/* =============================================================
   Vindexa — Homepage v4 — themed (light/dark) + scroll reveals
   ----------------------------------------------------------------
   Color discipline: near-white as default, cream as one accent
   (The File section), dark as structural anchor (How it works),
   deep forest as the closer. Gold reserved for the seal + the
   $5,000 callout — nowhere else.

   THEMING — every section reads from semantic variables:
     --bg / --bg-accent / --bg-card / --bg-hover / --bg-anchor
     --text-strong / --text-body / --text / --text-muted / --text-faint
     --accent (forest in light, sage in dark), --gold, --risk
   html[data-theme="dark"] re-maps them. Surfaces that are
   "physically" colored — the Golden Record file card (paper),
   the closing (forest), the seal (gold) — stay fixed in both
   themes; they are objects, not chrome.

   Type discipline: three clear tiers.
     Tier 1 — .t-section : section headlines, the largest move
     Tier 2 — .t-subhead : confident subsection heads
     Tier 3 — body copy  : paragraph-scale, readable
     plus  — .t-eyebrow  : tiny mono metadata
   ============================================================= */

:root {
  /* Raw palette — paper + forest + (rare) gold.
     Forest 700 is the CTA; forest 800 is the closing section. */
  --paper:        #faf7f0;
  --paper-warm:   #f0eadb;   /* the one cream accent surface */
  --forest-700:   #1f4d38;
  --forest-600:   #265b43;
  --forest-800:   #16382a;
  --forest-100:   #d8e2da;

  --gold-500:     #a87f33;
  --gold-400:     #c19a4a;
  --gold-300:     #d4a85a;
  --gold-100:     #e8d3a0;

  /* ---- semantic: light (default) ---- */
  --bg:            var(--paper);
  --bg-accent:     var(--paper-warm);
  --bg-card:       #ffffff;
  --bg-hover:      #ffffff;
  --legend-bg:     var(--sand-50);
  --bg-anchor:     var(--ink-800);    /* steps + footer */

  --text-strong:   var(--ink-800);
  --text-body:     var(--ink-700);
  --text:          var(--ink-500);
  --text-muted:    var(--ink-400);
  --text-faint:    var(--ink-300);

  --accent:        var(--forest-700); /* em phrases, links, checks */
  --accent-strong: var(--forest-800);
  --sage-accent:   var(--sage-700);   /* "in budget" family */
  --risk:          var(--action-600); /* "off the books" family */
  --risk-soft:     var(--action-500);
  --gold:          var(--gold-500);

  --rule:          rgba(18, 15, 10, 0.10);
  --rule-strong:   rgba(18, 15, 10, 0.22);
  --bar-ring:      rgba(18, 15, 10, 0.09);

  --nav-bg:           rgba(250, 247, 240, 0.78);
  --nav-bg-scrolled:  rgba(250, 247, 240, 0.95);

  --btn-primary-bg:    var(--forest-700);
  --btn-primary-fg:    var(--paper);
  --btn-primary-hover: var(--forest-800);
  --btn-secondary-hover-bg: rgba(18, 15, 10, 0.03);

  --tip-bg:        var(--ink-800);
  --tip-fg:        var(--sand-50);
  --tip-border:    transparent;

  --grain-blend:   multiply;
  --grain-opacity: 0.25;
}

/* ---- semantic: dark — "the operations room" ----
   Deep green-black, cream type, gold and sage doing the
   accent work. Paper objects (file card, seal) stay paper.
   Section rhythm mirrors light mode's chambers: green body →
   warm umber File chamber → warm near-black anchors → forest
   closer. Not one palette top to bottom. */
