/* Arctix Capital — public site.
 *
 * One stylesheet for all nine public pages. Lifted from the previous
 * single-file SPA (templates/home.html) so the visual system is unchanged;
 * what changed is the delivery. Page-specific blocks are scoped by a class on
 * <body> (.home-page, .sss-page, ...), which is exactly how they were scoped
 * when each page was a <div> — so those rules needed no rewriting.
 *
 * Section order: tokens -> reset -> motion primitives -> shared chrome ->
 * per-page blocks -> responsive -> reduced motion (last, so it wins).
 */

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

/* ─── FONTS ───
 * Self-hosted, reusing the files the mobile PWA already ships. This replaces
 * two render-blocking cross-origin requests to fonts.googleapis.com /
 * fonts.gstatic.com, and means the public site has no third-party dependency
 * of any kind. Same paths as /static/m/app.css, so the cache is shared.
 *
 * Cormorant is present at weight 300 only; the design's heavier serif weights
 * resolve to it, which is what the browser was already doing behind the
 * Google API. Instrument Sans has no 300 — see the note in app.css. */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal; font-weight: 300; font-display: swap;
  src: url('/static/m/fonts/cormorant-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic; font-weight: 300; font-display: swap;
  src: url('/static/m/fonts/cormorant-300-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal; font-weight: 300; font-display: swap;
  src: url('/static/m/fonts/dmmono-300.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/m/fonts/dmmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/m/fonts/dmmono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/m/fonts/instrument.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/static/m/fonts/instrument.woff2') format('woff2');
}

:root {
  --white: #ffffff;
  --off: #f8f8f6;
  --silver-light: #e8e8e4;
  --silver: #c8c8c4;
  --silver-mid: #9a9a96;
  --silver-dark: #6a6a68;
  --charcoal: #2a2a28;
  --ink: #0f0f0e;
  --accent: #1a1a18;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --mono: 'DM Mono', monospace;
  --sans: 'Instrument Sans', sans-serif;
  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --ease-smooth: cubic-bezier(0.25,0,0,1);
}

html { overflow-x: hidden; }

/* Smooth scrolling is a motion preference, not a default. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  
}



/* ─── NAV ───
 * Scoped to #nav, not the bare `nav` element. The footer index and the section
 * pager are <nav> landmarks too, and a bare selector made them inherit
 * `position: fixed; height: 72px`, which parked the footer's links on top of
 * the page content. */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 0 56px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .5s, border-color .5s;
}

nav.light-bg {
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid var(--silver-light);
  backdrop-filter: blur(12px);
}

nav.dark-bg {
  background: rgba(10,10,9,0.94);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .3s;
}

nav.light-bg .nav-logo { color: var(--ink); }
nav.dark-bg .nav-logo { color: var(--white); }

.nav-logo em {
  font-style: normal;
  transition: color .3s;
}

nav.light-bg .nav-logo em { color: var(--silver-mid); }
nav.dark-bg .nav-logo em { color: rgba(255,255,255,0.35); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  transition: color .3s;
}

nav.light-bg .nav-links a { color: var(--silver-dark); }
nav.dark-bg .nav-links a { color: rgba(255,255,255,0.5); }
nav.light-bg .nav-links a:hover { color: var(--ink); }
nav.dark-bg .nav-links a:hover { color: var(--white); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  transition: width .45s var(--ease-smooth);
}

nav.light-bg .nav-links a::after { background: var(--ink); }
nav.dark-bg .nav-links a::after { background: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-btn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 22px;
  position: relative;
  overflow: hidden;
  transition: color .4s;
}

nav.light-bg .nav-btn { color: var(--ink); border: 1px solid rgba(15,15,14,0.25); }
nav.dark-bg .nav-btn { color: var(--white); border: 1px solid rgba(255,255,255,0.25); }

.nav-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-105%);
  transition: transform .5s var(--ease-smooth);
}

nav.light-bg .nav-btn::before { background: var(--ink); }
nav.dark-bg .nav-btn::before { background: var(--white); }
.nav-btn:hover { color: var(--white) !important; }
nav.dark-bg .nav-btn:hover { color: var(--ink) !important; }
.nav-btn:hover::before { transform: translateX(0); }
.nav-btn span { position: relative; z-index: 1; }

/* ─── PAGE SYSTEM ───
 * Each page is now its own document, so .page is simply the main wrapper.
 * The old display:none / .active toggling and the JS-driven .page-enter /
 * .page-exit keyframes are gone: cross-document View Transitions (bottom of
 * this file) do that work now, and browsers without them just navigate. */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Skip link — first tab stop, visible only when focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 20px;
}

.skip-link:focus { left: 0; }

/* ─── SHARED UTILITIES ─── */
.section-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver-mid);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 64px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--silver-light);
  max-width: 60px;
}

.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 32px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: gap .3s;
}

.btn-solid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--charcoal);
  transform: translateX(-100%);
  transition: transform .5s var(--ease-smooth);
}

