/* ibiLab — precise, minimal, strange in a controlled way.
 *
 * Palette (§19): black / bone / silver / one electric signal accent. Two
 * themes, both easy on the eye, both painted from the same semantic tokens.
 *
 * Light is the default, and bare :root carries it in full. Dark is opt-in:
 * the toggle stamps data-theme="dark" on <html> and only those tokens change.
 * The system's prefers-color-scheme deliberately does not decide — a reader
 * who wants dark asks for it, and that choice then persists.
 *
 * Which is also why there is no prefers-color-scheme block below: if the
 * pre-paint script never runs, bare :root is light, which is the intended
 * default anyway.
 */

:root {
  /* LIGHT — bone ground, near-black ink, silver rules */
  --bg: #f5f3ed;
  --bg-2: #edeae2;
  --surface: rgba(18, 20, 26, 0.022);
  --panel: rgba(18, 20, 26, 0.03);
  --line: rgba(18, 20, 26, 0.15);
  --line-soft: rgba(18, 20, 26, 0.085);
  --ink: #14161b;
  --ink-2: #4d5261;
  --ink-3: #5f6675;
  --accent: #2749c8;
  --glow: rgba(39, 73, 200, 0.34);
  --halo: rgba(39, 73, 200, 0.07);
  --select: rgba(39, 73, 200, 0.18);
  --field-ink: #767f96;
  --field-accent: #2749c8;
  --field-op-max: 0.75;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --swap: 0.42s;
}

/* DARK — the same site with the ground removed. Opt-in only. */
:root[data-theme="dark"] {
  --bg: #06070a;
  --bg-2: #0b0d13;
  --surface: rgba(255, 255, 255, 0.026);
  --panel: rgba(255, 255, 255, 0.032);
  --line: rgba(255, 255, 255, 0.105);
  --line-soft: rgba(255, 255, 255, 0.055);
  --ink: #e9e6df;
  --ink-2: #a6aab6;
  --ink-3: #828896;
  --accent: #8fb0ff;
  --glow: rgba(143, 176, 255, 0.5);
  --halo: rgba(143, 176, 255, 0.11);
  --select: rgba(143, 176, 255, 0.28);
  --field-ink: #7f8aa8;
  --field-accent: #9fbcff;
  --field-op-max: 1;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 350;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* nothing snaps into existence: the first paint arrives */
  animation: page-in 0.7s var(--ease) both;
}
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--select); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.85rem;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Theme swap ----------
   The transition is switched on only for the duration of the swap, so it can
   be broad without fighting every hover state on the page. */

html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition:
    background-color var(--swap) var(--ease),
    border-color var(--swap) var(--ease),
    color var(--swap) var(--ease),
    fill var(--swap) var(--ease),
    stroke var(--swap) var(--ease),
    opacity var(--swap) var(--ease) !important;
}

/* ---------- Page-to-page continuity ----------
   Where the browser supports it, navigation cross-fades instead of flashing.
   Everywhere else the pages behave exactly as before. */

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out 0.28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.42s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- WebGL field ---------- */

.field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  /* Long for the arrival, short once app.js starts tracking the scroll: a
     0.9s ease restarted on every scroll frame leaves the field lagging most
     of a second behind the page and still moving after it stops. */
  transition: opacity var(--field-fade, 0.9s) var(--ease);
}
.field.is-live { opacity: var(--field-op, 1); }
.field canvas { display: block; width: 100%; height: 100%; }

[data-field-inline] { position: absolute; border-radius: inherit; overflow: hidden; }

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.55rem); }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 62ch;
}
.dim { color: var(--ink-3); }

.sidehead {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1rem;
  font-weight: 400;
}

/* a compact proposition, set like one */
.statement {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  line-height: 1.22;
  color: var(--ink);
  max-width: 26ch;
  margin: 1.6rem 0 0;
}
.statement--sm { font-size: clamp(1.15rem, 1.8vw, 1.5rem); max-width: 34ch; }

