/* ═══════════════════════════════════════════════════════════════
   TITAN 360 — LANDING · "CHRYSALIS ARC"
   One scroll-driven metamorphosis: deep-green night → cream dawn.
   Serif = heart · Sans = voice · Mono = instrument.
   ═══════════════════════════════════════════════════════════════ */

/* ---- Fonts (local, no network) ---- */
@font-face { font-family: "Domaine Display"; src: url("fonts/DomaineDisplayTest-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Domaine Display"; src: url("fonts/DomaineDisplayTest-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: "Domaine Display"; src: url("fonts/DomaineDisplayTest-MediumItalic.otf") format("opentype"); font-weight: 500; font-style: italic; font-display: block; }
@font-face { font-family: "Domaine Display"; src: url("fonts/DomaineDisplayTest-Semibold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: "Work Sans"; src: url("fonts/WorkSans-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/WorkSans-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/WorkSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/WorkSans-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---- Tokens ---- */
:root {
  --green-950: #04140C;
  --green-900: #003822;
  --green-700: #0a4a2e;
  --sage:      #81C597;
  --sage-pale: #A0CAAD;
  --gold-hover: #EDB52E;
  --surplus:   #3E9E6B;
  --plum:      #3F1038;
  --lilac:     #D195F5;
  --gold:      #FFC949;
  --pink:      #FFACAC;
  --cream:     #F9F0EE;
  --paper:     #FFFFFF;
  --night-ink: #F2EEE7;            /* warm cream text for the night phase */

  --serif: "Domaine Display", "Cormorant Garamond", Georgia, serif;
  --sans:  "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --rise:   cubic-bezier(0.16, 1, 0.3, 1);
  --settle: cubic-bezier(0.22, 1, 0.36, 1);

  /* dynamic — driven per-frame by app.js */
  --bg: #022114;
}

/* Ink voices flip per phase: night (default) vs daylight (body.light) */
body {
  --ink:       var(--night-ink);
  --ink-soft:  rgba(242, 238, 231, 0.72);
  --ink-faint: rgba(242, 238, 231, 0.44);
  --eyebrow-c: var(--sage);
  --hairline:  rgba(160, 202, 173, 0.22);
  --card-bg:   rgba(255, 255, 255, 0.045);
  --card-line: rgba(160, 202, 173, 0.28);
}
body.light {
  --ink:       var(--green-900);
  --ink-soft:  rgba(0, 56, 34, 0.78);
  --ink-faint: rgba(0, 56, 34, 0.45);
  --eyebrow-c: var(--plum);
  --hairline:  rgba(0, 56, 34, 0.16);
  --card-bg:   rgba(255, 255, 255, 0.55);
  --card-line: rgba(0, 56, 34, 0.14);
}
::selection { background: var(--lilac); color: var(--green-900); }
body.light ::selection { background: var(--sage); color: var(--green-900); }

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; text-wrap: balance; }
h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.06; letter-spacing: -0.01em; }
h3 { font-size: 24px; line-height: 1.2; }
em { font-style: italic; font-weight: 500; }
p  { margin: 0; color: var(--ink-soft); }
a  { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
body, p, h1, h2, h3, .eyebrow, dd, blockquote, .stat-l {
  transition: color 0.4s ease;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow-c);
  margin: 0 0 18px;
}

/* Dark-phase copy floats over the braid — give it a halo of night */
.hero-sub, .was-copy p, .steps-desc, .steps-clock, .live-head p, .live-foot,
.s-was h2, .s-arc h2, .s-live h2, .steps-left h2, .arc-lede {
  text-shadow: 0 1px 14px rgba(2, 33, 20, 0.85), 0 0 34px rgba(2, 33, 20, 0.65);
}
body.light .hero-sub, body.light .was-copy p, body.light .live-head p,
body.light .s-was h2, body.light .s-arc h2, body.light .s-live h2 { text-shadow: none; }

/* ---- Atmosphere canvas ---- */
#sky {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
main, .footer, .nav, .alt { position: relative; z-index: 1; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 16px 30px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--settle), box-shadow 0.3s ease;
}
.btn-primary { background: var(--gold); color: var(--green-900); }
.btn-primary:hover { background: var(--gold-hover); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 201, 73, 0.35); }
.btn-ghost {
  border-color: var(--card-line);
  color: var(--ink);
  background: rgba(2, 33, 20, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--sage); }
body.light .btn-ghost { background: transparent; }
body.light .btn-ghost:hover { border-color: var(--green-900); }

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* matches the section gutter exactly — the brand sits ON the margin */
  padding: 18px clamp(20px, 6vw, 90px);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -26px;
  background: linear-gradient(to bottom, var(--bg) 45%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  opacity: 0.96;
  pointer-events: none;
  z-index: -1;
}
.nav-brand { position: relative; display: inline-flex; align-items: center; height: 54px; }
.brand-full { position: relative; display: block; height: 46px; transition: opacity 0.35s ease; }
.brand-full img { display: block; height: 100%; width: auto; }
.logo-full--green { position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s ease; }
body.light .logo-full--white { opacity: 0; }
body.light .logo-full--green { opacity: 1; }
.logo-full--white { transition: opacity 0.4s ease; }
.logo-mark {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  height: 48px;
  width: auto;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.35s ease, color 0.4s ease;
}
/* Scrolled past the hero: the full lockup hands off to the monogram */
.nav.scrolled .brand-full { opacity: 0; }
.nav.scrolled .logo-mark { opacity: 1; }
.nav-brand:hover .logo-mark { color: var(--sage); }
body.light .nav-brand:hover .logo-mark { color: var(--green-700); }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-clock { font-size: 12px; color: var(--ink-faint); transition: color 0.4s ease; }
.btn-nav { padding: 11px 20px; font-size: 12px; background: var(--gold); color: var(--green-900); }
.btn-nav:hover { background: var(--gold-hover); }

/* ---- Altimeter ---- */
.alt {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}
.alt-readout {
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  transition: color 0.4s ease;
}
.alt-ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
.alt-ticks button {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  color: transparent;
  transition: color 0.25s ease;
}
.alt-ticks button:hover, .alt-ticks li.on button { color: var(--ink-faint); }
.alt-ticks i {
  display: block; width: 14px; height: 1px;
  background: var(--ink-faint);
  transition: width 0.3s var(--settle), background 0.3s ease;
}
.alt-ticks li.on i { width: 30px; height: 2px; background: var(--gold); }

/* ---- Reveal / entrance utilities ---- */
.reveal { opacity: 0; transform: translateY(26px); }
body.booted .reveal {
  animation: rise 0.8s var(--rise) forwards;
  animation-delay: calc(1.2s + attr(data-d number, 0) * 1s);
}
/* attr() fallback — explicit delays */
body.booted .reveal[data-d="0"] { animation-delay: 0.85s; }
body.booted .reveal[data-d="1"] { animation-delay: 1.0s; }
body.booted .reveal[data-d="2"] { animation-delay: 1.12s; }
body.booted .reveal[data-d="3"] { animation-delay: 1.55s; }
body.booted .reveal[data-d="4"] { animation-delay: 1.8s; }
body.booted .reveal[data-d="5"] { animation-delay: 2.05s; }
body.booted .reveal[data-d="6"] { animation-delay: 2.6s; }
.hl-line { display: block; overflow: hidden; }
.hl-mask { display: inline-block; transform: translateY(112%); }
body.booted .reveal-line { animation: lineUp 0.9s var(--rise) forwards; }
body.booted [data-d="1"].reveal-line { animation-delay: 1.0s; }
body.booted [data-d="2"].reveal-line { animation-delay: 1.12s; }
@keyframes rise   { to { opacity: 1; transform: translateY(0); } }
@keyframes lineUp { to { transform: translateY(0); } }

.io-rise { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--rise), transform 0.8s var(--rise); }
.io-rise.lit { opacity: 1; transform: translateY(0); }

