/* =====================================================================
   Latent — Humane Studies for AI
   A descent into latent space, lit by human culture.
   ===================================================================== */

:root {
  --ink: #07090F;
  --ink-2: #0B101B;
  --navy: #1E2D45;
  --navy-2: #111A2A;
  --ivory: #EFE7D6;
  --ivory-2: #BDB5A4;   /* 9.7:1 on ink */
  --ivory-3: #8C8779;   /* 5.5:1 on ink */
  --line: rgba(239, 231, 214, 0.14);
  --line-strong: rgba(239, 231, 214, 0.28);
  --amber: #FFB54A;
  --amber-ink: #8A5712; /* 4.9:1 on ivory */
  --paper-text: #1A1C22;
  --paper-muted: #4A4A4F;
  --paper-line: rgba(7, 9, 15, 0.16);

  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4.2vw, 64px);
  --header-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.83, 0, 0.17, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--ivory);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
em { font-style: italic; }
cite { font-style: italic; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

::selection { background: var(--amber); color: var(--ink); }

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}
[tabindex="-1"]:focus { outline: none; }
.lab :focus-visible { outline-color: var(--amber-ink); }

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--amber);
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- underline-draw links ---------- */
.ulink {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--line-strong), var(--line-strong));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.6s var(--ease), color 0.3s;
}
.ulink:hover, .ulink:focus-visible { background-size: 100% 1px, 100% 1px; color: var(--amber); }
.lab .ulink { background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--paper-line), var(--paper-line)); }
.lab .ulink:hover, .lab .ulink:focus-visible { color: var(--amber-ink); }

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--ivory);
  transition: color 0.4s;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -24px 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(7, 9, 15, 0.85), rgba(7, 9, 15, 0));
  pointer-events: none;
  transition: opacity 0.4s;
}
html.hdr-light .site-header { color: var(--ink); }
html.hdr-light .site-header::before { background: linear-gradient(to bottom, rgba(239, 231, 214, 0.92), rgba(239, 231, 214, 0)); }
/* scrolled state (past the hero, or always without JS): a real bar so content never collides */
html.hdr-scrolled .site-header::before,
html:not(.js) .site-header::before {
  inset: 0;
  background: rgba(7, 9, 15, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
html.hdr-scrolled.hdr-light .site-header::before {
  background: rgba(239, 231, 214, 0.86);
  border-bottom-color: var(--paper-line);
}
html.menu-open .site-header { color: var(--ivory); }
html.menu-open .site-header::before { opacity: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  justify-self: start;
}
.brand-name {
  font: 400 21px/1 var(--serif);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.brand-name em { color: var(--amber); }
html.hdr-light .brand-name em { color: var(--amber-ink); }

.header-chapter {
  margin: 0;
  display: flex;
  gap: 10px;
  color: inherit;
  opacity: 0.75;
}
.hc-index { color: var(--amber); }
html.hdr-light .hc-index { color: var(--amber-ink); }

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.header-cta:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 6px 0 16px;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}
.menu-btn-lines { position: relative; width: 28px; height: 28px; display: inline-block; }
.menu-btn-lines i {
  position: absolute;
  left: 3px; right: 3px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.menu-btn-lines i:first-child { top: 10px; }
.menu-btn-lines i:last-child { top: 17px; }
.menu-btn[aria-expanded="true"] .menu-btn-lines i:first-child { top: 13.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-lines i:last-child { top: 13.5px; transform: rotate(-45deg); }
html:not(.js) .menu-btn { display: none; }

/* =====================================================================
   MENU OVERLAY
   ===================================================================== */
.menu {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px;
  padding: calc(var(--header-h) + 5vh) var(--gutter) 6vh;
  background:
    radial-gradient(80% 70% at 85% 10%, rgba(30, 45, 69, 0.75), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(255, 181, 74, 0.08), transparent 70%),
    var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu[hidden] { display: none; }
.menu-nav ol { counter-reset: none; }
.menu-nav li { overflow: hidden; border-bottom: 1px solid var(--line); }
.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 0.9vh 0;
  text-decoration: none;
}
.menu-nav .mono { color: var(--amber); width: 2.5em; flex: none; }
.menu-link {
  font: 400 clamp(34px, 6.2vh, 78px)/1.05 var(--serif);
  letter-spacing: -0.015em;
  transition: transform 0.6s var(--ease), color 0.3s;
}
.menu-nav a:hover .menu-link, .menu-nav a:focus-visible .menu-link { transform: translateX(18px); color: var(--amber); font-style: italic; }
.menu-nav a:focus-visible { outline-offset: -3px; }
.menu-aside { align-self: end; display: grid; gap: 10px; }
.menu-aside-label { color: var(--ivory-3); margin: 18px 0 0; }
.menu-mail { font: 400 clamp(22px, 2.4vw, 32px)/1.2 var(--serif); text-decoration: none; }
.menu-mail:hover { color: var(--amber); }
.menu-social { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.menu-social a { text-decoration: none; }
.menu-social a:hover { color: var(--amber); }
.menu-legal { color: var(--ivory-3); margin-top: 24px; }

/* =====================================================================
   PROGRESS RAIL
   ===================================================================== */
.rail {
  position: fixed;
  right: calc(var(--gutter) - 8px);
  top: 50%;
  z-index: 50;
  transform: translateY(-50%);
  display: none;
  color: var(--ivory);
  transition: color 0.4s;
}
.rail-track {
  position: absolute;
  right: 3px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.rail-fill {
  position: absolute;
  inset: 0;
  background: var(--amber);
  transform-origin: top;
  transform: scaleY(0);
}
.rail ol { display: grid; gap: 14px; }
.rail a {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-right: 16px;
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.3s;
}
.rail a::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: var(--ink);
  transition: background-color 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}
.rail .mono { font-size: 10.5px; }
.rail-label {
  position: absolute;
  right: calc(100% + 4px);
  top: 50%;
  margin-top: -5px;
  font: 400 10.5px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.4s, transform 0.5s var(--ease);
  white-space: nowrap;
}
.rail a:hover, .rail a.is-active { opacity: 1; }
.rail a:hover .rail-label, .rail a:focus-visible .rail-label { opacity: 1; transform: none; }
.rail a.is-active .mono { color: var(--amber); }
html.rail-light .rail a.is-active .mono { color: var(--amber-ink); }
.rail a.is-active::after { background: var(--amber); border-color: var(--amber); transform: scale(1.3); }
html.rail-light .rail { color: var(--ink); }
html.rail-light .rail a::after { background: var(--ivory); }
html.rail-light .rail a.is-active::after { background: var(--amber-ink); border-color: var(--amber-ink); }
html.rail-light .rail-track { background: var(--paper-line); }
@media (min-width: 1180px) { .rail { display: block; } }

/* =====================================================================
   THE DESCENT — sticky latent field
   ===================================================================== */
.descent { position: relative; }
.field {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  width: 100%;
  overflow: hidden;
  z-index: 0;
  background:
    radial-gradient(55% 45% at 68% 42%, rgba(30, 45, 69, 0.55), transparent 72%),
    radial-gradient(35% 30% at 50% 34%, rgba(255, 181, 74, 0.07), transparent 70%),
    var(--ink);
}
.field canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.field-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(7, 9, 15, 0.7) 100%),
    linear-gradient(to bottom, rgba(7, 9, 15, 0) 82%, rgba(7, 9, 15, 0.9));
}
/* static fallback when WebGL is missing or JS is off */
html:not(.js) .field::before,
html.no-webgl .field::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/hero-jefferson-reading-room.jpg") center 40% / cover no-repeat;
  filter: grayscale(1) brightness(0.42) contrast(1.15);
  opacity: 0.55;
}
html:not(.js) .field::after,
html.no-webgl .field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(30, 45, 69, 0.55), rgba(7, 9, 15, 0.2) 50%, rgba(255, 181, 74, 0.12));
  mix-blend-mode: color;
}
html.no-webgl .field canvas { display: none; }

