/* Platform page styles, sharp corners throughout */

.platform-tabs-section { padding-top: 0; }
.platform-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--outline-variant);
  margin-bottom: 56px;
}
.platform-tab {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px 28px;
  position: relative;
  transition: color var(--transition-fast);
}
.platform-tab::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background-color: var(--primary);
  transition: width var(--transition-base);
}
.platform-tab:hover { color: var(--primary); }
.platform-tab.is-active { color: var(--primary); }
.platform-tab.is-active::after { width: 100%; }

.platform-tab-content { display: none; }
.platform-tab-content.is-active { display: block; }

.tab-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: start;
}
.tech-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 32px;
}
.tech-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  color: var(--on-surface-variant);
  padding: 14px 0;
  border-bottom: 1px solid var(--outline-variant);
  line-height: 1.5;
}
.tech-list li strong {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bio-moss);
  flex-shrink: 0;
}
.tech-metric-card {
  background-color: var(--primary);
  border-radius: 0;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.metric { display: flex; flex-direction: column; gap: 6px; }
.metric__val {
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-fixed);
  letter-spacing: 0.01em;
}
.metric__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-primary-container);
  letter-spacing: 0.04em;
}

/* --- Module sections --- */
.module-section { display: flex; flex-direction: column; gap: 56px; }
.module-header { max-width: 680px; }
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: var(--outline-variant);
  border: 1px solid var(--outline-variant);
}
.module-feature {
  padding: 32px;
  background-color: var(--surface-container-lowest);
  transition: background-color var(--transition-fast);
}
.module-feature:hover { background-color: var(--surface-container-low); }
.module-feature h4 {
  font-family: var(--font-subhead);
  font-size: 16px;
  font-weight: var(--weight-subhead);
  color: var(--on-surface);
  margin-bottom: 8px;
}
.module-feature p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-surface-variant);
}

/* --- Specs table --- */
.specs-table {
  border: 1px solid var(--outline-variant);
  border-radius: 0;
  overflow: hidden;
}
.specs-table__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  padding: 16px 28px;
  background-color: var(--surface-container);
  border-bottom: 1px solid var(--outline-variant);
}
.specs-rows { display: flex; flex-direction: column; }
.specs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  border-bottom: 1px solid var(--outline-variant);
}
.specs-row:last-child { border-bottom: none; }
.specs-row span { font-size: 14px; color: var(--on-surface-variant); }
.specs-row strong {
  font-family: var(--font-subhead);
  font-size: 14px;
  font-weight: var(--weight-subhead);
  color: var(--on-surface);
}

/* --- Specs CTA card --- */
.specs-cta { max-width: 720px; margin: 0 auto; padding: 56px 48px; }

/* --- FAQ ---
   Full-width rows: hairlines to both screen edges, questions at display size.
   The open question floods Forest Green; its answer sits on white below it.
   Multi-paragraph answers (the <div> ones) flow into two columns on wide
   screens so they do not become one very long line; single-paragraph answers
   stay in one readable column. */
.faq-list { border-top: 1px solid var(--outline); margin-top: 0; }
.faq-item { border-bottom: 1px solid var(--outline); }
.faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: clamp(20px, 2.2vw, 30px) var(--bleed-pad);
  font-family: var(--font-subhead);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: var(--weight-subhead);
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--on-surface);
  cursor: pointer;
  list-style: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.faq-item__question::-webkit-details-marker { display: none; }
.faq-item__question::after {
  content: '+';
  flex-shrink: 0;
  font-weight: 300;
  font-size: 1.4em;
  line-height: 0.8;
  color: var(--primary);
}
.faq-item__question:hover { background-color: var(--surface-container-lowest); }
.faq-item[open] .faq-item__question {
  background-color: var(--dark-surface);
  color: var(--primary-fixed);
}
.faq-item[open] .faq-item__question::after { content: '\2212'; color: var(--inverse-primary); }
.faq-item__question:focus-visible { outline-offset: -3px; }
.faq-item[open] .faq-item__question:focus-visible { outline-color: var(--inverse-primary); }
.faq-item__answer {
  margin: 0;
  padding: 28px var(--bleed-pad) 36px;
  background-color: var(--surface-container-lowest);
  font-size: 16px;
  line-height: 1.7;
  color: var(--on-surface-variant);
}
/* A one-paragraph answer is the <p> itself, so a max-width would also shrink its
   white ground. The measure is held with right padding instead. */