.btn-solid:hover { gap: 20px; }
.btn-solid:hover::before { transform: translateX(0); }
.btn-solid span { position: relative; z-index: 1; }
.btn-solid::after { content: '→'; position: relative; z-index: 1; transition: transform .3s; }
.btn-solid:hover::after { transform: translateX(4px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--silver-dark);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .3s, gap .3s;
}

.btn-outline::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: currentColor;
  transition: width .45s var(--ease-smooth);
}

.btn-outline:hover { color: var(--ink); gap: 16px; }
.btn-outline:hover::before { width: 36px; }

/* ─── SCROLL REVEALS ───
 * Inverted from the original, which defaulted .sr to opacity:0 and relied on
 * JS to reveal it — so with JS off, or if any script threw, the page rendered
 * blank. The hidden state is now opted into by html.js, which an inline head
 * script sets before first paint. No JS, no hiding. */
.sr { transition: opacity 1s var(--ease-smooth), transform 1s var(--ease-smooth); }

html.js .sr {
  opacity: 0;
  transform: translateY(28px);
}

html.js .sr.up { opacity: 1; transform: translateY(0); }
.sr-d1 { transition-delay: .1s; }
.sr-d2 { transition-delay: .22s; }
.sr-d3 { transition-delay: .36s; }
.sr-d4 { transition-delay: .5s; }

/* ────────────────────────────────
   PAGE 1: HOME
──────────────────────────────── */
.home-page {
  background: var(--white);
  min-height: 100vh;
  position: relative;
}

/* Animated background grid */
.home-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,200,196,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,200,196,0.18) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: gridDrift 30s linear infinite;
  pointer-events: none;
}

@keyframes gridDrift {
  from { background-position: 0 0; }
  to { background-position: 80px 80px; }
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(200,200,196,0.3) 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: orbFloat1 12s ease-in-out infinite;
}

.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(42,42,40,0.06) 0%, transparent 70%);
  bottom: 100px; left: 5%;
  animation: orbFloat2 16s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%,100%{transform:translate(0,0) scale(1)}
  33%{transform:translate(-40px,30px) scale(1.08)}
  66%{transform:translate(20px,-20px) scale(0.95)}
}

@keyframes orbFloat2 {
  0%,100%{transform:translate(0,0) scale(1)}
  50%{transform:translate(30px,-40px) scale(1.12)}
}

.home-inner {
  position: relative;
  z-index: 1;
  padding: 0 56px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding-top: 72px;
}

.home-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--silver-mid);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: fadeUp 1s var(--ease-smooth) 0.6s both;
}

.home-eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--silver);
}

@keyframes fadeUp {
  from{opacity:0;transform:translateY(16px)}
  to{opacity:1;transform:translateY(0)}
}

.home-headline {
  font-family: var(--serif);
  font-size: clamp(64px, 9vw, 130px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 900px;
  margin-bottom: 56px;
}

.home-headline .hl { display: block; overflow: hidden; }

.home-headline .hl-inner {
  display: block;
  opacity: 0;
  transform: translateY(110%);
}

.home-headline .hl:nth-child(1) .hl-inner { animation: slideUp 1.3s var(--ease-out) .75s both; }
.home-headline .hl:nth-child(2) .hl-inner { animation: slideUp 1.3s var(--ease-out) .92s both; }
.home-headline .hl:nth-child(3) .hl-inner { animation: slideUp 1.3s var(--ease-out) 1.09s both; }

.home-headline em {
  font-style: italic;
  color: var(--silver-mid);
}

@keyframes slideUp {
  from{opacity:0;transform:translateY(110%)}
  to{opacity:1;transform:translateY(0)}
}

.home-sub {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--silver-dark);
  max-width: 480px;
  margin-bottom: 60px;
  opacity: 0;
  animation: fadeUp 1s var(--ease-smooth) 1.4s both;
}

.home-actions {
  display: flex;
  align-items: center;
  gap: 36px;
  opacity: 0;
  animation: fadeUp 1s var(--ease-smooth) 1.6s both;
}

/* Corner stat block */
.home-stats {
  position: absolute;
  bottom: 56px; right: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--silver-light);
  border: 1px solid var(--silver-light);
  opacity: 0;
  animation: fadeUp 1s var(--ease-smooth) 2s both;
}

.home-stat {
  background: var(--white);
  padding: 20px 28px;
  text-align: right;
}

.home-stat-n {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.025em;
  display: block;
  line-height: 1;
}

.home-stat-l {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-mid);
  margin-top: 6px;
  display: block;
}

/* Scrolling ticker */
.home-ticker {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  overflow: hidden;
  border-top: 1px solid var(--silver-light);
  padding: 14px 0;
  opacity: 0;
  animation: fadeUp 1s var(--ease-smooth) 2.2s both;
}

.ticker-track {
  display: flex;
  gap: 0;
  animation: ticker 28s linear infinite;
  white-space: nowrap;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver);
  padding: 0 48px;
}