html[data-theme="dark"] {
  --bg:            #0f1712;
  --bg-accent:     #1b1610;   /* The File — warm umber chamber (dark analog of cream) */
  --bg-card:       #161f18;
  --bg-hover:      #1d2820;
  --legend-bg:     #141d17;
  --bg-anchor:     #0b0a07;   /* steps + footer — warm near-black, off the green axis */

  --text-strong:   #f1ecdc;
  --text-body:     #d3cdb9;
  --text:          #b3ae9a;
  --text-muted:    #8e8975;
  --text-faint:    #6c685b;

  --accent:        #a7b98c;   /* sage-300 — forest is invisible on dark */
  --accent-strong: #c4d2b1;
  --sage-accent:   #a7b98c;
  --risk:          #f4836a;
  --risk-soft:     #f47452;
  --gold:          var(--gold-300);

  --rule:          rgba(241, 236, 220, 0.10);
  --rule-strong:   rgba(241, 236, 220, 0.26);
  --bar-ring:      rgba(241, 236, 220, 0.14);

  --nav-bg:           rgba(15, 23, 18, 0.72);
  --nav-bg-scrolled:  rgba(15, 23, 18, 0.92);

  --btn-primary-bg:    #f1ecdc;
  --btn-primary-fg:    var(--forest-800);
  --btn-primary-hover: #ffffff;
  --btn-secondary-hover-bg: rgba(241, 236, 220, 0.05);

  --tip-bg:        #1d2820;
  --tip-fg:        var(--sand-50);
  --tip-border:    rgba(241, 236, 220, 0.16);

  --grain-blend:   screen;
  --grain-opacity: 0.12;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-strong);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 280ms var(--ease-standard), color 280ms var(--ease-standard);
}

a { color: inherit; text-decoration: none; }

html[data-theme="dark"] ::selection { background: var(--sage-800); color: var(--sand-50); }

/* Subtle warm grain over the whole page — gives near-white
   real texture without reading as a graphic. In dark it
   blends in screen mode so it lifts instead of muddying. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.06 0 0 0 0 0.04 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 36px;
  position: relative;
  z-index: 2;
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
}

/* ============================================================
   TYPE TIERS
   ============================================================ */

/* Tier 1 — section headlines */
.t-section {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  text-wrap: balance;
  margin: 0;
}

/* Tier 2 — subsection heads (sits between section + body) */
.t-subhead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  margin: 0;
}

/* Tier 3 — body */
.t-body, p {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}
.t-body-sm { font-size: 14.5px; line-height: 1.55; color: var(--text); }
.t-lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
  max-width: 520px;
  margin: 0;
}