p.faq-item__answer { padding-right: max(var(--bleed-pad), calc(100% - 78ch - var(--bleed-pad))); }
div.faq-item__answer {
  columns: 2 36ch;
  column-gap: 56px;
}
div.faq-item__answer > p { max-width: none; break-inside: avoid; }

@media (max-width: 1024px) {
  .tab-grid { grid-template-columns: 1fr; }
  .tech-metric-card { display: none; }
  .module-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .platform-tabs { overflow-x: auto; }
  .platform-tab { padding: 16px 20px; white-space: nowrap; }
  .specs-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* --- The bio-reactor: process flow ---
   Four steps across the full width, hairlines to both screen edges, the two
   products on a Sprout Green step at the end. The arrows are CSS and carry an
   empty alt text, so a screen reader hears the ordered list, not "right arrow". */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr);
  border-top: 1px solid var(--dark-border);
  border-bottom: 1px solid var(--dark-border);
}
.flow__step {
  position: relative;
  padding: clamp(32px, 3.4vw, 48px) clamp(24px, 2.6vw, 40px);
  border-left: 1px solid var(--dark-border);
}
.flow__step:first-child { border-left: 0; padding-left: var(--bleed-pad); }
.flow__step:not(.flow__step--out)::after {
  content: "\2192" / "";
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  transform: translate(50%, -50%);
  background-color: var(--dark-surface);
  border: 1px solid var(--dark-border);
  color: var(--inverse-primary);
  font-size: 16px;
}
.flow__step--out {
  display: grid;
  padding: 0;
  border-left: 0;
  background-color: var(--accent);
  color: var(--on-accent);
}
.flow__product { padding: clamp(28px, 3vw, 40px) var(--bleed-pad) clamp(28px, 3vw, 40px) clamp(32px, 3vw, 48px); }
.flow__product + .flow__product { border-top: 1px solid rgba(21, 33, 22, 0.25); }
.flow__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--inverse-primary);
  margin-bottom: 12px;
}
.flow__step--out .flow__label { color: var(--on-accent); }
.flow__title {
  font-family: var(--font-subhead);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: var(--weight-subhead);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--primary-fixed);
  margin: 0 0 10px;
}
.flow__step--out .flow__title { color: var(--on-accent); }
.flow__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-primary-container);
  margin: 0;
  max-width: 34ch;
}
.flow__step--out .flow__body { color: var(--on-accent); }
.flow__note {
  margin-top: 32px;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--on-primary-container);
}
.flow__note strong { color: var(--on-dark); }
.flow__note a { color: var(--inverse-primary); text-decoration: underline; text-underline-offset: 3px; }
.section--dark :focus-visible { outline-color: var(--inverse-primary); }

/* --- Market opportunity: two numbers split on a diagonal ---
   Edge to edge. The green side is the ground; the light side is a clipped
   overlay on top of it. Done this way round so that if clip-path is ever
   unsupported the fallback below can simply drop the overlay rather than
   leaving white text on a white field. */
.diagonal {
  position: relative;
  overflow: hidden;
  background-color: var(--primary);
}
.diagonal::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--surface-container-lowest);
  clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%);
}
.diagonal__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  min-height: clamp(380px, 34vw, 540px);
  padding: clamp(56px, 6vw, 96px) var(--bleed-pad);
  align-items: center;
}
.diagonal__half { display: flex; flex-direction: column; gap: 12px; }
/* Keep the copy clear of the diagonal on both sides. */
.diagonal__half--cost { padding-right: 18%; }
.diagonal__half--value { padding-left: 18%; text-align: right; align-items: flex-end; }

