/* ==========================================================================
   NeuroCore design system.
   Shared across all five pages: tokens, reset, type, layout primitives, nav,
   buttons, reveal, footer, contact dialog. Page specifics live in pages/*.css.
   Light theme throughout; the footer is the single dark surface.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------
   Self-hosted latin subsets. Inter and JetBrains Mono are variable files, so
   four requests cover every weight the system uses. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens --------------------------------------------------------------
   Brand palette verbatim, plus darker "ink" variants of teal, blue, gold and
   slate that pass WCAG AA as text on paper and on mist. */
:root {
  --teal: #00e8bc;
  --teal-ink: #007a63;
  --teal-hover: #00cfa8;
  --blue: #0099ff;
  --blue-ink: #0067b3;
  --gold: #fecf1b;
  --gold-ink: #7a5e00;
  --navy: #0b2a43;
  --navy-2: #133a57;
  --slate: #647488;
  --slate-ink: #4f6072;
  --mist: #eaf6f4;
  --mist-2: #ddf0ec;
  --paper: #fafcfc;
  --surface: #ffffff;
  --ink: var(--navy);
  --ink-2: var(--slate-ink);
  --rule: rgba(11, 42, 67, 0.12);
  --error: #b42318;

  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Shape rule: interactive controls are pills, frames and tiles are 16px,
     inputs are 10px. Nothing else gets a radius. */
  --radius-pill: 999px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 42, 67, 0.05), 0 12px 32px -16px rgba(11, 42, 67, 0.18);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 240ms;
  --t-slow: 560ms;

  --shell: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 68px;
  --space-section: clamp(4rem, 7vw, 6.5rem);
  --space-head: clamp(2rem, 3.5vw, 3rem);
}

/* --- Reset ---------------------------------------------------------------
   Minimal and explicit: predictable box model, block media, inheriting forms. */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img, svg, picture, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }

input, button, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button { background: none; border: 0; padding: 0; }

/* One focus treatment for the whole site. */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection { background: var(--mist-2); color: var(--ink); }

/* Anchor targets clear the fixed header. */
:target, #main { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }

/* --- Typography ----------------------------------------------------------
   Poppins for display, Inter for reading, JetBrains Mono for data.
   Sentence case only; no uppercase display, no gradient fills. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.375rem, 4.8vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.875rem, 3.2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 26ch;
}

h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p { text-wrap: pretty; }

/* Opening paragraph under a headline. */
.lede {
  font-size: clamp(1.125rem, 1.4vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

/* Reading measure and secondary body colour. */
.measure { max-width: 62ch; }
.body-2 { color: var(--ink-2); }

/* Rationed label above a section heading. Budget: one per three sections. */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-ink);
}

/* Data figures: years, degrees, thresholds. */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
}

/* --- Layout primitives ---------------------------------------------------
   Whitespace carries the composition, so there are only four of these. */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.section { padding-block: var(--space-section); }
.section--mist { background: var(--mist); }
.section--hero { padding-block: calc(var(--nav-h) + clamp(3rem, 6vw, 5rem)) var(--space-section); }
@media (min-width: 1024px) {
  .section--hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: clamp(3rem, 5vw, 4.5rem);
  }
  /* A hero that carries a picture holds a set share of the first screen. A
     hero that is only type needs less room, or it reads as a void, so the
     taller rule waits until there is a .hero__media to fill it. */
  .section--hero:has(.hero__media) { min-height: min(72dvh, 720px); }
  .section--hero.is-text { min-height: min(56dvh, 560px); }
}
.section--band { padding-block: 0; }

/* Below-the-fold sections skip rendering until they are near the viewport. */
.section--cv {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* Heading block, then content, then the trailing link: the page rhythm. */
.section__head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: var(--space-head);
}
.section__foot { margin-top: clamp(2rem, 4vw, 3rem); }