/* Tier 0 — eyebrow / metadata */
.t-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.t-eyebrow .num { color: var(--text-faint); }
.t-eyebrow .rule { width: 36px; height: 1px; background: var(--text-faint); }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms, background 200ms;
}
.nav.scrolled {
  border-bottom-color: var(--rule);
  background: var(--nav-bg-scrolled);
}
.nav-inner {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-brand img { height: 38px; display: block; }
html[data-theme="dark"] .nav-brand img { filter: brightness(0) invert(0.93); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 120ms;
}
.nav-links a:hover { color: var(--text-strong); }
.nav-cta { display: inline-flex; align-items: center; gap: 4px; }

/* Theme toggle — quiet instrument switch */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  margin-right: 4px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 120ms, border-color 120ms;
}
.theme-toggle:hover { color: var(--text-strong); border-color: var(--rule-strong); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: all 160ms var(--ease-standard);
  white-space: nowrap;
}
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-bg);
}
.btn-primary:hover { background: var(--btn-primary-hover); border-color: var(--btn-primary-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--rule-strong);
}
.btn-secondary:hover { border-color: var(--text-strong); background: var(--btn-secondary-hover-bg); }
.btn-ghost {
  background: transparent;
  color: var(--text-strong);
  border-color: transparent;
  padding: 0 10px;
}
.btn-ghost:hover { color: var(--accent); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn-arrow { display: inline-block; transition: transform 160ms var(--ease-standard); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* Closing-section button: cream on forest (fixed, both themes) */
.btn-on-forest {
  background: var(--paper);
  color: var(--forest-800);
  border-color: var(--paper);
}
.btn-on-forest:hover { background: #fff; border-color: #fff; }
.btn-on-forest-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(250, 247, 240, 0.45);
}
.btn-on-forest-ghost:hover { border-color: var(--paper); background: rgba(255,255,255,0.05); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 64px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  text-wrap: balance;
  margin: 0;
}
.hero-headline .l1 {
  font-weight: 400;
  color: var(--text-faint);
  display: block;
  font-size: 0.46em;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 18px;
}
.hero-headline .l2 { display: block; }
.hero-headline em {
  font-style: normal;
  color: var(--accent);
}

.hero-lede {
  margin-top: 32px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
  max-width: 480px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-backers {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-backers .key { color: var(--text-faint); }
.hero-backers .v { color: var(--text-strong); font-weight: 500; }

/* Seal stage */
.seal-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 540px;
}
.seal {
  width: 100%;
  max-width: 540px;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 56px rgba(18,15,10,0.10))
          drop-shadow(0 4px 14px rgba(168,127,51,0.20));
}
html[data-theme="dark"] .seal {
  filter: drop-shadow(0 24px 56px rgba(0,0,0,0.5))
          drop-shadow(0 4px 18px rgba(212,168,90,0.16));
}
.seal-rotor {
  transform-origin: 250px 250px;
  animation: seal-spin 120s linear infinite;
}
@keyframes seal-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .seal-rotor { animation: none; }
}

/* ============================================================
   TICKER STRIP  —  what Vindexa monitors
   Honest, scope-of-coverage list. Slow scroll, pauses on hover.
   ============================================================ */
.ticker-strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 2;
  background: var(--bg);
}
.ticker-frame {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 36px;
  padding: 22px 36px;
  position: relative;
}
.ticker-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  padding-right: 28px;
  border-right: 1px solid var(--rule);
}
.ticker-track {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
.ticker-row {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 90s linear infinite;
  width: max-content;
}
.ticker-strip:hover .ticker-row { animation-play-state: paused; }
.ticker-row span {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-body);
  letter-spacing: -0.005em;
  padding: 0 18px;
}
.ticker-row span.dot {
  color: var(--gold);
  padding: 0;
  font-size: 16px;
  opacity: 0.7;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 640px) {
  .ticker-frame { grid-template-columns: 1fr; gap: 14px; padding: 16px 20px; }
  .ticker-label { border-right: none; padding-right: 0; }
}

/* ============================================================
   THE FILE  —  the cream accent section
   ============================================================ */
.thefile {
  padding: 140px 0;
  background: var(--bg-accent);
  position: relative;
}
.thefile::before {
  /* hairline rules top and bottom mark this as the warm chamber */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.thefile-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 96px;
  align-items: center;
}
.thefile h2 {
  margin: 22px 0 0;
}
.thefile h2 em {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
}
.thefile p.lede {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
  max-width: 460px;
}
.thefile .kvs {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
  max-width: 480px;
}
.thefile .kv {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.thefile .kv .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.thefile .kv .v {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text-strong);
}

/* The rendered "Golden Record" document — a paper object.
   It stays paper in both themes; on dark it reads as the one
   physical artifact in the room. */
.filecard-stage {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}
.filecard {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 1.32;
  background: #fbf8ef;
  border: 1px solid rgba(18, 15, 10, 0.10);
  border-radius: 4px;
  padding: 40px 36px 28px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 32px 64px -12px rgba(18,15,10,0.18),
    0 10px 22px -6px rgba(18,15,10,0.10);
  transform: rotate(-1.2deg);
  transition: transform 600ms var(--ease-standard);
  overflow: hidden;
}
html[data-theme="dark"] .filecard {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 32px 64px -12px rgba(0,0,0,0.5),
    0 10px 22px -6px rgba(0,0,0,0.35);
}
.filecard:hover { transform: rotate(0deg); }
.filecard::before {
  content: "";
  position: absolute;
  inset: 10px 10px auto 10px;
  height: 1px;
  background: var(--gold-500);
  opacity: 0.6;
}
.filecard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/vindexa-mark.svg") center 60% / 70% no-repeat;
  opacity: 0.04;
  pointer-events: none;
}
.fc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  position: relative;
}
.fc-head .label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.fc-head .wordmark { height: 14px; }
.fc-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-800);
  margin-bottom: 6px;
}
.fc-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 28px;
}
.fc-rows { position: relative; }
.fc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(18,15,10,0.08);
  font-size: 13.5px;
}
.fc-row:last-child { border-bottom: 1px solid rgba(18,15,10,0.08); }
.fc-row .k { color: var(--ink-500); font-weight: 500; }
.fc-row .v {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-800);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fc-row .v .ok {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--forest-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fc-row .v .ok svg { width: 9px; height: 9px; color: var(--paper); }
.fc-foot {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 30px;
}
.fc-sig {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-400);
  line-height: 1.6;
}
.fc-sig .line {
  border-top: 1px solid var(--ink-800);
  margin-bottom: 6px;
  padding-top: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-800);
  text-transform: none;
  letter-spacing: 0;
}
.fc-stamp {
  position: absolute;
  right: -28px;
  bottom: 32px;
  width: 116px;
  height: 116px;
  transform: rotate(-12deg);
  filter: drop-shadow(0 4px 8px rgba(168,127,51,0.25));
}
.fc-stamp svg { width: 100%; height: 100%; }