/* ---- Gold stamp — the minted verb. Rationed page-wide. ---- */
.stamp {
  display: inline-block;
  background: var(--gold);
  color: var(--green-900);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 6px 10px;
  border-radius: 3px;
  position: relative;
  opacity: 0;
  transform: scale(1.45);
}
.stamp.stamped { animation: stampIn 0.42s var(--settle) forwards; }
.stamp::after {
  content: "";
  position: absolute; inset: 0;
  background: #fff;
  border-radius: 3px;
  opacity: 0;
}
.stamp.stamped::after { animation: stampFlash 0.42s linear forwards; }
@keyframes stampIn   { 0% { opacity: 0; transform: scale(1.45); } 55% { opacity: 1; transform: scale(0.97); } 100% { opacity: 1; transform: scale(1); } }
@keyframes stampFlash{ 0%,54% { opacity: 0; } 60% { opacity: 0.85; } 100% { opacity: 0; } }

/* ═══════ S1 · HERO ═══════ */
.s-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px clamp(20px, 6vw, 90px) 80px;
  position: relative;
}
.hero-inner { max-width: 1080px; position: relative; }
.hero-h1 {
  font-size: clamp(54px, 8.6vw, 124px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 6px 0 30px;
}
.grad-ink {
  background: linear-gradient(96deg, var(--sage) 8%, #CBC36A 50%, var(--gold) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-right: 0.06em; /* italic overhang */
}
.hero-ring {
  position: absolute;
  top: -10px;
  right: clamp(-20px, 2vw, 70px);
  width: 150px; height: 150px;
  pointer-events: none;
}
.hero-sub { max-width: 600px; font-size: 18px; line-height: 1.65; }
.hero-ctas { display: flex; gap: 16px; margin-top: 38px; flex-wrap: wrap; }
.hero-proof {
  display: inline-block;
  margin-top: 30px;
  margin-left: -14px;
  max-width: 580px;
  font-size: 11px;
  line-height: 2;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  background: rgba(2, 33, 20, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 8px 14px;
  border-radius: 3px;
}
.scroll-cue {
  position: absolute;
  bottom: 100px; right: clamp(54px, 5vw, 80px);
  display: flex; align-items: center; gap: 14px;
  font-size: 9px; letter-spacing: 0.26em; color: var(--ink-faint);
}
.scroll-cue .mono { font-size: 9px; }
.cue-thread {
  display: block; width: 1px; height: 52px;
  background: linear-gradient(var(--sage), transparent);
  animation: drip 2.6s ease-in-out infinite;
  transform-origin: top;
}
@keyframes drip { 0% { transform: scaleY(0); opacity: 0; } 35% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1) translateY(20px); opacity: 0; } }

/* ═══════ S2 · THE WAY IT WAS ═══════ */
.s-was {
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(320px, 52ch) 1fr;
  gap: 60px;
  align-items: center;
  padding: 14vh clamp(20px, 6vw, 90px);
  position: relative;
}
.was-copy p { margin-bottom: 20px; font-size: 18px; line-height: 1.7; }
.was-copy h2 { margin-bottom: 26px; }
.was-field { position: relative; min-height: 360px; }
.ghost-tag {
  position: absolute;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  padding: 8px 14px;
  border: 1px dashed var(--hairline);
  border-radius: 3px;
  white-space: nowrap;
  will-change: transform;
}
.ghost-tag:nth-child(1) { top: 8%;  left: 12%; }
.ghost-tag:nth-child(2) { top: 44%; left: 48%; }
.ghost-tag:nth-child(3) { top: 78%; left: 18%; }

/* ═══════ S3 · ONE ARC, THREE PROMISES ═══════ */
.s-arc { height: 320vh; position: relative; }
.arc-sticky {
  position: sticky; top: 0;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 110px clamp(20px, 6vw, 90px) 60px;
  overflow: hidden;
}
.arc-head { max-width: 660px; }
.arc-lede { margin-top: 20px; font-size: 18px; line-height: 1.7; }
.arc-stage { position: relative; height: 420px; margin-top: 40px; }
.p-card {
  position: absolute;
  top: 50%; left: 50%;
  width: min(320px, 84vw);
  padding: 26px 26px 22px;
  background: rgba(3, 38, 23, 0.36);
  border: 1px solid var(--card-line);
  border-radius: 3px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  will-change: transform, opacity;
}
.p-card h3 { margin-bottom: 10px; }
.p-card p { font-size: 14.5px; line-height: 1.6; }
.p-card-thread { position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: 2px 2px 0 0; display: block; }
.t-sage  { background: var(--sage); box-shadow: 0 0 14px rgba(129,197,151,0.7); }
.t-gold  { background: var(--gold); box-shadow: 0 0 14px rgba(255,201,73,0.7); }
.t-lilac { background: var(--lilac); box-shadow: 0 0 14px rgba(209,149,245,0.7); }
.p-tag {
  display: inline-block; margin-top: 16px;
  font-size: 9.5px; letter-spacing: 0.18em;
  color: var(--sage); border: 1px solid var(--hairline);
  padding: 5px 9px; border-radius: 3px;
}
.p-fused {
  width: min(720px, 90vw);
  text-align: center;
  padding: 40px 40px 34px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.94);
}
.p-fused::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: 4px;
  padding: 1px;
  background: conic-gradient(from var(--fuse-angle, 0deg), var(--sage), var(--gold), var(--plum), var(--lilac), var(--sage));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.p-fused h3 { font-size: 38px; }