.stack { display: flex; flex-direction: column; gap: var(--flow, 1.25rem); align-items: flex-start; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 800px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

/* --- Photo frame ---------------------------------------------------------
   16px radius, no border, no shadow, no overlay. Aspect set per use. */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--frame-back, var(--mist-2));
}
/* Renders shot on a dark studio background get a matching backing. */
.frame--dark { --frame-back: #0b1020; }
.frame > img,
.frame > picture,
.frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame--43 { aspect-ratio: 4 / 3; }
.frame--34 { aspect-ratio: 3 / 4; }
.frame--169 { aspect-ratio: 16 / 9; }
.frame--11 { aspect-ratio: 1 / 1; }

/* --- Photo band ----------------------------------------------------------
   Full bleed photo under a navy scrim so the quote stays legible. One per page. */
.band {
  position: relative;
  display: grid;
  min-height: min(78vh, 640px);
  isolation: isolate;
}
.band__media,
.band__media img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The three layers are stacked explicitly. The parallax rule further down puts
   a `scale` on the image, which makes it a stacking context, and without these
   the photograph would paint over the scrim and the quote would sit on raw
   photography. */
.band__media { z-index: 0; }
.band::after {
  content: "";
  grid-area: 1 / 1;
  z-index: 1;
  background: linear-gradient(to top, rgba(11, 42, 67, 0.88), rgba(11, 42, 67, 0.35));
}
.band__inner {
  grid-area: 1 / 1;
  z-index: 2;
  align-self: end;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  color: #fff;
}
.band__quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.375rem, 2.6vw, 2.125rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 34ch;
}
.band__attr {
  margin-top: 1rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
}
.band__inner .btn { margin-top: clamp(1.5rem, 3vw, 2rem); }
@media (max-width: 800px) {
  .band { min-height: 60vh; }
}

/* --- Callout -------------------------------------------------------------
   Mist panel with a teal left border, from the brand guide. Carries the
   closing CTA on every page and the form status region. */
