:root {
  color-scheme: dark;
  --ink: #f3f8f4;
  --muted: #c0ccc5;
  --field: #173a28;
  --field-deep: #0b2016;
  --mint: #67e7a5;
  --mint-soft: #d2fbe2;
  --ember: #ffb45f;
  --line: rgb(231 246 236 / 18%);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: geometricPrecision;
}

* { box-sizing: border-box; }
html { width: 100%; min-width: 320px; overflow-x: clip; background: var(--field-deep); scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
body { margin: 0; overflow-x: clip; color: var(--ink); background: var(--field-deep); }
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
::selection { color: #04100a; background: var(--mint); }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 11px 16px;
  color: var(--field);
  background: var(--mint-soft);
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.world-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #28543b, #0c2418 64%);
}
#world-canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.1s ease; }
.webgl-ready #world-canvas { opacity: 1; }
.world-poster { position: absolute; inset: 0; overflow: hidden; opacity: 1; transition: opacity .9s ease; }
.webgl-ready .world-poster { opacity: 0; pointer-events: none; }
.world-poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.08) saturate(.98) contrast(.96); }
.poster-card { position: absolute; padding: 10px 14px; color: var(--ink); background: rgb(2 7 5 / 78%); border: 1px solid var(--line); font-size: 11px; font-weight: 750; letter-spacing: .12em; }
.poster-card-a { top: 31%; right: 12%; }
.poster-card-b { right: 19%; bottom: 18%; color: var(--mint-soft); }
.world-vignette { position: absolute; inset: -2px; pointer-events: none; background: radial-gradient(circle at 54% 44%, transparent 32%, rgb(3 14 9 / 10%) 68%, rgb(2 10 6 / 54%) 118%); }

.world-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: max(14px, env(safe-area-inset-top)) clamp(20px, 3vw, 48px) 12px;
  border-bottom: 1px solid var(--line);
  background: rgb(8 21 15 / 76%);
  backdrop-filter: blur(18px) saturate(125%);
}
.world-brand { display: inline-flex; justify-self: start; align-items: center; min-height: 44px; gap: 11px; color: var(--ink); font-size: 14px; font-weight: 800; letter-spacing: .22em; text-decoration: none; }
.brand-mark { display: grid; width: 21px; height: 21px; place-items: center; color: #031008; background: var(--mint); font-size: 11px; font-weight: 900; letter-spacing: 0; }
.nav-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.status-pulse { width: 6px; height: 6px; background: var(--mint); border-radius: 50%; }
.workspace-link { display: inline-flex; min-height: 42px; align-items: center; justify-self: end; padding: 0 17px; color: #07150d; background: var(--mint); border-radius: 999px; font-size: 12px; font-weight: 800; text-decoration: none; }
.workspace-link span { display: inline-block; margin-left: 5px; transition: transform .35s ease; }
.workspace-link:hover span, .workspace-link:focus-visible span { transform: translate(3px, -3px); }

.chapter-rail { position: fixed; top: 50%; right: clamp(14px, 2vw, 32px); z-index: 25; transform: translateY(-50%); }
.chapter-rail ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.chapter-rail a { position: relative; display: grid; width: 44px; height: 44px; place-items: center; color: transparent; text-decoration: none; }
.chapter-rail a::before { width: 34px; height: 1px; background: rgb(238 245 239 / 34%); content: ""; transform: scaleX(.53); transform-origin: right; transition: transform .4s ease, background .4s ease; }
.chapter-rail a span { position: absolute; right: 34px; color: transparent; font-size: 11px; letter-spacing: .1em; transition: color .35s ease; }
.chapter-rail a[aria-current="true"]::before { background: var(--mint); transform: scaleX(1); }
.chapter-rail a[aria-current="true"] span { color: var(--muted); }

.live-hud {
  position: fixed;
  right: clamp(20px, 3vw, 48px);
  bottom: 14px;
  z-index: 20;
  width: min(300px, calc(100vw - 40px));
  padding: 8px 12px 10px;
  color: var(--muted);
  background: rgb(2 7 5 / 74%);
  border: 1px solid rgb(231 246 236 / 10%);
  border-radius: 3px;
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition: left .55s ease, right .55s ease;
}
body[data-chapter="identity"] .live-hud,
body[data-chapter="production"] .live-hud,
body[data-chapter="opportunities"] .live-hud { right: auto; left: clamp(20px, 3vw, 48px); }
.hud-kicker { display: none; }
.live-hud dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); }
.live-hud dl div { padding: 8px 9px 0 0; }
.live-hud dt { font-size: 11px; letter-spacing: .09em; }
.live-hud dd { margin: 3px 0 0; color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums; }