.p-fused-sub { font-size: 16px; margin: 8px 0 22px; }
.p-fused ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 11.5px; letter-spacing: 0.12em; color: var(--ink-soft); }
.p-fused .tick { margin-right: 8px; font-size: 8px; vertical-align: 2px; }
.t-sage-ink { color: var(--sage); } .t-gold-ink { color: var(--gold); } .t-lilac-ink { color: var(--lilac); }

/* ═══════ S4 · EIGHT STEPS ═══════ */
.s-steps { height: 520vh; position: relative; }
.steps-sticky {
  position: sticky; top: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(330px, 38%) 1fr;
  gap: clamp(24px, 4vw, 70px);
  align-items: center;
  padding: 100px clamp(20px, 6vw, 90px) 60px;
  overflow: hidden;
}
.steps-left h2 { margin: 0 0 34px; }
.steps-dial { position: relative; width: 280px; height: 280px; }
.dial-track { fill: none; stroke: var(--hairline); stroke-width: 1; }
#dial-segs path { fill: none; stroke-width: 3; stroke-linecap: round; transition: stroke 0.4s ease, opacity 0.4s ease; }
#dial-labels text { font-size: 9px; letter-spacing: 0.14em; fill: var(--ink-faint); transition: fill 0.3s ease; }
#dial-labels text.on { fill: var(--gold); }
.dial-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center;
}
.dial-step { font-size: 10px; letter-spacing: 0.22em; color: var(--ink-faint); }
.dial-name { font-family: var(--serif); font-size: 30px; color: var(--ink); }
.steps-desc { margin-top: 30px; max-width: 360px; font-size: 15.5px; min-height: 3.2em; }
.steps-clock { margin-top: 18px; font-size: 10px; letter-spacing: 0.2em; color: var(--ink-faint); }

