/* =============================================================================
   deck-tokens.css
   EXA Cinematic Executive Presentation — /exa/deck
   Deck-scoped token layer, built against EXA_Cinematic_Deck_Visual_Language_v2.md

   SCOPE: This file is deck-only. It does NOT touch reidexa-tokens.css or
   site.css, both of which remain the sitewide foundation for every other
   page. The visual-system guardrail ("inherit verbatim, zero additions")
   is retired for this deck by author direction (July 2026) — see the
   Build Ledger. Section 2 below still locks the inherited foundation
   (canvas, type, core text tokens, accents, status colors) exactly as
   the site defines them; everything past Section 3 is the deck's own
   expansion and does not exist anywhere else in the codebase.

   Non-negotiables carried in from the Visual Language doc (Section 8),
   restated here so anyone editing this file sees them first:
     - WCAG 2.1 AA floor / AAA target on all narrative text.
     - Depth, elevation, and glow may never be the sole carrier of
       meaning — anything they signal is also in text or structure.
     - prefers-reduced-motion is absolute (Section 10 of this file).
     - <1.5s first paint on mid-tier mobile; atmosphere/blur/3D lazy-load
       after first paint.
============================================================================= */


/* =============================================================================
   1. FONT LOADING — Geist + JetBrains Mono, self-hosted, subset later.
   No Inter Tight on this page — the deck uses Geist for both display
   and body per the Voice Guide's register (the site's Inter Tight body
   face is not part of this channel).
============================================================================= */

@font-face {
  font-family: 'Geist Fallback';
  src: local('Arial');
  size-adjust: 105%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* Self-hosted, subset to the deck's actual glyph range (Basic Latin +
   the handful of symbols the copy uses — —·×←→↓≈©), not the full
   Cyrillic/ligature-rich source files. Sourced from vercel/geist-font
   and JetBrains/JetBrainsMono (both OFL), see Build Ledger for the
   exact release/commit and the subsetting method. */