.turn { color: var(--ink-2); margin-top: 1.8rem; }
.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.note {
  font-size: 0.9rem;
  color: var(--ink-3);
  border-left: 1px solid var(--line);
  padding-left: 1.1rem;
  max-width: 60ch;
  line-height: 1.6;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

section { position: relative; }
section[id] { scroll-margin-top: 84px; }

.section { padding-block: clamp(4.5rem, 11vh, 9rem); }
.section--tight { padding-block: clamp(2.8rem, 6vh, 4.5rem); }
.section + .section { border-top: 1px solid var(--line-soft); }
.section--panel { background: var(--surface); }
.section--motto { text-align: center; }
.section--motto .pull { margin-inline: auto; }

.section__head { max-width: 68ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head p { margin-top: 1.2rem; }

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 940px) { .split { grid-template-columns: 1.35fr 1fr; } }

.aside {
  border-left: 1px solid var(--line-soft);
  padding-left: clamp(1.2rem, 2.5vw, 2rem);
  align-self: start;
  position: sticky;
  top: 100px;
}
@media (max-width: 939px) { .aside { position: static; } }
.aside h4 {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}

.prose { max-width: 66ch; }
.prose p { color: var(--ink-2); }
.leadership-origin__close { margin-top: clamp(2rem, 4vw, 3rem); }
.leadership-origin__close p { margin-block: 0; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line-soft); }

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  margin-right: auto;
}
.brand__name { line-height: 1; }
.brand__sub {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav__links { display: flex; gap: 1.5rem; font-size: 0.86rem; color: var(--ink-2); }
.nav__links a { position: relative; padding-block: 0.35rem; transition: color 0.3s; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--ink); }

/* theme toggle: one glyph that becomes the other */
.themer {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  padding: 0;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.themer:hover { color: var(--ink); border-color: var(--line); background: var(--surface); }
.themer__i { width: 17px; height: 17px; overflow: visible; }
.themer__disc, .themer__rays, .themer__mask {
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
  transform-origin: 12px 12px;
}
/* The icon offers the theme you are not in. It follows the same light-first
   structure as the palette — moon is the base state, and only a dark context
   swaps it for the sun — so the two can never disagree about which theme is
   live. */
.themer__disc, .themer__rays { opacity: 0; transform: scale(0.4); }
.themer__mask { opacity: 1; fill: none; }

:root[data-theme="dark"] .themer__disc,
:root[data-theme="dark"] .themer__rays { opacity: 1; transform: none; }
:root[data-theme="dark"] .themer__mask { opacity: 0; transform: scale(0.5) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__inner { height: auto; padding-block: 0.7rem; flex-wrap: wrap; gap: 0.4rem 1rem; }
  .brand { font-size: 1.05rem; }
  .brand__sub { display: none; }
  .nav__links {
    order: 3;
    width: 100%;
    gap: 1.1rem;
    font-size: 0.82rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links a { white-space: nowrap; }
  section[id] { scroll-margin-top: 110px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(92svh, 900px);
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 12vh, 8rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, var(--bg) 6%, color-mix(in srgb, var(--bg) 72%, transparent) 40%, transparent 70%);
}
.hero > * { position: relative; }
.hero__inner { max-width: 46ch; }
.hero h1 { margin-bottom: 1.6rem; }
.lede--hero { font-size: clamp(1.15rem, 1.9vw, 1.5rem); color: var(--ink); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }

.scroll-cue {
  position: absolute;
  left: var(--pad);
  bottom: 2.2rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.scroll-cue::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--line);
  animation: cue 3.4s var(--ease) infinite;
}
.scroll-cue::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 0.15rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  animation: cue-arrow 3.4s var(--ease) infinite;
}
@keyframes cue { 0%, 100% { opacity: 0.3; transform: scaleX(0.5); } 50% { opacity: 1; transform: scaleX(1); } }
@keyframes cue-arrow {
  0%, 100% { opacity: 0.4; transform: translateY(-2px) rotate(45deg); }
  50% { opacity: 1; transform: translateY(2px) rotate(45deg); }
}

/* ---------- Pull quotes ---------- */

.pull {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.3;
  color: var(--ink);
  border-left: 1px solid var(--accent);
  padding-left: clamp(1.2rem, 2.5vw, 2rem);
  margin: 2.6rem 0 0;
  max-width: 34ch;
}
.pull--motto {
  border-left: 0;
  padding-left: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 2.4rem;
  max-width: 46ch;
  font-size: clamp(1.3rem, 2.4vw, 1.95rem);
}

/* ---------- ORIENT · ADAPT · ACT ---------- */