.story { position: relative; z-index: 10; }
.chapter {
  position: relative;
  display: grid;
  min-height: calc(100svh * var(--scroll-weight, 1));
  align-items: center;
  padding: 15vh clamp(26px, 7vw, 112px);
}
.chapter::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}
.chapter-left::before { background: linear-gradient(90deg, rgb(7 21 14 / 74%) 0%, rgb(7 21 14 / 38%) 43%, transparent 72%); }
.chapter-right::before { background: linear-gradient(270deg, rgb(7 21 14 / 74%) 0%, rgb(7 21 14 / 38%) 43%, transparent 72%); }
.chapter-center::before { background: radial-gradient(circle at center, rgb(7 21 14 / 78%) 0%, rgb(7 21 14 / 52%) 40%, transparent 76%); }
.chapter-copy { position: relative; z-index: 1; width: min(590px, 45vw); }
.chapter-right .chapter-copy { justify-self: end; margin-right: clamp(36px, 8vw, 140px); }
.chapter-left .chapter-copy { justify-self: start; }
.chapter-center .chapter-copy { justify-self: center; width: min(920px, 82vw); text-align: center; }
.chapter-hero { align-items: center; padding-top: 18vh; padding-bottom: 11vh; }
.chapter-index { margin: 0 0 18px; color: var(--mint); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.chapter h1, .chapter h2 { max-width: 12ch; margin: 0; color: var(--ink); font-family: var(--sans); font-size: clamp(48px, 6.15vw, 96px); font-weight: 650; letter-spacing: -.04em; line-height: .94; text-wrap: balance; }
.chapter h2 { font-size: clamp(44px, 5.6vw, 88px); }
.chapter-center h2 { max-width: 14ch; margin-inline: auto; }
.chapter-copy > p:not(.chapter-index) { max-width: 47ch; margin: 28px 0 0; color: #d2ddd6; font-size: clamp(16px, 1.35vw, 20px); line-height: 1.55; }
.chapter-center .chapter-copy > p { margin-inline: auto; }
.chapter-lead { font-family: var(--serif); font-size: clamp(18px, 1.6vw, 24px) !important; }
.chapter-caption { position: absolute; right: clamp(24px, 4vw, 58px); bottom: 7vh; margin: 0; color: var(--muted); font-size: 9px; letter-spacing: .18em; line-height: 1.7; text-align: right; }

.scroll-cue, .object-control {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  margin-top: 30px;
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  cursor: pointer;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 34px; }
.hero-cta { display: inline-flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 28px; padding: 0 10px 0 22px; color: #07150d; background: var(--mint); border-radius: 999px; font-size: 12px; font-weight: 850; letter-spacing: .03em; text-decoration: none; transition: transform .3s ease, background .3s ease; }
.hero-cta span:last-child { display: grid; width: 40px; height: 40px; place-items: center; color: var(--ink); background: #0c2117; border-radius: 50%; font-size: 16px; }
.hero-cta:hover, .hero-cta:focus-visible { background: var(--mint-soft); transform: translateY(-2px); }
.hero-actions .scroll-cue { min-height: 50px; margin-top: 0; }
.cue-line { width: 70px; height: 1px; background: var(--mint); transform-origin: left; transition: transform .45s ease; }
.scroll-cue:hover .cue-line, .scroll-cue:focus-visible .cue-line { transform: scaleX(1.35); }
.control-dot { width: 9px; height: 9px; border: 1px solid var(--mint); border-radius: 50%; transition: background .35s ease; }
.object-control[aria-pressed="true"] .control-dot { background: var(--mint); }

.truth-line { display: grid; grid-template-columns: 90px 1fr; gap: 18px; align-items: center; margin-top: 34px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.truth-line strong { color: var(--ink); font-size: 12px; font-weight: 650; }
.process-line { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 34px 0 0; padding: 0; background: var(--line); list-style: none; }
.process-line li { padding: 14px 10px; color: var(--muted); background: rgb(13 35 23 / 88%); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.process-line span { display: block; margin-bottom: 14px; color: var(--mint); font-size: 11px; }
.evidence-ledger { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 34px 0 0; background: var(--line); }
.evidence-ledger div { padding: 15px 13px; background: rgb(13 35 23 / 88%); }
.evidence-ledger dt { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.evidence-ledger dd { margin: 8px 0 0; color: var(--mint-soft); font-family: var(--serif); font-size: 16px; }
.final-cta { display: inline-flex; align-items: center; justify-content: space-between; width: min(440px, 100%); min-height: 68px; margin-top: 40px; padding: 0 8px 0 26px; color: #06100c; background: var(--mint); border: 1px solid var(--mint); border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .03em; text-decoration: none; transition: background .4s ease, color .4s ease; }
.cta-arrow { display: grid; width: 52px; height: 52px; place-items: center; color: var(--ink); background: #07120d; border-radius: 50%; font-size: 18px; transition: transform .45s ease; }
.final-cta:hover, .final-cta:focus-visible { color: var(--mint-soft); background: transparent; }
.final-cta:hover .cta-arrow, .final-cta:focus-visible .cta-arrow { transform: rotate(45deg); }

.world-footer { position: relative; z-index: 12; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; min-height: 34vh; align-items: end; padding: 8vh clamp(24px, 4vw, 56px) max(36px, env(safe-area-inset-bottom)); color: var(--muted); background: #030806; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: .08em; line-height: 1.7; }
.world-footer p:last-child { text-align: right; }
.world-footer strong { color: var(--ink); font-size: 18px; letter-spacing: .18em; }
.world-cursor { position: fixed; top: 0; left: 0; z-index: 50; display: grid; width: 54px; height: 54px; place-items: center; color: #06100c; background: var(--mint); border-radius: 50%; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.2); }
.world-cursor span { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fallback-message { position: fixed; left: 50%; bottom: 18px; z-index: 60; width: min(560px, calc(100vw - 32px)); padding: 12px 16px; color: var(--ink); background: #17271f; border: 1px solid var(--line); transform: translateX(-50%); font-size: 12px; text-align: center; }

.motion-word-mask { display: inline-block; overflow: hidden; vertical-align: top; }
.motion-word { display: inline-block; will-change: transform, opacity, filter; }
.js [data-motion-text] { visibility: visible; }

:focus-visible { outline: 2px solid var(--mint-soft); outline-offset: 5px; }

@media (max-width: 860px) {
  .world-nav { grid-template-columns: 1fr auto; min-height: 62px; padding: max(10px, env(safe-area-inset-top)) 18px 10px; }
  .nav-status { display: none; }
  .workspace-link { font-size: 11px; }
  .chapter-rail { right: 7px; }
  .chapter-rail a span { display: none; }
  .chapter { min-height: calc(100svh * max(.9, var(--scroll-weight, 1))); padding: calc(78px + 8vh) 28px 16vh; align-items: center; scroll-margin-top: 66px; }
  .chapter-copy, .chapter-right .chapter-copy, .chapter-center .chapter-copy { width: min(620px, calc(100vw - 72px)); margin: 0; justify-self: start; text-align: left; }
  .chapter h1, .chapter h2 { max-width: 11ch; font-size: clamp(43px, 11.4vw, 70px); line-height: .97; }
  .chapter-center h2 { margin: 0; }
  .chapter-center .chapter-copy > p { margin-inline: 0; }
  .chapter-copy > p:not(.chapter-index) { max-width: 38ch; font-size: 16px; }
  .chapter-caption { display: none; }
  .process-line { grid-template-columns: repeat(2, 1fr); }
  .evidence-ledger { grid-template-columns: 1fr; }
  .world-footer { grid-template-columns: 1fr 1fr; }
  .world-footer p:last-child { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 520px) {
  .world-nav { padding-top: max(10px, env(safe-area-inset-top)); }
  .world-brand { font-size: 12px; }
  .workspace-link { min-height: 38px; padding-inline: 15px; text-align: right; }
  .chapter { min-height: max(760px, 100svh); padding: calc(68px + 8vh) 20px 14vh; }
  .chapter-copy, .chapter-right .chapter-copy, .chapter-center .chapter-copy { width: calc(100vw - 50px); }
  .chapter h1, .chapter h2 { max-width: 100%; font-size: clamp(38px, 10.8vw, 48px); line-height: 1; overflow-wrap: normal; }
  .chapter-copy > p:not(.chapter-index) { margin-top: 22px; font-size: 15px; }
  .chapter-index { margin-bottom: 13px; }
  .truth-line { grid-template-columns: 70px 1fr; }
  .process-line { margin-top: 24px; }
  .chapter-rail { display: none; }
  .live-hud { display: none; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-cta { width: 100%; }
  .hero-actions .scroll-cue { align-self: flex-start; }
  .world-poster img { object-position: 44% center; }
  .webgl-ready body[data-chapter="direction"] .world-poster { opacity: 1; }
  .poster-card { display: none; }
  .chapter-left::before, .chapter-right::before, .chapter-center::before { background: linear-gradient(180deg, rgb(7 21 14 / 32%) 0%, rgb(7 21 14 / 72%) 52%, rgb(7 21 14 / 88%) 100%); }
  .world-footer { grid-template-columns: 1fr; min-height: 46vh; }
  .world-footer p:last-child { grid-column: auto; }
}

@media (pointer: coarse) {
  .world-cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #world-canvas, .world-cursor { display: none !important; }
  .world-poster { opacity: 1 !important; }
  .chapter { min-height: auto; padding-top: 22vh; padding-bottom: 22vh; }
  .chapter-hero { min-height: 100svh; }
  .motion-word { transform: none !important; opacity: 1 !important; filter: none !important; }
  .object-control { display: none; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

.webgl-failed .object-control { display: none; }

.no-js #world-canvas, .no-js .live-hud, .no-js .world-cursor { display: none; }
.no-js .world-poster { opacity: 1; }