.field-readout {
  position: absolute;
  top: calc(var(--header-h) + 18px);
  right: var(--gutter);
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--ivory-3);
  font-size: 10.5px;
}
.field-readout .readout-state { color: var(--amber); }
html.no-webgl .field-readout, html:not(.js) .field-readout { display: none; }
@media (min-width: 1180px) { .field-readout { right: calc(var(--gutter) + 150px); } }

.descent-content {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  margin-top: -100lvh;
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: max(620px, min(100svh, 1180px));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-h) + 24px) var(--gutter) clamp(72px, 10vh, 104px);
}
.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
  gap: 28px 64px;
  align-items: end;
}
.hero-eyebrow {
  color: var(--ivory-2);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--amber);
}
.hero-title {
  font: 400 clamp(44px, 6.1vw, 108px)/0.94 var(--serif);
  letter-spacing: -0.022em;
  max-width: 10.5em;
  text-wrap: balance;
}
.hero-key { color: var(--amber); }
.hero-side { padding-bottom: 8px; }
.hero-lede {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ivory-2);
  margin-bottom: 28px;
}
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ivory);
}
.scroll-cue-line {
  position: relative;
  width: 1px;
  height: 44px;
  background: var(--line-strong);
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 1px; height: 40%;
  background: var(--amber);
  animation: cue 2.2s var(--ease-in-out) infinite;
}
@keyframes cue { to { top: 110%; } }