/* ============================================================
   TOTAL COST OF COMPLIANCE  (#total-cost-of-compliance)
   One bar, two tiers: "in your budget today" (sage family) +
   "off the books today" (action family). Numbers count up,
   bar segments grow in, legend rows fade up on scroll-in.
   Hover/focus on a segment or row cross-highlights its pair.
   ============================================================ */
.coc {
  position: relative;
  padding: 140px 0;
  border-bottom: 1px solid var(--rule);
}
.coc-eyebrow { margin-bottom: 40px; }

/* ---- headline + lede ---- */
.coc-headline {
  max-width: 22ch;
}
.coc-headline b {
  color: var(--sage-accent);
  font-weight: inherit;
}
.coc-sub {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 56ch;
}
.coc-sub [data-counter] {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---- the bar ---- */
.coc-barwrap { position: relative; margin-top: 56px; }
.coc-bar {
  display: flex;
  width: 100%;
  height: 64px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--bar-ring);
}
.coc-seg {
  position: relative;
  flex: var(--seg-flex, 0) 1 0%;
  cursor: default;
  transform: scaleX(0);
  transform-origin: left center;
  transition:
    transform 1100ms var(--ease-emphasis) var(--seg-delay, 0ms),
    opacity   var(--dur-base) var(--ease-standard);
}
.coc-seg::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
  transition: box-shadow var(--dur-base) var(--ease-standard);
  pointer-events: none;
}
.coc-bar.in-view .coc-seg { transform: scaleX(1); }
.coc-barwrap.is-dim .coc-seg:not(.is-active) { opacity: 0.32; }
.coc-seg.is-active::after { box-shadow: inset 0 0 0 2px var(--text-strong); }