.callout--art { position: relative; overflow: hidden; }
.callout--art .spark--wm {
  right: -4%;
  bottom: -34%;
  width: clamp(150px, 28%, 260px);
}
.callout {
  background: var(--mist);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

/* --- Buttons -------------------------------------------------------------
   One pill shape, sentence case, 48px tall so every target clears 44px. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease),
    color var(--t) var(--ease), transform var(--t) var(--ease);
}
/* Teal on navy text reads at 9.3:1. */
.btn--primary {
  background: var(--teal);
  color: var(--navy);
}
.btn--primary:hover { background: var(--teal-hover); transform: translateY(-1px); }
.btn--secondary {
  border-color: var(--navy);
  color: var(--navy);
}
.btn--secondary:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
/* For photo bands and other dark surfaces. */
.btn--on-dark {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}
.btn--on-dark:hover { background: #fff; color: var(--navy); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: default; transform: none; }
.btn--block { width: 100%; }

/* Text link with a trailing arrow, for "see the full list" moves. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--navy);
  text-decoration: none;
}
.link-arrow:hover { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 4px; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform var(--t) var(--ease); }

/* Inline links inside body copy. */
.link {
  color: var(--blue-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover { text-decoration-thickness: 2px; }

/* --- Icons ---------------------------------------------------------------
   Phosphor regular, 256 viewBox, filled with currentColor. One family only. */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: currentColor;
}
.icon--24 { width: 24px; height: 24px; }

/* --- Reveal --------------------------------------------------------------
   Entry motion only, driven by an IntersectionObserver in site.js.
   --d stages a group, maximum four steps. */
.reveal {
  opacity: 0;
  translate: 0 14px;
  transition: opacity var(--t-slow) var(--ease), translate var(--t-slow) var(--ease);
  transition-delay: calc(var(--d, var(--i, 0)) * 70ms);
}
.reveal.is-in { opacity: 1; translate: 0 0; }

/* --- Header and navigation ----------------------------------------------
   Fixed, 68px, solid background. The bottom rule appears only once the page
   has moved, toggled by an observer on a sentinel at the top of main. */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(250, 252, 252, 0.985);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--rule); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
}
.nav__brand { display: flex; align-items: center; min-height: 44px; }
.nav__brand img { height: 36px; width: auto; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
/* Every nav link clears a 44px target at every width. */
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
.nav__link:hover { color: var(--blue-ink); }
.nav__link[aria-current="page"] {
  color: var(--teal-ink);
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav__menu .btn { min-height: 44px; padding: 0 1.25rem; }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-right: -0.5rem;
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle .icon--close,
.nav__toggle[aria-expanded="true"] .icon--open { display: none; }
.nav__toggle[aria-expanded="true"] .icon--close { display: block; }

/* Under 900px the links move into a sheet below the bar. */
@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .nav__menu[data-open="true"] { display: flex; }
  .nav__link {
    min-height: 56px;
    font-size: 1.0625rem;
  }
  .nav__menu .btn { width: 100%; min-height: 48px; margin-top: 0.75rem; }
}

/* --- Skip link and screen reader helper ---------------------------------- */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: top var(--t) var(--ease);
}
.skip-link:focus-visible { top: 0.5rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Footer --------------------------------------------------------------
   The one dark surface on the page. Three zones, then a bottom rule. */
.foot {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.foot__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
/* The lockup is a transparent PNG, so brightness and invert give the approved
   reversed logo without shipping a second file. */
/* Right edge watermark, the device the brand guide closes on. */
.foot__spark {
  top: 50%;
  right: 1rem;
  translate: 0 -50%;
}
.foot__logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}
.foot__tagline {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: #fff;
}
.foot__nav {
  display: flex;
  flex-direction: column;
}
/* 44px rows so the footer links are as tappable as everything else. */
.foot__link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
.foot__link:hover { color: #fff; }
.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8125rem;
}
@media (max-width: 800px) {
  .foot__inner { grid-template-columns: minmax(0, 1fr); }
}

/* --- Contact dialog ------------------------------------------------------
   Opened by every "Book a call" control. Focus trap, Esc and scroll lock live
   in site.js. Full screen below 600px with a sticky close button. */
.dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: clamp(1rem, 4vw, 2rem);
  background: rgba(11, 42, 67, 0.55);
}
.dialog[data-open="true"] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dialog__panel {
  width: 100%;
  max-width: 560px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dialog__title { font-size: 1.5rem; letter-spacing: -0.01em; max-width: none; }
.dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: -0.5rem -0.5rem 0 0;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.dialog__close:hover { background: var(--mist); color: var(--ink); }

/* --- Form ----------------------------------------------------------------
   Labels above, errors below, 16px inputs so iOS does not zoom on focus. */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field__label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--t) var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; padding-right: 2.5rem; }
/* Full strength slate so placeholders still clear AA against the white field. */
.field input::placeholder,
.field textarea::placeholder { color: var(--slate-ink); opacity: 1; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(11, 42, 67, 0.28); }
.field__err {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--error);
}
.field__err:empty { display: none; }
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: var(--error); }

/* The select needs its own caret since the native one is removed. */
.field--select { position: relative; }
.field--select::after {
  content: "";
  position: absolute;
  right: 1.125rem;
  bottom: 1.375rem;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: rotate(45deg);
  pointer-events: none;
}

.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset__legend {
  padding: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ink);
}

/* Interest checkboxes read as pills; the native input stays focusable. */
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { display: inline-flex; }
.pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.pill__box {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 44px;
  padding: 0 0.9375rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.pill__box .icon { display: none; width: 16px; height: 16px; }
.pill input:checked + .pill__box {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--navy);
}
.pill input:checked + .pill__box .icon { display: block; }
.pill input:focus-visible + .pill__box { outline: 2px solid var(--blue); outline-offset: 3px; }