/* JS-only hide-for-animation (never without JS, never with reduced motion) */
html.js:not(.reduce-motion) .hero-title,
html.js:not(.reduce-motion) .hero-eyebrow,
html.js:not(.reduce-motion) .hero-side { opacity: 0; }
html.js:not(.reduce-motion) [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); }
html.js:not(.reduce-motion) [data-split] { opacity: 0; }

/* SplitText `mask: 'words'` wraps each word in an overflow:clip box exactly one line-height tall.
   Display serif at line-height .84–.98 has glyphs (g y p descenders, tall caps) taller than that box,
   so they were sliced. Give the clip box vertical room and cancel it with an equal negative margin,
   so layout is unchanged but nothing is cropped. The reveal still slides words up from below the box. */
.hw-mask, .sw-mask {
  padding-block: 0.2em;
  margin-block: -0.2em;
}

/* =====================================================================
   CHAPTERS — shared
   ===================================================================== */
.chapter {
  position: relative;
  padding: clamp(96px, 16vh, 190px) var(--gutter);
}
.chapter-index { color: var(--amber); margin: 0 0 22px; }
.chapter-title {
  font: 400 clamp(46px, 7.2vw, 124px)/0.92 var(--serif);
  letter-spacing: -0.025em;
  max-width: 12ch;
}
.chapter-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
  margin-bottom: clamp(48px, 9vh, 110px);
}
.chapter-intro {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.55;
  color: var(--ivory-2);
  max-width: 42ch;
  margin: 0;
}
.sub-label { color: var(--ivory-3); margin: 0 0 18px; }

/* ---------- 00 PREMISE ---------- */
.premise { min-height: min(100vh, 1100px); display: flex; flex-direction: column; justify-content: center; }
.premise-statement {
  font: 400 clamp(32px, 4.3vw, 72px)/1.06 var(--serif);
  letter-spacing: -0.016em;
  max-width: 12.6em;
  margin: 0 0 clamp(40px, 7vh, 80px);
  text-wrap: pretty;
}
.premise-statement em { color: var(--amber); }
.premise-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 30ch));
  gap: 24px 48px;
  color: var(--ivory-2);
  margin-bottom: clamp(56px, 10vh, 120px);
}
.premise-body p { margin: 0; }