.ticker-item span { color: var(--silver-mid); }

/* ────────────────────────────────
   PAGE 2: MANDATE
──────────────────────────────── */
.mandate-page {
  background: var(--white);
  min-height: 100vh;
}

.mandate-inner {
  padding: 120px 56px;
  flex: 1;
}

.mandate-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: start;
  margin-bottom: 100px;
}

.mandate-h2 {
  font-family: var(--serif);
  font-size: clamp(44px, 5.5vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.mandate-h2 em { font-style: italic; color: var(--silver-mid); }

.mandate-right-text {
  padding-top: 12px;
}

.mandate-body {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.95;
  color: var(--silver-dark);
  margin-bottom: 22px;
}

/* Pillars */
.mandate-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--silver-light);
  border: 1px solid var(--silver-light);
}

.mandate-pillar {
  background: var(--white);
  padding: 44px 36px;
  position: relative;
  overflow: hidden;
  transition: background .4s;
}

.mandate-pillar::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease-smooth);
}

.mandate-pillar:hover { background: var(--off); }
.mandate-pillar:hover::before { transform: scaleX(1); }

.mp-num {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--silver);
  letter-spacing: 0.2em;
  margin-bottom: 28px;
  display: block;
}

.mp-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 14px;
}

.mp-body {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--silver-dark);
}

/* ────────────────────────────────
   PAGE 3: ENGINE
──────────────────────────────── */
.engine-page {
  background: var(--ink);
  min-height: 100vh;
}

.engine-inner {
  padding: 120px 56px;
  flex: 1;
}

.engine-inner .section-label {
  color: rgba(255,255,255,0.3);
}

.engine-inner .section-label::after {
  background: rgba(255,255,255,0.1);
}

.engine-h2 {
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 300;
  line-height: 1.07;
  color: var(--white);
  margin-bottom: 16px;
}

.engine-h2 em { font-style: italic; color: var(--silver-mid); }

.engine-sub {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  line-height: 1.9;
  max-width: 520px;
  margin-bottom: 72px;
}

/* Engine flow diagram */
/* Five nodes separated by four arrows — nine children, so five columns wrapped
 * them onto two rows with the arrows landing in the wrong places. The nodes
 * share the free space; the arrows take only what they need. */
.engine-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  margin-bottom: 72px;
  position: relative;
}

.engine-node {
  padding: 32px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  text-align: center;
  position: relative;
  transition: background .4s, border-color .4s;
}

.engine-node:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}

.engine-node-tag {
  font-family: var(--mono);
  font-size: 8px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.engine-node-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 10px;
}

.engine-node-body {
  font-size: 11px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.35);
}

.engine-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.15);
  font-size: 20px;
  letter-spacing: -2px;
  animation: arrowPulse 2.5s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%,100%{opacity:.15;transform:translateX(0)}
  50%{opacity:.5;transform:translateX(3px)}
}

/* Engine cards */
.engine-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}

.engine-card {
  background: var(--ink);
  padding: 44px 36px;
  position: relative;
  overflow: hidden;
  transition: background .5s;
}

.engine-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  transform: scaleX(0);
  transition: transform .6s var(--ease-smooth);
}

.engine-card:hover { background: rgba(255,255,255,0.04); }
.engine-card:hover::after { transform: scaleX(1); }

.ec-tag {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.2em;
  margin-bottom: 24px;
  display: block;
}

.ec-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 16px;
}

.ec-body {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255,255,255,0.38);
}

/* ────────────────────────────────
   PAGE 4: PERFORMANCE
──────────────────────────────── */
.perf-page {
  background: var(--off);
  min-height: 100vh;
}

.perf-inner {
  padding: 120px 56px;
  flex: 1;
}

.perf-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
  margin-bottom: 72px;
  align-items: end;
}

.perf-h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.07;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.perf-h2 em { font-style: italic; color: var(--silver-mid); }

.perf-tagline {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--silver-dark);
}

/* Big metric row */
.perf-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--silver-light);
  border: 1px solid var(--silver-light);
  margin-bottom: 48px;
}

.pm-cell {
  background: var(--white);
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition: background .3s;
}

.pm-cell:hover { background: var(--off); }

.pm-val {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 8px;
  line-height: 1;
}

.pm-val.green { color: #3d7a3d; }

.pm-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver-mid);
}

/* Chart */
.perf-chart-wrap {
  background: var(--white);
  border: 1px solid var(--silver-light);
  padding: 36px;
}

.pch-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--silver-mid);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pch-badge {
  background: var(--off);
  border: 1px solid var(--silver-light);
  padding: 4px 12px;
  font-size: 8px;
  color: var(--silver-dark);
}

/* ────────────────────────────────
   PAGE 5: CONTACT
──────────────────────────────── */
.contact-page {
  background: var(--white);
  min-height: 100vh;
}

.contact-inner {
  padding: 120px 56px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: start;
}