/* Submit row and the status region, which reuses the callout language. */
.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}
.form__note {
  font-size: 0.875rem;
  color: var(--ink-2);
  max-width: 30ch;
}
.form__status {
  background: var(--mist);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.form__status b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
.form__status--err { background: #fef3f2; border-left-color: var(--error); }
.form__status--warn { background: #fff8e3; border-left-color: var(--gold); }

/* Honeypot: never shown, never focusable. */
.hp { display: none; }

@media (max-width: 600px) {
  .dialog { padding: 0; }
  .dialog__panel {
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    padding: 0 1.25rem 2rem;
  }
  .dialog__head {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0 -1.25rem 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
}

/* --- Utilities ----------------------------------------------------------- */
.u-mist { background: var(--mist); }
.u-teal-ink { color: var(--teal-ink); }
.u-nowrap { white-space: nowrap; }
/* Long unbroken strings (emails, URLs) never push a grid child wide. */
.u-break { overflow-wrap: anywhere; }


/* ==========================================================================
   MOTION SYSTEM v2. Every animation answers one of four things: hierarchy,
   storytelling, feedback, state transition. Only opacity, transform,
   translate, scale and clip-path move; nothing loops but the footer spark;
   the reduced motion block at the end neutralises all of it. Initial hidden
   states are gated on html.js, set by a one line inline script before first
   paint, so a visitor without JavaScript sees a finished page.
   ========================================================================== */

/* --- 1. Page entrance ----------------------------------------------------
   Hierarchy. Headline lines, then lede, then buttons. The hero media does not
   wait for them: it starts at first paint so the LCP image is opaque fast. */
.h1-line {
  display: block;
  /* Padding clears the descenders, the equal negative margin puts the line
     box back where it was, so the clip costs no layout shift. */
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  overflow: hidden;
}
.h1-line > span { display: block; }

@keyframes line-up {
  from { translate: 0 110%; }
  to { translate: 0 0; }
}
@keyframes enter-up {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
/* Opacity finishes early, so the largest image on the page is opaque about
   100ms after it can first paint and never holds up LCP. Scale keeps going. */
@keyframes media-in {
  from { opacity: 0; scale: 1.04; }
  12% { opacity: 1; }
  to { opacity: 1; scale: 1; }
}
@keyframes plate-in {
  from { opacity: 0; translate: -12px 12px; }
  to { opacity: 0.9; translate: 0 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .h1-line > span { translate: 0 110%; }
  .js .enter-up { opacity: 0; }
  .js .enter-media { opacity: 0; }
  .js .enter-plate { opacity: 0; }

  /* Text waits for is-ready (fonts loaded, or 400ms) so a line never
     animates twice in two typefaces. */
  .js.is-ready .h1-line > span {
    animation: line-up 700ms var(--ease) both;
    animation-delay: calc(var(--e, 0) * 80ms);
  }
  .js.is-ready .enter-up {
    animation: enter-up 560ms var(--ease) both;
    animation-delay: calc(var(--e, 0) * 80ms);
  }
  .js .enter-media {
    animation: media-in 900ms var(--ease) both;
    will-change: opacity, scale;
  }
  .js .enter-plate { animation: plate-in 900ms var(--ease) 120ms both; }
}

/* --- 2. Reveal groups ----------------------------------------------------
   Storytelling. site.js numbers the children as --i, capped at six steps. */
.reveal-group > * { --i: 0; }

/* A section heading wipes up inside its own box, so no layout shift. */
@media (prefers-reduced-motion: no-preference) {
  .js .section__head.reveal h2 {
    clip-path: inset(0 0 100% 0);
    translate: 0 0.3em;
    transition: clip-path 700ms var(--ease), translate 700ms var(--ease);
  }
  .js .section__head.reveal.is-in h2 {
    clip-path: inset(0 0 -25% 0);
    translate: 0 0;
  }
  /* Photographs settle rather than appear: only the contents scale. */
  .js .reveal .frame img { scale: 1.03; transition: scale 900ms var(--ease); }
  .js .reveal.is-in .frame img { scale: 1; }
}

/* --- 3. Buttons and links: feedback, every control answers the pointer. --- */
.btn--primary .icon { transition: translate var(--t) var(--ease); }
.btn--primary:hover .icon { translate: 3px 0; }

/* The outlined buttons fill from the bottom rather than swapping colour. */
.btn--secondary,
.btn--on-dark {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.btn--secondary::before,
.btn--on-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--navy);
  transform-origin: 50% 100%;
  scale: 1 0;
  transition: scale var(--t) var(--ease);
}
.btn--on-dark::before { background: #fff; }
.btn--secondary:hover::before,
.btn--on-dark:hover::before { scale: 1 1; }
.btn--secondary:hover,
.btn--on-dark:hover { background: none; }

/* The underline draws in from the left instead of switching on. */
.link-arrow {
  background-image: linear-gradient(var(--blue-ink), var(--blue-ink));
  background-repeat: no-repeat;
  background-position: 0 calc(50% + 0.85em);
  background-size: 0% 1.5px;
  transition: color var(--t) var(--ease), background-size var(--t) var(--ease);
}
.link-arrow:hover { text-decoration: none; background-size: 100% 1.5px; }

/* --- 4. Nav condense: the bar gives back 12px once you leave the top. ---- */
.nav { transition: border-color var(--t) var(--ease), height var(--t) var(--ease); }
.nav.is-scrolled { height: 56px; }
.nav__brand img { transform-origin: left center; transition: scale var(--t) var(--ease); }
.nav.is-scrolled .nav__brand img { scale: 0.9; }

/* --- 5. Photo band parallax ---------------------------------------------
   Depth, and the only parallax on the site. The image is oversized by 16% so
   6% of travel never uncovers an edge. Scroll driven, no script; a browser
   without view timelines shows a still photograph. */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes band-drift {
      from { translate: 0 -6%; }
      to { translate: 0 6%; }
    }
    .band { overflow: hidden; }
    .band__media img {
      scale: 1.16;
      animation: band-drift linear both;
      animation-timeline: view();
    }
  }
}

/* --- 6. Number counter ---------------------------------------------------
   Emphasis on the one number on the homepage. site.js splits value from word,
   counts once, and reserves the figure width so the line cannot reflow. */
.counter__num { display: inline-block; font-variant-numeric: tabular-nums; }
.counter__suf { transition: opacity 400ms var(--ease); }
.js .counter[data-running] .counter__suf { opacity: 0; }

/* --- 7. Gradient plate ---------------------------------------------------
   The brand guide's teal to blue gradient, as an offset plate behind a hero
   frame or a corner behind a callout. Never behind a product render. */
.plated { position: relative; isolation: isolate; }
.plated > .frame,
.plated > .callout,
.plated > .stack { position: relative; z-index: 1; }
.plate {
  position: absolute;
  z-index: 0;
  inset: 8% -6% -8% 6%;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  opacity: 0.9;
  pointer-events: none;
}
/* Narrow screens have no gutter to spare, so the offset shrinks. */
@media (max-width: 900px) {
  .plate { inset: 6% -3% -6% 3%; }
}
/* A corner of the same gradient behind a block, offset by 10px. */
.plate--corner {
  inset: -10px -10px auto auto;
  width: clamp(96px, 18%, 180px);
  aspect-ratio: 1;
}

/* --- 8. Brand spark ------------------------------------------------------
   The four point star, defined once per page as a symbol and used with <use>.
   Gold only where the plan allows gold, navy at 6% as a watermark. */
.spark { fill: currentColor; }
.spark--mark { width: 14px; height: 14px; color: var(--gold); }
.spark--wm {
  position: absolute;
  width: clamp(320px, 34vw, 480px);
  aspect-ratio: 1;
  color: rgba(11, 42, 67, 0.06);
  pointer-events: none;
}
/* On the navy footer the same watermark has to be light to exist at all. */
.foot .spark--wm { color: rgba(255, 255, 255, 0.06); }
.spark--sm { width: clamp(112px, 15vw, 180px); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes spark-turn { to { rotate: 360deg; } }
  .spark--turning { animation: spark-turn 120s linear infinite; }
}

/* --- 9. Thumbnail rows ---------------------------------------------------
   Thumb, title, sentence. For any page that lists ideas as rows. */
.thumb-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1.2fr) minmax(0, 1.8fr);
  gap: 0.5rem clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding-block: 1.5rem;
}
.thumb-row + .thumb-row { border-top: 1px solid var(--rule); }
.thumb-row__thumb { width: 120px; aspect-ratio: 4 / 3; }
@media (max-width: 800px) {
  .thumb-row { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .thumb-row__thumb { width: 100%; aspect-ratio: 16 / 9; }
}

/* --- 10. Year tile -------------------------------------------------------
   For list rows whose only real data is a year and a length. */
.yeartile {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 0.25rem;
  aspect-ratio: 1;
  padding: 0.75rem;
  background: var(--mist);
  border-radius: var(--radius);
}
.yeartile__year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.yeartile__meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--ink-2);
}

/* --- 11. Dialog transitions ---------------------------------------------
   State transition. The panel arrives small and low and leaves faster than it
   came; display transitions discretely so the exit is visible. */
.dialog {
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 160ms var(--ease), display 160ms allow-discrete;
}
.dialog[data-open="true"] { opacity: 1; transition-duration: 200ms; }
.dialog__panel {
  scale: 0.96;
  translate: 0 10px;
  transition: scale 160ms var(--ease), translate 160ms var(--ease);
}
.dialog[data-open="true"] .dialog__panel {
  scale: 1;
  translate: 0 0;
  transition-duration: 260ms;
}
@starting-style {
  .dialog[data-open="true"] { opacity: 0; }
  .dialog[data-open="true"] .dialog__panel { scale: 0.96; translate: 0 10px; }
}

/* --- Reduced motion ------------------------------------------------------
   Everything is visible immediately; no transitions, no smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; translate: none; }
  .btn:hover, .btn:active { transform: none; }

  /* Motion system v2, neutralised: no entrance, wipe, parallax, count, spin. */
  .h1-line { overflow: visible; }
  .h1-line > span,
  .enter-up,
  .enter-media,
  .enter-plate {
    opacity: 1 !important;
    translate: none !important;
    scale: none !important;
    animation: none !important;
  }
  .enter-plate { opacity: 0.9 !important; }
  .section__head.reveal h2,
  .section__head.reveal.is-in h2 { clip-path: none !important; translate: none !important; }
  .reveal .frame img { scale: none !important; }
  .btn--secondary::before, .btn--on-dark::before { display: none; }
  .btn--secondary:hover { background: var(--navy); color: #fff; }
  .btn--on-dark:hover { background: #fff; color: var(--navy); }
  .btn--primary:hover .icon { translate: none; }
  .link-arrow { background-image: none; }
  .link-arrow:hover { text-decoration: underline; }
  .nav, .nav.is-scrolled { height: var(--nav-h); }
  .nav.is-scrolled .nav__brand img { scale: none; }
  .band__media img { scale: 1; animation: none !important; }
  .counter__suf { opacity: 1 !important; }
  .spark--turning { animation: none !important; }
  .dialog, .dialog__panel { transition: none !important; scale: none; translate: none; }
  .seq__frame { transition: none !important; }
}

/* --- Print ---------------------------------------------------------------
   Ink on white, no fixed chrome, nothing left hidden by a pending reveal. */
@media print {
  .nav, .dialog, .skip-link, .btn, .foot__nav { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .reveal { opacity: 1 !important; translate: none !important; }
  .section, .section--hero { padding-block: 1.5rem; content-visibility: visible; }
  .foot { background: #fff; color: #000; }
  .foot__logo img { filter: none; }
  .spark--wm, .plate { display: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