.triad {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 860px) { .triad { grid-template-columns: repeat(3, 1fr); } }

.triad__cell {
  background: var(--bg-2);
  padding: clamp(1.7rem, 3vw, 2.6rem);
  transition: background 0.6s var(--ease);
}
.triad__cell:hover { background: color-mix(in srgb, var(--accent) 5%, var(--bg-2)); }
.triad__k {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.triad__h { font-size: clamp(1.3rem, 2vw, 1.7rem); margin-bottom: 0.7rem; }
.triad__p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }

/* ---------- Token lists ---------- */

.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.tokens li {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.34rem 0.9rem;
  background: var(--surface);
  transition: color 0.35s, border-color 0.35s, transform 0.45s var(--ease);
}
.tokens li:hover { color: var(--ink); border-color: var(--glow); transform: translateY(-2px); }
.tokens--lg li { font-size: 0.95rem; padding: 0.55rem 1.15rem; color: var(--ink); background: var(--bg-2); }
.tokens--sm { margin-top: 1rem; }
.tokens--sm li { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em; padding: 0.2rem 0.6rem; border-radius: 3px; }

.assumptions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}
@media (min-width: 760px) { .assumptions { grid-template-columns: repeat(4, 1fr); } }
.assumptions li {
  background: var(--bg);
  padding: clamp(1.4rem, 3vw, 2.2rem) 1.2rem;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--ink);
  line-height: 1.3;
}

.beats {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.bridge { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--ink-2); }
.bridge em { color: var(--accent); font-style: normal; }

/* ---------- Cards ---------- */

.grid {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.6rem, 3vw, 2.5rem);
  background: var(--bg-2);
  isolation: isolate;
  min-height: 260px;
  transition: background 0.6s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), var(--halo), transparent 70%);
  transition: opacity 0.6s var(--ease);
}
.card:hover::before { opacity: 1; }
a.card:hover { background: color-mix(in srgb, var(--accent) 4%, var(--bg-2)); }

.card__title {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}
.card__hook {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 auto;
  max-width: 20ch;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-top: 0.4rem;
}
.more::after { content: "→"; transition: transform 0.45s var(--ease); }
a:hover .more::after, a.more:hover::after { transform: translateX(5px); }

.keys { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.9rem; }
.key {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 0.2rem 0.5rem;
}

/* ---------- Research hub rows ---------- */

.hubrows { border-top: 1px solid var(--line-soft); }
.hubrow {
  display: grid;
  gap: 0.4rem 2rem;
  padding-block: clamp(1.6rem, 3.2vw, 2.4rem);
  border-bottom: 1px solid var(--line-soft);
  align-items: baseline;
  transition: background 0.6s var(--ease);
}
@media (min-width: 900px) { .hubrow { grid-template-columns: 3rem 15rem 1fr auto; } }
.hubrow:hover { background: var(--surface); }
.hubrow__n { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--accent); }
.hubrow__t { font-family: var(--serif); font-size: clamp(1.2rem, 1.8vw, 1.5rem); color: var(--ink); }
.hubrow__body { display: block; max-width: 52ch; }
.hubrow__q { display: block; color: var(--ink); font-size: 1.02rem; }
.hubrow__d { display: block; margin-top: 0.5rem; color: var(--ink-3); font-size: 0.88rem; line-height: 1.55; }
.hubrow .more { margin-top: 0; }

/* ---------- Facets ---------- */

.facets {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}
@media (min-width: 700px) { .facets { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .facets { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }

.facet {
  background: var(--bg-2);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  transition: background 0.6s var(--ease);
}
.facet:hover { background: color-mix(in srgb, var(--accent) 4%, var(--bg-2)); }
.facet h3 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.facet p { color: var(--ink-2); font-size: 0.93rem; margin: 0; }

/* ---------- Research close ---------- */

.research-close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.research-close__body { max-width: 56rem; }
.research-close__body h3 { margin-bottom: 0.45rem; }
.research-close__body .dim { margin: 0 0 1rem; }
.research-close__body .tokens { margin-top: 0; }
.research-close > .cta { flex: 0 0 auto; }

/* ---------- Thesis process ---------- */

.thesis-process {
  display: grid;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--bg-2);
  overflow: hidden;
}
.thesis-step {
  position: relative;
  padding: clamp(1.8rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-soft);
}
.thesis-step__n {
  display: block;
  margin-bottom: clamp(1.8rem, 4vw, 3.5rem);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.thesis-step h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: 0.9rem; }
.thesis-step p { max-width: 30ch; margin: 0; color: var(--ink-2); }
@media (min-width: 820px) {
  .thesis-process { grid-template-columns: repeat(3, 1fr); }
  .thesis-step { border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .thesis-step::after {
    content: "→";
    position: absolute;
    z-index: 1;
    top: 2.55rem;
    right: 0;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-soft);
    border-radius: 50%;
    background: var(--bg-2);
    color: var(--accent);
    font-size: 0.85rem;
    transform: translateX(50%);
  }
  .thesis-step:nth-child(3)::after { content: none; }
}

/* ---------- List blocks ---------- */

.lists { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 900px) { .lists { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); } }