.contact-h2 {
  font-family: var(--serif);
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.contact-h2 em { font-style: italic; color: var(--silver-mid); }

.contact-right {
  padding-top: 12px;
}

.contact-body {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--silver-dark);
  margin-bottom: 48px;
}

.contact-items {
  display: grid;
  gap: 1px;
  background: var(--silver-light);
  border: 1px solid var(--silver-light);
  margin-bottom: 40px;
}

.contact-item {
  background: var(--white);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: background .3s, padding-right .4s;
}

.contact-item:hover { background: var(--off); padding-right: 36px; }

.ci-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--silver-mid);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ci-val {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--charcoal);
  transition: color .3s;
}

.contact-item:hover .ci-val { color: var(--ink); }

.ci-arr {
  color: var(--silver);
  transition: transform .3s, color .3s;
}

.contact-item:hover .ci-arr { transform: translateX(5px); color: var(--ink); }

.contact-disclaimer {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 300;
  color: var(--silver);
  line-height: 1.8;
  letter-spacing: 0.06em;
  padding-top: 60px;
  border-top: 1px solid var(--silver-light);
}

/* ─── FOOTER (shared) ─── */
/* The footer carries a full site index now, so it is a stacked block rather
 * than a single centred row: the index on top, the wordmark and legal line
 * beneath it. Same type scale as the rest of the chrome — mono labels, serif
 * wordmark — so it reads as part of the system and not as a bolted-on sitemap. */
.site-footer {
  margin-top: auto;
  padding: 72px 56px 40px;
  border-top: 1px solid var(--silver-light);
}

.footer-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  max-width: 900px;
  margin-bottom: 64px;
}

.footer-col-title {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--silver-mid);
  margin-bottom: 20px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }

.footer-col a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--silver-dark);
  text-decoration: none;
  transition: color .3s;
}

.footer-col a:hover { color: var(--ink); }

/* The page you are on is marked rather than linked away silently. */
.footer-col a[aria-current="page"] { color: var(--ink); }

.footer-col a[aria-current="page"]::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: 8px;
  vertical-align: middle;
  background: currentColor;
}

.footer-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--silver-light);
}

/* ─── PAGER ───
 * The section labels always implied an order; this is what lets a visitor
 * follow it. Sits directly above the footer on the six sequenced pages. */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 0 56px 8px;
}

.pager-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "dir dir" "num label";
  gap: 4px 12px;
  align-items: baseline;
  text-decoration: none;
  padding: 28px 0;
  max-width: 46%;
}

.pager-next { text-align: right; grid-template-areas: "dir dir" "label num"; }

.pager-dir {
  grid-area: dir;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--silver-mid);
  margin-bottom: 10px;
  transition: color .3s;
}

.pager-num {
  grid-area: num;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--silver);
  transition: color .3s;
}

.pager-label {
  grid-area: label;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 300;
  color: var(--silver-dark);
  transition: color .3s;
}

.pager-link:hover .pager-label,
.pager-link:hover .pager-dir,
.pager-link:hover .pager-num { color: var(--ink); }

.footer-mark {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
}

.footer-legal {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 300;
  color: var(--silver);
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.9;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  transition: color .3s;
}

.footer-nav a:hover { color: var(--ink); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--silver-light); }

/* The full-screen loader that used to live here is gone. It gated every visit
 * for 2.6s (0.8s fade on a 1.8s delay) to cover a load that no longer happens
 * now that pages are server-rendered — a pure LCP cost. The hero's own entrance
 * animation carries the same beat in ~400ms.
 */

/* ─── PARALLAX NUMBERS ─── */
.parallax-num {
  position: absolute;
  font-family: var(--serif);
  font-weight: 300;
  color: rgba(0,0,0,0.04);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  letter-spacing: -0.05em;
}

/* The drawer's default state, OUTSIDE the media query on purpose.
   Every other .mobile-nav rule — including the display:none this replaces —
   lived inside @media (max-width: 768px), so above 768px #mobileNav had no
   display and no positioning and rendered as a static in-flow div: a "✕ Close"
   button plus nine links, 20px tall at top:0, concealed under the opaque fixed
   nav (z-index 500). Invisible, which is why it survived screenshot review, but
   it put ten focusable elements at the head of every desktop tab order and
   pushed all page content down 20px. Inherited verbatim from the retired SPA in
   templates/home.html, which had the same bug for the same reason. */
.mobile-nav { display: none; }