.steps-stage {
  position: relative;
  height: min(560px, 64vh);
  perspective: 1400px;
}
.scr {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translate3d(60px, 40px, 0) scale(0.96);
  transition: opacity 0.55s var(--settle), transform 0.55s var(--settle);
  pointer-events: none;
}
.scr.on   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.scr.gone { opacity: 0; transform: translate3d(-70px, -50px, 0) scale(0.95); }

/* The product mocks: always daylight surfaces — previews of dawn */
.mock {
  width: min(620px, 100%);
  background: var(--cream);
  color: var(--green-900);
  border-radius: 6px;
  box-shadow: 0 34px 90px rgba(0, 10, 6, 0.5), 0 4px 18px rgba(0, 10, 6, 0.3);
  transform: rotateY(-6deg) rotateX(2deg);
  overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 56, 34, 0.1);
}
.mock-crumb { font-size: 10px; letter-spacing: 0.18em; color: var(--green-900); font-weight: 600; }
.chip {
  font-size: 9px; letter-spacing: 0.12em;
  background: rgba(0, 56, 34, 0.07);
  color: rgba(0, 56, 34, 0.75);
  padding: 5px 9px; border-radius: 999px;
}
.chip-save { background: rgba(129, 197, 151, 0.28); color: #0a4a2e; }
.chip-ok   { background: rgba(129, 197, 151, 0.32); color: #0a4a2e; }
.mock-body { padding: 22px 20px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.mf { display: flex; flex-direction: column; gap: 5px; }
.mf-wide { grid-column: span 2; }
.mf label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(0, 56, 34, 0.55); }
.mi {
  font-size: 14.5px;
  background: #fff;
  border: 1px solid rgba(0, 56, 34, 0.16);
  border-radius: 3px;
  padding: 9px 12px;
}
.mock-catalog { grid-template-columns: 1fr 1fr; }
.cask { margin: 0; position: relative; background: #fff; border: 1px solid rgba(0,56,34,0.13); border-radius: 4px; padding: 12px; }
.cask-sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.cask img { height: 86px; object-fit: contain; margin: 0 auto 8px; }
.cask figcaption { display: flex; justify-content: space-between; font-size: 13px; }
.cask .stamp { position: absolute; top: -10px; left: 10px; }
.mock-cov { grid-column: span 2; display: flex; gap: 36px; }
.mock-cov div { display: flex; flex-direction: column; gap: 2px; }
.mock-cov-k { font-size: 9px; letter-spacing: 0.16em; color: rgba(0,56,34,0.5); }
.mock-cov strong { font-family: var(--mono); font-size: 26px; }
.mock-cov small { font-size: 13px; font-weight: 400; }
.mock-gap { grid-column: span 2; height: 8px; border-radius: 99px; background: rgba(0,56,34,0.1); overflow: hidden; }
.mock-gap span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--sage)); }
.mock-items { grid-column: span 2; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 10.5px; letter-spacing: 0.08em; }
.mock-items li { display: flex; align-items: center; gap: 8px; }
.mock-items b { margin-left: auto; }
.gtd, .est {
  font-style: normal; font-size: 8px; font-weight: 700; letter-spacing: 0.1em;
  padding: 2px 6px; border-radius: 2px;
}
.gtd { background: var(--gold); color: var(--green-900); }
.est { background: rgba(0, 56, 34, 0.1); color: rgba(0, 56, 34, 0.7); }
.mock-sign { grid-template-columns: 1fr; }
.mock-sigline { position: relative; padding: 18px 8px 6px; }
.mock-sig { width: 100%; height: 56px; }
.mock-sig path { fill: none; stroke: var(--green-900); stroke-width: 1.6; stroke-linecap: round; }
.mock-sigline > span { display: block; height: 1px; background: rgba(0, 56, 34, 0.4); }
.mock-sigline label { display: block; margin-top: 8px; font-size: 8.5px; letter-spacing: 0.16em; color: rgba(0,56,34,0.5); }
.mock-sign-btns { display: flex; gap: 12px; }
.mbtn {
  flex: 1; text-align: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid rgba(0, 56, 34, 0.3); border-radius: 3px; padding: 11px 8px;
}
.mbtn-solid { background: var(--gold); border-color: var(--gold); color: var(--green-900); }

