/* Algorist Strategies — site styles.
   Midnight & Brass palette (brand/concepts.html, tools/brand.py), evolved from
   the Nocturne tokens of the Claude Design export. Plain CSS, no build step.
   The CSP in _headers forbids inline styles, so every per-element value
   (animation delays, parallax offsets) lives here or is set through CSSOM. */

/* Inter (SIL OFL, see ../fonts/OFL.txt), self-hosted so no visitor data goes to
   a third party. Variable: weight 400–600 and optical size 14–32. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin.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-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Midnight & Brass (see brand/ and tools/brand.py) */
  --color-bg: #0e1420;
  --color-surface: #182030;
  --color-text: #efe9df;
  --color-bright: #fbf7ef;
  --color-accent: #c6a15b;
  --color-accent-200: #f1e4c6;
  --color-accent-300: #e8d3a4;
  --color-accent-400: #d9bb7e;
  --color-accent-600: #9c7c3f;
  --color-neutral-300: #d6cfc3;
  --color-neutral-400: #b3ada2;
  --color-neutral-500: #8f8a82;
  --color-neutral-800: #2a3140;
  --ink: 14, 20, 32; /* --color-bg as an rgb triple, for veils */
  --text-rgb: 239, 233, 223;
  --accent-rgb: 198, 161, 91;
  --hairline: rgba(var(--text-rgb), 0.08);
  --hairline-strong: rgba(var(--text-rgb), 0.12);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 6vw, 96px);
  --wrap: 1280px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  interpolate-size: allow-keywords;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--color-bg);
  color-scheme: dark;
  scroll-padding-top: 96px; /* anchors clear the sticky header */
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--color-neutral-800) var(--color-bg);
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: clip;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 500; }

::selection { background: rgba(var(--accent-rgb), 0.35); color: var(--color-bright); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: 12px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--color-surface);
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus-visible { transform: none; }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--color-accent-300);
}

.arrow { flex: none; transition: transform 0.6s var(--ease-out); }

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  view-transition-name: site-header;
  transition: background-color 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(var(--ink), 0.78);
  border-bottom-color: var(--hairline);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px;
  transition: padding 0.5s var(--ease-out);
}
.is-scrolled .header-inner { padding-block: 16px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-neutral-300);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.3s;
}
.brand:hover { color: var(--color-text); }
.brand-mark { flex: none; width: 26px; height: 26px; }
.mark-edge { fill: var(--color-text); }
.mark-dash { fill: var(--color-accent); transition: fill 0.4s; }
/* Hover: the lane markings light up from the near one into the distance. */
.brand:hover .mark-dash { fill: var(--color-accent-300); }
.mark-dash:nth-of-type(2) { transition-delay: 0.08s; }
.mark-dash:nth-of-type(3) { transition-delay: 0.16s; }
.page-home .brand-mark .mark-dash { animation: fade-in 0.6s var(--ease-out) both; }
.page-home .brand-mark .mark-dash:nth-of-type(1) { animation-delay: 0.5s; }
.page-home .brand-mark .mark-dash:nth-of-type(2) { animation-delay: 0.65s; }
.page-home .brand-mark .mark-dash:nth-of-type(3) { animation-delay: 0.8s; }

.site-nav {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav a {
  position: relative;
  padding-block: 6px;
  color: var(--color-neutral-400);
  transition: color 0.3s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-out);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--color-text); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

@media (max-width: 540px) {
  .brand-name-2 { display: none; }
  .brand { letter-spacing: 0.18em; }
  .site-nav { font-size: 12px; letter-spacing: 0.06em; }
  .header-inner { padding-block: 22px; }
}

/* ── Buttons & links ──────────────────────────────────────────────────── */

.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  border-radius: 6px;
  color: var(--color-accent-200);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: border-color 0.4s, color 0.4s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.28), rgba(var(--accent-rgb), 0.14));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}
.btn:hover { border-color: var(--color-accent-400); color: var(--color-bright); }
.btn:hover::before { transform: scaleX(1); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
  color: var(--color-neutral-300);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s;
}
.link-arrow:hover { color: var(--color-text); }
.btn:hover .arrow,
.link-arrow:hover .arrow { transform: translateX(5px); }

/* ── Home hero ────────────────────────────────────────────────────────── */

/* The hero's light is blended (screen / lighten) against the page ground, so
   nothing between it and <body> may create a stacking context. */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Live scene (trails.js): fades in on its first frame, then its own intro
   draws the lights along the road. */