/* ────────────────────────────────
   MOBILE RESPONSIVE — max 768px
──────────────────────────────── */
@media (max-width: 768px) {

  /* NAV */
  #nav {
    padding: 0 24px;
    height: 60px;
  }

  .nav-links { display: none; }

  .nav-btn { display: none; }

  .nav-logo { font-size: 16px; }

  /* Mobile hamburger menu */
  .nav-mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
  }

  .nav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    transition: background .3s;
  }

  nav.light-bg .nav-mobile-toggle span { background: var(--ink); }
  nav.dark-bg .nav-mobile-toggle span { background: var(--white); }

  /* Mobile nav drawer */
  .mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
  }

  .mobile-nav.open { display: flex; }
  .mobile-nav.light { background: var(--white); }
  .mobile-nav.dark { background: var(--ink); }

  .mobile-nav a {
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 300;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: opacity .3s;
  }

  .mobile-nav.light a { color: var(--ink); }
  .mobile-nav.dark a { color: var(--white); }
  .mobile-nav a:hover { opacity: 0.5; }

  .mobile-nav-close {
    position: absolute;
    top: 20px; right: 24px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    cursor: pointer;
    padding: 8px;
  }

  .mobile-nav.light .mobile-nav-close { color: var(--silver-mid); }
  .mobile-nav.dark .mobile-nav-close { color: rgba(255,255,255,0.3); }

  .mobile-nav-inquire {
    font-family: var(--mono) !important;
    font-size: 10px !important;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    padding: 14px 28px !important;
    margin-top: 16px;
  }

  /* HOME PAGE */
  .home-inner {
    padding: 0 24px;
    padding-top: 60px;
    justify-content: flex-start;
    padding-top: 100px;
  }

  .home-headline {
    font-size: clamp(48px, 12vw, 72px);
    margin-bottom: 32px;
  }

  .home-sub {
    font-size: 14px;
    margin-bottom: 40px;
  }

  .home-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .home-stats {
    position: relative;
    bottom: auto; right: auto;
    margin: 40px 24px 0;
    grid-template-columns: repeat(3, 1fr);
  }

  .home-stat { padding: 16px 14px; }
  .home-stat-n { font-size: 20px; }

  .home-ticker { display: none; }

  /* Footer on home */
  .home-page .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 28px 24px;
  }

  .footer-nav { justify-content: center; }

  /* MANDATE */
  .mandate-inner { padding: 90px 24px 60px; }

  .mandate-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-bottom: 56px;
  }

  .mandate-pillars {
    grid-template-columns: 1fr;
  }

  .mandate-pillar { padding: 32px 24px; }

  /* ENGINE */
  .engine-inner { padding: 90px 24px 60px; }

  .engine-flow {
    grid-template-columns: 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.06);
    margin-bottom: 40px;
  }

  .engine-arrow {
    display: none;
  }

  .engine-node {
    text-align: left;
    padding: 24px 20px;
  }

  .engine-cards {
    grid-template-columns: 1fr;
  }

  .engine-card { padding: 32px 24px; }

  .engine-inner .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 28px 24px;
  }

  /* PERFORMANCE */
  .perf-inner { padding: 90px 24px 60px; }

  .perf-top {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
  }

  .perf-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .pm-val { font-size: 32px; }
  .pm-cell { padding: 24px 18px; }

  .perf-chart-wrap { padding: 24px 16px; }

  .pch-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* CONTACT */
  .contact-inner { padding: 90px 24px 60px; }

  .contact-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-h2 { font-size: clamp(40px, 10vw, 64px); }

  .contact-item { padding: 18px 20px; }
  .ci-val { font-size: 12px; }

  .contact-disclaimer { padding-top: 40px; }

  /* SHARED FOOTER */
  .site-footer {
    padding: 28px 24px;
  }

  /* Section padding */
  .section-label { margin-bottom: 40px; }

  /* Loader */
  .loader-logo { font-size: 22px; }
}

/* Tablet — 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  #nav { padding: 0 36px; }

  .home-inner { padding: 0 36px; padding-top: 72px; }

  .home-headline { font-size: clamp(52px, 8vw, 90px); }

  .home-stats {
    bottom: 40px; right: 36px;
  }

  .mandate-inner,
  .engine-inner,
  .perf-inner,
  .contact-inner { padding: 100px 36px 60px; }

  .mandate-hero { gap: 48px; }
  .contact-top { gap: 48px; }
  .perf-top { gap: 48px; }

  .engine-flow { gap: 0; }
  .engine-node { padding: 20px 12px; }
  .engine-node-body { display: none; }

  .perf-metrics { grid-template-columns: repeat(2, 1fr); }
  .pm-val { font-size: 36px; }

  .site-footer { padding: 32px 36px; }
}

/* Show toggle only on mobile */
.nav-mobile-toggle { display: none; }

@media (max-width: 768px) {
  .nav-mobile-toggle { display: flex; }
}



/* ══════════════════════════════════════════════════════════
   PAGE: SSS — Special Situations Squadron
   Restored from templates/home.html.backup (the only surviving
   copy; the page was removed by a direct file edit on 2026-06-12
   and never existed in a commit).
   ══════════════════════════════════════════════════════════ */


/* ────────────────────────────────
   PAGE 5: SSS
──────────────────────────────── */
.sss-page {
  background: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Dramatic animated background */
.sss-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sss-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: sssGridMove 20s linear infinite;
}

@keyframes sssGridMove {
  from{background-position:0 0}
  to{background-position:0 60px}
}

.sss-bg-line {
  position: absolute;
  left: 50%;
  top: -10%;
  width: 1px;
  height: 120%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.06) 70%, transparent);
  animation: sssLineDrift 8s ease-in-out infinite;
}

