/* ZionX, zionx.in
   One stylesheet, no dependencies.

   Colour comes from the logo: bright teal #0097B2 (the summit) and deep teal #026273
   (the range). Pages open and close dark, like the mountain at night, and read on
   light "snow" in between. Each page has at most one dark moment mid-page.

   Components never name a colour directly. They use the context tokens (--bg, --fg,
   --fg-muted, --accent-text and so on), which are set once per section type below.
   Every text pair listed there meets WCAG 2.1 AA; the numbers are in README.md. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Registered so the scroll sequence can animate them smoothly */
@property --lit  { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --open { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --on   { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --pass { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --fill { syntax: "<number>"; inherits: true; initial-value: 1; }

:root {
  /* From the logo */
  --teal: #0097B2;
  --teal-deep: #026273;
  --teal-word: #004E5B;

  /* Built from the same hue */
  --ink: #04191E;
  --ink-2: #0A262D;
  --ink-3: #0B3A44;
  --snow: #F2F7F8;
  --white: #FFFFFF;
  --offwhite: #E8EEF0;

  --r-lg: 28px;
  --r-md: 18px;
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Context tokens ---------- */

/* Light: the default reading context */
:root, .band, .bar {
  --bg: var(--white);
  --surface: var(--snow);
  --fg: #06242B;
  --fg-muted: #47636B;
  --line: rgba(6, 36, 43, 0.13);
  --line-strong: #6B858C;
  --accent-text: var(--teal-deep);   /* bright teal fails AA as small text on light */
  --focus: var(--teal-deep);
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  --btn-hover: var(--teal-word);
  --shadow: 0 1px 2px rgba(2, 60, 72, 0.05), 0 20px 44px -22px rgba(2, 60, 72, 0.25);
}
.tint {
  --bg: var(--snow);
  --surface: var(--white);
}

/* Dark: heroes, the Standard sequence, closers, the footer */
.dark, .hero, .page-hero, .standard, .closer, .site-footer, .tile-wide, .result {
  --bg: var(--ink);
  --surface: var(--ink-2);
  --fg: var(--offwhite);
  --fg-muted: #9FB3B8;
  --line: rgba(232, 238, 240, 0.15);
  --line-strong: #7F9AA1;
  --accent-text: var(--teal);
  --focus: var(--teal);
  --btn-bg: var(--teal);
  --btn-fg: var(--ink);
  --btn-hover: #1FAAC3;
  --shadow: none;
}

/* Deep teal: the one highlighted band. Only white-ish text passes here. */
.start {
  --bg: var(--teal-deep);
  --surface: #035465;
  --fg: var(--white);
  --fg-muted: #D9EBEE;
  --line: rgba(255, 255, 255, 0.24);
  --line-strong: #D9EBEE;
  --accent-text: var(--white);
  --focus: var(--white);
  --btn-bg: var(--white);
  --btn-fg: var(--ink);
  --btn-hover: var(--offwhite);
  --shadow: none;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 104px;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  color: var(--fg);
  background: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

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

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sprite { position: absolute; }

.js-only { display: none; }
.js .js-only { display: revert; }
.js .nojs-only { display: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  translate: 0 -220%;
}
.skip:focus { translate: 0 0; }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:focus-visible { border-radius: 999px; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--fg); background: color-mix(in srgb, var(--fg) 8%, transparent); }
.btn-wrap { white-space: normal; padding-block: 12px; text-align: center; }
.btn-xl { min-height: 68px; padding: 0 40px; font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.closer-alt a { color: var(--fg); text-underline-offset: 0.2em; }
.textlink, .prose a, .also-line a, .check-fallback a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.textlink:hover, .prose a:hover, .also-line a:hover, .closer-alt a:hover, .check-fallback a:hover { text-decoration-thickness: 2px; }

.pill, .tag {
  align-self: flex-start;
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid color-mix(in srgb, var(--accent-text) 45%, transparent);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 560;
  line-height: 1.3;
  color: var(--accent-text);
}

/* ---------- Header: one frosted pill ---------- */

.site-header {
  position: fixed;
  inset: 12px 0 auto;
  z-index: 50;
  padding-inline: clamp(12px, 3vw, 40px);
  pointer-events: none;
}

.bar {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 8px 8px 8px 22px;
  border: 1px solid rgba(6, 36, 43, 0.08);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(2, 24, 29, 0.08), 0 14px 34px -16px rgba(2, 24, 29, 0.35);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bar {
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    backdrop-filter: blur(18px) saturate(1.6);
  }
}

.brand { display: block; padding: 8px 0; margin-right: auto; border-radius: 8px; }
.brand svg { height: 28px; width: auto; aspect-ratio: 5280 / 1200; }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 2px; }
.site-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--fg);
  transition: background-color 0.2s;
}
.site-nav a:hover { background: rgba(2, 98, 115, 0.1); }
.site-nav a[aria-current="page"] { background: rgba(2, 98, 115, 0.12); color: var(--teal-word); }

.nav-toggle {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}
.bar-cta { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }

@media (max-width: 1019px) {
  .bar { padding-left: 18px; }
  .brand svg { height: 24px; }
  .site-nav { order: 10; flex-basis: 100%; }
  .site-nav ul { padding: 4px 0 6px; }
  .js .site-nav { display: none; }
  .js .bar.is-open .site-nav { display: block; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { padding: 12px 10px; border-radius: 12px; font-size: 1.0625rem; }
}
@media (max-width: 419px) {
  .bar { gap: 4px 8px; padding-left: 14px; }
  .brand svg { height: 21px; }
  .bar-cta { padding: 0 14px; }
  .nav-toggle { padding: 0 12px; }
}
@media (min-width: 1020px) {
  .bar { flex-wrap: nowrap; border-radius: 999px; }
  .site-nav { margin-right: 8px; }
  .nav-toggle { display: none; }
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: clamp(124px, 18svh, 200px);
  background: var(--bg);
  color: var(--fg);
  overflow: clip;
}

.hero-copy { position: relative; z-index: 2; }

.hero h1 {
  max-width: 12.5em;
  font-size: clamp(2.5rem, min(5.7vw, 10.4svh), 6.25rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.052em;
}
.hero h1 span { display: block; text-wrap: balance; }
.hero h1 span + span { margin-top: 0.12em; color: var(--fg-muted); }

.hero-lede {
  max-width: 31em;
  margin-top: clamp(22px, 3.2svh, 36px);
  font-size: clamp(1.0625rem, 0.95rem + 0.55vw, 1.3125rem);
  line-height: 1.5;
  color: var(--fg-muted);
  text-wrap: pretty;
}
.hero .actions { margin-top: clamp(26px, 3.8svh, 40px); }

.peaks {
  position: relative;
  z-index: 1;
  flex: none;
  width: 132%;
  margin: auto 0 0 -16%;
  padding-top: 40px;
  aspect-ratio: 2400 / 1304;
  box-sizing: content-box;
  overflow: visible;
}

.p-up { fill: var(--teal); }
.p-lo { fill: var(--teal-deep); }
.peaks .p-lo { fill: url(#g-lo); }
.peak-far-a .p-up, .peak-far-b .p-up { fill: url(#g-far-up); }
.peaks .peak-far-a .p-lo, .peaks .peak-far-b .p-lo { fill: url(#g-far-lo); }

@media (min-width: 900px) {
  .hero-copy { padding-bottom: 12svh; }
  .peaks {
    position: absolute;
    right: -9vw;
    bottom: 0;
    width: auto;
    height: min(60svh, 40vw);
    margin: 0;
    padding: 0;
  }
}

/* ---------- Inner page hero ---------- */

.page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(72svh, 720px);
  padding-block: clamp(140px, 22svh, 220px) clamp(64px, 11svh, 120px);
  background: var(--bg);
  color: var(--fg);
  overflow: clip;
}
.page-hero-full { min-height: 100svh; justify-content: center; }
.page-hero-copy { position: relative; z-index: 2; }

.page-hero h1 {
  max-width: 13em;
  font-size: clamp(2.5rem, 1.2rem + 5.4vw, 5.75rem);
  font-weight: 600;
  line-height: 0.97;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.h1-sub { display: block; margin-top: 0.14em; color: var(--fg-muted); }

.page-lede {
  max-width: 30em;
  margin-top: clamp(22px, 3.4svh, 36px);
  font-size: clamp(1.125rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.page-note { max-width: 36em; margin-top: 18px; color: var(--fg-muted); }
.page-hero .actions { margin-top: clamp(26px, 4svh, 40px); }
.page-hero .mail { margin-top: clamp(28px, 5svh, 56px); }

.ridge {
  position: absolute;
  z-index: 1;
  right: -10vw;
  bottom: 0;
  width: min(86vw, 900px);
  height: auto;
  aspect-ratio: 2400 / 1304;
  overflow: visible;
}
.r-up { fill: url(#g-far-up); }
.r-lo { fill: url(#g-far-lo); }
.r-up.r-main { fill: var(--ink-3); }
.r-lo.r-main { fill: #072E36; }

.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(26px, 4svh, 40px); }
.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.jump a:hover { border-color: var(--fg); background: color-mix(in srgb, var(--fg) 8%, transparent); }

/* ---------- Bands ---------- */

.band {
  padding-block: clamp(80px, 13vh, 152px);
  background: var(--bg);
  color: var(--fg);
}
/* Two neighbours on the same surface get a hairline between them */
.band:not(.tint):not(.dark):not(.standard):not(.closer):not(.start)
  + .band:not(.tint):not(.dark):not(.standard):not(.closer):not(.start),
.page-hero + .standard { box-shadow: inset 0 1px 0 var(--line); }

.band-head { margin-bottom: clamp(36px, 6vh, 72px); }

.band h2 {
  font-size: clamp(2.2rem, 1.3rem + 3.8vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.046em;
  text-wrap: balance;
}

.band-sub {
  max-width: 32em;
  margin-top: 18px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
  color: var(--fg-muted);
}

.split { display: grid; gap: clamp(28px, 5vw, 80px); }
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; }
}

.lines li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  font-weight: 500;
  line-height: 1.35;
}
.lines li:last-child { border-bottom: 1px solid var(--line); }

.facts { margin-top: 28px; }
.facts > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9rem) 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts:first-child { margin-top: 0; }
.facts dt { color: var(--fg-muted); }
.facts dd { font-weight: 500; }

/* ---------- Tiles (home) ---------- */

.bento { display: grid; grid-template-columns: 1fr; gap: 18px; }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(26px, 3.2vw, 44px);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
}

.tile h3:not(.tile-line) {
  font-size: 1rem;
  font-weight: 560;
  color: var(--accent-text);
}
.tile h3 a { text-decoration: none; }
.tile-link h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
}
.tile-link h3 a:focus-visible { outline: none; }
.tile-link h3 a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.tile-link { transition: translate 0.25s ease, box-shadow 0.25s ease; }
.tile-link:hover { translate: 0 -4px; }
.tint .tile-link:not(.tile-wide):hover { box-shadow: 0 1px 2px rgba(2, 60, 72, 0.06), 0 30px 54px -22px rgba(2, 60, 72, 0.36); }

.tile-line {
  max-width: 14em;
  font-size: clamp(1.625rem, 1.15rem + 1.7vw, 2.375rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.tile-offers { margin-top: auto; padding-top: 18px; }
.tile-offers li {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--fg-muted);
}

.tile-term {
  align-self: flex-start;
  margin-top: 10px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.tile-wide { background: var(--bg); gap: 32px; }
.tile-main { display: flex; flex-direction: column; gap: 14px; }
.tile-main > p:not([class]) { max-width: 30em; color: var(--fg-muted); }
.tile-wide .tile-line { font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem); max-width: 10em; }
.tile-list li {
  padding: 15px 0;
  border-top: 1px solid var(--line);
  line-height: 1.35;
}
.tile-list li:last-child { border-bottom: 1px solid var(--line); }

@media (min-width: 760px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .tile-wide {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: end;
  }
}

/* ---------- The Standard: intro ---------- */

.standard { padding-bottom: 0; }

.standard-intro { display: grid; gap: clamp(28px, 5vw, 64px) clamp(40px, 6vw, 96px); }

.standard-lede {
  margin-top: 18px;
  font-size: clamp(1.375rem, 1rem + 1.6vw, 2.25rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--accent-text);
}

.standard-copy { display: grid; gap: 1em; max-width: 36em; color: var(--fg-muted); }
.standard-copy p:first-child { color: var(--fg); }
.standard-copy .actions { margin-top: 10px; }

@media (min-width: 900px) {
  .standard-intro { grid-template-columns: 1fr 1fr; align-items: end; }
}

/* ---------- The climb: static by default (every stage lit, every gate open) ---------- */

/* As a static diagram the gates are drawn closed across the route, so they read as gates */
.climb { --lit: 1; --open: 0; --on: 1; --pass: 1; --fill: 1; }

.climb-pin {
  display: grid;
  gap: 28px;
  padding: clamp(48px, 8vh, 96px) var(--gutter) clamp(80px, 13vh, 152px);
}

.readout, .gatecard { display: none; }

.climb-box { position: relative; width: min(100%, 880px); margin-inline: auto; }
.climb-art { width: 100%; height: auto; overflow: visible; }

.c-up { fill: var(--ink-3); }
.c-lo { fill: #072E36; }

.route-ahead {
  fill: none;
  stroke: rgba(232, 238, 240, 0.3);
  stroke-width: 6;
  stroke-dasharray: 2 22;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 0;
}

.node {
  fill: var(--teal);
  fill: color-mix(in srgb, var(--teal) calc(var(--lit) * 100%), var(--ink));
  stroke: var(--teal);
  stroke: color-mix(in srgb, var(--teal) calc(var(--lit) * 100%), #9FB3B8);
  stroke-width: 9;
}
.node-halo { fill: var(--teal); opacity: calc(var(--lit) * 0.22); }

.gate-bar {
  transform-box: fill-box;
  transform-origin: 8px 8px;
  rotate: calc(var(--open) * -90deg);
  fill: var(--teal);
  fill: color-mix(in srgb, var(--teal) calc(var(--open) * 100%), var(--offwhite));
}

.route {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-top: 28px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
}
.route li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--offwhite);
  color: color-mix(in srgb, var(--offwhite) calc(var(--lit) * 100%), #9FB3B8);
}
.route-n {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--teal);
  border-color: color-mix(in srgb, var(--teal) calc(var(--lit) * 100%), #9FB3B8);
  border-radius: 50%;
  background: var(--teal);
  background: color-mix(in srgb, var(--teal) calc(var(--lit) * 100%), transparent);
  color: var(--ink);
  color: color-mix(in srgb, var(--ink) calc(var(--lit) * 100%), #9FB3B8);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.climb-note { max-width: 30em; margin-inline: auto; text-align: center; color: var(--fg-muted); }

@media (min-width: 900px) {
  .climb-box { width: min(100% - 420px, 860px); padding-top: 56px; }
  .route { position: absolute; inset: 56px 0 0; display: block; margin: 0; }
  .route li { position: absolute; white-space: nowrap; }
  .route .s1, .route .s2, .route .s3 { flex-direction: row-reverse; }
  .route .s4 { flex-direction: column; gap: 6px; }
}

/* ---------- Outcome cards (home) and case studies (work) ---------- */

.outcomes { display: grid; gap: 18px; }
@media (min-width: 800px) {
  .outcomes { grid-template-columns: 1fr 1fr; }
}

.outcome {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(26px, 3.4vw, 48px);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: translate 0.25s ease, box-shadow 0.25s ease;
}
.outcome:hover { translate: 0 -4px; box-shadow: 0 1px 2px rgba(2, 60, 72, 0.06), 0 30px 54px -22px rgba(2, 60, 72, 0.36); }
.outcome .figure { margin-bottom: clamp(20px, 4vw, 48px); }
.outcome h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; }
.outcome h3 a { text-decoration: none; }
.outcome h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.outcome h3 a:focus-visible { outline: none; }
.outcome h3 a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.outcome > p:not([class]) { color: var(--fg-muted); max-width: 30em; }
.outcome-more {
  margin-top: auto;
  padding-top: 16px;
  font-weight: 500;
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.figure-n {
  display: block;
  font-size: clamp(2.75rem, 1.4rem + 4.6vw, 5.25rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.055em;
  color: var(--accent-text);
  text-wrap: balance;
}
.figure-l {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.35;
  color: var(--fg-muted);
}

.case {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(26px, 4.2vw, 60px);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-margin-top: 104px;
}
.case + .case { margin-top: 18px; }

.figures { margin-top: clamp(24px, 4vw, 44px); }
.figures li {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: var(--fg-muted);
  line-height: 1.3;
}
.figure-s {
  margin-right: 6px;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg);
}

.band h2.case-title {
  font-size: clamp(1.625rem, 1.1rem + 1.8vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}
.case-meta { margin-top: 10px; color: var(--fg-muted); }

.story { margin-top: clamp(22px, 3vw, 34px); }
.story > div { display: grid; gap: 4px 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.story dt { font-weight: 600; }
.story dd { max-width: 40em; color: var(--fg-muted); }
.story dd p + p { margin-top: 0.8em; }

@media (min-width: 700px) {
  .story > div { grid-template-columns: 8.5rem 1fr; }
}
@media (min-width: 1000px) {
  .case { grid-template-columns: 5fr 7fr; }
  .case-figure { position: sticky; top: 112px; align-self: start; }
}

/* ---------- Krenox strip (home) and products (about) ---------- */

.strip-inner, .feature { display: grid; gap: clamp(24px, 5vw, 80px); }
.strip-head, .feature-head { display: flex; flex-direction: column; gap: 14px; }
.strip-head h2 { margin-top: 6px; }
.strip-line, .feature-line {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--fg-muted);
}
.strip-copy { display: grid; gap: 1em; align-content: end; max-width: 36em; }
.also-line { font-size: 1rem; color: var(--fg-muted); }
p.also-line.reveal { max-width: 44em; margin-top: 28px; }

.feature {
  position: relative;
  padding: clamp(26px, 4.2vw, 60px);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.feature h3 {
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}
.feature h3 a { text-decoration: none; }
.feature h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.feature h3 a:focus-visible { outline: none; }
.feature h3 a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.feature-copy { display: grid; gap: 1em; align-content: end; max-width: 34em; color: var(--fg-muted); }
.product-url {
  font-weight: 500;
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

@media (min-width: 900px) {
  .strip-inner, .feature { grid-template-columns: 1fr 1fr; align-items: end; }
}

/* ---------- Services ---------- */

.start-inner { display: grid; gap: clamp(28px, 5vw, 80px); }
.start-head { display: flex; flex-direction: column; gap: 16px; }
.start-for { max-width: 26em; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.4; }
.start-head .actions { margin-top: 12px; }
.start-copy { display: grid; gap: 1em; align-content: end; max-width: 36em; color: var(--fg-muted); }
.start-length { padding-top: 16px; border-top: 1px solid var(--line); font-weight: 560; color: var(--fg); }
@media (min-width: 900px) {
  .start-inner { grid-template-columns: 1fr 1fr; align-items: end; }
}

.pillar { scroll-margin-top: 0; }

.offer {
  display: grid;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(26px, 3.8vw, 52px);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.offer + .offer { margin-top: 18px; }
.offer h3 {
  margin-bottom: 6px;
  font-size: clamp(1.625rem, 1.15rem + 1.7vw, 2.375rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.offer h4 {
  margin-top: 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg-muted);
}
.offer-get h4 { margin: 0 0 12px; }
.offer-head p { max-width: 28em; }
.offer-cta { margin-top: 26px; }
.offer-before { margin-bottom: 12px; }
.offer-after { margin-top: 16px; font-weight: 500; }
.offer .lines li { font-size: clamp(1rem, 0.96rem + 0.3vw, 1.125rem); padding: 14px 0; }
@media (min-width: 900px) {
  .offer { grid-template-columns: 5fr 6fr; }
}

/* ---------- AI Engineering Standard: the rules, set as an essay ---------- */

.essay-title { margin-bottom: clamp(40px, 7vh, 88px); }

.rule-group { display: grid; gap: 8px 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.rule-group + .rule-group { margin-top: clamp(48px, 8vh, 96px); }
.rule-group-title { font-size: 1.0625rem; font-weight: 600; color: var(--fg-muted); }

.rule {
  display: grid;
  grid-template-columns: clamp(3.25rem, 9vw, 6.5rem) 1fr;
  gap: 4px 12px;
  padding-block: clamp(22px, 3.4vh, 40px);
  scroll-margin-top: 104px;
}
.rule + .rule { border-top: 1px solid var(--line); }
.rule:first-child { padding-top: 6px; }
.rule-n {
  grid-row: 1 / span 2;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4.25rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
}
.rule h4 {
  max-width: 18em;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.rule p {
  max-width: 34em;
  margin-top: 12px;
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.7;
  text-wrap: pretty;
}
.rule:target h4 { color: var(--accent-text); }
@media (max-width: 699px) {
  .rule { grid-template-columns: 3rem 1fr; align-items: start; }
  .rule-n { grid-row: auto; font-size: 2.25rem; line-height: 1; }
  .rule p { grid-column: 1 / -1; }
}

.coda {
  max-width: 13em;
  margin-top: clamp(64px, 11vh, 128px);
  font-size: clamp(2rem, 1.2rem + 3.6vw, 4.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.046em;
  color: var(--accent-text);
  text-wrap: balance;
}

@media (min-width: 1000px) {
  .rule-group { grid-template-columns: 13rem 1fr; }
  .rule-group-title { position: sticky; top: 112px; align-self: start; padding-top: 14px; }
}

/* ---------- Review ---------- */

.steps { display: grid; gap: 0 28px; counter-reset: none; }
.steps li {
  position: relative;
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--teal);
}
.step-n {
  display: block;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--accent-text);
}
.steps p {
  max-width: 16em;
  margin-top: 14px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.faq > div { padding: 22px 0; border-top: 1px solid var(--line); }
.faq > div:last-child { border-bottom: 1px solid var(--line); }
.faq dt {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.faq dd { max-width: 38em; margin-top: 8px; color: var(--fg-muted); }

/* ---------- About ---------- */

.founder { display: grid; gap: clamp(28px, 6vw, 96px); align-items: center; }
.portrait {
  width: min(100%, 340px);
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait-empty { display: grid; place-items: center; }
.portrait-empty svg { width: 46%; height: auto; }
.founder-role {
  margin-top: 14px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 500;
  color: var(--accent-text);
}
.founder-copy p:not([class]) { max-width: 34em; margin-top: 22px; color: var(--fg-muted); }
@media (min-width: 800px) {
  .founder { grid-template-columns: minmax(220px, 340px) 1fr; }
}
@media (max-width: 799px) {
  .portrait { width: 150px; }
}

.principles li {
  display: grid;
  gap: 8px 48px;
  padding: clamp(22px, 3.4vw, 40px) 0;
  border-top: 1px solid var(--line);
}
.principles li:last-child { border-bottom: 1px solid var(--line); }
.principle {
  font-size: clamp(1.625rem, 1rem + 2.6vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.principle-detail { max-width: 26em; color: var(--fg-muted); }
@media (min-width: 900px) {
  .principles li { grid-template-columns: 1.4fr 1fr; align-items: baseline; }
}

/* ---------- Readiness check ---------- */

.check-wrap { max-width: calc(940px + 2 * var(--gutter)); }

.check-item {
  display: grid;
  gap: 14px 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.check-item:last-child { border-bottom: 1px solid var(--line); }
.check-q {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.012em;
}
.check-n { color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.check-rule {
  grid-column: 2;
  justify-self: start;
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--accent-text);
  text-underline-offset: 0.2em;
}

.check-answer { gap: 8px; padding-left: 2.4rem; }
.js .check-answer { display: flex; }
.check-answer label { position: relative; display: block; cursor: pointer; }
.check-answer input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.check-answer span {
  display: grid;
  place-items: center;
  min-width: 84px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  font-weight: 560;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.check-answer label:hover span { border-color: var(--fg); }
.check-answer input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--white); }
.check-answer input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }

.check-fallback { max-width: 44em; margin-top: 28px; }
.check-submit { margin-top: 32px; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.js .check-submit { display: flex; }
.check-error { font-weight: 560; }

.result {
  margin-top: clamp(40px, 7vh, 72px);
  padding: clamp(28px, 4.6vw, 64px);
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--fg);
  scroll-margin-top: 104px;
}
.result:focus-visible { outline-offset: 4px; border-radius: var(--r-lg); }
.result-score { font-size: 1.125rem; font-weight: 500; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.result-name {
  margin-top: 6px;
  font-size: clamp(2.75rem, 1.4rem + 5.4vw, 5.5rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.052em;
  color: var(--accent-text);
}
.result-text {
  max-width: 24em;
  margin-top: 18px;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.result-rules { margin-top: clamp(32px, 5vh, 52px); }
.result-rules h3 { margin-bottom: 14px; font-size: 1rem; font-weight: 600; color: var(--fg-muted); }
.result-rules li { font-size: 1.0625rem; }
.result-rules a { display: block; text-decoration: none; }
.result-rules a:hover .rr-title { text-decoration: underline; text-underline-offset: 0.2em; }
.rr-n { margin-right: 10px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.rr-q { display: block; margin-top: 4px; font-size: 0.9375rem; font-weight: 400; color: var(--fg-muted); }
.result .actions { margin-top: clamp(28px, 5vh, 44px); }

/* ---------- Reading pages ---------- */

.prose { max-width: calc(34em + 2 * var(--gutter)); margin-inline: 0 auto; }
.nowrap { white-space: nowrap; }
.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin-top: 0.6em; font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.7; }
.prose .prose-next { margin-top: 2.4em; }
@media (min-width: 1000px) {
  .prose { margin-left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); padding-inline: 0; }
}

/* ---------- Closers and footer ---------- */

.closer {
  display: grid;
  align-items: center;
  min-height: min(78svh, 760px);
  background: var(--bg) url("../img/ridge.svg") no-repeat right -10vw bottom / min(92vw, 980px) auto;
}
.closer h2 {
  max-width: 12em;
  font-size: clamp(2.4rem, 1.2rem + 5vw, 5.75rem);
  line-height: 0.97;
  letter-spacing: -0.05em;
}
.closer-note {
  max-width: 30em;
  margin-top: 22px;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.4375rem);
  line-height: 1.4;
  color: var(--fg-muted);
}
.closer .actions { margin-top: clamp(28px, 5vh, 48px); }
.closer .btn-xl { margin-top: clamp(28px, 5vh, 48px); }
.closer-alt { margin-top: 26px; color: var(--fg-muted); }

.mail {
  display: inline-block;
  margin-top: clamp(28px, 5vh, 56px);
  font-size: clamp(1.625rem, 1rem + 3.4vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  transition: color 0.2s;
}
.mail:hover { color: var(--fg); }

.site-footer {
  padding-block: 0 40px;
  background: var(--bg);
  color: var(--fg-muted);
  font-size: 0.9375rem;
}
.site-footer .wrap > * { margin-top: 28px; }
.site-footer .wrap::before {
  content: "";
  display: block;
  border-top: 1px solid var(--line);
}
.foot-brand { display: inline-block; border-radius: 8px; }
.foot-brand svg { height: 26px; width: auto; aspect-ratio: 5280 / 1200; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-left: -10px; }
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}
.foot-links a:hover { text-decoration: underline; text-underline-offset: 0.22em; }
.foot-links a[aria-current="page"] { color: var(--accent-text); }
.foot-line a { color: var(--fg); text-underline-offset: 0.2em; }

/* ---------- Motion. Screen only, and switched off under reduced motion. ---------- */

@media screen and (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* One load sequence in the hero */
  .hero h1, .hero-lede, .hero .actions,
  .page-hero h1, .page-lede { animation: rise-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-lede, .page-lede { animation-delay: 0.12s; }
  .hero .actions { animation-delay: 0.22s; }
  .peaks { animation: peaks-in 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }

  @supports (animation-timeline: view()) {
    /* Fade and rise as blocks enter */
    .reveal {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 20%;
    }

    /* Parallax on the hero peaks */
    .peak {
      animation: linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 100vh;
    }
    .peak-far-a { animation-name: drift-far-a; }
    .peak-far-b { animation-name: drift-far-b; }
    .peak-main-up { animation-name: drift-main; }

    /* The pinned climb */
    .climb {
      height: 520vh;
      view-timeline: --climb block;
    }
    .climb-pin {
      position: sticky;
      top: 0;
      height: 100vh;
      height: 100svh;
      grid-template-rows: auto minmax(0, 1fr);
      gap: 16px;
      padding: 92px var(--gutter) 28px;
    }
    .climb-top {
      display: grid;
      gap: 14px;
      width: 100%;
      max-width: var(--wrap);
      margin-inline: auto;
    }
    .climb-note { display: none; }
    .climb-stage { display: grid; align-items: end; min-height: 0; }
    .climb-box { width: min(100%, calc((100svh - 500px) * 1.3846)); }
    .route { margin-top: 18px; gap: 8px 16px; }

    .readout { display: grid; }
    .readout-stage {
      grid-area: 1 / 1;
      display: grid;
      gap: 2px;
      opacity: var(--on);
      translate: 0 calc((1 - var(--on)) * 14px);
    }
    .readout-n { font-size: 0.9375rem; font-weight: 500; color: var(--fg-muted); }
    .readout-name {
      font-size: clamp(2.4rem, 1.4rem + 4.6vw, 5.5rem);
      font-weight: 600;
      line-height: 0.98;
      letter-spacing: -0.05em;
    }

    .gatecard {
      display: flex;
      gap: 14px;
      align-items: flex-start;
      padding: 16px 18px;
      border: 1px solid color-mix(in srgb, var(--teal) calc(var(--pass) * 100%), rgba(232, 238, 240, 0.22));
      border-radius: var(--r-md);
      background: rgba(232, 238, 240, 0.06);
      -webkit-backdrop-filter: blur(14px);
      backdrop-filter: blur(14px);
      font-size: 0.9375rem;
      line-height: 1.35;
    }
    .lock { flex: none; width: 28px; height: 28px; margin-top: 2px; fill: none; stroke-width: 1.8; stroke-linecap: round; }
    .lock-body {
      fill: color-mix(in srgb, var(--teal) calc(var(--pass) * 100%), transparent);
      stroke: color-mix(in srgb, var(--teal) calc(var(--pass) * 100%), var(--offwhite));
    }
    .lock-shackle {
      stroke: color-mix(in srgb, var(--teal) calc(var(--pass) * 100%), var(--offwhite));
      transform-box: view-box;
      transform-origin: 16px 11px;
      rotate: calc(var(--pass) * 30deg);
    }
    .gatecard-text { flex: 1; min-width: 0; }
    .gatecard-title { font-weight: 600; }
    .gatecard-names, .gatecard-status { display: grid; }
    .gatecard-names { color: var(--fg-muted); }
    .gn { grid-area: 1 / 1; opacity: var(--on); }
    .st { grid-area: 1 / 1; }
    .st-locked { opacity: calc(1 - var(--pass)); }
    .st-passed { opacity: var(--pass); }
    .meter {
      height: 4px;
      margin: 10px 0 8px;
      border-radius: 2px;
      background: rgba(232, 238, 240, 0.16);
      overflow: hidden;
    }
    .meter-fill {
      display: block;
      height: 100%;
      background: var(--teal);
      transform-origin: 0 50%;
      scale: var(--fill) 1;
    }

    /* Everything in the sequence runs on the same timeline */
    .climb .route-line,
    .climb .node, .climb .node-halo, .climb .route li,
    .climb .gate, .climb .readout-stage, .climb .gn,
    .climb .gatecard, .climb .meter-fill {
      animation-duration: 1ms;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --climb;
      animation-range: contain 0% contain 100%;
    }

    @media (max-width: 899px) and (max-height: 739px) {
      .climb .route { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }
      .climb-box { width: min(100%, calc((100svh - 380px) * 1.3846)); }
    }

    @media (min-width: 900px) {
      .climb-pin { padding-top: 104px; }
      .climb-top { grid-template-columns: 1fr minmax(300px, 360px); align-items: start; gap: 32px; }
      .climb-box { width: min(100% - 420px, calc((100svh - 345px) * 1.3846)); padding-top: 48px; }
      .route { inset: 48px 0 0; margin: 0; }
    }
  }
}

@keyframes rise-in {
  from { opacity: 0; translate: 0 26px; }
}
@keyframes peaks-in {
  from { opacity: 0; translate: 0 48px; }
}
@keyframes drift-far-a { to { translate: 0 300px; } }
@keyframes drift-far-b { to { translate: 0 230px; } }
@keyframes drift-main  { to { translate: 0 80px; } }

/* ---------- The climb, explained (home page and AI Engineering Standard page) ----------
   Markup: partials/climb.html. Everything here is scoped to .climb-explained or to
   classes that only exist in the explained markup.

   Default (no scroll-driven animation, reduced motion, short screens, print):
   the diagram, then the six stages as a vertical route that reads top to bottom. */

.climb-explained .climb-pin { gap: clamp(28px, 5vh, 48px); }

.stages { width: min(100%, 760px); margin-inline: auto; }

.stage {
  position: relative;
  padding: 0 0 clamp(30px, 5vh, 48px) 52px;
}
.stage:last-child { padding-bottom: 0; }
/* The route: a rail down the left, a checkpoint for each stage */
.stage::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -12px;
  left: 9px;
  width: 2px;
  background: var(--teal);
}
.stage:last-child::before { display: none; }
.stage::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(0, 151, 178, 0.22);
}

.stage-n { font-size: 0.9375rem; font-weight: 500; line-height: 1.6; color: var(--fg-muted); }
.stage-name {
  margin-top: 2px;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.042em;
}
.stage-text { max-width: 34em; margin-top: 10px; }

.stage-gate { position: relative; margin-top: 22px; }
/* The gate: a bar across the rail, drawn closed like the gates on the mountain */
.stage-gate::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: -56px;
  width: 28px;
  height: 5px;
  border-radius: 3px;
  background: var(--offwhite);
}
.gate-title { font-weight: 600; line-height: 1.35; }
.gate-evidence { max-width: 34em; margin-top: 2px; color: var(--fg-muted); }
.gate-k { color: var(--fg); }
.stage-gate .lock, .gate-meter, .stage-gate .gatecard-status, .stage-gate-end { display: none; }

/* Small screens: the numbered chips sit on the nodes, and the names live in the list below */
@media (max-width: 899px) {
  .climb.climb-explained .route {
    position: absolute;
    inset: 0;
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
  }
  .climb-explained .route li { position: absolute; translate: -50% -50%; }
  .climb-explained .route-name { display: none; }
  .climb-explained .route-n {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    background: var(--teal);
    background: color-mix(in srgb, var(--teal) calc(var(--lit) * 100%), var(--ink));
  }
}

/* Pinned and scroll-driven, where the browser supports it and the screen is tall enough
   to hold a stage, its gate and the mountain together */
@media screen and (prefers-reduced-motion: no-preference) and (min-height: 620px) {
  @supports (animation-timeline: view()) {
    .climb-explained { height: 600vh; }
    .climb-explained .climb-pin {
      grid-template-rows: auto minmax(0, 1fr);
      gap: 14px;
      padding-bottom: 22px;
    }

    /* The six list items are stacked in one cell and shown one at a time */
    .climb-explained .stages {
      grid-row: 1;
      display: grid;
      width: 100%;
      max-width: var(--wrap);
    }
    .stage {
      grid-area: 1 / 1;
      display: grid;
      gap: 14px;
      align-content: start;
      padding: 0;
      opacity: var(--on);
      translate: 0 calc((1 - var(--on)) * 14px);
    }
    .stage::before, .stage::after, .stage-gate::before { display: none; }
    .stage-n { line-height: 1.4; }
    .stage-name {
      margin-top: 0;
      font-size: clamp(2.125rem, 1.3rem + 4.2vw, 5rem);
      line-height: 0.98;
      letter-spacing: -0.05em;
    }
    .stage-text {
      max-width: 31em;
      margin-top: 12px;
      font-size: clamp(0.9375rem, 0.88rem + 0.4vw, 1.1875rem);
      line-height: 1.45;
    }

    /* The gate card */
    .stage-gate {
      display: flex;
      gap: 14px;
      align-items: flex-start;
      margin-top: 0;
      padding: 14px 16px;
      border: 1px solid color-mix(in srgb, var(--teal) calc(var(--pass) * 100%), rgba(232, 238, 240, 0.22));
      border-radius: var(--r-md);
      background: rgba(232, 238, 240, 0.06);
      -webkit-backdrop-filter: blur(14px);
      backdrop-filter: blur(14px);
      font-size: 0.9375rem;
      line-height: 1.35;
    }
    .stage-gate-end { --pass: 1; align-items: center; }
    .stage-gate .lock { display: block; }
    .stage-gate-text { flex: 1; min-width: 0; }
    .gate-evidence { margin-top: 3px; }
    .gate-meter {
      display: block;
      height: 4px;
      margin: 10px 0 8px;
      border-radius: 2px;
      background: rgba(232, 238, 240, 0.16);
      overflow: hidden;
    }
    .gate-meter-fill {
      display: block;
      height: 100%;
      background: var(--teal);
      transform-origin: 0 50%;
      scale: var(--fill) 1;
    }
    .stage-gate .gatecard-status { display: grid; }

    /* The mountain takes whatever height is left */
    .climb-explained .climb-stage {
      grid-row: 2;
      container-type: size;
      display: grid;
      place-items: end center;
    }
    .climb-explained .climb-box { width: min(100cqw, 100cqh * 1.3846); padding-top: 0; }

    .climb-explained .stage, .climb-explained .stage-gate, .climb-explained .gate-meter-fill {
      animation-duration: 1ms;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --climb;
      animation-range: contain 0% contain 100%;
    }

    @media (min-width: 900px) {
      .climb-explained .climb-pin { gap: 8px; }
      .stage {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
        gap: 40px;
        align-items: start;
      }
      .climb-explained .climb-box {
        width: min(100cqw - 420px, (100cqh - 64px) * 1.3846);
        padding-top: 64px;
      }
      .climb-explained .route { inset: 64px 0 0; }
    }
  }
}

/* Too short to pin with its text: fall back to the static route */
@media screen and (prefers-reduced-motion: no-preference) and (max-height: 619.98px) {
  @supports (animation-timeline: view()) {
    .climb-explained { height: auto; view-timeline: none; }
    .climb-explained .climb-pin {
      position: static;
      height: auto;
      grid-template-rows: none;
      padding: clamp(48px, 8vh, 96px) var(--gutter) clamp(80px, 13vh, 152px);
    }
    .climb-explained .climb-note { display: block; }
    .climb-explained .climb-box { width: min(100%, 880px); }
    .climb.climb-explained * { animation: none !important; }
  }
}
@media screen and (prefers-reduced-motion: no-preference) and (max-height: 619.98px) and (min-width: 900px) {
  @supports (animation-timeline: view()) {
    .climb-explained .climb-box { width: min(100% - 420px, 860px); padding-top: 56px; }
    .climb-explained .route { inset: 56px 0 0; }
  }
}

/* ---- Generated by gen_climb.py: label positions and scroll keyframes ---- */

@media (min-width: 900px) {
  .route .s1 { right: calc(94.91% + 24px); top: 91.38%; translate: 0 -50%; }
  .route .s2 { right: calc(79.62% + 24px); top: 61.85%; translate: 0 -50%; }
  .route .s3 { right: calc(64.33% + 24px); top: 32.31%; translate: 0 -50%; }
  .route .s4 { left: 50.00%; bottom: calc(95.38% + 22px); translate: -50% 0; }
  .route .s5 { left: calc(71.98% + 24px); top: 47.08%; translate: 0 -50%; }
  .route .s6 { left: calc(94.91% + 24px); top: 91.38%; translate: 0 -50%; }
}

@keyframes climb-route {
  0% { stroke-dashoffset: 1000; }
  3% { stroke-dashoffset: 970.0; }
  5% { stroke-dashoffset: 970.0; }
  9% { stroke-dashoffset: 890.0; }
  17% { stroke-dashoffset: 890.0; }
  21% { stroke-dashoffset: 810.0; }
  23% { stroke-dashoffset: 810.0; }
  27% { stroke-dashoffset: 730.0; }
  35% { stroke-dashoffset: 730.0; }
  39% { stroke-dashoffset: 650.0; }
  41% { stroke-dashoffset: 650.0; }
  45% { stroke-dashoffset: 575.0; }
  53% { stroke-dashoffset: 575.0; }
  57% { stroke-dashoffset: 500.0; }
  59% { stroke-dashoffset: 500.0; }
  63% { stroke-dashoffset: 385.0; }
  71% { stroke-dashoffset: 385.0; }
  75% { stroke-dashoffset: 270.0; }
  77% { stroke-dashoffset: 270.0; }
  81% { stroke-dashoffset: 150.0; }
  89% { stroke-dashoffset: 150.0; }
  93% { stroke-dashoffset: 30.0; }
  95% { stroke-dashoffset: 30.0; }
  99% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
@keyframes climb-s1 {
  0% { --lit: 0; }
  2.50% { --lit: 0; }
  3% { --lit: 1; }
  100% { --lit: 1; }
}
@keyframes climb-s2 {
  0% { --lit: 0; }
  20.50% { --lit: 0; }
  21% { --lit: 1; }
  100% { --lit: 1; }
}
@keyframes climb-s3 {
  0% { --lit: 0; }
  38.50% { --lit: 0; }
  39% { --lit: 1; }
  100% { --lit: 1; }
}
@keyframes climb-s4 {
  0% { --lit: 0; }
  56.50% { --lit: 0; }
  57% { --lit: 1; }
  100% { --lit: 1; }
}
@keyframes climb-s5 {
  0% { --lit: 0; }
  74.50% { --lit: 0; }
  75% { --lit: 1; }
  100% { --lit: 1; }
}
@keyframes climb-s6 {
  0% { --lit: 0; }
  92.50% { --lit: 0; }
  93% { --lit: 1; }
  100% { --lit: 1; }
}
@keyframes climb-g1 {
  0% { --open: 0; }
  15.50% { --open: 0; }
  17% { --open: 1; }
  100% { --open: 1; }
}
@keyframes climb-g2 {
  0% { --open: 0; }
  33.50% { --open: 0; }
  35% { --open: 1; }
  100% { --open: 1; }
}
@keyframes climb-g3 {
  0% { --open: 0; }
  51.50% { --open: 0; }
  53% { --open: 1; }
  100% { --open: 1; }
}
@keyframes climb-g4 {
  0% { --open: 0; }
  69.50% { --open: 0; }
  71% { --open: 1; }
  100% { --open: 1; }
}
@keyframes climb-g5 {
  0% { --open: 0; }
  87.50% { --open: 0; }
  89% { --open: 1; }
  100% { --open: 1; }
}
@keyframes climb-r1 {
  0% { --on: 1; }
  20% { --on: 1; }
  20.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-r2 {
  0% { --on: 0; }
  20.50% { --on: 0; }
  21% { --on: 1; }
  38% { --on: 1; }
  38.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-r3 {
  0% { --on: 0; }
  38.50% { --on: 0; }
  39% { --on: 1; }
  56% { --on: 1; }
  56.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-r4 {
  0% { --on: 0; }
  56.50% { --on: 0; }
  57% { --on: 1; }
  74% { --on: 1; }
  74.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-r5 {
  0% { --on: 0; }
  74.50% { --on: 0; }
  75% { --on: 1; }
  92% { --on: 1; }
  92.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-r6 {
  0% { --on: 0; }
  92.50% { --on: 0; }
  93% { --on: 1; }
  100% { --on: 1; }
}
@keyframes climb-gn1 {
  0% { --on: 1; }
  22% { --on: 1; }
  22.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-gn2 {
  0% { --on: 0; }
  22.50% { --on: 0; }
  23% { --on: 1; }
  40% { --on: 1; }
  40.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-gn3 {
  0% { --on: 0; }
  40.50% { --on: 0; }
  41% { --on: 1; }
  58% { --on: 1; }
  58.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-gn4 {
  0% { --on: 0; }
  58.50% { --on: 0; }
  59% { --on: 1; }
  76% { --on: 1; }
  76.50% { --on: 0; }
  100% { --on: 0; }
}
@keyframes climb-gn5 {
  0% { --on: 0; }
  76.50% { --on: 0; }
  77% { --on: 1; }
  100% { --on: 1; }
}
@keyframes climb-pass {
  0% { --pass: 0; }
  15.50% { --pass: 0; }
  16.70% { --pass: 1; }
  22% { --pass: 1; }
  22.50% { --pass: 0; }
  33.50% { --pass: 0; }
  34.70% { --pass: 1; }
  40% { --pass: 1; }
  40.50% { --pass: 0; }
  51.50% { --pass: 0; }
  52.70% { --pass: 1; }
  58% { --pass: 1; }
  58.50% { --pass: 0; }
  69.50% { --pass: 0; }
  70.70% { --pass: 1; }
  76% { --pass: 1; }
  76.50% { --pass: 0; }
  87.50% { --pass: 0; }
  88.70% { --pass: 1; }
  100% { --pass: 1; }
}
@keyframes climb-meter {
  0% { --fill: 0; }
  9% { --fill: 0; }
  15.50% { --fill: 1; }
  22% { --fill: 1; }
  22.50% { --fill: 0; }
  27% { --fill: 0; }
  33.50% { --fill: 1; }
  40% { --fill: 1; }
  40.50% { --fill: 0; }
  45% { --fill: 0; }
  51.50% { --fill: 1; }
  58% { --fill: 1; }
  58.50% { --fill: 0; }
  63% { --fill: 0; }
  69.50% { --fill: 1; }
  76% { --fill: 1; }
  76.50% { --fill: 0; }
  81% { --fill: 0; }
  87.50% { --fill: 1; }
  100% { --fill: 1; }
}
@keyframes climb-pass1 {
  0% { --pass: 0; }
  15.50% { --pass: 0; }
  16.70% { --pass: 1; }
  100% { --pass: 1; }
}
@keyframes climb-meter1 {
  0% { --fill: 0; }
  9% { --fill: 0; }
  15.50% { --fill: 1; }
  100% { --fill: 1; }
}
@keyframes climb-pass2 {
  0% { --pass: 0; }
  33.50% { --pass: 0; }
  34.70% { --pass: 1; }
  100% { --pass: 1; }
}
@keyframes climb-meter2 {
  0% { --fill: 0; }
  27% { --fill: 0; }
  33.50% { --fill: 1; }
  100% { --fill: 1; }
}
@keyframes climb-pass3 {
  0% { --pass: 0; }
  51.50% { --pass: 0; }
  52.70% { --pass: 1; }
  100% { --pass: 1; }
}
@keyframes climb-meter3 {
  0% { --fill: 0; }
  45% { --fill: 0; }
  51.50% { --fill: 1; }
  100% { --fill: 1; }
}
@keyframes climb-pass4 {
  0% { --pass: 0; }
  69.50% { --pass: 0; }
  70.70% { --pass: 1; }
  100% { --pass: 1; }
}
@keyframes climb-meter4 {
  0% { --fill: 0; }
  63% { --fill: 0; }
  69.50% { --fill: 1; }
  100% { --fill: 1; }
}
@keyframes climb-pass5 {
  0% { --pass: 0; }
  87.50% { --pass: 0; }
  88.70% { --pass: 1; }
  100% { --pass: 1; }
}
@keyframes climb-meter5 {
  0% { --fill: 0; }
  81% { --fill: 0; }
  87.50% { --fill: 1; }
  100% { --fill: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .climb .route-line { animation-name: climb-route; }
    .climb .s1 { animation-name: climb-s1; }
    .climb .r1 { animation-name: climb-r1; }
    .climb .s2 { animation-name: climb-s2; }
    .climb .r2 { animation-name: climb-r2; }
    .climb .s3 { animation-name: climb-s3; }
    .climb .r3 { animation-name: climb-r3; }
    .climb .s4 { animation-name: climb-s4; }
    .climb .r4 { animation-name: climb-r4; }
    .climb .s5 { animation-name: climb-s5; }
    .climb .r5 { animation-name: climb-r5; }
    .climb .s6 { animation-name: climb-s6; }
    .climb .r6 { animation-name: climb-r6; }
    .climb .g1 { animation-name: climb-g1; }
    .climb .gn1 { animation-name: climb-gn1; }
    .climb .g2 { animation-name: climb-g2; }
    .climb .gn2 { animation-name: climb-gn2; }
    .climb .g3 { animation-name: climb-g3; }
    .climb .gn3 { animation-name: climb-gn3; }
    .climb .g4 { animation-name: climb-g4; }
    .climb .gn4 { animation-name: climb-gn4; }
    .climb .g5 { animation-name: climb-g5; }
    .climb .gn5 { animation-name: climb-gn5; }
    .climb .gatecard { animation-name: climb-pass; }
    .climb .meter-fill { animation-name: climb-meter; }
    .climb-explained .gp1 { animation-name: climb-pass1; }
    .climb-explained .gm1 { animation-name: climb-meter1; }
    .climb-explained .gp2 { animation-name: climb-pass2; }
    .climb-explained .gm2 { animation-name: climb-meter2; }
    .climb-explained .gp3 { animation-name: climb-pass3; }
    .climb-explained .gm3 { animation-name: climb-meter3; }
    .climb-explained .gp4 { animation-name: climb-pass4; }
    .climb-explained .gm4 { animation-name: climb-meter4; }
    .climb-explained .gp5 { animation-name: climb-pass5; }
    .climb-explained .gm5 { animation-name: climb-meter5; }
  }
}

@media (max-width: 899px) {
  .climb-explained .route .s1 { left: 5.09%; top: 91.38%; }
  .climb-explained .route .s2 { left: 20.38%; top: 61.85%; }
  .climb-explained .route .s3 { left: 35.67%; top: 32.31%; }
  .climb-explained .route .s4 { left: 50.00%; top: 4.62%; }
  .climb-explained .route .s5 { left: 71.98%; top: 47.08%; }
  .climb-explained .route .s6 { left: 94.91%; top: 91.38%; }
}