.listblock h3 { font-size: 1.35rem; margin-bottom: 1.2rem; }
.listblock__note { margin-top: 1.2rem; font-size: 0.85rem; color: var(--ink-3); max-width: 52ch; }
.listblock--wide {
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface);
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
}
.listblock--wide .dim { margin-bottom: 1rem; }

/* ---------- Contrast pair ---------- */

/* ---------- Leadership programs ---------- */

.programs { display: flex; flex-direction: column; gap: clamp(3rem, 7vw, 5.5rem); }
.program { display: grid; gap: 1.5rem clamp(2rem, 5vw, 4rem); }
@media (min-width: 940px) { .program { grid-template-columns: 16rem 1fr; } }
.program__meta { position: sticky; top: 100px; align-self: start; }
@media (max-width: 939px) { .program__meta { position: static; } }
.program__n {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.6rem;
}
.program__name { font-size: 1.25rem; color: var(--ink-2); }
.program__body h2 { margin-bottom: 1.2rem; max-width: 22ch; }
.program__body > p { color: var(--ink-2); max-width: 62ch; }
.program__body .sidehead { margin-top: 2rem; }
.program__cta { margin-top: 2.2rem; }

.gapbox {
  margin-top: 2.4rem;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.gapbox .sidehead { margin-top: 0; }
.formula {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 1.6rem;
}

.qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.qlist li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.qlist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px; height: 6px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.7;
}

/* ---------- Question masonry ---------- */

.qs { columns: 1; column-gap: 1.25rem; }
@media (min-width: 720px) { .qs { columns: 2; } }
@media (min-width: 1040px) { .qs { columns: 3; } }

.q {
  break-inside: avoid;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1.6rem;
  background: var(--bg-2);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.32;
  color: var(--ink);
  transition: border-color 0.5s var(--ease), transform 0.6s var(--ease);
}
.q:hover { border-color: var(--glow); transform: translateY(-2px); }
.q::before {
  content: attr(data-n);
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  margin-bottom: 0.9rem;
}
.q cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- World tiles ---------- */

.tiles { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

.tile {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-2);
  min-height: 300px;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: border-color 0.6s var(--ease), transform 0.6s var(--ease);
}
.tile:hover { border-color: var(--glow); transform: translateY(-3px); }
.tile__viz { position: absolute; inset: 0; z-index: 0; }
.tile__viz::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-2) 2%, color-mix(in srgb, var(--bg-2) 86%, transparent) 32%, transparent 88%);
}
.tile__body { position: relative; padding: 1.5rem; }
.tile__stage {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.tile h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.tile p { font-size: 0.88rem; color: var(--ink-2); margin: 0; }

/* ---------- Figures ----------
   Every diagram is drawn from numbers and inherits the theme. */

.fig { width: 100%; height: auto; display: block; overflow: visible; }
.fig--wide { max-width: 100%; }
.fig-wrap { margin: 0; }
.fig-wrap figcaption,
.progression__note {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--ink-3);
  max-width: 56ch;
}

.fig__stroke { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.fig__accent { stroke: var(--accent); stroke-width: 1.4; }
.fig__dashed { stroke: var(--line); stroke-dasharray: 3 5; }
.fig__axis { fill: none; stroke: var(--line); stroke-width: 1; }
.fig__band { fill: var(--accent); opacity: 0.09; stroke: none; }
.fig__dot { fill: var(--ink-3); stroke: none; }
.fig__dot--key { fill: var(--accent); }
.fig__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  fill: var(--ink-3);
}
.fig__label--end { text-anchor: end; }
.fig__label--mid { text-anchor: middle; fill: var(--ink-2); }
.fig__label--accent { fill: var(--accent); }
.fig__node {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  fill: var(--ink-2);
}
.fig__node--key { fill: var(--ink); font-size: 15px; }