.diagonal__basis {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.diagonal__value {
  font-family: var(--font-headline);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.01em;
}
.diagonal__body { font-size: 16px; line-height: 1.6; margin: 0; max-width: 30ch; }

.diagonal__half--cost .diagonal__basis { color: var(--outline); }
.diagonal__half--cost .diagonal__value { color: var(--primary); }
.diagonal__half--cost .diagonal__body { color: var(--on-surface-variant); }

/* Same reason as the comparison check mark: --inverse-primary is a Forest Green
   token and fails on the lighter --primary ground. */
.diagonal__half--value .diagonal__basis { color: var(--primary-fixed); }
.diagonal__half--value .diagonal__value { color: var(--cloud-white); }
.diagonal__half--value .diagonal__body { color: rgba(255,255,255,0.92); }

@supports not (clip-path: polygon(0 0, 1px 0, 1px 1px)) {
  .diagonal::before { display: none; }
  .diagonal__inner { grid-template-columns: 1fr; padding: 0; }
  .diagonal__half--cost {
    padding: 40px var(--bleed-pad);
    background-color: var(--surface-container-lowest);
  }
  .diagonal__half--value { padding: 40px var(--bleed-pad); text-align: left; align-items: flex-start; }
}

/* --- Why we build: manifesto ---
   The founder story set large across the full width in two columns, ending on
   its closing sentence at display size. */
.manifesto {
  background-color: var(--dark-surface-deep);
  color: var(--on-primary-container);
}
.manifesto .section__eyebrow { color: var(--inverse-primary); }
.manifesto__story {
  margin: 8px 0 0;
  font-family: var(--font-subhead);
  font-size: clamp(1.15rem, 1.9vw, 1.65rem);
  font-weight: var(--weight-body);
  line-height: 1.5;
  color: var(--on-primary-container);
  columns: 2 30ch;
  column-gap: clamp(40px, 5vw, 80px);
}
.manifesto__story strong { color: var(--on-dark); font-weight: 700; }
.manifesto__line {
  margin: clamp(40px, 5vw, 72px) 0 0;
  padding-top: clamp(28px, 3vw, 44px);
  border-top: 1px solid var(--dark-border);
  font-family: var(--font-headline);
  font-size: clamp(2.4rem, 6.6vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--inverse-primary);
  text-wrap: balance;
}

/* --- Values: three colour stripes ---
   Light to dark, full width, each with a solid numeral that bleeds off the
   bottom edge of its stripe. */
.values { list-style: none; margin: 0; padding: 0; }
.value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  min-height: clamp(240px, 24vw, 340px);
  overflow: hidden;
}
.value:nth-child(1) { background-color: var(--surface); color: var(--on-surface); }
.value:nth-child(2) { background-color: var(--accent); color: var(--on-accent); }
.value:nth-child(3) { background-color: var(--dark-surface); color: var(--on-primary-container); }
.value__num {
  padding-left: var(--bleed-pad);
  font-family: var(--font-headline);
  font-size: clamp(7rem, 17vw, 15rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0.01em;
  margin-bottom: -0.06em;
}
.value:nth-child(1) .value__num { color: var(--primary); }
.value:nth-child(2) .value__num { color: var(--on-accent); }
.value:nth-child(3) .value__num { color: var(--inverse-primary); }
.value__text {
  align-self: center;
  padding: clamp(40px, 5vw, 72px) var(--bleed-pad) clamp(40px, 5vw, 72px) 0;
}
.value__title {
  font-family: var(--font-subhead);
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: var(--weight-subhead);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
}
.value:nth-child(3) .value__title { color: var(--primary-fixed); }
.value__text p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  max-width: 52ch;
}

@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow__step,
  .flow__step:first-child { border-left: 0; border-top: 1px solid var(--dark-border); padding: 32px var(--bleed-pad); }
  .flow__step:first-child { border-top: 0; }
  .flow__step:not(.flow__step--out)::after {
    top: auto;
    bottom: 0;
    right: auto;
    left: var(--bleed-pad);
    transform: translateY(50%) rotate(90deg);
  }
  .flow__product { padding: 32px var(--bleed-pad); }

  .diagonal::before { display: none; }
  .diagonal__inner { grid-template-columns: 1fr; gap: 0; padding: 0; min-height: 0; }
  .diagonal__half { padding: 40px var(--bleed-pad); }
  .diagonal__half--cost { background-color: var(--surface-container-lowest); }
  .diagonal__half--value { text-align: left; align-items: flex-start; }

  .manifesto__story { columns: 1; }

  .value { grid-template-columns: 1fr; }
  .value__text { order: -1; padding: 40px var(--bleed-pad) 20px; }
  .value__num { font-size: clamp(6rem, 30vw, 9rem); }
}

/* Answers now hold multiple paragraphs and a source line, so the block is a
   <div>. The single-<p> rule above still applies to the older entries. */
.faq-item__answer p { margin: 0 0 12px; }
.faq-item__answer p:last-child { margin-bottom: 0; }
.faq-item__source {
  font-size: 13px;
  line-height: 1.6;
  color: var(--outline);
}
.faq-item__source a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