.hero-scene {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
.scene .hero-scene { display: block; }
.scene-on .hero-scene { opacity: 1; }

/* A still frame of the same scene, for when it can't run. */
.hero-still { position: absolute; inset: 0; mix-blend-mode: lighten; }
.hero-still picture,
.hero-still img { width: 100%; height: 100%; }
.hero-still img { object-fit: cover; object-position: 65% 50%; animation: hero-media-in 2.4s var(--ease-out) both; }
.scene .hero-still { display: none; }
.no-scene .hero-still { display: block; }
.no-scene .hero-scene { display: none; }

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 20% 36%, rgba(var(--ink), 0.9) 0%, rgba(var(--ink), 0.62) 45%, rgba(var(--ink), 0) 100%),
    linear-gradient(180deg, rgba(var(--ink), 0.5) 0%, rgba(var(--ink), 0.2) 45%, rgba(var(--ink), 0) 70%, rgba(var(--ink), 0.45) 100%);
}

.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  padding-block: clamp(24px, 7vh, 104px) 56px;
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 28px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--hairline-strong);
  color: var(--color-neutral-400);
}
.status-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  opacity: 0;
  animation: ping 2.6s var(--ease-out) 1.8s infinite;
}

.hero-title {
  max-width: 14ch;
  margin-bottom: 24px;
  font-size: clamp(44px, 6.2vw, 92px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

/* Masked line reveal, shared by the home and inner-page headlines. */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.line > span {
  display: block;
  animation: line-up 1.2s var(--ease-out) both;
  animation-delay: var(--line-delay, 0.3s);
}
.line:nth-child(2) > span { --line-delay: 0.42s; }
.line:nth-child(3) > span { --line-delay: 0.54s; }

.hero-lede {
  max-width: 38ch;
  color: var(--color-neutral-300);
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  margin-top: clamp(32px, 5vh, 48px);
}

/* Pause / play for the live scene (WCAG 2.2.2); shown by trails.js once running. */
.scene-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: rgba(var(--ink), 0.4);
  color: var(--color-neutral-400);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: color 0.3s, border-color 0.3s;
  animation: fade-in 1s var(--ease-out) 2s both;
}
.scene-toggle[hidden] { display: none; }
.scene-toggle:hover { border-color: var(--color-accent); color: var(--color-text); }
.scene-toggle .icon-play,
.scene-toggle[aria-pressed="true"] .icon-pause { display: none; }
.scene-toggle[aria-pressed="true"] .icon-play { display: block; }

/* Load choreography for the home page. */
[data-enter] { animation: fade-up 1s var(--ease-out) both; animation-delay: var(--enter-delay, 0s); }
[data-enter="1"] { --enter-delay: 0.15s; }
[data-enter="2"] { --enter-delay: 0.6s; }
[data-enter="3"] { --enter-delay: 0.95s; }
[data-enter="4"] { --enter-delay: 1.05s; }
[data-enter="5"] { --enter-delay: 1.15s; }
[data-enter="6"] { --enter-delay: 1.3s; }
[data-enter="7"] { --enter-delay: 1.5s; }
.page-home .site-header { animation: fade-in 1.2s var(--ease-out) both; }

/* ── Inner pages ──────────────────────────────────────────────────────── */

.page-bg {
  position: absolute;
  inset: 0 0 auto;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
}
/* Mask + blend on the same element: the fade replaces the original's hard
   bottom edge without isolating the blend from the page ground. */
.page-media {
  position: absolute;
  top: -10%;
  left: -6%;
  right: -30%;
  height: 82vh;
  mix-blend-mode: lighten;
  opacity: 0.28;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 92%);
  animation: page-media-in 2s var(--ease-out) both;
}
.page-media-inner { position: absolute; inset: 0; }
.page-media picture,
.page-media img { width: 100%; height: 100%; }
.page-media img { object-fit: cover; animation: zoom-settle 3s var(--ease-out) both; }
.page-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--ink), 0.55) 0%, rgba(var(--ink), 0.82) 40%, rgba(var(--ink), 1) 75%);
}

.page-main { position: relative; z-index: 1; flex: 1; }

.intro { padding-block: clamp(40px, 9vh, 120px) clamp(56px, 10vh, 120px); }

