/* ---------- Tokens ---------- */
:root {
  --paper: #F7F6F2;
  --paper-2: #EFEEE7;
  --sage: #DFE8DE;
  --mist: #BFD6C6;
  --ink: #101512;
  --ink-2: #47514B;
  --ink-3: #68726B;
  --line: rgba(16, 21, 18, .1);
  --accent: #2D7A5A;
  --forest: #0A3D2B;
  --forest-2: #0E4A35;
  --on-dark: #F4F6F0;
  --on-dark-2: rgba(244, 246, 240, .72);

  --r-sm: 14px;
  --r-md: 24px;
  --r-lg: 40px;
  --gutter: clamp(16px, 3.6vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .7, .15, 1);
}

:root {
  --font: 'Inter Tight', system-ui, sans-serif;
  --display-weight: 200;
  --title-weight: 400;
  --display-track: -.03em;
  --title-track: -.015em;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Added after load, so arriving at #research from an article jumps there instead of scrolling past the whole hero. */
html.smooth { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2 { font-weight: var(--display-weight); letter-spacing: var(--display-track); line-height: 1.04; }
h3 { font-weight: var(--title-weight); letter-spacing: var(--title-track); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 16px; }

.sec-head { max-width: 1040px; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head h2 { font-size: clamp(38px, 5.2vw, 72px); }
.sec-head p { margin-top: 18px; color: var(--ink-2); font-size: clamp(17px, 1.5vw, 20px); max-width: 620px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 16px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap;
  transition: transform .4s var(--ease), background-color .3s, color .3s, box-shadow .3s;
}
.btn:active { transform: translateY(0) scale(.98); }
.btn--solid { background: var(--forest); color: var(--on-dark); }
.btn--ghost { background: rgba(16, 21, 18, .06); color: var(--ink); }
.btn--light { background: var(--on-dark); color: var(--forest); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 50; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: clamp(16px, 2.6vw, 36px);
  width: min(860px, calc(100vw - 32px));
  padding: 8px 8px 8px 22px; border-radius: 999px;
  background: rgba(247, 246, 242, .72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 0 0 1px rgba(16, 21, 18, .06), 0 10px 30px -14px rgba(10, 61, 43, .22);
}
.nav__menu { display: none; }
.menu[hidden] { display: none; }
.markets__desc { display: none; }
.nav__brand { display: inline-flex; align-items: center; min-height: 44px; }
.nav__brand img { height: 16px; width: auto; filter: brightness(0); }
.nav__links { display: flex; gap: clamp(14px, 2.2vw, 30px); margin-inline: auto; font-size: 15px; color: var(--ink-2); }
.nav__links a { transition: color .25s; }

/* ---------- 1. Gate ---------- */
.gate { position: relative; height: 360vh; height: 360svh; }
.gate__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--paper); --w: 0px; --h: 0px; }
:root { --band: 76px; }
.gate__scene {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  background: #0f4733 url(assets/horizon.jpg) center / cover no-repeat;
  clip-path: inset(100% 35% 0 35% round 200px 200px 0 0);
  will-change: clip-path;
}

.gate__echoes i {
  position: absolute; left: 50%; bottom: var(--b, 0px);
  width: calc(var(--w) + var(--n) * 2 * var(--gap));
  height: calc(var(--h) + var(--n) * var(--gap));
  transform: translateX(-50%);
  border: 1px solid rgba(45, 122, 90, var(--a));
  border-bottom: 0;
  border-radius: 9999px 9999px 0 0;
  --gap: clamp(12px, 1.2vw, 20px);
}
.gate__echoes i:nth-child(1) { --n: 1; --a: .32; }
.gate__echoes i:nth-child(2) { --n: 2; --a: .18; }
.gate__echoes i:nth-child(3) { --n: 3; --a: .09; }

.gate__intro { position: absolute; inset: 0; pointer-events: none; }
.gate__intro a { pointer-events: auto; }
.gate__title { position: absolute; left: 0; right: 0; top: clamp(84px, 11vh, 112px); padding-inline: var(--gutter); text-align: center; white-space: nowrap; font-size: clamp(44px, min(6.6vw, 13vh), 124px); }
.gate__sub {
  position: absolute; left: var(--gutter); bottom: calc(var(--band) + clamp(24px, 5vh, 48px));
  color: var(--ink-2); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.4;
}
.gate__sub span { display: block; white-space: nowrap; }
.gate__cta {
  position: absolute; right: var(--gutter); bottom: calc(var(--band) + clamp(24px, 5vh, 48px));
  display: flex; align-items: center; gap: 8px;
}


.gate__reveal {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(96px, 16vh, 150px) var(--gutter) 0;
  text-align: center; color: var(--on-dark);
  opacity: 0; visibility: hidden;
  /* Sky behind the type is deepened so small text holds 4.5:1 over the brightest pixel. */
  background: linear-gradient(180deg, rgba(6, 38, 28, .66) 0, rgba(6, 38, 28, .66) calc(var(--scrim, 480px) + 8px), rgba(6, 38, 28, 0) var(--scrim-end, 600px));
}
.gate__big {
  font-size: clamp(50px, min(9.6vw, 24vh), 164px); line-height: .98; letter-spacing: var(--display-track);
  text-wrap: balance;
}
.gate__subtitle { margin-top: clamp(10px, 1.8vh, 18px); font-size: clamp(22px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -.015em; }
.gate__line { margin-top: clamp(14px, 2.4vh, 24px); color: rgba(244, 246, 240, .9); max-width: 860px; font-size: clamp(19px, 1.9vw, 26px); line-height: 1.3; letter-spacing: -.01em; }

/* Logo band: visible on load, the arch stands on it */
.band {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--band);
  display: flex; align-items: center; gap: clamp(20px, 3vw, 44px);
  padding-inline: var(--gutter);
  background: var(--paper); border-top: 1px solid var(--line);
}
.band__label { flex: none; color: var(--ink-2); font-size: 15px; }
.band__view {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.band__track { display: flex; align-items: center; width: max-content; animation: band var(--dur, 44s) linear infinite; }
.band__track li { flex: none; padding-right: calc(clamp(44px, 6vw, 96px) + var(--loop-pad, 0px)); }
.band__track img { width: auto; filter: brightness(0); opacity: .78; }
.l-gs { height: 32px; } .l-gsr { height: 24px; } .l-jump { height: 38px; }
.l-hrt { height: 24px; } .l-p72 { height: 34px; } .l-rh { height: 21px; }
.l-nasa { height: 22px; } .l-bab { height: 30px; } .l-nyu { height: 24px; }
.band__named { display: flex; align-items: center; gap: 8px; }
.band__named span { color: var(--ink); opacity: .78; font-size: 17px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
@keyframes band { to { transform: translateX(-50%); } }

/* ---------- Our Thesis: one column per word ---------- */
.thesis { position: relative; height: 340vh; height: 340svh; color: var(--on-dark); }   /* one screen, plus 80vh of scrolling per card */
.thesis__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(6, 38, 28, .9) 0, rgba(6, 38, 28, .78) 55%, rgba(6, 38, 28, .2) 100%), url("assets/horizon.jpg") center bottom / cover no-repeat var(--forest);
}
.thesis__inner {
  width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: auto;
  padding: clamp(88px, 11vh, 112px) var(--gutter) 24px;
}
.thesis__title { font-size: clamp(38px, min(4.6vw, 8.4vh), 68px); line-height: 1.04; }
.thesis__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; margin-top: clamp(14px, 2.4vh, 24px); }
/* Five shared rows, so heading, lead, bullets, stats and notes line up across the cards */
.gcard { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; padding: clamp(16px, 2.2vh, 24px) clamp(18px, 1.8vw, 26px); border-radius: var(--r-md); background: var(--paper); color: var(--ink); }
.gcard h3 { font-size: clamp(24px, min(2.6vw, 4.6vh), 36px); line-height: 1.08; letter-spacing: var(--display-track); font-weight: var(--display-weight); color: var(--forest); }
.gcard__lead { margin-top: 6px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.25; font-weight: 500; letter-spacing: -.01em; text-wrap: pretty; }
.gcard ul { margin-top: clamp(8px, 1.4vh, 14px); }
.gcard li { position: relative; padding-left: 18px; font-size: clamp(14.5px, 1.1vw, 16px); line-height: 1.36; color: var(--ink-2); text-wrap: pretty; }
.gcard li + li { margin-top: clamp(5px, .9vh, 9px); }
.gcard li::before { content: ""; position: absolute; left: 0; top: .66em; width: 9px; height: 2px; border-radius: 2px; background: var(--accent); }
.thesis__stats { container-type: inline-size; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(6px, .7vw, 10px); padding-top: 12px; }
.thesis__stats div { display: flex; flex-direction: column; padding-top: 10px; border-top: 1px solid var(--line); }
.thesis__stats dd { order: -1; font-size: clamp(18px, 7.6cqi, 30px); line-height: 1.05; letter-spacing: var(--display-track); font-weight: var(--display-weight); color: var(--forest); }
.thesis__stats dt { margin-top: 3px; font-size: 13px; line-height: 1.25; color: var(--ink-2); }
.thesis__stats sup, .gcard__notes sup { font-size: .72em; line-height: 0; vertical-align: super; }
.gcard__notes { margin-top: 10px; font-size: 11.5px; line-height: 1.35; color: var(--ink-2); }
@container (max-width: 300px) {   /* three figures in a narrow card */
  .thesis__stats dt { font-size: 12px; }
}

/* ---------- Sheet rising over the gate ---------- */
.sheet {
  position: relative; z-index: 2; background: var(--paper);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  margin-top: -40px;
}

/* ---------- 2. Story ---------- */
.story { position: relative; height: 420vh; }
.story__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(84px, 11vh, 110px) 0 clamp(28px, 4vh, 40px);
  gap: clamp(20px, 3.4vh, 36px);
}
.story__head {
  width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
}
.story__head h2 { font-size: clamp(38px, min(4.6vw, 9vh), 68px); text-wrap: balance; }
.story__head p { color: var(--ink-2); font-size: clamp(17px, 1.5vw, 20px); max-width: 380px; padding-bottom: 6px; }
.story__window { overflow: hidden; }
.story__track { display: flex; gap: clamp(20px, 3vw, 44px); width: max-content; padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); will-change: transform; }