@font-face {
  font-family: 'Geist';
  src: url('vendor/fonts/Geist-Variable.woff2') format('woff2-variations'),
       url('vendor/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('vendor/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('vendor/fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}


/* =============================================================================
   2. FOUNDATION — INHERITED AND LOCKED (Visual Language v2.0 §2)
   Exact values from the reidEXA system. Not open to expansion.
============================================================================= */

:root {
  /* Type */
  --display: 'Geist', 'Geist Fallback', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Base canvas — the home key of the whole composition */
  --bg: #0f1a2b;

  /* Core text tokens */
  --ink: rgba(255, 255, 255, 0.94);
  --body-text: #A6BCD6;
  --muted: #8FA8C4;
  --faint: rgba(166, 188, 214, 0.78); /* WCAG AA fix, 2026-07-20: 0.55 measured 3.3-3.7:1 in real use (footer links, byline, exit ramps) — below the 4.5:1 floor. 0.78 clears with margin (5.2-6.4:1) across observed contexts; see Build Ledger. */

  /* Accent */
  --blue: #5AA0F2;       /* text-safe */
  --blue-deco: #2B7FE0;  /* decorative only */

  /* Status */
  --red: #FF6B5B;
  --amber: #FFC668;
  --green: #34C77B;
}


/* =============================================================================
   3. EXPANDED COLOR — TONAL DEPTH RAMPS (Visual Language v2.0 §3)
   New tokens. Darker = farther. Lighter/warmer navy = nearer, elevated.
============================================================================= */

:root {
  /* 3.1 Navy depth ramp */
  --void:      #070d18;  /* Deepest backdrop — Closer, cold-open stages */
  --deep:      #0a1322;  /* Atmospheric background plane */
  /* --bg is elevation E0, the reference plane — declared above */
  --surface-1: #142034;  /* E1 — rails, meta triads, quiet chrome */
  --surface-2: #192841;  /* E2 — standard cards, tiles */
  --surface-3: #1f3150;  /* E3 — hover/focus/expanded states */
  --surface-4: #263b5f;  /* E4 — console, focal objects, quote cards */

  /* 3.2 Light ramp — glow and emission */
  --glow-core: #8FC2FF;                 /* hot center of any emissive element */
  --glow-mid:  rgba(90, 160, 242, 0.45);  /* glow falloff */
  --glow-far:  rgba(43, 127, 224, 0.12);  /* outer atmosphere */
  --edge-light: #7FD4FF;                /* rim/edge highlight — the "cyan kiss" */
  --horizon:   rgba(127, 212, 255, 0.08); /* horizon-line gradients on stage floors */

  /* Status glow variants — emissive alert moments (e.g. SameGrid CLOSED cell) */
  --red-glow:   rgba(255, 107, 91, 0.35);
  --amber-glow: rgba(255, 198, 104, 0.35);
  --green-glow: rgba(52, 199, 123, 0.35);
}


/* =============================================================================
   4. ELEVATION & SHADOW — THE FIVE-LEVEL SYSTEM (Visual Language v2.0 §4)
   Light source: upper-left, slightly forward. Every shadow/highlight in
   the deck obeys the same sun. Interaction = elevation — this is the
   deck's affordance system; anything clickable rests at E2, rises to E3.
============================================================================= */

:root {
  --shadow-e1: 0 2px 8px rgba(4, 8, 16, 0.35);
  --shadow-e2: 0 8px 24px rgba(4, 8, 16, 0.45);
  --shadow-e3: 0 16px 40px rgba(4, 8, 16, 0.55);
  --shadow-e4: 0 28px 64px rgba(2, 5, 10, 0.65), 0 0 80px var(--glow-far);

  --edge-e1: 1px solid rgba(255, 255, 255, 0.06);
  --edge-e2: 1px solid rgba(255, 255, 255, 0.08);
  --edge-e3: 1px solid rgba(255, 255, 255, 0.08); /* edge-light layered separately, see .elev-3 */
  --edge-e4: 1px solid rgba(255, 255, 255, 0.10); /* full rim light, see .elev-4 */
}

.elev-0 { background: var(--bg); box-shadow: none; }

.elev-1 {
  background: var(--surface-1);
  box-shadow: var(--shadow-e1);
  border: var(--edge-e1);
}

.elev-2 {
  background: var(--surface-2);
  box-shadow: var(--shadow-e2);
  border: var(--edge-e2);
  border-top-color: rgba(127, 212, 255, 0.14); /* top edge-light */
}

.elev-3 {
  background: var(--surface-3);
  box-shadow: var(--shadow-e3);
  border: var(--edge-e3);
  border-top-color: rgba(127, 212, 255, 0.22);
}

.elev-4 {
  background: var(--surface-4);
  box-shadow: var(--shadow-e4);
  border: 1px solid rgba(127, 212, 255, 0.18); /* full rim light */
}

/* Interaction = elevation. Default state E2, rises to E3 on hover/focus. */
.interactive {
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out,
              background-color 0.2s ease-out, border-color 0.2s ease-out;
}

.interactive:hover,
.interactive:focus-visible {
  transform: translateY(-2px);
  background: var(--surface-3);
  box-shadow: var(--shadow-e3);
  border-color: rgba(127, 212, 255, 0.22);
}

/* Ambient occlusion — tight dark gradient where a plane meets its floor */
.contact-shadow {
  position: relative;
}
.contact-shadow::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6px;
  height: 12px;
  background: radial-gradient(ellipse at center, rgba(2, 5, 10, 0.5) 0%, transparent 75%);
  pointer-events: none;
}

/* Scrims — content over atmospheric art */
.scrim {
  background: rgba(10, 19, 34, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}


/* =============================================================================
   4.1 GLASS MATERIAL (Visual Language v2.0 §4.1)
   The deck's premium surface: economics console, persona tray, appendix
   drawer. Fallback to solid --surface-3 where backdrop-filter is
   unsupported.
============================================================================= */

.glass {
  background: rgba(25, 40, 65, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(127, 212, 255, 0.18);
  box-shadow: var(--shadow-e3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--surface-3);
  }
}


/* =============================================================================
   5. SPATIAL SYSTEM — COMPOSING IN Z (Visual Language v2.0 §5)
   Three planes: atmosphere (far), stage (mid), focal (near).
============================================================================= */

.plane-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.plane-stage {
  position: relative;
  z-index: 1;
  perspective: 1200px;
}

.plane-focal {
  position: relative;
  z-index: 2;
}

/* Depth-of-field — far-plane blur, never on anything the viewer must read */
.depth-blur {
  filter: blur(4px);
}

/* Vignette — soft edge frame for Deck Mode */
.vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(2, 5, 10, 0.25) 100%);
  mix-blend-mode: multiply;
}

/* Standard gradient-mesh atmosphere: void → deep → glow pool, top-left signature */
.atmos-default {
  background:
    radial-gradient(1100px 720px at 12% -10%, var(--glow-far), transparent 60%),
    linear-gradient(180deg, var(--void) 0%, var(--deep) 100%);
}

/* Deepest stage variant — Closer, cold-open */
.atmos-void {
  background: var(--void);
}


/* =============================================================================
   6. TYPOGRAPHY SCALE
   Geist display/body; JetBrains Mono for eyebrows, numerals, rails, footers.
   Brand patterns: eyebrow (mono + 26x2px blue bar), italic-emphasis
   headlines, mono 01/02/03 numerals, footer lockup.
============================================================================= */

body {
  font-family: var(--display);
  color: var(--body-text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--blue-deco);
}

h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

em {
  font-style: italic;
  color: var(--blue);
  font-weight: inherit;
}

/* Load-bearing terms (Infrastructure of Intent, Governed Autonomy, Cognitive
   Endurance, Agentic Constitution, the two role names) — upright bold blue,
   deliberately distinct from the em/italic-blue emphasis pattern above, which
   stays reserved for headline emphasis. Recommended by Claude Code, accepted
   by Reid (2026-07-20) — the content script marks these terms "load-bearing"
   but never itself specifies a visual treatment; see the Build Ledger. Use
   on <strong>, not <em> — this is a defined term, not rhetorical emphasis. */
.term {
  color: var(--blue);
  font-weight: 600;
  font-style: normal;
}

/* Inline in-prose jump link (Slide 11's deep-dive → appendix). Inherits
   the surrounding em/italic-blue treatment; only adds the underline as
   its own affordance rather than switching font/color like .exit-ramp,
   which would break flow mid-sentence. */
.inline-jump {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(90, 160, 242, 0.45);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease-out;
}

.inline-jump:hover,
.inline-jump:focus-visible {
  text-decoration-color: var(--blue);
}

.body-copy {
  /* max-width:62ch removed 2026-07-28: narrower than the slide's own h2/
     .kicker on the same slides (no cap on either), so it read as an
     inconsistency within each slide rather than a deliberate measure —
     confirmed with the author. A block child with no explicit width
     already fills .slide-inner's 1100px column by default; no new width
     value introduced. See Build Ledger for the measured before/after. */
  font-size: 1.0625rem;
  color: var(--body-text);
}

.kicker {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.25rem;
}

.mono-numeral {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.footer-lockup {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.footer-lockup a {
  color: var(--faint);
  text-decoration: underline;
  text-decoration-color: rgba(166, 188, 214, 0.35);
  text-underline-offset: 2px;
  transition: color 0.2s ease-out, text-decoration-color 0.2s ease-out;
}

.footer-lockup a:hover {
  color: var(--muted);
  text-decoration-color: currentColor;
}

/* Gradient text fill — hero display type only (Slides 01, 18) */
.gradient-fill {
  background: linear-gradient(180deg, var(--ink) 0%, var(--glow-core) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--ink); /* solid fallback if background-clip unsupported */
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .gradient-fill {
    -webkit-text-fill-color: transparent;
  }
}


/* =============================================================================
   7. UI CHROME (Visual Language v2.0 §9)
============================================================================= */

/* Act rail — persistent, low-chrome progress rail, E1 glass strip */
.act-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 14px 24px;
  background: rgba(20, 32, 52, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  /* Fades on the Closer (deck-slides.css, body.closer-active) — the
     deck's one place chrome disappears entirely. Reduced motion already
     collapses this to instant via the existing global transition-duration
     override, no separate case needed. */
  transition: opacity 0.6s ease-out;
}

.act-rail__item {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor — visual size stays compact via padding/font-size */
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

.act-rail__item:hover {
  color: var(--body-text);
}

.act-rail__item[aria-current="true"] {
  color: var(--edge-light);
  background: var(--surface-2);
  border-top: 1px solid rgba(127, 212, 255, 0.14);
}

/* Deck/Read mode toggle — E1 pill, active state E2 with glow-far halo */
.mode-toggle {
  position: fixed;
  top: 14px;
  right: 24px;
  z-index: 101;
  display: flex;
  background: var(--surface-1);
  border: var(--edge-e1);
  border-radius: 999px;
  padding: 3px;
  box-shadow: var(--shadow-e1);
}

.mode-toggle__btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor */
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.mode-toggle__btn[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px rgba(127, 212, 255, 0.18), 0 0 16px var(--glow-far);
}

/* Site return — persistent low-chrome link back to /exa (added 2026-07-28).
   Sits top-left on the act rail's own glass strip, the one free corner: the
   rail centers its items and the mode toggle owns the right. Same --faint
   mono register as .exit-ramp and .act-rail__item — no new tokens. */
.site-return {
  position: fixed;
  top: 14px;
  left: 24px;
  z-index: 101;
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor, same as the rail/toggle */
  padding: 7px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-decoration: none;
  border-radius: 3px;
  transition: color 0.2s ease-out, opacity 0.6s ease-out;
}

.site-return:hover {
  color: var(--body-text);
}

/* The top chrome band has no room for a third element at phone widths —
   the act rail's five centered items already run 62–318px of a 380px
   viewport, which is why the mode toggle overlapping them is a known open
   item. Rather than make that worse, the back-link moves to the free
   bottom-left corner on mobile and drops its domain prefix to just
   "←/exa". Measured, not assumed: at 380px this clears the act rail, the
   mode toggle, the bottom-right advance control, and Slide 01's centered
   footer lockup. */
@media (max-width: 640px) {
  .site-return {
    top: auto;
    bottom: 16px;
    left: 16px;
  }

  .site-return__full {
    display: none;
  }
}

/* Read Mode advance control (added 2026-07-28). Hidden by default — Deck
   Mode has Reveal's own navigate-* arrows, and showing both would double
   the affordance. body.reveal-scroll is the class Reveal sets in scroll
   view, and (since the 2026-07-28 toggle fix) the class that now actually
   tracks the mode, so exactly one advance control is visible at a time. */
.advance-control {
  display: none;
}

body.reveal-scroll .advance-control {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 101;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px; /* touch target floor */
  color: var(--faint);
  background: var(--surface-1);
  border: var(--edge-e1);
  border-radius: 999px;
  box-shadow: var(--shadow-e1);
  cursor: pointer;
  transition: color 0.2s ease-out, background-color 0.2s ease-out, opacity 0.6s ease-out;
}

body.reveal-scroll .advance-control:hover {
  color: var(--ink);
  background: var(--surface-2);
}

/* Chevron affordance — first frame only, soft glow-mid pulse */
.chevron-hint {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  animation: chevron-pulse 2.4s ease-in-out infinite;
}

@keyframes chevron-pulse {
  0%, 100% { opacity: 0.5; filter: drop-shadow(0 0 0 transparent); }
  50% { opacity: 1; filter: drop-shadow(0 0 8px var(--glow-mid)); }
}

.chevron-hint__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.chevron-hint.show-label .chevron-hint__label {
  opacity: 1;
}

.chevron-hint.dismissed {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-out;
}

/* Expandable cards — E2 -> E3 on open, 3D hinge in Deck Mode */
.expandable {
  cursor: pointer;
}

.expandable__body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform-origin: top;
  transform: rotateX(-6deg);
  transition: max-height 0.35s ease-out, opacity 0.3s ease-out, transform 0.35s ease-out;
}

.expandable[aria-expanded="true"] .expandable__body {
  max-height: 600px;
  opacity: 1;
  transform: rotateX(0deg);
}

/* Persona chips — mono chips at E1, active seat rises to E3 */
.persona-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor */
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface-1);
  border: var(--edge-e1);
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease-out;
}

.persona-chip[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface-3);
  border-color: rgba(127, 212, 255, 0.22);
  box-shadow: var(--shadow-e3);
}