.page-title {
  margin-top: 20px;
  font-size: clamp(38px, 4.2vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.intro-head .eyebrow,
.intro-copy .eyebrow { animation: fade-up 0.9s var(--ease-out) 0.15s both; }

.lede {
  color: var(--color-neutral-300);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.65;
  text-wrap: pretty;
}

/* Approach */
.intro--approach {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(32px, 6vw, 120px);
  align-items: start;
}
.intro--approach .intro-head { position: sticky; top: 112px; }

/* ── Disclosures: a short line always visible, the detail on demand ──────── */
/* Native <details>, so they work without JavaScript and are keyboard and
   screen-reader friendly. Browsers that can animate to height:auto open
   smoothly; the rest open instantly. */
.disclosure > summary {
  display: grid;
  align-items: center;
  gap: 6px 28px;
  padding: 26px 0;
  list-style: none;
  cursor: pointer;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:focus-visible { outline-offset: 6px; }
.disclosure-title {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  transition: transform 0.7s var(--ease-out), color 0.4s;
}
.disclosure-note { color: var(--color-neutral-400); font-size: 15px; line-height: 1.5; text-wrap: balance; }
.disclosure-icon {
  position: relative;
  justify-self: end;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  color: var(--color-neutral-300);
  transition: border-color 0.4s, color 0.4s, background-color 0.4s;
}
.disclosure-icon::before,
.disclosure-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  margin: -0.75px 0 0 -6px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.5s var(--ease-out);
}
.disclosure-icon::after { transform: rotate(90deg); } /* plus; rotates flat into a minus when open */
.disclosure > summary { -webkit-tap-highlight-color: transparent; }
.disclosure > summary:active .disclosure-icon { border-color: var(--color-accent); background: rgba(var(--accent-rgb), 0.14); }
.disclosure[open] .disclosure-icon { border-color: var(--color-accent); background: rgba(var(--accent-rgb), 0.14); color: var(--color-accent-300); }
.disclosure[open] .disclosure-icon::after { transform: rotate(0deg); }
.disclosure-body { padding-bottom: 32px; }
.disclosure-body p { max-width: 62ch; color: var(--color-neutral-300); font-size: 16px; line-height: 1.7; text-wrap: pretty; }
.disclosure[open] .disclosure-body { animation: fade-up 0.7s var(--ease-out) both; }
.disclosure::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 0.6s var(--ease-out), content-visibility 0.6s allow-discrete;
}
.disclosure[open]::details-content { block-size: auto; }

/* Rows: Approach steps and Strategies components. Hairlines between, a brass
   rule on hover or while open; the detail lines up under the title. */
.rows { border-top: 1px solid var(--hairline-strong); }
.row { position: relative; border-bottom: 1px solid var(--hairline-strong); }
.row::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent), transparent 75%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out);
}
.row:has([open])::after { transform: scaleX(1); }
.row .disclosure > summary,
.row .disclosure-body { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.3fr) 36px; column-gap: 28px; }
.row .disclosure > summary { padding: 30px 0; }
.row .disclosure-body { display: grid; padding-bottom: 34px; }
.row .disclosure-body > * { grid-column: 2 / 4; }
.row-num {
  color: var(--color-accent-300);
  font-size: 14px;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s;
}

/* Photo band (Approach) */
.band {
  position: relative;
  height: clamp(340px, 64vh, 640px);
  margin-top: clamp(96px, 14vh, 160px);
  overflow: hidden;
}
.band-media { position: absolute; inset: -12% 0; }
.band-media picture,
.band-media img { width: 100%; height: 100%; }
.band-media img {
  object-fit: cover;
  object-position: 50% 60%;
  transform: scale(1.08);
  transition: transform 2.6s var(--ease-out);
}
.band.is-in .band-media img { transform: none; }
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--color-bg) 0%, rgba(var(--ink), 0) 26%, rgba(var(--ink), 0) 52%, rgba(var(--ink), 0.85) 86%, var(--color-bg) 100%),
    linear-gradient(90deg, rgba(var(--ink), 0.6), rgba(var(--ink), 0) 60%);
}

/* Strategies: headline beside the diagram */
.intro--split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px clamp(32px, 6vw, 96px);
  align-items: center;
}
.intro-copy { max-width: 640px; }
.intro-copy .page-title { margin-bottom: 24px; }
.intro-copy .lede { max-width: 52ch; animation: fade-up 1s var(--ease-out) 0.65s both; }