/* Segment palette — sage family = in budget, action family = off the books. */
.coc-seg--consult,  .sw.coc-seg--consult  { background: var(--sage-600); }
.coc-seg--internal, .sw.coc-seg--internal { background: var(--sage-500); }
.coc-seg--epc,      .sw.coc-seg--epc      { background: var(--sage-300); }
.coc-seg--pw,       .sw.coc-seg--pw       { background: var(--action-500); }
.coc-seg--appr,     .sw.coc-seg--appr     { background: var(--action-400); }
.coc-seg--tax,      .sw.coc-seg--tax      { background: var(--action-300); }
.coc-seg--counsel,  .sw.coc-seg--counsel  { background: #f0a07e; /* between action-300/400 */ }

/* ---- brackets under the bar ---- */
.coc-brackets {
  display: grid;
  grid-template-columns: 660fr 678.5fr;   /* budget : off-books totals */
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.coc-bracket {
  position: relative;
  padding: 14px 18px 0 0;
}
.coc-bracket::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 10px;
  height: 1px;
  background: var(--text-muted);
}
.coc-bracket::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 1px;
  height: 7px;
  background: var(--text-muted);
}
.coc-bracket b {
  display: block;
  font-weight: 600;
  color: var(--text-body);
}
.coc-bracket .amt {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.1vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  text-transform: none;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.coc-bracket--budget b { color: var(--sage-accent); }
.coc-bracket--risk   b { color: var(--risk); }

/* ---- legend: two columns, budget left / off-books right ---- */
.coc-legend {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.coc-col { background: var(--legend-bg); display: flex; flex-direction: column; }
.coc-col-head {
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.coc-col-head .amt {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.coc-col--budget .coc-col-head { color: var(--sage-accent); }
.coc-col--risk   .coc-col-head { color: var(--risk); }

.coc-row {
  padding: 16px 22px;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 14px;
  align-items: start;
  cursor: default;
  border-top: 1px solid var(--rule);
  /* fade-up entrance — applied only after .in-view lands */
  opacity: 0;
  transform: translateY(6px);
  transition:
    background var(--dur-base) var(--ease-standard),
    opacity 520ms var(--ease-standard) var(--row-delay, 0ms),
    transform 520ms var(--ease-standard) var(--row-delay, 0ms);
}
.coc-col .coc-row:first-of-type { border-top: none; }
[data-coc].in-view .coc-row { opacity: 1; transform: translateY(0); }
.coc-row:hover,
.coc-row.is-active { background: var(--bg-hover); }
.coc-row:focus-visible {
  outline: none;
  background: var(--bg-hover);
  box-shadow: var(--shadow-focus);
}
.coc-row .sw {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-top: 4px;
}
.coc-row-body { min-width: 0; }
.coc-row .name {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.coc-row .desc {
  display: block;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-muted);
  margin-top: 3px;
}
.coc-row-fig { text-align: right; white-space: nowrap; }
.coc-row .fig {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
  font-variant-numeric: tabular-nums;
}
.coc-row .coc-tier {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}
.coc-row .coc-tier.coc-tier--b { color: var(--sage-accent); }
.coc-row .coc-tier.coc-tier--r { color: var(--risk-soft); }

/* ---- resolve line ---- */
.coc-resolve {
  margin-top: 40px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 26px;
  border: 1px dashed var(--sage-500);
  background: rgba(127, 146, 103, 0.06);
  border-radius: var(--radius-sm);
}
.coc-resolve .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-accent);
  flex-shrink: 0;
  padding-top: 3px;
}
.coc-resolve .copy {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--text);
}
.coc-resolve .copy b {
  color: var(--text-strong);
  font-weight: 600;
}

/* ---- tooltip (presentation only) ---- */
.coc-tip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: var(--tip-bg);
  color: var(--tip-fg);
  border: 1px solid var(--tip-border);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  max-width: 260px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 120ms, transform 120ms;
}
.coc-tip.is-show { opacity: 1; transform: translateY(0); }
.coc-tip .tname {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.coc-tip .tfig {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--sage-300);
  margin-bottom: 6px;
}
.coc-tip .tdesc {
  font-size: 12px;
  line-height: 1.45;
  color: #cfc7b3;
}

@media (max-width: 960px) {
  .coc { padding: 100px 0; }
  .coc-headline { max-width: none; }
}
@media (max-width: 820px) {
  .coc { padding: 88px 0; }
  .coc-legend { grid-template-columns: 1fr; }
  .coc-bar { height: 56px; }
}

/* Respect reduced motion — show end states, skip choreography. */
@media (prefers-reduced-motion: reduce) {
  .coc-seg { transition: none; transform: scaleX(1); }
  .coc-row { opacity: 1; transform: none; transition: background var(--dur-base) var(--ease-standard); }
  .coc-tip { transition: none; }
}

/* ============================================================
   PROBLEM
   ============================================================ */
.problem {
  padding: 140px 0;
  border-bottom: 1px solid var(--rule);
}
.problem-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 80px;
  align-items: end;
}
.fine-display {
  display: flex;
  align-items: baseline;
  gap: 22px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--text-strong);
}
.fine-display .amt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(80px, 12vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.fine-display .leg {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  max-width: 200px;
  line-height: 1.55;
  padding-bottom: 12px;
}

/* the cure-window card */
.cure {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.cure-head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--rule);
}
.cure-head > span { white-space: nowrap; }
.cure-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cure-col {
  padding: 32px 28px 28px;
  border-right: 1px solid var(--rule);
}
.cure-col:last-child { border-right: none; }
.cure-col .way {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.cure-col.bad .way { color: var(--risk); }
.cure-col.good .way { color: var(--accent); }
.cure-col h4 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  margin: 0 0 14px;
}
.cure-col p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

