/* ============================================================
   Home page — unique to index.html
   Builds on design.css
   ============================================================ */

/* ---------------- Hero ---------------- */
.hero-section {
  padding-top: clamp(60px, 8vw, 110px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.hero-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 64px;
}
@media (max-width: 720px) {
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 36px; }
}
.hero-head h1 {
  font-size: clamp(44px, 8.2vw, 144px);
  letter-spacing: -0.04em;
  line-height: 0.92;
  text-wrap: balance;
}
.hero-foot {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--gap);
  align-items: end;
}
@media (max-width: 900px) {
  .hero-foot { grid-template-columns: 1fr; gap: 40px; }
}

/* "What it replaces" stamp card */
.stamp-card {
  border: 1px solid var(--ink);
  background: var(--paper-warm);
  padding: 22px 22px 24px;
  position: relative;
  max-width: 360px;
  margin-left: auto;
  transform: rotate(0.6deg);
}
.stamp-card::before {
  content: "MEMO"; position: absolute; top: -10px; left: 18px;
  background: var(--bone); padding: 0 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--signal);
}
.stamp-card-top {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
  margin-bottom: 16px;
}
.stamp-list {
  list-style: none; display: flex; flex-direction: column; gap: 8px;
  font-family: var(--display); font-size: 22px; font-weight: 400;
}
.stamp-list li s { text-decoration-color: var(--signal-soft); text-decoration-thickness: 1px; color: var(--ink-3); }

.hero-rule-row {
  display: flex; justify-content: space-between; padding-top: 14px;
}

/* ---------------- System diagram (02 · The system) ----------------
   Three-column architecture: [inputs | brain | outcomes].
   Fixed-pixel canvas (1280×680) so the SVG arrow layer can pixel-align
   with column geometry. Canvas scales down inside a container query.
*/
.sys-canvas-frame {
  background: var(--paper-warm);
  border: 1px solid var(--ink);
  padding: 28px clamp(20px, 2vw, 36px) 24px;
  container-type: inline-size;
  /* The canvas inside is a fixed 1280px box that is only shrunk visually with
     transform: scale(); its layout box still extends to 1280px. Clip it here so
     it never overflows the frame (and the page) on narrow screens. */
  overflow: hidden;
}

.sys-canvas {
  position: relative;
  width: 1280px;
  height: 680px;
  margin: 0 auto;
  transform-origin: top left;
  /* Inputs hugged left, outputs hugged right — brain gets the breathing room. */
  display: grid;
  grid-template-columns: 240px 680px 240px;
  column-gap: 60px;
}
@container (max-width: 1280px) {
  .sys-canvas {
    transform: scale(calc((100cqw - 60px) / 1280px));
  }
  .sys-canvas {
    margin-bottom: calc((100cqw - 60px) * 680 / 1280 - 680px);
  }
}

/* ---- Column headers (sit in the top area of the canvas) ---- */
.sys-colhead {
  position: absolute;
  top: 0;
  text-align: left;
  z-index: 4;
}
.sys-colhead-mid { left: 300px;  width: 680px; text-align: center; }
.sys-colhead-out { left: 1040px; width: 240px; }
.sys-colhead .sys-tag {
  display: inline-block;
  margin: 0 0 8px 0;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sys-colhead .sys-tag-signal { background: var(--signal); color: var(--bone); }
.sys-colhead .eyebrow {
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.16em;
}
.sys-colhead .eyebrow .num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  margin-left: 4px;
}
.sys-colhead-mid p,
.sys-colhead-out p {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 38ch;
}
.sys-colhead-mid p { margin-left: auto; margin-right: auto; }