/* Diagram: three components converging on one book. The names link to the rows. */
.converge { justify-self: end; width: 100%; max-width: 380px; }
.converge svg { width: 100%; height: auto; overflow: visible; }
.cv-label { fill: var(--color-neutral-300); font-family: var(--font); font-size: 13px; transition: fill 0.3s; }
.cv-num { fill: var(--color-accent-300); font-size: 11px; letter-spacing: 0.1em; }
.cv-link { cursor: pointer; }
.cv-link:hover .cv-label,
.cv-link:focus-visible .cv-label { fill: var(--color-accent-300); text-decoration: underline; }
.cv-track {
  fill: none;
  stroke: rgba(var(--text-rgb), 0.24);
  stroke-width: 1;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.6s var(--ease-in-out);
}
.cv-track:nth-of-type(2) { transition-delay: 0.15s; }
.cv-track:nth-of-type(3) { transition-delay: 0.3s; }
.is-in .cv-track { stroke-dashoffset: 0; }
.cv-pulse {
  fill: none;
  stroke: var(--color-accent-300);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 14 130;
  stroke-dashoffset: 14;
  opacity: 0;
}
.is-in .cv-pulse { animation: cv-run 4.5s var(--ease-in-out) infinite; }
.is-in .cv-pulse.p1 { animation-delay: 1.8s; }
.is-in .cv-pulse.p2 { animation-delay: 2.6s; }
.is-in .cv-pulse.p3 { animation-delay: 3.4s; }
.cv-node { fill: var(--color-bg); stroke: var(--color-accent-600); transition: fill 0.6s 0.9s; }
.is-in .cv-node { fill: var(--color-accent); }
.cv-hub { fill: var(--color-bg); stroke: var(--color-accent); stroke-width: 1.2; }
.cv-hub-core { fill: var(--color-accent); }
.cv-ring {
  fill: none;
  stroke: var(--color-accent);
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}
.is-in .cv-ring { animation: ring 3s var(--ease-out) 2.4s infinite; }

/* Legal pages */
.legal-head,
.legal-body { max-width: 760px; }
.legal-head { margin-bottom: clamp(40px, 7vh, 72px); }
.legal-head .eyebrow { animation: fade-up 0.9s var(--ease-out) 0.15s both; }
.legal-updated { margin-top: 16px; color: var(--color-neutral-500); font-size: 14px; }
.legal-body { display: flex; flex-direction: column; gap: 40px; animation: fade-up 1s var(--ease-out) 0.45s both; }
.legal-body h2 { margin-bottom: 12px; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.legal-body p { color: var(--color-neutral-300); font-size: 16px; line-height: 1.7; text-wrap: pretty; }
.legal-body p + p { margin-top: 14px; }

/* Pointer-following glow on cards and rows (position set by site.js). */
[data-spotlight] { isolation: isolate; }
[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

/* Next-page link */
.next { margin-top: clamp(64px, 10vh, 120px); border-top: 1px solid var(--hairline); }
.band + .next { margin-top: 0; }
.next-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(48px, 9vh, 96px);
}
.next-title {
  display: block;
  margin-top: 14px;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  transition: transform 0.8s var(--ease-out), color 0.4s;
}
.next-arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(52px, 5vw, 76px);
  aspect-ratio: 1;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  color: var(--color-neutral-300);
  transition: background-color 0.5s var(--ease-out), border-color 0.5s, color 0.5s;
}

/* Hover effects only where there is a real pointer. On touch screens :hover
   sticks after a tap, which would leave a row shifted, glowing and underlined. */