.era { display: flex; gap: clamp(20px, 2.4vw, 34px); align-items: flex-end; width: min(720px, 76vw); }
.era__arch { flex: none; height: min(56vh, 500px); aspect-ratio: 300 / 440; }
.era__arch svg { display: block; width: 100%; height: 100%; }
.era__bars { transition: none; }
.era__copy { padding-bottom: 8px; min-width: 0; }
.era__year { display: block; font-size: clamp(50px, 5.6vw, 84px); line-height: 1; letter-spacing: var(--display-track); font-weight: var(--display-weight); color: var(--forest); }
.era__place { display: block; margin-top: 8px; font-weight: 500; font-size: 18px; }
.era__text { margin-top: 10px; color: var(--ink-2); font-size: 17px; line-height: 1.42; }
.era__gate { display: inline-block; margin-top: 16px; padding: 8px 14px; border-radius: 999px; background: var(--sage); color: var(--forest); font-size: 15px; font-weight: 500; }
.era--open .era__gate { background: var(--forest); color: var(--on-dark); }

.story__rail { width: calc(100% - 2 * var(--gutter)); max-width: var(--max); margin-inline: auto; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; flex: none; }
.story__rail span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- 3. Today ---------- */
.today { position: relative; height: 240vh; height: 240svh; }
.today__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; }
.today__text {
  width: 100%; max-width: calc(1180px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter);
  font-size: clamp(32px, 5vw, 74px); line-height: 1.12; letter-spacing: var(--display-track); font-weight: var(--display-weight);
}
.today__text em { font-style: normal; display: block; margin-top: .5em; color: var(--accent); text-wrap: balance; }
.js .today__text .w { color: rgba(16, 21, 18, .12); transition: color .35s; }
.js .today__text .w.on { color: var(--ink); }
.js .today__text em .w.on { color: var(--accent); }