/* Exit ramps — quietest objects in the space, by design */
.exit-ramp {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target floor — text stays 12px, hit area doesn't */
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  text-decoration: none;
  transition: color 0.2s ease-out;
}

.exit-ramp:hover {
  color: var(--muted);
}

/* Slides 06/07/08 carry two ramps side by side (the internal "← all three
   pillars" return plus the outbound pillar link added 2026-07-28). Both are
   inline-flex, so without this they'd sit on a single whitespace gap. */
.exit-ramp + .exit-ramp {
  margin-left: var(--space-xl);
}


/* =============================================================================
   8. LAYOUT PRIMITIVES
============================================================================= */

/* 8pt spacing scale — the deck's first. Names/values mirror
   reidexa-design-system.md §5.2 so the two systems agree in principle,
   even though this deck deliberately doesn't import the site's token
   file (see the file header). Added 2026-07-28 fixing Slide 01's
   layout — see Build Ledger. */
:root {
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 36px;
  --space-3xl: 60px;
  --space-4xl: 80px;
  --space-5xl: 110px;
  --space-6xl: 140px;
}

.slide-inner {
  /* width:100% added 2026-07-28 alongside the Slide 01 fix: .slide is now
     genuinely display:flex (see deck-slides.css) instead of the block
     layout it silently fell back to before. .slide-inner is .slide's only
     in-flow child (siblings are all position:absolute), but as a flex
     item with no explicit width it defaults to shrink-to-fit instead of
     filling the row — on any slide whose content is narrower than
     1100px (e.g. the appendix drawer) it silently narrowed. width:100%
     restores the fill-then-cap-by-max-width behavior block layout gave
     it for free. */
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
  z-index: 2;
}