/* ---------- 01 THE QUESTIONS ---------- */
.questions .chapter-head { margin-bottom: clamp(32px, 6vh, 64px); }
.pillars { border-top: 1px solid var(--line); max-width: 1000px; }
.pillar {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 24px;
  padding: clamp(40px, 9vh, 96px) 0;
  border-bottom: 1px solid var(--line);
}
.pillar-num { color: var(--amber); padding-top: 14px; grid-row: span 2; }
.pillar-title {
  font: 400 clamp(34px, 4.8vw, 80px)/0.98 var(--serif);
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.pillar p {
  font-size: clamp(17px, 1.3vw, 19px);
  color: var(--ivory-2);
  max-width: 52ch;
  margin: 18px 0 0;
}

/* ---------- 02 CURRENT WORK ---------- */
.work { padding: 0; }
.work-stage { position: relative; padding: clamp(96px, 16vh, 190px) var(--gutter); }
.work-head {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 16px 40px;
}
.work-counter { display: none; color: var(--ivory-3); align-items: center; gap: 12px; margin: 0; }
.wc-now { color: var(--amber); }
.wc-bar { display: inline-block; width: 90px; height: 1px; background: var(--line-strong); position: relative; overflow: hidden; }
.wc-bar i { position: absolute; inset: 0; background: var(--amber); transform-origin: left; transform: scaleX(0.3333); }
.panel { padding: clamp(40px, 8vh, 80px) 0; border-top: 1px solid var(--line); }
.panel:first-of-type { border-top: 0; }
.panel-inner { max-width: 860px; }
.panel-meta {
  color: var(--ivory-2);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 18px;
}
.panel-meta span { color: var(--amber); }
.panel-title {
  font: 400 clamp(52px, 7.2vw, 128px)/0.88 var(--serif);
  letter-spacing: -0.03em;
  margin: 0 0 clamp(18px, 3vh, 30px);
}
.panel-title em { color: var(--amber); }
.panel-lede {
  font: 400 clamp(20px, 1.8vw, 27px)/1.28 var(--serif);
  color: var(--ivory);
  max-width: 42ch;
  margin-bottom: clamp(18px, 3vh, 28px);
}
.panel-body { color: var(--ivory-2); max-width: 56ch; }
.panel-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 28px;
  margin-bottom: 22px;
}
.panel-points li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ivory-2);
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
}
.panel-points strong { display: block; color: var(--ivory); font-weight: 500; margin-bottom: 4px; }
.panel-note { color: var(--ivory-3); max-width: 70ch; text-transform: none; letter-spacing: 0.02em; font-size: 12.5px; }
.panel-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.panel-plate {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 26px;
  max-width: 620px;
}
.panel-plate figure { margin: 0; }
.panel-plate img {
  width: 150px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1) brightness(0.9) sepia(0.25);
}
.panel-plate figcaption { font-size: 9.5px; color: var(--ivory-3); margin-top: 8px; letter-spacing: 0.08em; }
.panel-plate p { color: var(--ivory-2); margin: 0; font-size: 15.5px; }

/* pinned mode (desktop, motion allowed) */
.work.is-pinned .work-stage { height: 100vh; height: 100svh; padding: 0; overflow: hidden; }
.work.is-pinned .work-head {
  position: absolute;
  z-index: 3;
  top: calc(var(--header-h) + 22px);
  left: var(--gutter);
  right: var(--gutter);
}
.work.is-pinned .work-counter { display: inline-flex; }
.work.is-pinned .panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 52px) calc(var(--gutter) + 72px) 56px var(--gutter);
  border: 0;
  background: linear-gradient(90deg, #07090F 0%, #07090F 46%, rgba(7, 9, 15, 0) 70%);
}
.work.is-pinned .panel-inner { max-width: min(860px, 60vw); }
@media (max-height: 820px) {
  .work.is-pinned .panel-note { display: none; }
  .work.is-pinned .panel-title { font-size: clamp(48px, 6vw, 96px); }
}