/* ---------- 4. Markets ---------- */
.markets { position: relative; height: 400vh; height: 400svh; }   /* one screen, plus 60vh of scrolling per asset class */
.markets__stage {
  position: sticky; top: 0; width: 100%; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(84px, 11vh, 104px); padding-bottom: clamp(16px, 3vh, 32px);
}
.markets .sec-head { flex: none; margin-bottom: clamp(16px, 3vh, 36px); }
.markets .sec-head h2 { font-size: clamp(34px, min(5.2vw, 8.4vh), 72px); }
.markets__body { flex: 1 1 auto; min-height: 0; max-height: 560px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: stretch; }
.mtab { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink-3); background: none; border: 0; border-top: 1px solid var(--line); padding: clamp(10px, 2vh, 20px) 0; cursor: pointer; }
.mtab:last-child { border-bottom: 1px solid var(--line); }
.mtab__name { display: block; font-size: clamp(24px, min(2.8vw, 4.4vh), 38px); line-height: 1.1; letter-spacing: var(--display-track); font-weight: var(--display-weight); transition: color .3s; }
.mtab__desc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease), margin .55s var(--ease); font-size: 17px; line-height: 1.42; color: var(--ink-2); }
.mtab__desc > span { overflow: hidden; }
.mtab[aria-selected="true"] .mtab__name { color: var(--ink); }
.mtab[aria-selected="true"] .mtab__desc { grid-template-rows: 1fr; margin-top: 10px; }