.tray {
  position: absolute;
  bottom: -14px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; align-items: center;
  width: min(540px, 100%);
}
.steps-stage.tickets-live .scr.on { opacity: 0.4; filter: saturate(0.8); }
.tkt {
  display: block;
  width: 100%;
  font-size: 9.5px; letter-spacing: 0.14em;
  color: var(--ink-soft);
  background: rgba(3, 38, 23, 0.55);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 8px 14px;
  margin-top: -26px;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s var(--settle), transform 0.5s var(--settle), margin 0.5s var(--settle);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tkt.in { opacity: 1; transform: translateY(0); margin-top: 6px; }

/* ═══════ S5 · NUMBERS, LIVE ═══════ */
.s-live {
  padding: 18vh clamp(20px, 6vw, 90px) 16vh;
  position: relative;
}
.live-head { max-width: 720px; margin-bottom: 56px; }
.live-head p { margin-top: 22px; font-size: 18px; line-height: 1.7; }
.live-head strong { color: var(--ink); font-weight: 600; }
.panel {
  max-width: 980px;
  margin-left: auto;
  background: var(--cream);
  color: var(--green-900);
  border-radius: 6px;
  padding: 40px clamp(22px, 4vw, 52px) 34px;
  box-shadow: 0 40px 110px rgba(0, 8, 5, 0.45), 0 6px 22px rgba(0, 8, 5, 0.28);
  position: relative;
}
.panel-top { display: grid; grid-template-columns: minmax(240px, 0.9fr) 1.3fr; gap: 40px; align-items: start; }
.panel-k { font-size: 10px; letter-spacing: 0.2em; color: rgba(0, 56, 34, 0.55); }
.odo-wrap { display: flex; align-items: baseline; gap: 16px; margin: 8px 0 10px; }
.odo { font-family: var(--mono); font-size: clamp(46px, 5.4vw, 72px); font-weight: 600; line-height: 1; letter-spacing: 0; display: inline-flex; }
.odo .slot { display: inline-block; height: 1em; overflow: hidden; position: relative; }
.odo .strip { display: flex; flex-direction: column; transition: transform 0.28s linear; }
.odo .strip span { height: 1em; line-height: 1; display: block; }
.odo .slot .ghost {
  position: absolute; inset: 0;
  color: var(--sage);
  opacity: 0;
  pointer-events: none;
}
.odo .slot .ghost.go { animation: ghostFade 0.22s linear forwards; }
@keyframes ghostFade { 0% { opacity: 0.85; } 100% { opacity: 0; } }
.odo-suffix { font-size: 0.34em; font-weight: 400; color: rgba(0, 56, 34, 0.6); margin-left: 4px; }
.panel-calc { font-size: 11px; letter-spacing: 0.18em; color: var(--plum); opacity: 0; }
.panel-calc.on { animation: blink 0.5s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.panel-note { font-size: 11px; letter-spacing: 0.14em; color: rgba(0, 56, 34, 0.62); }

.panel-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: grab;
  margin-top: 14px;
}
.panel-slider input[type="range"]:active { cursor: grabbing; }
.panel-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--plum), var(--gold));
}
.panel-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-900);
  border: 4px solid var(--cream);
  box-shadow: 0 0 0 1.5px var(--green-900), 0 4px 12px rgba(0, 20, 12, 0.4);
  margin-top: -9px;
}
.panel-slider input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--plum), var(--gold));
}
.panel-slider input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--green-900); border: 4px solid var(--cream);
  box-shadow: 0 0 0 1.5px var(--green-900);
}
.slider-scale { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.12em; color: rgba(0,56,34,0.58); margin-top: 8px; }
.quickset { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.qs {
  font-size: 9px; letter-spacing: 0.08em;
  background: none; border: 1px solid rgba(0, 56, 34, 0.25); border-radius: 999px;
  color: rgba(0, 56, 34, 0.75);
  padding: 6px 12px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.qs:hover { border-color: var(--green-900); background: rgba(0, 56, 34, 0.05); }

.gapline { margin-top: 34px; }
.gapbar {
  display: flex; height: 12px; border-radius: 99px; overflow: hidden;
  background: rgba(0, 56, 34, 0.08);
}
.gapbar span { display: block; height: 100%; transition: width 0.45s var(--settle), background 0.3s ease; }
.gap-gtd { background: var(--gold); }
.gap-est {
  background: repeating-linear-gradient(45deg, var(--sage) 0 6px, #9fd3b0 6px 12px);
}
.gap-extra.surplus { background: var(--surplus); }
.gap-extra.gap { background: repeating-linear-gradient(45deg, var(--pink) 0 6px, #ffc4c4 6px 12px); }
.gap-extra.pulse { animation: gapPulse 0.7s ease 2; }
@keyframes gapPulse { 50% { opacity: 0.45; } }
.gap-msg { margin-top: 12px; font-size: 10.5px; letter-spacing: 0.16em; color: rgba(0, 56, 34, 0.7); }
.gap-msg.warn { color: #b04a4a; }

.panel-items { list-style: none; margin: 30px 0 0; padding: 22px 0 0; border-top: 1px solid rgba(0, 56, 34, 0.12); display: flex; flex-direction: column; gap: 12px; }
.panel-items li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.panel-items b { margin-left: auto; font-family: var(--mono); font-weight: 600; }
.panel-total { padding-top: 12px; border-top: 1px dashed rgba(0, 56, 34, 0.18); font-weight: 600; }
.live-foot { margin-top: 40px; text-align: right; font-size: 10px; letter-spacing: 0.18em; color: var(--ink-faint); }

/* ═══════ S6 · THE VAULT AT DAWN ═══════ */
.s-vault { padding: 16vh 0 14vh; position: relative; }
.vault-slab {
  background: var(--cream);
  color: var(--green-900);
  margin: 0 auto;
  padding: clamp(44px, 7vw, 96px) clamp(22px, 6vw, 90px);
  clip-path: inset(0 round 8px);
  max-width: calc(100% - clamp(32px, 9vw, 160px));
  box-shadow: 0 50px 140px rgba(0, 8, 5, 0.4);
  will-change: clip-path, max-width;
}
.vault-slab .eyebrow { color: var(--plum); }
.vault-slab h2, .vault-slab h3, .vault-slab p, .vault-slab dd { color: var(--green-900); }
.vault-slab p { color: rgba(0, 56, 34, 0.78); }
.vault-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.85fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.vault-heritage p { margin-top: 22px; font-size: 17px; line-height: 1.7; }
.ledger-h { font-size: 10px; letter-spacing: 0.22em; color: rgba(0, 56, 34, 0.5); margin: 6px 0 18px; }
.ledger { margin: 0; display: flex; flex-direction: column; }
.ledger div {
  display: grid; grid-template-columns: 1fr; gap: 3px;
  padding: 13px 0;
  border-top: 1px solid rgba(0, 56, 34, 0.13);
}
.ledger div:last-child { border-bottom: 1px solid rgba(0, 56, 34, 0.13); }
.ledger dt { font-size: 10.5px; letter-spacing: 0.16em; font-weight: 600; color: var(--green-900); }
.ledger dd { margin: 0; font-size: 13.5px; color: rgba(0, 56, 34, 0.66); }
.seal-card {
  background: #fff;
  border: 1px solid rgba(0, 56, 34, 0.14);
  border-radius: 4px;
  padding: 26px 24px 22px;
  text-align: center;
  position: relative;
  box-shadow: 0 14px 40px rgba(0, 20, 12, 0.1);
}
.seal-k { font-size: 9px; letter-spacing: 0.2em; color: rgba(0, 56, 34, 0.5); }
.seal-line { font-family: var(--serif); font-size: 27px; color: var(--green-900); margin-top: 12px; }
.seal-forever { font-family: var(--serif); font-size: 36px; color: var(--green-900); margin: 2px 0 16px; }
.diverge {
  margin: clamp(48px, 7vw, 84px) 0 0;
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
}
.div-k { font-size: 11px; letter-spacing: 0.2em; color: rgba(0, 56, 34, 0.62); }
.diverge figcaption p { margin-top: 14px; font-size: 16px; line-height: 1.65; }
.diverge strong { font-weight: 600; }
#div-chart { width: 100%; height: auto; }
.div-legend { display: flex; gap: 26px; margin-top: 10px; font-size: 11px; letter-spacing: 0.14em; color: rgba(0, 56, 34, 0.74); grid-column: 2; flex-wrap: wrap; }
.div-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg { display: inline-block; width: 18px; height: 2px; border-radius: 2px; }
.lg-fog { background: rgba(0, 56, 34, 0.4); }
.lg-gold { background: var(--gold); }

/* ═══════ S7 · AGENTS AT FIRST LIGHT ═══════ */
.s-light { padding: 16vh clamp(20px, 6vw, 90px); text-align: center; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
  margin: 60px auto 84px;
  max-width: 1080px;
}
.stat {
  background: var(--paper);
  border: 1px solid rgba(0, 56, 34, 0.08);
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(15, 22, 18, 0.1);
  padding: 36px 26px 30px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.stat-v {
  font-family: var(--serif);
  font-size: clamp(40px, 4vw, 58px);
  font-weight: 500;
  color: var(--green-900);
  line-height: 1;
  letter-spacing: 0;
}
.stat-inf { font-size: clamp(44px, 4.4vw, 64px); }
.stat-l { font-size: 13.5px; color: rgba(0, 56, 34, 0.66); line-height: 1.45; max-width: 24ch; }
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 30px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}
.quote {
  margin: 0;
  text-align: left;
  background: var(--paper);
  color: var(--green-900);
  border-radius: 4px;
  padding: 32px 28px 26px;
  box-shadow: 0 24px 70px rgba(15, 22, 18, 0.16);
  transform: rotate(var(--tilt, 0deg));
}
.quote:nth-child(2) { margin-top: 44px; }
.quote:nth-child(3) { margin-top: 14px; }
.quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.45;
  color: var(--green-900);
}
.quote footer { margin-top: 20px; font-size: 9.5px; letter-spacing: 0.16em; color: rgba(0, 56, 34, 0.55); }

/* ═══════ S8 · FULL DAWN ═══════ */
.s-dawn { position: relative; }
.sign-wrap { height: 240vh; position: relative; }
.sign-sticky {
  position: sticky; top: 0;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 100px clamp(20px, 6vw, 90px) 60px;
  text-align: center;
}
.sign-card {
  margin-top: 44px;
  background: var(--paper);
  border-radius: 4px;
  padding: 34px clamp(24px, 4vw, 56px) 30px;
  box-shadow: 0 36px 100px rgba(15, 22, 18, 0.2);
  position: relative;
  width: min(740px, 94vw);
}
.sign-k { display: block; font-size: 9.5px; letter-spacing: 0.2em; color: rgba(0, 56, 34, 0.5); text-align: left; margin-bottom: 8px; }
#sig-canvas { width: 100%; height: auto; display: block; }
.sign-line { border-top: 1px solid rgba(0, 56, 34, 0.45); padding-top: 10px; text-align: left; }
.sign-line label { font-size: 9px; letter-spacing: 0.18em; color: rgba(0, 56, 34, 0.5); }
.stamp-signed {
  position: absolute;
  right: 36px; bottom: 42px;
  font-size: 11px;
  padding: 8px 12px;
}
.stamp-signed.stamped { animation-name: stampInTilt; }
@keyframes stampInTilt { 0% { opacity: 0; transform: scale(1.45) rotate(-4deg); } 55% { opacity: 1; transform: scale(0.97) rotate(-4deg); } 100% { opacity: 1; transform: scale(1) rotate(-4deg); } }
.sign-hint { margin-top: 26px; font-size: 10.5px; letter-spacing: 0.22em; color: var(--ink-soft); transition: opacity 0.4s ease; }

.cta-block {
  min-height: 88vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 10vh clamp(20px, 6vw, 90px) 16vh;
}
.cta-h { font-size: clamp(40px, 5.6vw, 84px); }
.cta-sub { margin-top: 24px; max-width: 520px; font-size: 17px; }
.cta-form { display: flex; gap: 12px; margin-top: 44px; flex-wrap: wrap; justify-content: center; }
.cta-mail {
  font-size: 13px;
  padding: 15px 20px;
  min-width: 280px;
  border: 1px solid var(--card-line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--green-900);
  outline: none;
}
.cta-mail:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 201, 73, 0.3); }
.btn-converge { position: relative; }
.btn-converge::before {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 6px;
  padding: 2px;
  background: conic-gradient(from var(--fuse-angle, 0deg), var(--sage), var(--gold), var(--plum), var(--lilac), var(--sage));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.btn-converge.fused::before { opacity: 1; }
.btn-converge.fused { box-shadow: 0 0 0 6px rgba(255, 201, 73, 0.14), 0 14px 44px rgba(255, 201, 73, 0.26); }
.cta-clock { margin-top: 34px; font-size: 11.5px; letter-spacing: 0.16em; color: var(--ink-soft); }

/* ---- Footer: night returns as the foundation ---- */
.footer {
  background: var(--green-900);
  color: var(--cream);
  padding: 64px clamp(20px, 6vw, 90px) 40px;
  position: relative;
}
.foot-thread {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--sage) 30%, var(--sage) 70%, transparent);
  opacity: 0.6;
}
.foot-grid { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; }
.logo-full-foot { display: block; height: 54px; width: auto; }
.foot-nav { display: flex; gap: 26px; flex-wrap: wrap; font-size: 10px; letter-spacing: 0.16em; }
.foot-nav a { color: rgba(249, 240, 238, 0.66); transition: color 0.2s; }
.foot-nav a:hover { color: var(--cream); }
.foot-legal { margin-top: 36px; font-size: 12px; line-height: 1.6; color: rgba(249, 240, 238, 0.45); max-width: 760px; }
.foot-demo { margin-top: 14px; font-size: 10px; letter-spacing: 0.14em; color: rgba(249, 240, 238, 0.6); }

/* ---- Focus visibility ---- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ═══════ Responsive ═══════ */
@media (max-width: 1060px) {
  .vault-grid { grid-template-columns: 1fr 1fr; }
  .vault-lock { grid-column: span 2; max-width: 420px; }
  .quotes { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .quote:nth-child(2), .quote:nth-child(3) { margin-top: 0; }
}
@media (max-width: 860px) {
  .alt { display: none; }
  .vault-grid { grid-template-columns: 1fr; }
  .vault-lock { grid-column: auto; max-width: 100%; }
  .s-was { grid-template-columns: 1fr; min-height: 0; }
  .was-field { min-height: 240px; }
  .s-arc { height: auto; }
  .arc-sticky { position: static; min-height: 0; padding-top: 80px; }
  .arc-stage { height: auto; display: flex; flex-direction: column; gap: 18px; margin-top: 36px; }
  .p-card { position: static; width: 100%; transform: none !important; opacity: 1 !important; }
  .p-fused { transform: none !important; }
  .p-fused::before { opacity: 1; }
  .s-steps { height: auto; }
  .steps-sticky { position: static; grid-template-columns: 1fr; min-height: 0; padding-top: 80px; }
  .steps-stage { height: auto; display: flex; flex-direction: column; gap: 26px; perspective: none; }
  .scr, .scr.gone, .scr.on { position: static; opacity: 1; transform: none; transition: none; pointer-events: auto; }
  .mock { transform: none; }
  .tray { position: static; transform: none; margin-top: 10px; }
  .tkt { opacity: 1; transform: none; margin-top: 6px; }
  .panel-top { grid-template-columns: 1fr; }
  .diverge { grid-template-columns: 1fr; }
  .div-legend { grid-column: 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .sign-wrap { height: auto; }
  .sign-sticky { position: static; min-height: 0; }
  .nav-clock { display: none; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .hero-ring { display: none; }
  .mock-body { grid-template-columns: 1fr; }
  .mock-catalog { grid-template-columns: 1fr; }
  .mf-wide, .mock-cov, .mock-gap, .mock-items { grid-column: span 1; }
}

/* ═══════ Reduced motion ═══════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-line, .io-rise { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .hl-mask { transform: none; }
  .cue-thread { animation: none; }
  .scr { transition: none; }
  .tkt { transition: none; }
  .stamp { opacity: 1; transform: none; }
  .stamp.stamped { animation: none; }
  .stamp-signed.stamped { animation: none; transform: rotate(-4deg); }
}