@keyframes sssLineDrift {
  0%,100%{transform:translateX(-200px)}
  50%{transform:translateX(200px)}
}

.sss-bg-ring {
  position: absolute;
  width: 600px; height: 600px;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: sssRingPulse 6s ease-in-out infinite;
}

.sss-bg-ring-2 {
  position: absolute;
  width: 900px; height: 900px;
  border: 1px solid rgba(255,255,255,0.025);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  animation: sssRingPulse 8s ease-in-out infinite reverse;
}

@keyframes sssRingPulse {
  0%,100%{opacity:.4;transform:translate(-50%,-50%) scale(1)}
  50%{opacity:1;transform:translate(-50%,-50%) scale(1.04)}
}

.sss-inner {
  position: relative;
  z-index: 1;
  padding: 120px 56px;
  flex: 1;
}

/* SSS classification header */
.sss-classified {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
  margin-bottom: 80px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sss-classified::before, .sss-classified::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.06);
  max-width: 80px;
}

.sss-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
  margin-bottom: 100px;
}

.sss-designator {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sss-designator::before {
  content: '';
  width: 28px; height: 1px;
  background: rgba(255,255,255,0.18);
}

.sss-h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 300;
  line-height: 0.97;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 40px;
}

.sss-h1 em { font-style: italic; color: rgba(255,255,255,0.35); }

.sss-tagline {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  border-left: 1px solid rgba(255,255,255,0.12);
  padding-left: 24px;
  margin-bottom: 40px;
}

.sss-sub {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.95;
  color: rgba(255,255,255,0.38);
  margin-bottom: 48px;
}

.sss-right {
  padding-top: 16px;
}

/* SSS doctrine list */
.sss-doctrine {
  margin-bottom: 56px;
}

.sss-law {
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  align-items: start;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .9s var(--ease-smooth), transform .9s var(--ease-smooth);
}

.sss-law.up { opacity: 1; transform: translateX(0); }
.sss-law:last-child { border-bottom: 1px solid rgba(255,255,255,0.06); }

.sss-law-num {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.14em;
  padding-top: 3px;
}

.sss-law-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.sss-law-body {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255,255,255,0.3);
}

/* SSS status panel */
.sss-status {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 32px;
  margin-bottom: 40px;
}

.sss-status-header {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  animation: statusBlink 3s ease-in-out infinite;
}

@keyframes statusBlink {
  0%,100%{opacity:.15}
  50%{opacity:.6}
}

.sss-status-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.05);
}

.sss-status-cell {
  background: var(--ink);
  padding: 18px 20px;
}

.sss-sc-label {
  font-family: var(--mono);
  font-size: 8px;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.sss-sc-val {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.1em;
}

/* SSS bottom quote */
.sss-manifesto {
  padding: 72px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sss-manifesto-quote {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.sss-manifesto-attr {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 24px;
}

/* ────────────────────────────────

/* SSS: nav link treatment */

.nav-links a.sss-link {
  letter-spacing: 0.3em;
}

nav.light-bg .nav-links a.sss-link { color: var(--charcoal); }
nav.dark-bg .nav-links a.sss-link { color: rgba(255,255,255,0.7); }

/* SSS: footer + scrollbar overrides */

.sss-page .site-footer {
  border-top-color: rgba(255,255,255,0.06);
}

/* Footer on the dark pages.
 *
 * The old markup carried these as inline style="" attributes on each dark
 * page's <footer>; with one shared footer partial they belong in CSS. The
 * engine page needs them too — it is just as dark as SSS, and without these
 * its footer renders --ink on --ink, i.e. invisible.
 *
 * Alphas are raised from the original (0.2 / 0.15 / 0.18), which sat around
 * 1.6:1 against --ink and failed WCAG AA outright. */
.sss-page .site-footer,
.engine-page .site-footer { border-top-color: rgba(255,255,255,0.08); }

.sss-page .footer-mark,
.engine-page .footer-mark { color: rgba(255,255,255,0.55); }

.sss-page .footer-legal,
.engine-page .footer-legal { color: rgba(255,255,255,0.5); }

.sss-page .footer-nav a,
.engine-page .footer-nav a { color: rgba(255,255,255,0.5); }

.sss-page .footer-nav a:hover,
.engine-page .footer-nav a:hover { color: var(--white); }

.engine-page::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
.sss-page .footer-nav a:hover { color: rgba(255,255,255,0.6); }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--silver-light); }
.sss-page::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }


/* ─── SSS: RESPONSIVE ───
 * These lived inside the backup's existing @media blocks; re-wrapped here
 * because the shared breakpoints above were lifted without them. */