.progression__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.4rem;
}
.progression__row::-webkit-scrollbar { display: none; }
.progression__cell { flex: 1 0 130px; min-width: 130px; }
.progression__cell figcaption {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  margin-top: 0.5rem;
}
.progression__arrow { color: var(--ink-3); font-size: 0.9rem; flex: 0 0 auto; }
.progression .fig__stroke { stroke-width: 0.7; opacity: 0.85; }


/* ---------- People ---------- */

.pi { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 940px) { .pi { grid-template-columns: 1.5fr 1fr; } }
.pi__name { font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: 1.2rem; }
.pi__main .prose { margin-top: 1.8rem; }
.pi__aside { padding-top: 0.4rem; }

.members { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden; }
@media (min-width: 800px) { .members { grid-template-columns: repeat(2, 1fr); } }
.member {
  background: var(--bg-2);
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
  display: flex;
  flex-direction: column;
  transition: background 0.6s var(--ease);
}
.member:hover { background: color-mix(in srgb, var(--accent) 4%, var(--bg-2)); }
.member__name { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin-bottom: 0.5rem; }
.member__role {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.member__focus { font-family: var(--serif); font-size: 1.15rem; line-height: 1.35; color: var(--ink); max-width: 30ch; }
.member__p { font-size: 0.92rem; color: var(--ink-2); }

/* ---------- Collaborate ---------- */

.tracks { display: flex; flex-direction: column; }
.track {
  display: grid;
  gap: 2rem clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 90px;
}
@media (min-width: 940px) { .track { grid-template-columns: 1fr 1fr; } }
.track__n { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--accent); display: block; margin-bottom: 0.9rem; }
.track__intro h2 { margin-bottom: 1rem; }
.track__intro .dim { margin-bottom: 1.1rem; }

.track__form {
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--surface);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-self: start;
}
.track__action {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

/* label rides above the field once it has content or focus */
.field-row { position: relative; }
.field-row input,
.field-row textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1.5rem 0 0.55rem;
  resize: vertical;
  transition: border-color 0.4s var(--ease);
}
.field-row textarea { min-height: 3.4rem; }
.field-row input:focus, .field-row textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field-row label {
  position: absolute;
  left: 0;
  top: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-3);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.45s var(--ease), color 0.45s var(--ease);
}
.field-row input:focus + label,
.field-row textarea:focus + label,
.field-row input:not(:placeholder-shown) + label,
.field-row textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.45rem) scale(0.74);
  color: var(--accent);
}

.track__form button[disabled] { opacity: 0.45; cursor: not-allowed; }
.track__form button[disabled]:hover { transform: none; border-color: var(--line); background: var(--surface); }
.formnote { font-size: 0.76rem; color: var(--ink-3); margin: 0; }

/* ---------- CTA ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.7rem 1.4rem;
  font-family: inherit;
  font-size: 0.87rem;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease), transform 0.5s var(--ease), color 0.5s var(--ease);
}
.cta:hover { border-color: var(--glow); background: color-mix(in srgb, var(--accent) 8%, transparent); transform: translateY(-2px); }
.cta::after { content: "→"; transition: transform 0.45s var(--ease); }
.cta:hover::after { transform: translateX(4px); }
.cta--lg { padding: 0.85rem 1.7rem; font-size: 0.95rem; }
.cta--ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.cta--ghost:hover { color: var(--ink); border-color: var(--line); background: transparent; }

.section--cta { border-top: 1px solid var(--line-soft); }
.ctablock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.8rem;
}
.ctablock__q {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.25;
  color: var(--ink);
  max-width: 32ch;
  margin: 0;
}

/* ---------- Page header ---------- */