/* ============================================================
   PILLARS  —  editorial, no cards, with a product moment
   ============================================================ */
.pillars {
  padding: 160px 0 140px;
  border-bottom: 1px solid var(--rule);
}
.pillars-head {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 80px;
}

/* PRODUCT MOMENT — anomaly detection card */
.product-moment {
  margin-bottom: 96px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.pm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pm-head .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.pm-head .live .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(31, 77, 56, 0.6);
  animation: pulse-forest 2.4s ease-in-out infinite;
}
@keyframes pulse-forest {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 77, 56, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(31, 77, 56, 0); }
}
.pm-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  align-items: stretch;
}
.pm-left { padding: 36px 28px 32px; border-right: 1px solid var(--rule); }
.pm-badge {
  display: inline-flex;
  align-items: center;
  background: var(--action-100);
  color: var(--action-700);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.pm-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0 0 6px;
}
.pm-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 26px;
}
.pm-detail {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 14px 28px;
  font-size: 14px;
  line-height: 1.5;
}
.pm-detail dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 2px;
}
.pm-detail dd {
  margin: 0;
  color: var(--text-body);
}
.pm-detail dd strong { color: var(--text-strong); font-weight: 600; }
.pm-detail .figure {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

/* Right side: timeline visualization */
.pm-right { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.pm-right .label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.pm-right .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pm-right .deadline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--risk);
  font-variant-numeric: tabular-nums;
}
.pm-timeline {
  flex: 1;
  position: relative;
  min-height: 200px;
}
.pm-timeline svg { width: 100%; height: 100%; display: block; }

.pm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text);
}
.pm-foot .right {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-strong);
  font-weight: 600;
}

/* the three editorial chapters */
.chapters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  border-top: 1px solid var(--text-strong);
  padding-top: 40px;
}
.chapter {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.chapter-icon {
  width: 64px;
  height: 64px;
  color: var(--text-strong);
  margin: 8px 0 8px;
}
.chapter-icon svg { width: 100%; height: 100%; display: block; }
.chapter h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}
.chapter p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
}
.chapter-link {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 160ms var(--ease-standard);
  cursor: pointer;
}
.chapter-link:hover { gap: 14px; }

/* ============================================================
   PERSONAS  —  editorial spread
   ============================================================ */
.personas {
  padding: 160px 0;
  border-bottom: 1px solid var(--rule);
}
.personas-head { max-width: 760px; margin-bottom: 96px; }
.personas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  position: relative;
}
.personas-grid::before {
  /* center hairline rule */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--rule);
  transform: translateX(-50%);
}
.persona-col { padding-right: 16px; }
.persona-col + .persona-col { padding-right: 0; padding-left: 32px; }
.persona-role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.persona-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin-bottom: 28px;
}
.persona-prose {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-body);
  margin-bottom: 18px;
  max-width: 440px;
}
.persona-prose strong { color: var(--text-strong); font-weight: 600; }
.persona-prose em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.persona-deliver {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  max-width: 440px;
}
.persona-deliver .kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.persona-deliver ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.persona-deliver li {
  display: grid;
  grid-template-columns: 24px 1fr;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
}
.persona-deliver li:first-child {
  border-top: none;
  padding-top: 0;
}
.persona-deliver .m {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  padding-top: 2px;
}

/* ============================================================
   HOW IT WORKS  —  dark, with scale variation across steps
   ============================================================ */
.steps-section {
  padding: 160px 0;
  background: var(--bg-anchor);
  color: var(--sand-300);
  position: relative;
}
.steps-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none;
}
.steps-section .container { z-index: 3; }
.steps-section h2 { color: var(--sand-50); }
.steps-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 80px;
}
.steps-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-400);
  margin-bottom: 32px;
}
.steps-eyebrow .rule { width: 36px; height: 1px; background: rgba(235,228,212,0.4); }
.steps-lede {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(235, 228, 212, 0.7);
  max-width: 440px;
}