@media (max-width: 768px) {
  .sss-inner { padding: 90px 24px 60px; }

  .sss-classified {
    font-size: 7px;
    letter-spacing: 0.2em;
    margin-bottom: 48px;
  }

  .sss-hero {
    grid-template-columns: 1fr;
    gap: 56px;
    margin-bottom: 64px;
  }

  .sss-h1 { font-size: clamp(42px, 10vw, 72px); }

  .sss-tagline { font-size: 15px; }

  .sss-status-rows { grid-template-columns: 1fr; }

  .sss-manifesto-quote { font-size: clamp(17px, 4vw, 24px); }

  .sss-page .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 28px 24px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .sss-inner { padding: 100px 36px 60px; }
  .sss-hero { gap: 56px; }
}

/* ─── FOCUS ───
 * The original had no visible focus state anywhere: every nav item was an
 * href="#" driven by onclick, so keyboard users had nothing to follow. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sss-page :focus-visible,
.engine-page :focus-visible {
  outline-color: var(--white);
}

/* ─── VIEW TRANSITIONS ───
 * Replaces the old JS page-swap. Chromium animates between documents; every
 * other browser performs an ordinary navigation and loses nothing. */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: vtOut .32s var(--ease-smooth) both;
}

::view-transition-new(root) {
  animation: vtIn .42s var(--ease-out) both;
}

@keyframes vtOut {
  to { opacity: 0; transform: translateY(-14px); }
}

@keyframes vtIn {
  from { opacity: 0; transform: translateY(20px); }
}

/* The nav is continuous across pages, so it should not cross-fade with them. */
#nav { view-transition-name: site-nav; }

/* ─── REDUCED MOTION ───
 * Last block in the file so it wins on specificity ties. Covers the CSS side;
 * the JS side checks the same query before creating a WebGL context or
 * attaching a pointer listener. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Reveals must land visible, not stay mid-transition. */
  html.js .sr { opacity: 1; transform: none; }

  /* Purely decorative motion is removed outright rather than sped up. */
  .home-grid-bg,
  .orb,
  .parallax-num,
  .ticker-track,
  .sss-bg-grid,
  .sss-bg-line,
  .sss-bg-ring,
  .sss-bg-ring-2 { animation: none !important; }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ─── WEBGL STAGE ───
 * The fallback is a real, styled layer that ships in the HTML — not an empty
 * box waiting for script. The canvas sits on top of it and stays transparent
 * until a context is actually running, so every failure path (no WebGL, lost
 * context, reduced motion, JS blocked) resolves to something drawn. */
.gl-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.gl-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--ease-smooth);
}

.gl-stage canvas.gl-live { opacity: 1; }

.gl-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(42,42,40,0.05), transparent 70%),
    radial-gradient(50% 45% at 12% 72%, rgba(42,42,40,0.04), transparent 70%);
}

.sss-page .gl-fallback,
.engine-page .gl-fallback {
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(255,255,255,0.06), transparent 70%),
    radial-gradient(50% 45% at 12% 72%, rgba(255,255,255,0.04), transparent 70%);
}

/* Content sits above the stage. Note nav is deliberately NOT given a position
 * here — it is `position: fixed` further up, and restating position in this
 * rule would silently un-fix the header. */
#nav { z-index: 500; }
.page { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  /* No context is created at all in this case; hide the canvas so a stale
     frame from a preference change mid-session cannot linger. */
  .gl-stage canvas { display: none; }
}

/* ─── LINEAGE ───
 * Server-rendered SVG on /engine. Sits on the dark page, so strokes are white
 * at low alpha; the survivor paths are the only thing allowed to be bright. */
.lineage {
  margin: 96px 0 0;
  width: 100%;
}

.lineage-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.ln-edge {
  fill: none;
  stroke: rgba(255,255,255,0.09);
  stroke-linecap: round;
}

.ln-edge.ln-alive { stroke: rgba(255,255,255,0.55); }

.ln-node {
  fill: rgba(255,255,255,0.16);
  stroke: rgba(255,255,255,0.28);
  stroke-width: 1;
}

.ln-node.ln-alive {
  fill: rgba(255,255,255,0.85);
  stroke: var(--white);
}

.ln-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  fill: rgba(255,255,255,0.5);
}

.lineage-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.ln-key {
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 8px;
  vertical-align: middle;
}

.ln-key-dim { background: rgba(255,255,255,0.18); }
.ln-key-alive { background: rgba(255,255,255,0.7); }
.lineage-count { margin-left: auto; color: rgba(255,255,255,0.3); }

/* The WebGL upgrade replaces the SVG in place; until then, and whenever it
   cannot run, the SVG is what is on screen. */
.lineage canvas {
  width: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1s var(--ease-smooth);
}

.lineage.gl-active canvas { opacity: 1; }
.lineage.gl-active .lineage-svg { display: none; }

@media (max-width: 768px) {
  .ln-label { font-size: 14px; }
  .lineage-caption { gap: 16px; }
  .lineage-count { margin-left: 0; }
}

/* Six-cell variant of the metrics grid (the pipeline funnel on /track-record).
 * The base grid is four columns, which leaves two empty cells showing the
 * grid's own background as grey blocks; three columns divides evenly. */