.pagehead { position: relative; padding-block: clamp(4rem, 14vh, 8rem) clamp(2.5rem, 6vh, 4.5rem); }
.pagehead h1 { margin-bottom: 1.5rem; max-width: 20ch; }
.pagehead .lede { font-size: clamp(1.15rem, 1.8vw, 1.5rem); color: var(--ink); max-width: 44ch; }
.pagehead__intro { margin-top: 1.8rem; max-width: 62ch; color: var(--ink-2); }
.pagehead__intro--body { font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.7; }

.crumb {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2rem;
  display: inline-flex;
  gap: 0.6rem;
}
.crumb a { transition: color 0.3s; }
.crumb a:hover { color: var(--accent); }

/* ---------- Pager ---------- */

.pager { display: grid; gap: 1px; background: var(--line-soft); border-block: 1px solid var(--line-soft); }
@media (min-width: 700px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a {
  background: var(--bg);
  padding: clamp(1.6rem, 3vw, 2.4rem) var(--pad);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.5s var(--ease);
}
.pager a:hover { background: var(--bg-2); }
.pager small { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.pager strong { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; }
.pager a.is-next { text-align: right; align-items: flex-end; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line-soft); padding-block: clamp(3rem, 7vw, 5rem) 3rem; }
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer h4 {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer li a { font-size: 0.88rem; color: var(--ink-2); transition: color 0.3s; }
.footer li a:hover { color: var(--accent); }
.footer .brand { margin-right: 0; margin-bottom: 1rem; }
.footer__line { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; max-width: 24ch; color: var(--ink); }
.footer__motto { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; }
.footer__note {
  margin-top: 3rem;
  font-size: 0.78rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

/* ---------- Reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Logo mark ---------- */

.mark { width: 2em; height: 2em; flex: 0 0 auto; color: var(--ink); overflow: visible; }

/* Every point knows the offset that cancels its own height, so hovering the
   wordmark flattens the saddle with one rule, and letting go lets it warp
   again. */
.mark circle { transition: transform 0.9s var(--ease); }
.mark path { transition: d 0.9s var(--ease); }
.brand:hover .mark circle { transform: translateY(var(--dy, 0)); }
.brand:hover .mark path { d: var(--flat); }
.footer .brand .mark { width: 2.4em; height: 2.4em; }

/* ---------- Reduced motion ----------
   Nothing animates, nothing moves, and nothing is hidden as a result. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .scroll-cue::before, .scroll-cue::after { animation: none; }
  .mark circle, .mark path { transition: none; }
  .brand:hover .mark circle { transform: none; }
  .brand:hover .mark path { d: auto; }
  @view-transition { navigation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.statement--centred { margin-inline: auto; max-width: 24ch; }

/* ---------- The creed ----------
   The motto, given the landing page. Full measure, display size, centred, and
   deliberately alone in the frame, and set larger than the page own H1: on the
   landing page the motto is the thing you are meant to leave with. */

.creed {
  /* capped like the hero: svh alone runs away on a very tall window */
  min-height: min(68svh, 640px);
  display: grid;
  align-content: center;
  text-align: center;
  padding-block: clamp(5rem, 14vh, 10rem);
}
.creed__q {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.14;
  letter-spacing: -0.022em;
  color: var(--ink);
  max-width: 22ch;
  margin: 0 auto;
  text-wrap: balance;
}

/* ---------- The two doors ----------
   What used to be six research cards. Large, quiet, and confident: the whole
   of the lab offered as two choices rather than explained as a syllabus. */

.doors {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}
#research-focus .doors { margin-top: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 820px) { .doors { grid-template-columns: repeat(2, 1fr); } }

.door {
  position: relative;
  isolation: isolate;
  background: var(--bg-2);
  padding: clamp(2rem, 4.5vw, 3.6rem);
  min-height: clamp(280px, 34vh, 400px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.6s var(--ease);
}
.door::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--halo), transparent 70%);
  transition: opacity 0.6s var(--ease);
}
.door:hover::before { opacity: 1; }
.door:hover { background: color-mix(in srgb, var(--accent) 4%, var(--bg-2)); }

.door__k {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.door__h {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  margin: 1.2rem 0 0.9rem;
}
.door__line {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  line-height: 1.3;
  color: var(--ink);
  max-width: 24ch;
  margin: 0 0 auto;
}
.door__p { font-size: 0.9rem; color: var(--ink-2); margin: 1.4rem 0 0; max-width: 40ch; }
.door .more { margin-top: 1.1rem; }