/* equal-weight steps: all four are the product */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(168,127,51,0.45);
  border-bottom: 1px solid rgba(168,127,51,0.45);
}
.step {
  padding: 40px 26px 44px;
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.step:last-child { border-right: none; }
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold-400);
  text-transform: uppercase;
}
.step h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--sand-50);
  margin: 0;
  text-wrap: balance;
}
.step p {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(235, 228, 212, 0.66);
  margin: 0;
}
.step-mark {
  margin-top: auto;
  padding-top: 18px;
  color: var(--gold-400);
}

/* ============================================================
   PARTNERS
   ============================================================ */
.partners {
  padding: 140px 0;
  border-bottom: 1px solid var(--rule);
}
.partners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
}
.partner-names {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.partner-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.partner-row:last-child { border-bottom: 1px solid var(--rule); }
.partner-row::after {
  /* hairline that animates from 0 → full width when in view */
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 1100ms var(--ease-standard);
}
.partner-row.in-view::after { width: 100%; }
.partner-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 5.5vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--text-strong);
}
.partner-name .full {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 10px;
}
.partner-row .role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   TIERS
   ============================================================ */
.tiers {
  padding: 160px 0;
  border-bottom: 1px solid var(--rule);
}
.tiers-head { max-width: 760px; margin-bottom: 64px; }
.tiers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tier {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 44px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  min-height: 440px;
  transition: transform 200ms var(--ease-standard), border-color 200ms;
}
.tier:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.tier.dark {
  /* Deep forest, per the design-firm comps — branded, less severe
     than black, and one more color station on the page. */
  background: var(--forest-800);
  color: var(--sand-200);
  border-color: var(--forest-800);
}
html[data-theme="dark"] .tier.dark {
  border-color: rgba(241, 236, 220, 0.14);
}
.tier-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.tier.dark .tier-tag { color: rgba(255,255,255,0.4); }
.tier h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin: 0;
}
.tier.dark h3 { color: var(--sand-50); }
.tier .for {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}
.tier.dark .for { color: var(--sand-300); }
.tier-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tier-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  padding: 13px 0;
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.45;
  border-top: 1px solid var(--rule);
}
.tier-list li:first-child { border-top: none; }
.tier.dark .tier-list li { color: var(--sand-200); border-top-color: rgba(255,255,255,0.08); }
.tier-list svg { width: 14px; height: 14px; color: var(--accent); margin-top: 4px; }
.tier.dark .tier-list svg { color: var(--gold-300); }
.tier .who {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px dashed var(--rule);
  font-size: 13px;
  color: var(--text-muted);
}
.tier .who strong { color: var(--text-body); font-weight: 600; }
.tier.dark .who {
  border-top-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.55);
}
.tier.dark .who strong { color: var(--sand-100); }

/* ============================================================
   CLOSING  —  deep forest (fixed in both themes)
   ============================================================ */