/* ---------- 03 RESEARCH INDEX ---------- */
.research { background: var(--ink); z-index: 2; }
.index-list { position: relative; z-index: 2; border-top: 1px solid var(--line); }
.index-row > a, .index-row > .ir-static {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(120px, 220px) 32px;
  gap: 8px 24px;
  align-items: baseline;
  padding: clamp(18px, 3vh, 30px) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.ir-num { color: var(--ivory-3); }
.ir-title {
  display: block;
  font: 400 clamp(28px, 3.7vw, 60px)/1.02 var(--serif);
  letter-spacing: -0.015em;
  transition: transform 0.7s var(--ease), color 0.3s, opacity 0.4s;
}
.ir-desc {
  display: block;
  max-width: 64ch;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ivory-3);
  transition: color 0.3s, opacity 0.4s;
}
.ir-cat { color: var(--ivory-2); text-align: right; }
.ir-arrow {
  font: 400 26px/1 var(--serif);
  text-align: right;
  color: var(--ivory-3);
  transition: transform 0.6s var(--ease), color 0.3s;
}
@media (hover: hover) {
  .index-list:hover .index-row:not(:hover) .ir-title,
  .index-list:hover .index-row:not(:hover) .ir-desc { opacity: 0.32; }
  .index-row:hover .ir-title { transform: translateX(16px); color: var(--amber); font-style: italic; }
  .index-row:hover .ir-desc { color: var(--ivory-2); }
  .index-row:hover .ir-arrow { transform: translate(4px, -4px); color: var(--amber); }
}

.preview {
  position: fixed;
  left: 0; top: 0;
  z-index: 1;
  width: clamp(240px, 24vw, 380px);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
.preview-inner { width: 100%; height: 100%; overflow: hidden; border-radius: 2px; position: relative; }
.preview-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(30, 45, 69, 0.55), rgba(255, 181, 74, 0.28));
  mix-blend-mode: color;
}
.preview img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15) brightness(0.62); }

.pubs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 40px 64px;
  margin-top: clamp(96px, 16vh, 180px);
}
.pubs-head { align-self: start; position: sticky; top: calc(var(--header-h) + 32px); }
.pubs-title {
  font: 400 clamp(40px, 5.2vw, 88px)/0.95 var(--serif);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.pubs-note { color: var(--ivory-2); max-width: 40ch; }
.pubs-list { border-top: 1px solid var(--line); }
.pubs-list li {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 6px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.pubs-list .mono { color: var(--amber); padding-top: 4px; font-size: 10.5px; }
.pubs-list p { margin: 0; color: var(--ivory-2); font-size: 16px; }
.pubs-list cite { color: var(--ivory); }

/* three-column approach comparison (03); stacks below the card width, one block per row, column named by data-label */
.approach-table { width: 100%; max-width: 1180px; border-collapse: collapse; text-align: left; margin-bottom: clamp(40px, 7vh, 80px); }
.approach-table caption { text-align: left; }
.approach-table th, .approach-table td { padding: 20px 28px 20px 0; vertical-align: top; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.55; color: var(--ivory-2); }
.approach-table thead th { border-top: 0; color: var(--ivory); font: 400 clamp(20px, 1.9vw, 30px)/1.1 var(--serif); letter-spacing: -0.01em; }
.approach-table thead td { border-top: 0; }
.approach-table tbody th { width: 13%; color: var(--amber); font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.approach-table .cell-note { display: block; margin-top: 12px; font-size: 14px; color: var(--ivory-3); }
@media (max-width: 899px) {
  .approach-table, .approach-table tbody, .approach-table tr, .approach-table th, .approach-table tbody th, .approach-table td { display: block; width: auto; }
  .approach-table caption { display: block; }
  .approach-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .approach-table tr { padding: 24px 0 10px; border-top: 1px solid var(--line); }
  .approach-table th, .approach-table td { padding: 0 0 14px; border-top: 0; }
  .approach-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ivory-3); }
}

.affil { margin-top: clamp(96px, 14vh, 160px); }
.affil .chapter-index { margin-bottom: 26px; color: var(--ivory-3); }
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 26px 0;
  margin-inline: calc(-1 * var(--gutter));
}
.marquee-track {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 56px;
  padding-inline: var(--gutter);
  font: 400 clamp(26px, 3vw, 46px)/1.1 var(--serif);
  color: var(--ivory);
}
.marquee-track li { white-space: nowrap; display: flex; align-items: center; gap: 56px; }
.marquee-track li::after { content: "✦"; font-size: 0.45em; color: var(--amber); }
html.marquee-on .marquee { display: flex; }
html.marquee-on .marquee-track {
  flex-wrap: nowrap;
  flex: none;
  padding-inline: 0 56px;
  animation: marquee 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translate3d(-100%, 0, 0); } }

