/* ============================================================
   Layer A — warm Premise page brand (from DESIGN.md).
   ============================================================ */
:root {
  --paper: #f9f8f4;
  --paper-warm: #f2ece2;
  --surface: #fffdf8;
  --ink: #111511;
  --muted: #5f665f;
  --line: rgba(17, 21, 17, 0.08);
  --line-strong: rgba(17, 21, 17, 0.16);
  --teal: #159d90;
  --teal-deep: #0d7f76;
  --teal-soft: #d9fff5;
  --mint: #5de3c4;
  --max: 1180px;
  --font: "Switzer", "Helvetica Neue", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* ---- nav ---- */
.site-nav { display: flex; align-items: center; justify-content: space-between; max-width: var(--max); margin: 0 auto; padding: 22px clamp(20px, 4vw, 48px); }
.brand { font-weight: 600; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 9px; }
.brand .b2 { color: var(--muted); font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 2px; background: var(--teal); display: inline-block; }
.nav-cta { font-size: 0.9rem; font-weight: 560; color: var(--ink); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 11px; padding: 8px 15px; transition: background .15s ease, transform .15s ease; }
.nav-cta:hover { background: var(--surface); transform: translateY(-1px); }

/* ---- hero (short + lively: small type, two-line headline, one lede) ---- */
.hero { max-width: var(--max); margin: 0 auto; padding: clamp(34px, 6vh, 76px) clamp(20px, 4vw, 48px) clamp(26px, 4vh, 48px); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: var(--teal-deep); margin: 0 0 18px; }
.hero h1 { font-size: clamp(2.05rem, 3.6vw, 3.1rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.06; margin: 0 0 18px; text-wrap: balance; max-width: 34ch; }
.rotator { color: var(--teal-deep); display: inline-block; will-change: opacity, transform; }
.lede { font-size: clamp(1.04rem, 1.3vw, 1.22rem); color: var(--muted); margin: 0 0 24px; max-width: 46ch; font-weight: 450; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 560; color: var(--teal-deep); text-decoration: none; }
.scroll-cue .chev { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); transition: transform .2s ease; }
.scroll-cue:hover .chev { transform: translateY(3px); }

/* ============================================================
   The case: one sticky console, scrolled through the stages.
   ============================================================ */
.case-wrap { position: relative; min-height: 800vh; background: radial-gradient(125% 70% at 70% 38%, #edf2f9 0%, rgba(237, 242, 249, 0) 60%); }
.case-viewport {
  position: sticky; top: 0; height: 100vh; display: grid;
  grid-template-columns: clamp(248px, 33%, 372px) 1fr;
  gap: clamp(26px, 4vw, 56px); align-items: center;
  max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px);
}

/* ---- left rail, synced to the active stage ---- */
.rail { align-self: center; }
.rail-vp { font-size: clamp(1.45rem, 2.1vw, 2rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.14; margin: 0 0 30px; text-wrap: balance; }
.stage-index { list-style: none; margin: 0 0 24px; padding: 0; }
.stage-index li { display: grid; grid-template-columns: 2.4em 1fr; grid-template-rows: auto auto; align-items: baseline; gap: 2px 12px; padding: 11px 0 9px; border-top: 1px solid var(--line); color: var(--muted); transition: color .3s ease; }
.stage-index li .num { grid-row: 1 / 3; align-self: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.92rem; color: var(--line-strong); transition: color .3s ease; }
.stage-index li .lbl { font-size: 0.97rem; font-weight: 500; }
.stage-index li .prog { grid-column: 2; height: 2px; border-radius: 2px; background: var(--line); transform-origin: left; opacity: 0; margin-top: 5px; position: relative; overflow: hidden; }
.stage-index li .prog::after { content: ""; position: absolute; inset: 0; background: var(--teal); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform .35s ease; }
.stage-index li.active { color: var(--ink); }
.stage-index li.active .num { color: var(--teal); }
.stage-index li.active .prog { opacity: 1; }
.stage-index li.done .num { color: var(--muted); }
.stage-index li.done .lbl { color: var(--muted); }
.stage-index li.upcoming { color: var(--line-strong); }
.stage-index li.upcoming .lbl { color: var(--line-strong); }
.rail-caption { font-size: 0.98rem; color: var(--muted); line-height: 1.55; max-width: 34ch; margin: 0; min-height: 4.6em; transition: opacity .3s ease; }

/* ---- the contained console frame ---- */
.frame { height: min(76vh, 624px); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 24px 60px -20px rgba(15, 23, 42, .28); border: 1px solid rgba(17, 21, 17, 0.06); overflow: hidden; }

/* ============================================================
   After the case — resolved neutral, warm Premise brand.
   ============================================================ */
.band { padding: clamp(58px, 9vh, 116px) 0; }
.band-inner { max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.band-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: var(--teal-deep); margin: 0 0 18px; }

/* ---- 6. principle + evidence + cost (hands off from the indigo console) ---- */
.principle-band { background: linear-gradient(180deg, #eaeef6 0%, var(--paper) 58%); border-top: 1px solid var(--line); }
.principle-h { font-size: clamp(1.95rem, 3.4vw, 2.85rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 20px; max-width: 20ch; text-wrap: balance; }
.principle-h .accent { color: var(--teal-deep); }
.principle-sub { font-size: clamp(1.08rem, 1.35vw, 1.28rem); color: var(--ink); line-height: 1.5; max-width: 52ch; margin: 0; font-weight: 450; }
.principle-ev { font-size: clamp(0.98rem, 1.1vw, 1.06rem); color: var(--muted); line-height: 1.6; max-width: 64ch; margin: 26px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.figure { color: var(--ink); font-weight: 600; box-shadow: inset 0 -0.42em 0 var(--teal-soft); }

/* ---- 7. trust grid ---- */
.trust-band { background: var(--paper); }
.trust-h { font-size: clamp(1.5rem, 2.4vw, 2.05rem); font-weight: 500; letter-spacing: -0.018em; line-height: 1.14; margin: 0 0 24px; max-width: 24ch; text-wrap: balance; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0 0 clamp(34px, 4vh, 50px); }
.chips-label { font-size: 0.82rem; font-weight: 500; color: var(--muted); margin-right: 4px; }
.chip { font-size: 0.8rem; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 13px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(22px, 2.6vw, 40px); }
.tcol h3 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.005em; margin: 0 0 14px; padding-bottom: 11px; border-bottom: 1px solid var(--line-strong); }
.tcol ul { list-style: none; margin: 0; padding: 0; }
.tcol li { position: relative; font-size: 0.9rem; color: var(--muted); line-height: 1.52; padding: 0 0 13px 16px; }
.tcol li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 5px; height: 5px; border-radius: 2px; background: var(--teal); opacity: 0.8; }

/* ---- 8. founder note ---- */
.founder-band { background: var(--paper-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.founder-inner { max-width: 760px; }
.founder-note { font-size: clamp(1.16rem, 1.7vw, 1.46rem); font-weight: 450; line-height: 1.5; letter-spacing: -0.012em; color: var(--ink); margin: 0; text-wrap: pretty; }
.founder-sign { font-size: 0.96rem; color: var(--muted); margin: 20px 0 0; }
.founder-sign a { color: var(--teal-deep); text-decoration: none; }
.founder-sign a:hover { text-decoration: underline; }

/* ---- 9. closing cta ---- */
.cta-band { text-align: center; }
.cta-inner { max-width: 720px; }
.cta-h { font-size: clamp(1.95rem, 3.2vw, 2.7rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 28px; text-wrap: balance; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 13px; margin: 0 0 20px; }
.btn-cta { font-size: 0.98rem; font-weight: 560; text-decoration: none; border-radius: 12px; padding: 13px 22px; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.btn-cta.primary { background: var(--teal); color: #fff; box-shadow: 0 1px 2px rgba(13, 127, 118, .25), 0 12px 26px -12px rgba(13, 127, 118, .5); }
.btn-cta.primary:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn-cta.ghost { color: var(--ink); border: 1px solid var(--line-strong); background: var(--surface); }
.btn-cta.ghost:hover { transform: translateY(-1px); background: #fff; }
.cta-note { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ---- footer ---- */
.site-footer { max-width: var(--max); margin: 0 auto; padding: 30px clamp(20px, 4vw, 48px) 44px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.site-footer .brand { font-size: 0.98rem; }
.footer-links { display: flex; gap: 18px; margin-left: auto; }
.footer-links a { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.site-footer .copy { font-size: 0.88rem; color: var(--muted); margin: 0; width: 100%; }

/* ---- scroll-reveal (progressive enhancement) ---- */
.w { opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease; }
.w.in { opacity: 1; transform: none; }
html:not(.js) .w { opacity: 1; transform: none; }
html:not(.js) .c-pane[hidden] { display: block; }
html:not(.js) .c-canvas { overflow: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .w, .c-pane, .stage-index li .prog::after, .scroll-cue .chev, .nav-cta { transition: none; }
}

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 28px 36px; }
}
@media (max-width: 880px) {
  .case-viewport { grid-template-columns: 1fr; gap: 14px; height: auto; position: static; padding-top: 22px; padding-bottom: 22px; }
  .case-wrap { min-height: 0; }
  .rail-vp { font-size: 1.35rem; margin-bottom: 16px; }
  .rail-caption { min-height: 0; }
  .frame { height: 78vh; }
  html .w { opacity: 1; transform: none; }
  html .c-pane[hidden] { display: block; }
  .c-canvas { overflow: auto; }
}
@media (max-width: 580px) {
  .trust-grid { grid-template-columns: 1fr; gap: 26px; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .footer-links { margin-left: 0; }
}