/* ---- Arrow layer (overlay, drawn on top of column rules) ---- */
.sys-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}
.arr-fill.arr-ink       { fill: var(--ink); }
.arr-fill.arr-ink-soft  { fill: var(--ink); opacity: 0.45; }
.arr-fill.arr-signal    { fill: var(--signal); }
.arr-line               { fill: none; stroke-width: 2; stroke-linecap: square; }
.arr-line.arr-ink       { stroke: var(--ink); }
.arr-line.arr-signal    { stroke: var(--signal); }
/* Trunk-arrow labels — white mono caps text rendered inside the arrow body */
.arr-text {
  fill: var(--bone);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---- Generic column ---- */
.sys-col {
  position: relative;
  height: 100%;
  z-index: 2;
}

/* ============ COL 1 · INPUTS ============
   Input rows are absolutely positioned at known canvas-y values so the SVG
   arrow layer can pixel-align with them. Three semantic groups (top/mid/bot)
   exist in the markup for accessibility and lane-color styling. */
.sys-col-inputs { padding-right: 0; }
.sys-input-group { list-style: none; display: contents; }

.sys-input {
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  display: grid;
  grid-template-columns: 1fr 60px;
  gap: 16px;
  align-items: center;
}
.sys-input-label {
  display: flex;
  flex-direction: column;
  text-align: right;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}
.sys-input-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bone);
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  justify-self: end;
}
.sys-input-icon svg { color: var(--ink); }

/* Inputs all share one visual treatment — they represent the same unified data flow */