/* ---------- 04 THE LAB (ivory) ---------- */
.lab {
  background: var(--ivory);
  color: var(--paper-text);
  z-index: 2;
}
.lab .chapter-index { color: var(--amber-ink); }
.lab .chapter-intro { color: var(--paper-muted); }
/* the track record (.pubs) is written for the dark chapters; on ivory it takes the paper colours */
.lab .pubs-note { color: var(--paper-muted); }
.lab .pubs-list, .lab .pubs-list li { border-color: var(--paper-line); }
.lab .pubs-list .mono { color: var(--amber-ink); }
.lab .pubs-list p { color: var(--paper-muted); }
.lab .pubs-list cite { color: var(--paper-text); }
.founders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 96px);
}
.founder { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.founder-portrait { margin: 0; overflow: hidden; aspect-ratio: 4 / 5; background: #d9d0bd; }
.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: filter 0.8s var(--ease);
}
.founder:hover .founder-portrait img { filter: grayscale(0.15) contrast(1.02); }
.founder-role { color: var(--amber-ink); margin-bottom: 12px; }
.founder-name {
  font: 400 clamp(38px, 3.8vw, 64px)/0.95 var(--serif);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.founder-name em { color: var(--amber-ink); }
.founder-text p { font-size: 15.5px; line-height: 1.6; color: var(--paper-muted); }
.founder-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.founder-links a { color: var(--paper-text); font-size: 14.5px; }

/* ---------- 05 DISPATCHES ---------- */
.dispatches { background: var(--ink); z-index: 2; }
.news {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: clamp(80px, 12vh, 140px);
}
.news-card { background: var(--ink); }
.news-card--lead { grid-row: span 2; background: linear-gradient(170deg, var(--navy-2), var(--ink) 70%); }
.news-card a {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 220px;
  padding: clamp(22px, 2.4vw, 36px);
  text-decoration: none;
  transition: background-color 0.4s;
}
.news-card a:hover { background: rgba(255, 181, 74, 0.06); }
.news-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--ivory-3); }
.news-meta time { color: var(--amber); }
.news-title {
  font: 400 clamp(23px, 1.9vw, 30px)/1.12 var(--serif);
  letter-spacing: -0.01em;
  transition: color 0.3s;
}
.news-card--lead .news-title { font-size: clamp(30px, 2.9vw, 48px); line-height: 1.02; margin-top: auto; }
.news-desc { color: var(--ivory-2); font-size: 15px; line-height: 1.5; }
.news-card a:hover .news-title { color: var(--amber); }

.press { border-top: 1px solid var(--line); }
.press a {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) 110px;
  gap: 8px 32px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
  isolation: isolate;
}
.press a::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--gutter));
  z-index: -1;
  background: var(--amber);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease);
}
.press-outlet { font: italic 400 clamp(24px, 2.4vw, 38px)/1.05 var(--serif); }
.press-title { color: var(--ivory-2); font-size: 16px; }
.press time { color: var(--ivory-3); text-align: right; }
@media (hover: hover) {
  .press a:hover::before { transform: scaleY(1); }
  .press a:hover, .press a:hover .press-title, .press a:hover time { color: var(--ink); }
}