@media (hover: hover) {
  .disclosure > summary:hover .disclosure-icon { border-color: var(--color-accent); color: var(--color-text); }
  .disclosure > summary:hover .disclosure-title { color: var(--color-bright); transform: translateX(6px); }
  .row:hover::after { transform: scaleX(1); }
  .row .disclosure > summary:hover .row-num { color: var(--color-bright); }
  [data-spotlight]:hover::before { opacity: 1; }
  .next-link:hover .next-title { color: var(--color-bright); transform: translateX(10px); }
  .next-link:hover .next-arrow { border-color: var(--color-accent); background: var(--color-accent); color: var(--color-bg); }
  .next-link:hover .arrow { transform: translateX(4px); }
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hairline);
  color: var(--color-neutral-500);
  font-size: 13px;
}
.footer-inner { display: flex; flex-direction: column; gap: 14px; padding-block: 26px 28px; }
.footer-legal { max-width: 96ch; line-height: 1.6; }
.footer-legal strong { color: var(--color-neutral-400); }
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  color: var(--color-neutral-400);
}
.footer-company { display: flex; flex-wrap: wrap; gap: 4px 28px; font-style: normal; }
.footer-copy { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.footer-link {
  color: var(--color-neutral-300);
  text-decoration: underline;
  text-decoration-color: rgba(var(--text-rgb), 0.25);
  text-underline-offset: 3px;
  transition: color 0.3s, text-decoration-color 0.3s;
}
.footer-link:hover { color: var(--color-text); text-decoration-color: var(--color-accent); }
.footer-link .ext { display: inline; margin-left: 4px; vertical-align: 1px; }
.page-home .site-footer {
  /* The trails run under the footer, so the legal text gets its own scrim. */
  background: linear-gradient(0deg, rgba(var(--ink), 0.94), rgba(var(--ink), 0.72));
  animation: fade-in 1.2s var(--ease-out) 1.6s both;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Scroll reveal (site.js adds .is-in; html.js is set before first paint) ── */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="1"] { --reveal-delay: 0.1s; }
[data-reveal="2"] { --reveal-delay: 0.2s; }
[data-reveal="3"] { --reveal-delay: 0.3s; }
[data-reveal="4"] { --reveal-delay: 0.4s; }

/* ── Page transitions (Chromium & Safari 18.2+; others navigate normally) ── */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.3s var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in 0.6s var(--ease-out) both; }

/* ── Keyframes ────────────────────────────────────────────────────────── */

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }
@keyframes line-up { from { transform: translateY(110%); } }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes hero-media-in { from { opacity: 0; } }
@keyframes page-media-in { from { opacity: 0; } }
@keyframes zoom-settle { from { transform: scale(1.12); } }
@keyframes ping {
  0% { opacity: 0.7; transform: scale(0.6); }
  70%, 100% { opacity: 0; transform: scale(2.2); }
}
@keyframes ring {
  0% { opacity: 0.8; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(2.6); }
}
@keyframes cv-run {
  0% { stroke-dashoffset: 14; opacity: 0; }
  8% { opacity: 1; }
  52% { opacity: 1; }
  60%, 100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .intro--approach,
  .intro--split { grid-template-columns: minmax(0, 1fr); }
  .intro--approach .intro-head { position: static; }
  .converge { justify-self: start; max-width: 400px; }
}

@media (max-width: 760px) {
  /* Rows stack: number, then title, then the short note; the detail sits
     under the title, a step quieter than it. */
  .row .disclosure > summary { grid-template-columns: 30px minmax(0, 1fr) 34px; gap: 4px 12px; padding: 22px 0; }
  .row-num { grid-row: 1; align-self: start; padding-top: 5px; font-size: 13px; }
  .row .disclosure-title { grid-column: 2; grid-row: 1; font-size: 19px; }
  .row .disclosure-note { grid-column: 2; grid-row: 2; font-size: 14px; }
  .row .disclosure-icon { grid-column: 3; grid-row: 1 / 3; width: 34px; height: 34px; }
  .row .disclosure-body { display: block; padding: 0 0 24px 42px; }
  .row .disclosure-body p { font-size: 15px; line-height: 1.65; }

  /* Tighter vertical rhythm on small screens. */
  .intro { padding-block: 40px 48px; }
  .intro--split { gap: 36px; }
  .band { height: 300px; margin-top: 64px; }
  .next { margin-top: 48px; }
  .next-link { padding-block: 40px; }
}

@media (max-width: 520px) {
  .hero-actions { gap: 4px 28px; }
}

/* Reduced motion keeps the fades but drops everything that travels: no slides,
   zooms, parallax (site.js skips it), live scene or looping pulses. */
@media (prefers-reduced-motion: reduce) {
  .page-media img { animation: none; }
  [data-enter],
  .line > span,
  .intro-head .eyebrow,
  .intro-copy .eyebrow,
  .intro-copy .lede { animation-name: fade-in; }
  .js [data-reveal] { transform: none; }
  .band-media img { transform: none; }
  .cv-track { stroke-dashoffset: 0; transition: none; }
  .cv-pulse,
  .cv-ring,
  .status-dot::after { display: none; }
  .disclosure > summary:hover .disclosure-title,
  .next-link:hover .next-title { transform: none; }
  .disclosure::details-content { transition: none; }
  .disclosure[open] .disclosure-body { animation-name: fade-in; }
  ::view-transition-old(root) { animation-name: fade-out; }
  ::view-transition-new(root) { animation-name: fade-in; }
}
@keyframes fade-out { to { opacity: 0; } }