.act-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}


/* =============================================================================
   9. FOCUS STATES — visible at every elevation (WCAG 2.1 §2.4.7)
============================================================================= */

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

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

/* Skip link (the deck's only .sr-only element) becomes visible on focus,
   same interaction pattern as the sitewide .skip-link — a permanently
   invisible focus target is a real gap for sighted keyboard users. */
a.sr-only:focus {
  position: fixed;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  padding: 12px 20px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--edge-light);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  z-index: 9999;
}


/* =============================================================================
   10. MOTION — prefers-reduced-motion (ABSOLUTE, Visual Language v2.0 §7/§8)
   Kills ambient drift, parallax, 3D scenes (fallbacks render), shadow-lag
   choreography. Every section has a complete instant state.
============================================================================= */

@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;
  }

  .interactive:hover,
  .interactive:focus-visible {
    transform: none;
  }

  .chevron-hint {
    animation: none;
  }

  /* WebGL canvases must not render under reduced motion — Tier-2 scenes
     swap to their static fallback via JS reading this same media query;
     this rule is the CSS-side belt to that JS suspenders. */
  canvas[data-tier2] {
    display: none;
  }

  [data-reduced-motion-fallback] {
    display: block !important;
  }
}

/* Default: hide reduced-motion fallbacks when motion is allowed */
[data-reduced-motion-fallback] {
  display: none;
}


/* =============================================================================
   11. MOBILE — 380px mobile-first opening fold (Visual Language v2.0 §8.3)
   Depth simplified: single glow pool, parallax off by default on touch.
============================================================================= */

@media (max-width: 640px) {
  .slide-inner {
    padding: 0 24px;
  }

  .act-rail {
    padding: 10px 16px;
    gap: 2px;
  }

  .act-rail__item {
    padding: 5px 8px;
    font-size: 10px;
  }

  /* Simplify atmosphere: drop the secondary pool/blur layers, single glow only */
  .atmos-default {
    background:
      radial-gradient(800px 500px at 20% 0%, var(--glow-far), transparent 55%),
      linear-gradient(180deg, var(--void) 0%, var(--deep) 100%);
  }

  .depth-blur {
    filter: none; /* skip blur cost on touch/small viewports */
  }
}

@media (pointer: coarse) {
  /* Parallax off by default on touch — layers driven by JS check this
     media query before attaching scroll/pointer listeners. */
  .plane-atmosphere[data-parallax] {
    transform: none !important;
  }
}