/* ---------- 06 FAQ ---------- */
.faq { background: var(--ink); z-index: 2; }
.faq-list { border-top: 1px solid var(--line); max-width: 1100px; margin-left: auto; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 28px;
  gap: 16px;
  align-items: center;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa-n { color: var(--ivory-3); }
.qa-q {
  font: 400 clamp(22px, 2.3vw, 36px)/1.15 var(--serif);
  letter-spacing: -0.01em;
  transition: color 0.3s, transform 0.6s var(--ease);
}
.qa summary:hover .qa-q { color: var(--amber); transform: translateX(8px); }
.qa-icon { position: relative; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; }
.qa-icon::before, .qa-icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 11px; height: 1.5px;
  margin: -0.75px 0 0 -5.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}
.qa-icon::after { transform: rotate(90deg); }
.qa[open] .qa-icon::after { transform: rotate(0deg); }
.qa[open] .qa-icon { border-color: var(--amber); color: var(--amber); }
.qa-a { overflow: hidden; }
.qa-a p { padding: 0 44px 28px 72px; color: var(--ivory-2); max-width: calc(64ch + 72px); margin: 0; }

/* ---------- 07 CONTACT ---------- */
.contact {
  background:
    radial-gradient(60% 60% at 80% 100%, rgba(30, 45, 69, 0.6), transparent 70%),
    radial-gradient(35% 45% at 12% 90%, rgba(255, 181, 74, 0.1), transparent 70%),
    var(--ink);
  z-index: 2;
  padding-bottom: clamp(80px, 14vh, 160px);
  overflow: hidden;
}
.contact-title {
  font: 400 clamp(76px, 17vw, 300px)/0.84 var(--serif);
  letter-spacing: -0.045em;
  margin: 0 0 clamp(32px, 6vh, 64px) -0.04em;
}
.contact-title em { color: var(--amber); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 64px;
  align-items: end;
}
.contact-lede { font: 400 clamp(22px, 2.1vw, 32px)/1.3 var(--serif); max-width: 30ch; margin: 0; }
.contact-actions { display: grid; gap: 24px; justify-items: start; }
.mail-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 22px 30px;
  border: 1px solid var(--ivory);
  border-radius: 999px;
  text-decoration: none;
  font: 400 clamp(18px, 1.9vw, 28px)/1 var(--serif);
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s, border-color 0.4s;
  max-width: 100%;
}
.mail-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--amber);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease);
  border-radius: inherit;
}
.mail-btn:hover, .mail-btn:focus-visible { color: var(--ink); border-color: var(--amber); }
.mail-btn:hover::before, .mail-btn:focus-visible::before { transform: none; }
.mail-btn-label { overflow-wrap: anywhere; }
.mail-btn-arrow { transition: transform 0.6s var(--ease); }
.mail-btn:hover .mail-btn-arrow { transform: translateX(6px); }
.contact-note { color: var(--ivory-2); max-width: 44ch; margin: 0; font-size: 15.5px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  position: relative;
  z-index: 2;
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: clamp(64px, 10vh, 110px) var(--gutter) 88px;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.footer-id p { color: var(--ivory-2); max-width: 30ch; }
.footer-col h2 { color: var(--amber); margin-bottom: 16px; font-size: 10.5px; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { text-decoration: none; color: var(--ivory-2); font-size: 15px; transition: color 0.3s; }
.footer-col a:hover { color: var(--amber); }
.footer-mark {
  margin: clamp(64px, 10vh, 120px) 0 18px;
  font: 400 clamp(40px, 9.4vw, 170px)/0.85 var(--serif);
  letter-spacing: -0.035em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(239, 231, 214, 0.35);
}
.footer-mark em { -webkit-text-stroke-color: rgba(255, 181, 74, 0.6); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  color: var(--ivory-3);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin: 0;
}
.footer-base a { text-decoration: none; }
.footer-base a:hover { color: var(--amber); }

/* =====================================================================
   CURSOR + GRAIN
   ===================================================================== */
.cursor { display: none; }
html.has-cursor .cursor {
  display: block;
  position: fixed;
  left: 0; top: 0;
  z-index: 150;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s;
}
html.has-cursor .cursor.is-on { opacity: 1; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; border-radius: 50%; }
.cursor-dot { width: 6px; height: 6px; background: var(--ivory); }
.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ivory);
  display: grid;
  place-items: center;
  transition: width 0.45s var(--ease), height 0.45s var(--ease), background-color 0.3s, border-color 0.3s;
}
.cursor.is-link .cursor-ring { width: 64px; height: 64px; background: rgba(239, 231, 214, 0.08); }
.cursor.has-label .cursor-ring { width: 88px; height: 88px; background: var(--ivory); }
.cursor-label { font: 500 10px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor summary { cursor: none; }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 140;
  pointer-events: none;
  opacity: 0.075;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -0.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
/* reserve a lane for the fixed chapter rail */
@media (min-width: 1180px) {
  .chapter, .site-footer { padding-right: calc(var(--gutter) + 72px); }
  .work { padding-right: 0; }
  .work-stage { padding-right: calc(var(--gutter) + 72px); }
  .work.is-pinned .work-stage { padding: 0; }
}

@media (max-width: 1100px) {
  .panel-points { grid-template-columns: 1fr; gap: 12px; }
  .founders { grid-template-columns: 1fr; }
  .founder { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  :root { --header-h: 64px; }
  .header-chapter { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .header-cta { display: none; }
  .menu { grid-template-columns: 1fr; gap: 28px; }
  .menu-aside { align-self: start; }
  .hero-bottom { grid-template-columns: 1fr; }
  .hero-side { max-width: 42ch; }
  .chapter-head--split { grid-template-columns: 1fr; }
  .premise-body { grid-template-columns: 1fr; }
  .pillar { grid-template-columns: 1fr; }
  .pillar-num { grid-row: auto; padding-top: 0; }
  .index-row > a, .index-row > .ir-static { grid-template-columns: 48px minmax(0, 1fr) 24px; }
  .ir-cat { grid-column: 2; grid-row: 2; text-align: left; order: 3; }
  .ir-arrow { grid-column: 3; grid-row: 1; }
  .pubs { grid-template-columns: 1fr; }
  .pubs-head { position: static; }
  .news { grid-template-columns: 1fr; }
  .news-card--lead { grid-row: auto; }
  .press a { grid-template-columns: 1fr auto; }
  .press-title { grid-column: 1 / -1; grid-row: 2; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .premise-statement, .pillar-title, .panel-title, .panel-lede { text-shadow: 0 0 18px rgba(7, 9, 15, 0.95), 0 0 42px rgba(7, 9, 15, 0.8); }
  .brand-name { font-size: 18px; }
  .field-readout { display: none; }
  .hero-eyebrow { font-size: 10px; letter-spacing: 0.1em; }
  .panel-plate { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
  .panel-plate img { width: 110px; }
  .pubs-list li { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; }
  .founder-portrait { max-width: 300px; }
  .qa summary { grid-template-columns: 34px minmax(0, 1fr) 28px; gap: 10px; }
  .qa-a p { padding: 0 0 24px 44px; }
  .mail-btn { padding: 18px 22px; font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
/* keyed on shared/motion.js: html.reduce-motion = OS setting or forced via ?motion=reduce / pill */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
html.reduce-motion .grain { animation: none; }
html.reduce-motion .scroll-cue-line::after { animation: none; top: 30%; }