.perf-metrics-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .perf-metrics-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── FOOTER INDEX + PAGER ON THE DARK PAGES ───
 * Same treatment the footer already gets on .sss-page / .engine-page, extended
 * to the index columns and the pager. Without these they inherit --ink and
 * render invisible on a near-black page. */
.sss-page .footer-col-title,
.engine-page .footer-col-title { color: rgba(255,255,255,0.4); }

.sss-page .footer-col a,
.engine-page .footer-col a { color: rgba(255,255,255,0.62); }

.sss-page .footer-col a:hover,
.engine-page .footer-col a:hover,
.sss-page .footer-col a[aria-current="page"],
.engine-page .footer-col a[aria-current="page"] { color: var(--white); }

.sss-page .footer-base,
.engine-page .footer-base { border-top-color: rgba(255,255,255,0.08); }

.sss-page .pager-dir,
.engine-page .pager-dir { color: rgba(255,255,255,0.4); }

.sss-page .pager-num,
.engine-page .pager-num { color: rgba(255,255,255,0.35); }

.sss-page .pager-label,
.engine-page .pager-label { color: rgba(255,255,255,0.72); }

.sss-page .pager-link:hover .pager-label,
.engine-page .pager-link:hover .pager-label,
.sss-page .pager-link:hover .pager-dir,
.engine-page .pager-link:hover .pager-dir,
.sss-page .pager-link:hover .pager-num,
.engine-page .pager-link:hover .pager-num { color: var(--white); }

/* The nav gained a sixth item; reclaim the space before it wraps. */
@media (max-width: 1180px) {
  .nav-links { gap: 24px; }
  #nav { padding: 0 36px; }
}

/* Eight nav items. A flex item may shrink below its content width, so
   "Track Record" broke onto two lines inside its own <li> at ~840px while the
   row itself still measured as one row — the wrap was inside the item, which is
   why an items-per-row check does not catch it. nowrap forbids that, and the
   tighter gap buys back the width nowrap costs. */
@media (max-width: 980px) {
  .nav-links { gap: 15px; }
}

/* Below ~900px eight items do not fit at any gap the design can bear — even at
   8px the links run flush into the logo, and shrinking the type was not on the
   table. So one item yields rather than the row breaking. About is the one that
   gives: it stays in the footer index (present on every page), in the pager, in
   the sitemap, and in the drawer below 768px, so nothing becomes unreachable —
   which is the property that matters, not nav presence. */
@media (max-width: 900px) {
  .nav-links li.nav-optional { display: none; }
}

/* The last band before the hamburger takes over at 768px. "Falsification" is
   the longest label on the bar and it displaces the "About" hidden above, so
   without this step the links run flush into the logo here — measured at 769px
   as 9px of clearance before this page existed and 0px after. */
@media (max-width: 820px) {
  .nav-links { gap: 10px; }
}

@media (max-width: 768px) {
  .site-footer { padding: 56px 24px 32px; }

  .footer-index {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-bottom: 48px;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
  }

  .footer-legal { text-align: left; }

  .pager { padding: 0 24px; flex-direction: column; gap: 0; }

  .pager-link {
    max-width: none;
    padding: 24px 0;
    border-top: 1px solid var(--silver-light);
  }

  /* Both directions read left-aligned when stacked. */
  .pager-next {
    text-align: left;
    grid-template-areas: "dir dir" "num label";
  }

  .sss-page .pager-link,
  .engine-page .pager-link { border-top-color: rgba(255,255,255,0.08); }
}

/* ─── VISIBILITY / ACCESSIBILITY PASS ─── */

/* The menu toggle and drawer close are real <button>s now (they were <div
 * onclick>, unreachable by keyboard). Buttons carry a UA background and border,
 * which rendered the hamburger as a white box on the dark pages. */
.nav-mobile-toggle,
.mobile-nav-close {
  background: none;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.nav-mobile-toggle {
  flex-direction: column;
  gap: 5px;
  padding: 8px 0;
}

/* The SSS mobile rule centred the whole footer for the old single-line layout;
 * with an index in it, the columns must stay left-aligned. */
.site-footer,
.sss-page .site-footer,
.engine-page .site-footer { text-align: left; }

/* Footer wordmark and legal line were --silver (#c8c8c4), about 1.9:1 on white
 * — below WCAG AA, and the wordmark is a link now. */
.footer-mark { color: var(--silver-dark); text-decoration: none; }
.footer-mark:hover { color: var(--ink); }
.footer-legal { color: var(--silver-dark); text-align: left; }

.sss-page .footer-mark,
.engine-page .footer-mark { color: rgba(255,255,255,0.62); }

.sss-page .footer-mark:hover,
.engine-page .footer-mark:hover { color: var(--white); }

/* Eight pillars in a three-column grid leaves an empty cell showing the grid's
 * own background as a grey block. Four columns divides evenly. */
.mandate-pillars-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .mandate-pillars-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .mandate-pillars-4 { grid-template-columns: 1fr; }
}