/* ============ COL 2 · BRAIN ============ */
.sys-col-brain {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sys-brain-wrap {
  position: relative;
  width: 460px;
  height: 460px;
}
.sys-brain-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

/* Assumption pills — icon + label, sit on top of brain illustration */
.sys-pill {
  position: absolute;
  background: var(--bone);
  border: 1.5px solid var(--ink);
  padding: 8px 12px 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
  box-shadow: 0 1px 0 rgba(20,17,13,0.06);
  white-space: nowrap;
}
.sys-pill-icon {
  display: grid;
  place-items: center;
  color: var(--ink);
  flex-shrink: 0;
}
.sys-pill-text {
  display: inline-flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}
.sys-pill-text strong {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.sys-pill-text em {
  font-style: normal;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Triangle layout inside the 460×460 brain wrap.
   TL is shifted right so the top trunk arrowhead (which ends at canvas x=432)
   sits clear of the pill body. */
.sys-pill-tl { left: 30px;   top: 80px;  }
.sys-pill-tr { left: 252px;  top: 80px;  }
.sys-pill-bm { left: 92px;   top: 350px; }

/* ============ COL 3 · OUTCOMES ============
   Outcome items absolutely positioned at canvas-y so output arrows align. */
.sys-out-item {
  position: absolute;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  align-items: start;
}
.sys-out-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--bone);
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
}
.sys-out-icon svg { color: var(--ink); }
.sys-out-body h4 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
  color: var(--ink);
}
.sys-out-body p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---- Caption row below canvas ---- */
.sys-cap {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.sys-fig {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The system canvas keeps its exact desktop composition on every screen —
   the @container rule above scales the whole 1280×680 figure down to fit
   narrow viewports, so it looks identical (just smaller) on phones/tablets
   rather than reflowing into a cluttered stack. */
@media (max-width: 640px) {
  .sys-cap { flex-wrap: wrap; gap: 12px; }
}

/* ---------------- Proof trio ---------------- */
.proof-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.proof-row.proof-row-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  .proof-row.proof-row-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .proof-row, .proof-row.proof-row-4 { grid-template-columns: 1fr; }
}
.proof-card {
  border-top: 1px solid var(--ink);
  padding: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.proof-card-top {
  display: flex; align-items: baseline; gap: 12px;
}
.proof-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  color: var(--signal);
}
.proof-key {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.proof-v {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-style: italic;
}
.proof-card p { max-width: 38ch; font-size: 15px; }

/* ---------------- Problem band ---------------- */
.problem-band {
  background: var(--paper-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.pb-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(48px, 8vw, 120px);
  align-items: start;
}
@media (max-width: 900px) {
  .pb-grid { grid-template-columns: 1fr; gap: 56px; }
}
.pb-head { max-width: 920px; }
.pb-title { font-size: clamp(40px, 5vw, 72px); margin-top: 18px; line-height: 1.0; }
.pb-lede { margin-top: 24px; max-width: 64ch; }
.problem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 56px;
  align-items: start;
}
@media (max-width: 760px) { .problem-cards { grid-template-columns: 1fr; } }
.problem-card {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
  display: grid;
  /* align all inner rows so figures, labels and text line up across cards */
  grid-template-rows: auto auto auto 1fr;
}
.problem-card .roman {
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.problem-card .pc-fig {
  font-size: clamp(48px, 5.5vw, 76px);
  line-height: 0.9;
  margin-bottom: 16px;
}
.problem-card .pc-fig .unit {
  font-size: 0.32em; font-style: italic; color: var(--muted);
  margin-left: 4px; letter-spacing: 0;
}
.problem-card h4 {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 12px;
}
.problem-card p {
  font-size: 14px; line-height: 1.55; color: var(--ink-2);
  max-width: 40ch;
}
/* 2026 inflection band — big figure beside its own text */
.pb-inflection {
  margin-top: 64px;
  border-top: 1px solid var(--rule);
  padding-top: 40px;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) 1.2fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
@media (max-width: 760px) { .pb-inflection { grid-template-columns: 1fr; gap: 36px; } }
.pb-inflection-fig .numplate { font-size: clamp(56px, 8vw, 104px); line-height: 0.86; }
.pb-inflection-fig .numplate-lbl { margin-top: 14px; }
.pb-inflection-body .body { margin-top: 18px; max-width: 56ch; }
.pb-inflection-body .btn { margin-top: 28px; }

/* ---------------- Intro film ---------------- */
.section-film { padding-top: 0; }
.film-frame {
  position: relative;
  margin-top: 48px;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--ink);
}
.film-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.film-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; gap: 20px;
  padding: clamp(20px, 3vw, 40px);
  background: linear-gradient(to top, rgba(20,17,13,0.72) 0%, rgba(20,17,13,0.15) 45%, rgba(20,17,13,0.28) 100%);
  border: 0; cursor: pointer; text-align: left;
  color: var(--bone, #efeae0);
  transition: background 0.3s ease;
}
.film-overlay:hover { background: linear-gradient(to top, rgba(20,17,13,0.78) 0%, rgba(20,17,13,0.2) 50%, rgba(20,17,13,0.34) 100%); }
.film-play {
  flex: 0 0 auto;
  width: clamp(56px, 6vw, 84px); height: clamp(56px, 6vw, 84px);
  border-radius: 50%;
  background: var(--signal);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease;
}
.film-overlay:hover .film-play { transform: scale(1.06); }
.film-meta { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
.film-kicker { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.7; }
.film-runtime { font-size: 14px; letter-spacing: 0.04em; }
.film-tag {
  position: absolute; top: clamp(16px, 2.4vw, 28px); right: clamp(16px, 2.4vw, 28px);
  font-size: 10px; letter-spacing: 0.2em; color: rgba(239,234,224,0.7);
  pointer-events: none;
}
.film-frame.is-playing .film-tag { display: none; }

/* ---------------- Closing CTA ----------------
   Light, editorial close — warm paper with signal-orange title.
   Distinct from the dark footer immediately below it. */
.closing {
  background: var(--paper-warm, var(--bone));
  color: var(--ink);
  padding: clamp(100px, 12vw, 180px) 0 clamp(80px, 10vw, 140px);
  margin-bottom: 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.closing::before {
  /* full-width hairline above the eyebrow, with a signal tick */
  content: "";
  position: absolute;
  top: clamp(60px, 8vw, 110px);
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--ink);
  opacity: 0.18;
}
.closing .eyebrow { color: var(--muted); }
.closing .eyebrow .num { color: var(--ink); }
.closing h2 { color: var(--ink); }
.closing h2 em.signal { color: var(--signal); }
.closing p { color: var(--ink-2); max-width: 50ch; }
.closing .btn-ghost { color: var(--ink); border-color: var(--rule-strong); }
.closing .btn-ghost:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.closing-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(48px, 8vw, 120px);
  align-items: end;
}
@media (max-width: 900px) {
  .closing-grid { grid-template-columns: 1fr; }
}