.closing {
  padding: 180px 0;
  background: var(--forest-800);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0.16 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none;
}
.closing::after {
  /* faint warm glow center */
  content: "";
  position: absolute;
  top: 40%; left: 50%;
  width: 110vmax; height: 110vmax;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at center, rgba(212,168,90,0.10) 0%, rgba(212,168,90,0) 55%);
  pointer-events: none;
}
.closing-inner {
  position: relative;
  z-index: 2;
}
.closing-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 56px;
}
.closing-eyebrow .rule { width: 36px; height: 1px; background: var(--gold-500); opacity: 0.6; }
.closing-headline {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--paper);
  margin: 0;
  max-width: 1200px;
}
.closing-headline em {
  font-style: normal;
  color: var(--gold-300);
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .closing-headline em { white-space: normal; }
}
.closing-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 64px;
}
.closing-foot {
  margin-top: 36px;
  max-width: 380px;
  font-size: 13.5px;
  color: rgba(250, 247, 240, 0.55);
  line-height: 1.55;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ============================================================
   FOOTER  (fixed dark in both themes)
   ============================================================ */
footer {
  background: var(--bg-anchor);
  color: var(--sand-400);
  padding: 96px 0 36px;
  position: relative;
}
html[data-theme="dark"] footer { border-top: 1px solid rgba(241, 236, 220, 0.08); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.foot-brand .wm { height: 28px; filter: brightness(0) invert(1) opacity(0.92); }
.foot-brand .tag {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--sand-50);
  letter-spacing: -0.015em;
  max-width: 320px;
}
.foot-brand .pron {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  max-width: 320px;
  line-height: 1.55;
}
.foot-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 18px;
}
.foot-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.foot-col a {
  font-size: 14px;
  color: var(--sand-300);
  transition: color 120ms;
}
.foot-col a:hover { color: #fff; }
.foot-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.foot-bottom .lr { display: flex; gap: 24px; align-items: center; }

/* ============================================================
   REVEAL ON SCROLL — quiet editorial entrance. Elements carry
   data-reveal (optionally --reveal-delay for stagger); JS adds
   .revealed when they enter the viewport.
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 700ms var(--ease-standard) var(--reveal-delay, 0ms),
    transform 700ms var(--ease-standard) var(--reveal-delay, 0ms);
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .pm-body { grid-template-columns: 1fr; }
  .pm-left { border-right: none; border-bottom: 1px solid var(--rule); }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2n) { border-right: none; }
  .step:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.08); }
}
@media (max-width: 960px) {
  .hero-grid,
  .thefile-grid,
  .problem-grid,
  .pillars-head,
  .partners-grid,
  .steps-head { grid-template-columns: 1fr; gap: 56px; }
  .chapters { grid-template-columns: 1fr; gap: 36px; }
  .personas-grid { grid-template-columns: 1fr; gap: 64px; }
  .personas-grid::before { display: none; }
  .persona-col + .persona-col { padding-left: 0; }
  .tiers-grid { grid-template-columns: 1fr; }
  .context-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .context-label { grid-column: 1 / -1; }
  .seal-stage { min-height: 440px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 48px 0 72px; }
  .thefile, .problem, .pillars, .personas, .steps-section, .partners, .tiers { padding: 96px 0; }
  .closing { padding: 120px 0; }
  .steps-grid { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .step:last-child { border-bottom: none; }
  .cure-body { grid-template-columns: 1fr; }
  .cure-col { border-right: none; border-bottom: 1px solid var(--rule); }
  .cure-col:last-child { border-bottom: none; }
  .fine-display { flex-direction: column; align-items: flex-start; gap: 12px; }
  .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .foot-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .filecard { padding: 32px 24px; }
  .fc-foot { left: 24px; right: 24px; }
  .fc-stamp { right: -10px; width: 92px; height: 92px; }
  .context-grid { grid-template-columns: 1fr; gap: 20px; }
  .pm-detail { grid-template-columns: 1fr; gap: 4px 0; }
  .pm-detail dt { padding-top: 14px; }
}

/* =============================================================
   LEGAL PAGES  —  long-form prose (privacy, terms)
   ============================================================= */
.legal {
  padding: 96px 0 120px;
}
.legal-inner {
  max-width: 760px;
  margin: 0 auto;
}
.legal-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.legal-eyebrow .rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin: 0 0 16px;
}
.legal .effective {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 56px;
}
.legal h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  margin: 48px 0 16px;
}
.legal h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-strong);
  margin: 28px 0 10px;
}
.legal p,
.legal li {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 14px;
}
.legal ul {
  padding-left: 22px;
  margin: 0 0 18px;
}
.legal li {
  margin-bottom: 8px;
}
.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal a:hover {
  color: var(--accent-strong);
}
.legal strong {
  color: var(--text-strong);
  font-weight: 600;
}
.legal hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 56px 0;
}
.legal .back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}
.legal .back-home:hover {
  color: var(--accent);
}
@media (max-width: 640px) {
  .legal { padding: 64px 0 88px; }
  .legal h2 { margin-top: 36px; }
}