.markets__panel { position: relative; min-height: 0; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(180deg, var(--paper-2), var(--sage)); }
.markets__arch {
  position: absolute; left: 50%; bottom: 0; width: 46%; height: 78%; transform: translateX(-50%);
  border-radius: 9999px 9999px 0 0;
  background: #0f4733 url(assets/horizon.jpg) center bottom / auto 118% no-repeat;
}
.markets__rows {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: clamp(10px, 1.8vh, 18px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.mrow { display: flex; width: max-content; animation: mrow var(--dur, 60s) linear infinite; }
.mrow--rev { animation-direction: reverse; }
.mi { flex: none; padding-right: calc(10px + var(--loop-pad, 0px)); }
@keyframes mrow { to { transform: translateX(-50%); } }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--ink);
  font-size: 16px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 12px 26px -16px rgba(10, 61, 43, .4), 0 0 0 1px rgba(16, 21, 18, .04);
}
.chip img, .chip b { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.chip b { display: grid; place-items: center; background: var(--sym, var(--sage)); color: #fff; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.chip__pair { display: inline-flex; flex: none; }
.chip__pair img { width: 30px; height: 30px; box-shadow: 0 0 0 2px #fff; }
.chip__pair img + img { margin-left: -9px; }

/* ---------- 5. Builders ---------- */
.builders { padding-inline: clamp(8px, 1.4vw, 20px); }
.builders__inner {
  max-width: calc(var(--max) + 2 * var(--gutter) + 80px); margin-inline: auto;
  background: var(--forest); color: var(--on-dark);
  border-radius: var(--r-lg);
  padding: clamp(40px, 6.4vw, 96px) clamp(20px, 5vw, 84px) clamp(24px, 4vw, 56px);
}
.builders__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.builders h2 { font-size: clamp(38px, 5.2vw, 72px); }
.builders__intro > p { margin-top: 18px; color: var(--on-dark-2); font-size: clamp(17px, 1.5vw, 20px); max-width: 480px; }
.builders__stats { display: flex; gap: clamp(32px, 4vw, 64px); margin: clamp(28px, 3.6vw, 44px) 0; }
.builders__stats strong { display: block; font-size: clamp(44px, 5vw, 68px); line-height: 1; letter-spacing: var(--display-track); font-weight: var(--display-weight); }
.builders__stats small { font-size: .46em; margin-left: .12em; letter-spacing: -.01em; }
.builders__stats span { display: block; margin-top: 6px; color: var(--on-dark-2); font-size: 16px; }

.code { border-radius: var(--r-md); background: rgba(255, 255, 255, .06); padding: 10px; min-width: 0; }
.code__tabs { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.code__tabs button { font: inherit; font-size: 15px; color: var(--on-dark-2); background: none; border: 0; padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background-color .25s, color .25s; }
.code__tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .12); color: var(--on-dark); }
.code__body {
  margin: 0; padding: 20px 22px; border-radius: 16px; overflow: hidden;
  background: #072C1F; color: #DCE9DE; display: grid;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.6;
}
/* Wraps instead of scrolling, so no line can run off the side of the box. */
.code__ghost, .code__live { grid-area: 1 / 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.code__ghost { visibility: hidden; }
.code__body .k { color: #8FD1AE; }
.code__body .s { color: #F0DDA8; }
.code__body .c { color: #86A895; }
.code__caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 1px; vertical-align: text-bottom; background: #8FD1AE; }
.code__caret.done { animation: caret 1s steps(2, jump-none) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.code__src { display: block; padding: 10px 12px 2px; color: var(--on-dark-2); font-size: 14px; }

.builders__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: clamp(40px, 5.6vw, 80px); }
.builders__grid li { padding: 22px; border-radius: var(--r-md); background: rgba(255, 255, 255, .055); }
.builders__grid h3 { font-size: 19px; line-height: 1.2; }
.builders__grid p { margin-top: 8px; color: var(--on-dark-2); font-size: 16px; line-height: 1.42; }

/* ---------- 6. Team + research ---------- */
.research { padding-top: clamp(72px, 10vw, 130px); padding-bottom: clamp(72px, 10vw, 130px); }
.research__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rcard {
  display: flex; flex-direction: column; padding: 8px 8px 20px;
  border-radius: var(--r-md); background: var(--paper-2);
  transition: transform .5s var(--ease), background-color .3s;
}
/* Covers come from five different sources; a shared green tint makes them one set. Hover shows the original. */
.rcard__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 18px; background: #0E4A35; margin-bottom: 16px; }
.rcard__img img { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: luminosity; opacity: .92; transition: opacity .5s, transform .9s var(--ease); }
.rcard__img--crop img { object-position: 78% 30%; transform: scale(1.7); transform-origin: 80% 30%; }
.rcard__tag, .rcard h3, .rcard__meta { padding-inline: 14px; }
.rcard__tag { color: var(--accent); font-size: 15px; font-weight: 500; }
.rcard h3 { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.18; margin-top: 8px; text-wrap: balance; }
.rcard__meta { margin-top: auto; padding-top: 18px; color: var(--ink-3); font-size: 15px; }
.rcard--lead { grid-column: span 2; grid-row: span 2; background: var(--sage); }
.rcard--lead .rcard__img { aspect-ratio: auto; flex: 1; min-height: 240px; }
.rcard--lead h3 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.06; letter-spacing: var(--display-track); font-weight: var(--display-weight); }

/* ---------- 7. Close ---------- */
.close { text-align: center; padding-top: clamp(48px, 7vw, 96px); overflow: hidden; }
.close__copy { position: relative; z-index: 1; padding-inline: var(--gutter); }
.close h2 { font-size: clamp(40px, 6.6vw, 100px); text-wrap: balance; }
.close__sub { margin-top: clamp(8px, 1.2vw, 16px); color: var(--ink-2); font-size: clamp(22px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -.015em; }
.close__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: clamp(24px, 3vw, 36px); }
.close__arch {
  width: min(620px, 78vw); height: clamp(220px, 34vw, 420px);
  margin: clamp(44px, 6vw, 80px) auto 0;
  border-radius: 9999px 9999px 0 0;
  background: #0f4733 url(assets/horizon.jpg) center bottom / cover no-repeat;
}

/* ---------- Footer ---------- */
.foot { position: relative; z-index: 3; background: var(--forest); color: var(--on-dark); padding: clamp(40px, 5vw, 64px) var(--gutter) 24px; }
.foot__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; max-width: var(--max); margin-inline: auto; }
.foot__brand img { height: 20px; width: auto; }
.foot__brand p { margin-top: 12px; color: var(--on-dark-2); font-size: 16px; }
.foot__cols { display: flex; gap: clamp(32px, 6vw, 96px); flex-wrap: wrap; }
.foot__cols h3 { font-size: 15px; font-weight: 500; color: var(--on-dark-2); letter-spacing: 0; margin-bottom: 8px; }
.foot__cols a { display: block; padding: 3px 0; font-size: 16px; }
.foot__band {
  display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); max-width: var(--max);
  margin: clamp(32px, 4vw, 56px) auto 0; padding-top: clamp(20px, 2.4vw, 28px); border-top: 1px solid rgba(255, 255, 255, .12);
}
.foot__band .band__label { color: var(--on-dark-2); }
.foot__band .band__track img { filter: brightness(0) invert(1); opacity: .82; }
.foot__band .band__named span { color: var(--on-dark); opacity: .82; }
.foot__base { display: flex; justify-content: space-between; gap: 16px; max-width: var(--max); margin: clamp(20px, 2.4vw, 28px) auto 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); color: var(--on-dark-2); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- Scroll reveals ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Hover: only on devices that really hover ---------- */
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn--solid:hover { background: var(--accent); }
  .btn--ghost:hover { background: rgba(16, 21, 18, .1); }
  .band:hover .band__track, .foot__band:hover .band__track, .markets__panel:hover .mrow { animation-play-state: paused; }
  .nav__links a:hover, .mtab:hover .mtab__name { color: var(--ink); }
  .rcard:hover { transform: translateY(-4px); background: var(--sage); }
  .rcard--lead:hover { background: var(--mist); }
  .rcard:hover .rcard__img img { mix-blend-mode: normal; opacity: 1; transform: scale(1.03); }
  .rcard:hover .rcard__img--crop img { transform: scale(1.74); }
  .foot__cols a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
  .code__src:hover { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }
}

/* Short screens: the heading gives its supporting line to the markets themselves */
@media (max-height: 780px) {
}

/* Fingers need bigger targets than the pointer, even on a wide iPad */
@media (pointer: coarse) {
  .nav__links a { padding: 12px 6px; }
  .code__tabs button { min-height: 44px; }
  .nav .btn--sm { min-height: 44px; }
  .foot__cols a { padding: 9px 0; }
}

/* ---------- Tablet and down ---------- */
@media (max-width: 1240px) {
  .gate__cta { flex-direction: column; align-items: flex-end; }
}
@media (max-width: 1080px) {
  .research__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builders__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Touch layout: phones, small tablets, and anything too short to pin ---------- */
@media (max-width: 860px), (max-height: 520px) {
  body { font-size: 17px; }

  .nav { padding-left: 18px; gap: 6px; background: rgba(247, 246, 242, .94); }
  .nav__links { display: none; }
  .nav__brand { margin-right: auto; }
  .nav .btn--sm { min-height: 44px; }
  .nav__menu { display: block; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(16, 21, 18, .06); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
  .menu {
    position: fixed; z-index: 49; top: 80px; left: 16px; right: 16px;
    max-height: calc(100vh - 96px); max-height: calc(100svh - 96px); overflow-y: auto;
    display: flex; flex-direction: column; padding: 10px; border-radius: var(--r-md);
    background: var(--paper);
    box-shadow: 0 0 0 1px rgba(16, 21, 18, .06), 0 20px 40px -20px rgba(10, 61, 43, .35);
  }
  .menu a:not(.btn) { display: flex; align-items: center; min-height: 48px; padding: 0 12px; font-size: 19px; border-bottom: 1px solid var(--line); }
  .menu .btn { margin-top: 10px; }

  /* Thesis: stacked cards */
  .thesis { height: auto; }
  .thesis__stage { position: static; display: block; height: auto; overflow: visible; }
  .thesis__inner { padding-block: 96px 88px; }
  .thesis__title { font-size: clamp(38px, 11vw, 64px); }
  .thesis__grid { grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
  .gcard { padding: 20px; margin-bottom: 12px; }
  .gcard h3 { font-size: 34px; }
  .gcard__lead { font-size: 18px; }
  .gcard li { font-size: 16px; }
  .thesis__stats { margin-top: 16px; }

  /* Story: native swipe in place of the pinned scroll */
  .story { height: auto; }
  .story__stage { position: static; height: auto; padding: 108px 0 40px; }
  .story__head { display: block; }
  .story__head p { margin-top: 12px; max-width: none; }
  .story__window { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .story__window::-webkit-scrollbar { display: none; }
  .story__track { padding-inline: var(--gutter); gap: 14px; transform: none !important; }
  .era { flex-direction: column; align-items: stretch; width: 74vw; max-width: 320px; gap: 14px; scroll-snap-align: center; }
  .era__arch { height: auto; width: 100%; }

  .today { height: 220vh; height: 220svh; }

  /* Markets: tabs become swipeable pills above the panel, so the panel never leaves the screen */
  .markets__body { max-height: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
  .markets__list { position: relative; display: flex; gap: 6px; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .markets__list::-webkit-scrollbar { display: none; }
  .mtab, .mtab:last-child { flex: none; width: auto; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--paper-2); }
  .mtab__name { font-size: 16px; letter-spacing: 0; font-weight: 500; }
  .mtab__desc { display: none; }
  .mtab[aria-selected="true"] { background: var(--forest); }
  .mtab[aria-selected="true"] .mtab__name { color: var(--on-dark); }
  .markets__panel { min-height: 0; border-radius: var(--r-md); }
  .markets__desc { display: block; color: var(--ink-2); font-size: 17px; line-height: 1.42; min-height: 3em; }
  .chip { font-size: 15px; padding: 6px 14px 6px 6px; }
  .chip img, .chip b { width: 28px; height: 28px; }
  .chip b { font-size: 13px; }
  .chip__pair img { width: 26px; height: 26px; }

  /* Builders */
  .builders__top { grid-template-columns: minmax(0, 1fr); }
  .builders__inner { padding-inline: 16px; border-radius: var(--r-md); }
  .code { padding: 6px; }
  .code__tabs { scrollbar-width: none; }
  .code__tabs::-webkit-scrollbar { display: none; }
  .code__tabs button { min-height: 44px; flex: none; }
  .code__body { font-size: 12.5px; padding: 14px; }
  .code__ghost { display: none; }
  .code__ghost.on { display: block; }

  .foot__cols a { padding: 9px 0; }
}

/* ---------- Portrait phones: hero stacks, gate sits under the headline ---------- */
@media (max-width: 860px) and (min-height: 521px) {
  :root { --band: 86px; }
  .band { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; text-align: center; }
  .foot__band { flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
  .band__label { font-size: 14px; }
  .l-gs { height: 26px; } .l-gsr { height: 20px; } .l-jump { height: 30px; }
  .l-hrt { height: 20px; } .l-p72 { height: 28px; } .l-rh { height: 18px; }
  .l-nasa { height: 18px; } .l-bab { height: 26px; } .l-nyu { height: 20px; }
  .band__named span { font-size: 15px; }

  .gate__intro { display: flex; flex-direction: column; align-items: center; padding: 96px var(--gutter) 0; }
  .gate__title { position: static; padding-inline: 0; white-space: normal; text-align: center; font-size: clamp(42px, 12.4vw, 76px); line-height: 1.02; }
  .gate__word { display: block; white-space: normal; }
  .gate__sub { position: static; margin-top: 12px; text-align: center; font-size: min(17px, 4.6vw); line-height: 1.35; }
  .gate__cta { left: 50%; right: auto; bottom: calc(var(--band) + 18px); transform: translateX(-50%); flex-direction: column; align-items: stretch; width: min(216px, calc(100vw - 2 * var(--gutter))); }
  .gate__cta .btn { width: 100%; }
  .gate__cta .btn--ghost { background: rgba(247, 246, 242, .86); }
  .gate__big { font-size: clamp(46px, 14vw, 88px); }
  .gate__reveal { padding-top: 88px; }
}

/* ---------- Landscape phones: keep the wide hero, compressed ---------- */
@media (max-height: 520px) {
  :root { --band: 52px; }
  .nav { top: 8px; }
  .menu { top: 72px; max-height: calc(100vh - 80px); max-height: calc(100svh - 80px); }
  .gate__title { top: 74px; font-size: clamp(30px, min(5vw, 11vh), 46px); }
  .gate__sub { font-size: 14px; line-height: 1.3; bottom: calc(var(--band) + 12px); }
  .gate__cta { bottom: calc(var(--band) + 10px); gap: 6px; }
  .gate__cta .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
  .band__label { font-size: 13px; }
  .band__track img { max-height: 26px; }
  .band__named span { font-size: 14px; }
  .gate__reveal { padding-top: 72px; }
  .gate__big { font-size: min(8.4vw, 19vh); }
  .gate__subtitle { font-size: 20px; margin-top: 6px; }
  .gate__line { margin-top: 8px; font-size: 15px; max-width: 640px; }

  .thesis__grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .story__stage { padding-top: 84px; }
  .era { flex-direction: row; align-items: flex-end; width: min(560px, 84vw); max-width: none; }
  .era__arch { flex: none; width: auto; height: min(68vh, 280px); }
  .era__year { font-size: 40px; }
  .era__text { font-size: 15px; }
  .era__gate { margin-top: 10px; }

  .markets { height: auto; }
  .markets__stage { position: static; height: auto; padding-block: 96px 56px; }
  .markets__body { grid-template-rows: auto 300px auto; }

  .today { height: auto; }
  .today__stage { position: static; height: auto; padding-block: 96px 72px; }
  .today__text { font-size: clamp(26px, 4.6vw, 40px); }
  .js .today__text .w { color: var(--ink); }
  .js .today__text em .w { color: var(--accent); }
}

/* Not enough room beside the arch: the line sits under the headline. main.js sets its top. */
@media (min-width: 861px) and (max-width: 1040px), (max-height: 520px) {
  .gate__sub { left: var(--gutter); right: var(--gutter); bottom: auto; text-align: center; }
  .gate__sub span { display: inline; }
}

@media (max-width: 560px) {
  :root { --display-weight: 300; }   /* the 200 weight goes faint at phone sizes */
  .research__grid, .builders__grid { grid-template-columns: minmax(0, 1fr); }
  .rcard--lead { grid-column: auto; }
  .rcard--lead .rcard__img { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .thesis__stats { gap: 8px; }
}

/* Narrow and short at once: all three thesis cards still have to fit in one screen */
@media (min-width: 861px) and (max-width: 1040px) and (min-height: 521px) and (max-height: 600px) {
  .gcard { padding: 12px 14px; }
  .gcard__lead { font-size: 15px; }
  .gcard li { font-size: 13.5px; line-height: 1.28; }
}

/* Short desktop windows: the timeline copy has to fit beside the arch */
@media (min-width: 861px) and (min-height: 521px) and (max-height: 660px) {
  .era__year { font-size: 44px; }
  .era__place { margin-top: 4px; font-size: 16px; }
  .era__text { margin-top: 6px; font-size: 15px; line-height: 1.36; }
  .era__gate { margin-top: 10px; padding: 6px 12px; font-size: 14px; }
}

/* ---------- Reduced motion: no pinning, no drift ---------- */
@media (prefers-reduced-motion: reduce) {
  html.smooth { scroll-behavior: auto; }
  .thesis { height: auto; }
  .thesis__stage { position: static; display: block; height: auto; overflow: visible; }
  .thesis__inner { padding-block: 96px 88px; }
  .gate { height: auto; }
  .band__track { animation: none; flex-wrap: wrap; width: auto; }
  .band__track li { padding-right: 36px; }
  .band__view { -webkit-mask-image: none; mask-image: none; }
  .gate__stage { position: relative; height: auto; overflow: visible; }
  .gate__scene { height: 100vh; }
  .gate__intro { position: relative; inset: auto; height: 100vh; }
  .gate__reveal { position: relative; inset: auto; padding-block: 96px 136px; background: var(--forest); }
  .markets { height: auto; }
  .markets__stage { position: static; height: auto; padding-block: 96px 72px; }
  .markets__body { max-height: none; grid-template-rows: auto; }
  .mrow { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: 8px; padding-inline: 16px; }
  .markets__rows { position: relative; padding-block: 24px; -webkit-mask-image: none; mask-image: none; }
  .markets__arch { display: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .today { height: auto; }
  .today__stage { position: static; height: auto; padding-block: 96px; }
  .js .today__text .w { color: var(--ink); transition: none; }
  .js .today__text em .w { color: var(--accent); }
  .story { height: auto; }
  .story__stage { position: static; height: auto; }
  .story__window { overflow-x: auto; }
}
