:root {
  --paper: #efe9dc;
  --paper-2: #e7e0d0;
  --ink: #171814;
  --ink-2: #4b4a42;
  --ink-3: #7c796c;
  --rule: rgba(23, 24, 20, .16);
  --rule-2: rgba(23, 24, 20, .32);
  --night: #0d100e;
  --night-2: #151915;
  --snow: #f4f1ea;
  --snow-2: rgba(244, 241, 234, .66);
  --snow-rule: rgba(244, 241, 234, .16);
  --green: #1d7a4c;
  --green-lt: #9fe6bf;
  --orange: #c9501c;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--night); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; font-feature-settings: "ss01"; }
::selection { background: var(--green-lt); color: var(--ink); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.mono { font-family: var(--mono); font-feature-settings: "tnum", "zero"; }
.green { color: var(--green); }
.dirty { color: var(--orange); }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
sup { font: 500 .62em var(--mono); line-height: 0; }
sup a { text-decoration: none; color: var(--green); padding: 0 1px; }
.sheet { width: min(1240px, 100% - 80px); margin-inline: auto; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 20px max(40px, calc((100% - 1240px) / 2));
  color: var(--snow);
  transition: background-color 280ms ease, color 280ms ease, padding 280ms var(--ease), border-color 280ms ease;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: rgba(239, 233, 220, .92); backdrop-filter: blur(10px); color: var(--ink); padding-block: 12px; border-color: var(--rule); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 400 26px/1 var(--serif); letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav-links a { text-decoration: none; opacity: .78; transition: opacity 150ms ease; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.nav-cta { text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 14px; border: 1px solid currentColor; border-radius: 3px; transition: background-color 160ms ease, color 160ms ease; }
.nav-cta:hover { background: var(--snow); color: var(--ink); border-color: var(--snow); }
.nav.solid .nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- buttons & links ---------- */
.cta {
  display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px;
  background: var(--snow); color: var(--ink); text-decoration: none; border-radius: 3px;
  font-weight: 550; font-size: 15.5px; letter-spacing: -0.005em;
  transition: background-color 160ms ease, transform 160ms var(--ease);
}
.cta span { transition: transform 220ms var(--ease); }
.cta:hover { background: #fff; }
.cta:hover span { transform: translateX(4px); }
.cta:active { transform: translateY(1px); }
.textlink { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--rule-2); transition: text-decoration-color 150ms ease; font-weight: 500; }
.textlink:hover { text-decoration-color: currentColor; }
.textlink.light { color: var(--snow); text-decoration-color: rgba(244,241,234,.4); }
.textlink.light:hover { text-decoration-color: var(--snow); }
.textlink .mono { font-size: 12px; opacity: .7; margin-left: 4px; }
:focus-visible { outline: 2px solid var(--green-lt); outline-offset: 3px; }

/* ---------- hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 740px; overflow: hidden; isolation: isolate; color: var(--snow);
  background: linear-gradient(180deg, #2c5f9e 0%, #8db6d8 45%, #d9c7a6 62%, #3e6a3a 63%, #22401f 100%);
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 900ms ease; z-index: -2; touch-action: pan-y; }
#scene.ready { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,10,9,.5) 0%, rgba(8,10,9,0) 20%),
    linear-gradient(90deg, rgba(8,10,9,.55) 0%, rgba(8,10,9,.18) 45%, rgba(8,10,9,0) 65%),
    linear-gradient(0deg, rgba(13,16,14,1) 0%, rgba(13,16,14,.86) 18%, rgba(13,16,14,0) 46%);
}
.hero-copy { position: absolute; left: max(40px, calc((100% - 1240px) / 2)); right: max(40px, calc((100% - 1240px) / 2)); bottom: 196px; will-change: transform, opacity; }
h1 { font: 400 clamp(60px, 8.4vw, 132px)/.88 var(--serif); letter-spacing: -0.02em; text-shadow: 0 2px 30px rgba(0,0,0,.18); }
h1 em { color: var(--green-lt); }
.hero-row { display: grid; grid-template-columns: minmax(0, 46ch) auto; justify-content: space-between; align-items: end; gap: 40px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--snow-rule); max-width: 900px; }
.sub { margin: 0; font-size: 17px; line-height: 1.5; color: rgba(244,241,234,.86); }
.hero-actions { display: flex; align-items: center; gap: 24px; white-space: nowrap; }

.hud { position: absolute; right: max(40px, calc((100% - 1240px) / 2)); bottom: 196px; width: 250px; padding-top: 14px; border-top: 1px solid var(--snow-rule); will-change: transform; }
.hud p { margin: 0; }
.hud-when { font-size: 11.5px; color: var(--snow-2); }
.hud-I { display: flex; align-items: baseline; gap: 10px; margin-top: 6px !important; }
.hud-I b { font: 400 76px/.9 var(--serif); letter-spacing: -0.02em; font-feature-settings: "lnum"; transition: color 300ms ease; }
.hud-I span { font-size: 11.5px; color: var(--snow-2); }
.hud-verdict { margin-top: 8px !important; font: italic 400 19px/1.25 var(--serif); color: var(--snow); min-height: 24px; }

.timeline { position: absolute; left: max(40px, calc((100% - 1240px) / 2)); right: max(40px, calc((100% - 1240px) / 2)); bottom: 30px; }
.timeline[hidden] { display: none; }
.tl-head { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 11.5px; color: var(--snow-2); }
.tl-title { margin-right: auto; }
.tl-btn { height: 26px; padding: 0 10px; border: 0; border-radius: 2px; background: transparent; color: var(--snow); font: 500 11.5px var(--mono); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(244,241,234,.35); }
.tl-btn:hover { text-decoration-color: var(--snow); }
.tl-btn[aria-pressed="true"] { background: var(--snow); color: var(--ink); text-decoration: none; }
.tl-track { position: relative; height: 56px; cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; border-bottom: 1px solid var(--snow-rule); }
.tl-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 1px; }
.tl-bars i { flex: 1; min-width: 1px; opacity: .78; }
.tl-best { position: absolute; top: -10px; bottom: -1px; border: 1px solid var(--green-lt); border-bottom: 0; pointer-events: none; }
.tl-best::before { content: attr(data-label); position: absolute; left: -1px; bottom: 100%; margin-bottom: 4px; white-space: nowrap; font: 500 10.5px var(--mono); color: var(--green-lt); }
.tl-cursor { position: absolute; top: -14px; bottom: -6px; width: 1px; background: var(--snow); pointer-events: none; transition: left 90ms linear; }
.tl-cursor::before { content: ""; position: absolute; top: -1px; left: -4px; border: 4.5px solid transparent; border-top: 6px solid var(--snow); }
.tl-cursor::after { content: attr(data-label); position: absolute; left: 6px; bottom: 0; white-space: nowrap; font: 500 10.5px var(--mono); color: var(--snow); background: rgba(13,16,14,.75); padding: 1px 5px; }
.tl-axis { position: relative; height: 16px; margin-top: 8px; font-size: 10.5px; color: var(--snow-2); }
.tl-axis span { position: absolute; white-space: nowrap; }
.tl-axis span::before { content: ""; position: absolute; left: 0; top: -9px; width: 1px; height: 5px; background: var(--snow-rule); }

/* ---------- sections ---------- */
.paper { background: var(--paper); color: var(--ink); padding: 128px 0; border-bottom: 1px solid var(--rule); }
.paper + .paper { padding-top: 112px; }
.dark { background: var(--night); color: var(--snow); padding: 128px 0; }
h2 { font: 400 clamp(46px, 6.2vw, 92px)/.95 var(--serif); letter-spacing: -0.02em; max-width: 14ch; }
h2 em { color: var(--green); }
.dark h2 em { color: var(--green-lt); }
.intro { margin: 26px 0 0; max-width: 52ch; font-size: 18px; color: var(--ink-2); }
.dark .intro { color: var(--snow-2); }

/* the idea */
#why .big { margin: 0 0 28px; max-width: 30ch; font: 400 clamp(30px, 3.4vw, 46px)/1.16 var(--serif); letter-spacing: -0.01em; color: var(--ink); }
#why .big b { font-weight: 400; font-feature-settings: "lnum"; }
.hl { background: linear-gradient(transparent 62%, rgba(29,122,76,.18) 62%); padding: 0 2px; }
.source { margin: 0; font-size: 12px; color: var(--ink-3); }
.source a { color: inherit; text-underline-offset: 3px; }

.ledger { width: 100%; margin-top: 72px; border-collapse: collapse; }
.ledger td { padding: 26px 0; border-top: 1px solid var(--rule); vertical-align: baseline; }
.ledger tr:last-child td { border-bottom: 1px solid var(--rule); }
.ledger .num { width: 38%; padding-right: 40px; font: 400 clamp(46px, 5.4vw, 76px)/1 var(--serif); letter-spacing: -0.02em; white-space: nowrap; font-feature-settings: "lnum"; }
.ledger .num small { margin: 0 8px; font: 400 13px var(--mono); letter-spacing: 0; color: var(--ink-3); }
.ledger td:last-child { max-width: 52ch; font-size: 17px; color: var(--ink-2); }

/* § 2 figure */
.fig { margin: 56px 0 0; padding-top: 18px; border-top: 1.5px solid var(--ink); }
.fig-controls { display: flex; flex-wrap: wrap; gap: 14px 48px; }
.pick { display: flex; align-items: baseline; gap: 16px; }
.pick > .mono { font-size: 11.5px; color: var(--ink-3); }
.opts { display: flex; gap: 18px; }
.opts button { padding: 4px 0; border: 0; background: none; font-size: 16px; color: var(--ink-3); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 7px; text-decoration-thickness: 1.5px; transition: color 150ms ease, text-decoration-color 150ms ease; }
.opts button:hover { color: var(--ink); }
.opts button[aria-pressed="true"] { color: var(--ink); text-decoration-color: var(--ink); }
.opts.on-dark button { color: var(--snow-2); font-size: 13px; }
.opts.on-dark button:hover, .opts.on-dark button[aria-pressed="true"] { color: var(--snow); text-decoration-color: var(--snow); }
.chart-wrap { position: relative; margin-top: 64px; }
.demo-chart { height: 260px; border-bottom: 1px solid var(--ink); }
.demo-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.demo-axis { position: relative; height: 18px; margin-top: 10px; font-size: 11px; color: var(--ink-3); }
.demo-axis span { position: absolute; white-space: nowrap; }
.anno { position: absolute; bottom: calc(100% - 10px); display: flex; align-items: flex-end; gap: 2px; transform: translateX(-100%); color: var(--green); pointer-events: none; transition: left 400ms var(--ease); }
.anno span { font: italic 400 20px/1 var(--serif); white-space: nowrap; transform: translateY(-14px) rotate(-3deg); }
.anno.flip { transform: none; flex-direction: row-reverse; }
.anno.flip svg { transform: scaleX(-1); }
.verdict { margin: 40px 0 0; max-width: 34ch; font: 400 clamp(26px, 3vw, 38px)/1.2 var(--serif); letter-spacing: -0.01em; }
.verdict b { font-weight: 400; font-feature-settings: "lnum"; border-bottom: 1px solid currentColor; }

/* § 3 */
.steps { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.steps li { padding: 22px 32px 0 0; border-top: 1px solid var(--ink); }
.steps li + li { padding-left: 32px; border-left: 1px solid var(--rule); }
.steps .mono { font-size: 12px; color: var(--ink-3); }
.steps h3 { margin: 18px 0 14px; font: 400 30px/1.08 var(--serif); letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* film: sits right under the hero, so it continues the hero's night colour */
.dark.film { padding: 64px 0 120px; }
.film-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 38ch); gap: 48px; align-items: end; margin-bottom: 36px; }
.film-title { font-size: clamp(36px, 4.2vw, 60px); line-height: 1; max-width: 18ch; }
.film-note { margin: 0; color: var(--snow-2); font-size: 16px; }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--snow-rule); border-radius: 6px; overflow: hidden; background: #000; box-shadow: 0 50px 100px -50px rgba(0,0,0,.9); }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video iframe.preview { opacity: 0; pointer-events: none; transform: scale(1.02); transition: opacity 700ms ease; }
.video.previewing iframe.preview { opacity: 1; }
.video-hit { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 0; border: 0; cursor: pointer; background: linear-gradient(0deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 32%), rgba(0,0,0,.12); transition: background-color 200ms ease; }
.video-hit:hover { background-color: rgba(0,0,0,.02); }
.play-big { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: var(--snow); color: var(--ink); box-shadow: 0 0 0 10px rgba(244,241,234,.16), 0 20px 40px -10px rgba(0,0,0,.6); transition: transform 220ms var(--ease), box-shadow 220ms ease; }
.play-big svg { width: 32px; height: 32px; margin-left: 4px; }
.video-hit:hover .play-big { transform: scale(1.07); box-shadow: 0 0 0 16px rgba(244,241,234,.12), 0 20px 40px -10px rgba(0,0,0,.6); }
.video-bar { position: absolute; left: 22px; right: 22px; bottom: 18px; z-index: 3; display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--snow); pointer-events: none; }
.vb-prev { display: none; }
.video.previewing .vb-idle { display: none; }
.video.previewing .vb-prev { display: inline; }
.video-bar .track { flex: 1; height: 3px; border-radius: 2px; background: rgba(244,241,234,.28); overflow: hidden; }
.video-bar .track i { display: block; width: 0; height: 100%; background: var(--snow); }
.video.previewing .track i { animation: film-progress 62s linear infinite; }
@keyframes film-progress { to { width: 100%; } }

/* § 4 collage */
.collage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 32px; margin-top: 72px; }
.collage figure { margin: 0; }
.c-main { grid-column: 1 / span 8; grid-row: span 2; }
.c-side { grid-column: 9 / span 4; }
.frame { border-radius: 6px; overflow: hidden; border: 1px solid var(--rule-2); background: #0e1110; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 40px 70px -40px rgba(60, 45, 20, .55); }
.frame img { display: block; width: 100%; height: auto; scale: 1.06; will-change: transform; }
.collage figcaption { margin-top: 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

/* § 5 plug */
.plug-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.plug-copy h2 { max-width: 11ch; }
.plug-stage { position: relative; height: 620px; border-radius: 4px; overflow: hidden; border: 1px solid var(--snow-rule); background: #0f1210; }
.plug-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.plug-ctl { position: absolute; left: 20px; right: 20px; bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 12px; }

/* § 6 math */
.equation { margin: 64px 0 0; padding: 40px 0 34px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); text-align: center; }
.eq { margin: 0; font: italic 400 clamp(34px, 5vw, 68px)/1.1 var(--serif); letter-spacing: -0.01em; }
.eq i { font-style: italic; }
.eq sub { font-size: .46em; font-style: italic; vertical-align: -0.35em; line-height: 0; }
.where { margin: 18px 0 0; font-size: 15px; color: var(--ink-2); }
.ledger.scale { margin-top: 80px; }
.ledger.scale .num { color: var(--green); }

/* faq */
.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; margin-top: 56px; }
.qa > div { padding: 26px 0 30px; border-top: 1px solid var(--rule); }
.qa h3 { font: 400 28px/1.1 var(--serif); letter-spacing: -0.01em; }
.qa p { margin: 12px 0 0; color: var(--ink-2); font-size: 16px; max-width: 48ch; }

/* end */
.final { padding: 168px 0 140px; background: radial-gradient(80% 120% at 85% 120%, rgba(159,230,191,.14), rgba(159,230,191,0) 60%), var(--night); }
.final h2 { max-width: none; font-size: clamp(56px, 9vw, 144px); line-height: .88; }
.final-row { display: flex; align-items: center; gap: 28px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--snow-rule); }
.final-row p { margin: 0; color: var(--snow-2); }

.foot { background: var(--night); color: var(--snow-2); padding: 0 0 48px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid var(--snow-rule); font-size: 13px; }
.foot-row nav { display: flex; gap: 20px; }
.foot a { color: var(--snow-2); text-underline-offset: 3px; }
.foot a:hover { color: var(--snow); }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 700ms ease, transform 800ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tl-cursor, .anno { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hud { width: 210px; }
  .hud-I b { font-size: 60px; }
}
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .sheet { width: calc(100% - 48px); }
  .paper, .dark { padding: 88px 0; }
  .hero { min-height: 780px; }
  .hero-copy { left: 24px; right: 24px; bottom: 236px; }
  .hero-row { grid-template-columns: 1fr; gap: 22px; }
  .hud { left: 24px; right: 24px; bottom: 164px; width: auto; display: flex; align-items: baseline; gap: 14px; padding-top: 10px; }
  .hud-when { display: none; }
  .hud-I { margin: 0 !important; }
  .hud-I b { font-size: 38px; }
  .hud-I span { display: none; }
  .hud-verdict { margin: 0 !important; font-size: 17px; }
  .timeline { left: 24px; right: 24px; bottom: 20px; }
  .tl-title { display: none; }
  .tl-head { justify-content: flex-end; }
  .tl-track { height: 46px; }
  .tl-best::before { display: none; }
  .tl-axis span:nth-child(even) { display: none; }
  .ledger .num { width: auto; display: block; padding: 22px 0 8px; border-top: 1px solid var(--rule); }
  .ledger td { display: block; }
  .ledger td:last-child { border-top: 0; padding-top: 0; }
  .steps, .qa { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 20px 0 28px; border-left: 0; }
  .collage { grid-template-columns: 1fr; gap: 36px; }
  .c-main, .c-side { grid-column: auto; grid-row: auto; }
  .plug-grid { grid-template-columns: 1fr; gap: 40px; }
  .plug-stage { height: 460px; order: -1; }
  .anno { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { padding: 16px 20px; }
  .nav.solid { padding-block: 10px; }
  h1 { font-size: 58px; }
  .sub { font-size: 15.5px; }
  .hero-actions { gap: 18px; }
  .cta { height: 48px; padding: 0 18px; }
  .fig-controls { flex-direction: column; gap: 10px; }
  .opts { gap: 14px; flex-wrap: wrap; }
  .opts button { font-size: 15px; }
  .chart-wrap { margin-top: 32px; }
  .demo-chart { height: 180px; }
  .demo-axis span:nth-child(even) { display: none; }
  .play-big { width: 64px; height: 64px; }
  .play-big svg { width: 24px; height: 24px; }
  .video-bar { left: 14px; right: 14px; bottom: 12px; font-size: 11px; }
  .vb-state { display: none; }
  .film-row { grid-template-columns: 1fr; gap: 16px; }
  .final-row { flex-direction: column; align-items: flex-start; }
}
