/* ═══════════════════════════════════════════════════════════
   AETHERUS MONOLITH — style.css
   Design System v2.0 · Code of Stillness
   ═══════════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Palette */
  --obsidian-deep:    #060810;
  --obsidian:         #0A0D15;
  --obsidian-mid:     #111520;
  --obsidian-surface: #161B28;
  --white:            #F2F4F7;
  --white-dim:        rgba(242,244,247,0.55);
  --white-ghost:      rgba(242,244,247,0.15);
  --blue:             #00BFFF;
  --blue-dim:         rgba(0,191,255,0.08);
  --blue-glow:        rgba(0,191,255,0.25);
  --chromium:         #B4B8C1;
  --chromium-border:  rgba(180,184,193,0.2);
  --chromium-hover:   rgba(180,184,193,0.5);

  /* Layer accent opacities */
  --layer-governance: rgba(180,184,193,0.65);
  --layer-pipeline:   rgba(180,184,193,0.40);
  --layer-artifact:   rgba(180,184,193,0.22);

  /* Typography */
  --font-primary: 'Helvetica Neue', 'Arial', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Easing */
  --ease-reveal: cubic-bezier(0.16,1,0.3,1);
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--obsidian-deep);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Focus states */
:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: 1px solid rgba(0,191,255,0.45);
  outline-offset: 4px;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

/* ─── SCAN LINE ──────────────────────────────────────────── */
@keyframes scan {
  0%   { top: -100px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.scan-line {
  position: fixed; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,191,255,0.1), transparent);
  animation: scan 12s linear infinite;
  pointer-events: none;
  z-index: 9998;
}

/* ─── NAVIGATION ─────────────────────────────────────────── */
@keyframes nav-enter {
  from { transform: translateY(-52px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 52px;
  background: rgba(6,8,16,0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--chromium-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
  transform: translateY(-52px);
  opacity: 0;
}
.nav.is-revealed {
  transform: translateY(0);
  opacity: 1;
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 500ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 200ms;
}
.nav-brand {
  font-family: var(--font-primary);
  font-weight: 200;
  font-size: 13px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.nav-brand span { color: var(--blue); }

.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--chromium);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--white); }

/* ─── HERO ───────────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#grid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: block;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(6,8,16,0.6) 65%,
    #060810 100%
  );
  pointer-events: none;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(120px, 18vh, 200px) 40px 100px;
  width: 100%;
}
.hero-content::after {
  content: '';
  position: absolute;
  bottom: 0; left: 40px;
  width: 120px; height: 1px;
  background: var(--blue);
}

@keyframes hero-line-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.30em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 24px;
  animation: hero-line-in 600ms var(--ease-reveal) 400ms both;
}
.hero-title {
  font-family: var(--font-primary);
  font-weight: 100;
  font-size: clamp(38px, 6vw, 80px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.0;
  margin-bottom: 32px;
  animation: hero-line-in 700ms var(--ease-reveal) 550ms both;
}
.hero-title em { font-style: normal; color: var(--chromium); }

.hero-subtitle {
  font-size: 15px; font-weight: 300;
  color: var(--white-dim);
  max-width: 560px;
  line-height: 1.85;
  animation: hero-line-in 700ms var(--ease-reveal) 700ms both;
}
.hero-index {
  margin-top: 52px;
  display: flex; gap: 32px; flex-wrap: wrap;
  animation: hero-line-in 600ms var(--ease-reveal) 900ms both;
}
.hero-index-item {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--chromium); cursor: default;
  transition: color 0.2s;
}
.hero-index-item:hover { color: var(--white); }

.hero-scroll-cue {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: hero-line-in 600ms var(--ease-reveal) 1100ms both;
  z-index: 2;
}
.hero-scroll-cue span {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--chromium);
}
@keyframes scroll-tick {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(4px); opacity: 1; }
}
.hero-scroll-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--chromium), transparent);
  animation: scroll-tick 2s ease-in-out infinite;
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 40px 80px;
}

/* ─── SCROLL REVEAL ──────────────────────────────────────── */
/* Phase E — Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms var(--ease-reveal),
              transform 400ms var(--ease-reveal);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── SECTION HEADERS ────────────────────────────────────── */
.section { margin-bottom: 100px; }
.section-header {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 48px;
}
.section-number {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.3em; color: var(--blue);
  text-transform: uppercase; white-space: nowrap;
}
.section-title {
  font-family: var(--font-primary);
  font-weight: 200;
  font-size: 22px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
}
.section-divider {
  flex: 1; height: 1px;
  background: var(--chromium-border);
}

/* ─── GLASS CARD ─────────────────────────────────────────── */
.glass-card {
  background: rgba(22,27,40,0.75);
  backdrop-filter: blur(20px);
  border: 1px solid var(--chromium-border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,184,193,0.35), transparent);
  pointer-events: none;
}
.glass-card:hover {
  border-color: var(--chromium-hover);
}
.glass-card.active {
  border-color: rgba(0,191,255,0.4);
  box-shadow: 0 0 32px rgba(0,191,255,0.06), inset 0 0 60px rgba(0,191,255,0.02);
}
.glass-card.active::before {
  background: linear-gradient(90deg, transparent, rgba(0,191,255,0.3), transparent);
}

/* ─── MANIFESTO ──────────────────────────────────────────── */
/* PHASE F: manifesto relocated — rules below target zero DOM elements */
/*
.manifesto-body {
  font-size: 14px;
  font-weight: 300;
  color: var(--white-dim);
  line-height: 1.9;
  max-width: 720px;
}
.manifesto-body h1 {
  font-family: var(--font-primary);
  font-weight: 100;
  font-size: 24px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 24px;
}
.manifesto-body h2 {
  font-family: var(--font-primary);
  font-weight: 200;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chromium);
  margin-top: 32px;
  margin-bottom: 12px;
}
.manifesto-body strong { color: var(--white); font-weight: 500; }
.manifesto-body p { margin-bottom: 16px; max-width: 65ch; }
*/

/* ─── PIPELINE HUD ───────────────────────────────────────── */

/* Circuit trace SVG pattern as data URI background */
.pipeline-hud {
  position: relative;
  background-color: rgba(6,8,16,0.9);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='80'%3E%3Cg stroke='%23B4B8C1' stroke-opacity='0.05' fill='none' stroke-width='1'%3E%3Cline x1='0' y1='20' x2='40' y2='20'/%3E%3Cline x1='40' y1='20' x2='40' y2='5'/%3E%3Cline x1='40' y1='5' x2='80' y2='5'/%3E%3Cline x1='80' y1='5' x2='80' y2='40'/%3E%3Cline x1='80' y1='40' x2='120' y2='40'/%3E%3Cline x1='20' y1='60' x2='20' y2='80'/%3E%3Cline x1='20' y1='60' x2='60' y2='60'/%3E%3Cline x1='60' y1='60' x2='60' y2='40'/%3E%3Cline x1='100' y1='20' x2='100' y2='50'/%3E%3Ccircle cx='40' cy='20' r='2' fill='%23B4B8C1' fill-opacity='0.08' stroke='none'/%3E%3Ccircle cx='80' cy='40' r='2' fill='%23B4B8C1' fill-opacity='0.08' stroke='none'/%3E%3Ccircle cx='60' cy='60' r='2' fill='%23B4B8C1' fill-opacity='0.08' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  border: 1px solid rgba(180,184,193,0.12);
  border-radius: 0;
  padding: 56px 40px 48px;
  margin-bottom: 24px;
  overflow: hidden;
}

/* Corner brackets via spans */
.hud-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.hud-corner--tl { top: 12px; left: 12px; border-top: 1.5px solid rgba(180,184,193,0.4); border-left: 1.5px solid rgba(180,184,193,0.4); }
.hud-corner--tr { top: 12px; right: 12px; border-top: 1.5px solid rgba(180,184,193,0.4); border-right: 1.5px solid rgba(180,184,193,0.4); }
.hud-corner--bl { bottom: 12px; left: 12px; border-bottom: 1.5px solid rgba(180,184,193,0.4); border-left: 1.5px solid rgba(180,184,193,0.4); }
.hud-corner--br { bottom: 12px; right: 12px; border-bottom: 1.5px solid rgba(180,184,193,0.4); border-right: 1.5px solid rgba(180,184,193,0.4); }

/* Greeble micro-data */
.hud-greeble {
  position: absolute;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: rgba(180,184,193,0.35);
  pointer-events: none;
  white-space: nowrap;
}
.hud-greeble--tl { top: 16px; left: 36px; }
.hud-greeble--tc { top: 16px; left: 50%; transform: translateX(-50%); }
.hud-greeble--tr { top: 16px; right: 36px; }
.hud-greeble--bl { bottom: 16px; left: 36px; }
.hud-greeble--br { bottom: 16px; right: 36px; }

/* Atmospheric balyage glow */
.pipeline-atmosphere {
  position: absolute;
  left: 0; right: 0;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,191,255,0.06) 30%,
    rgba(0,191,255,0.10) 50%,
    rgba(0,191,255,0.06) 70%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, white 30%, white 70%, transparent);
  mask-image: linear-gradient(to bottom, transparent, white 30%, white 70%, transparent);
  pointer-events: none;
  z-index: 1;
}

/* Angular wiring SVG */
.pipeline-wiring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

/* Rail wrap + rail */
.pipeline-rail-wrap {
  position: relative;
  z-index: 3;
  padding: 32px 0;
  display: flex;
  align-items: center;
}
.pipeline-rail {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 0;
  background: linear-gradient(to bottom, #0A0D15 0%, #2A2D35 30%, #1A1D25 70%, #060810 100%);
  box-shadow: 0 0 8px rgba(0,191,255,0.15), 0 0 20px rgba(0,191,255,0.06);
}

/* Particles */
@keyframes particle-traverse {
  0%   { left: 0%; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { left: calc(100% - 4px); opacity: 0; }
}
.pipeline-particle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #00BFFF;
  box-shadow: 0 0 6px #00BFFF, 0 0 14px rgba(0,191,255,0.4);
  animation: particle-traverse 4s linear infinite;
  will-change: transform;
  z-index: 2;
}
.pipeline-particle::before {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 4px;
  background: linear-gradient(to left, rgba(0,191,255,0.7), transparent);
  border-radius: 0;
  pointer-events: none;
}
.pipeline-particle:nth-child(2) { animation-delay: 1.3s; }
.pipeline-particle:nth-child(3) { animation-delay: 2.6s; }

/* Nodes row */
.pipeline-nodes-row {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  list-style: none;
  z-index: 4;
}

/* Joint nodes */
.pnode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}
.pnode-box {
  width: 44px;
  height: 44px;
  border-radius: 3px;
  border: 1.5px solid rgba(180,184,193,0.5);
  background: #060810;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.pnode-id {
  position: absolute;
  top: 3px;
  right: 5px;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(180,184,193,0.3);
  pointer-events: none;
}

/* Interior pulser */
@keyframes pulser-breathe {
  0%, 100% { transform: scale(1.0); box-shadow: 0 0 8px #00BFFF, 0 0 20px rgba(0,191,255,0.5); }
  50%       { transform: scale(1.3); box-shadow: 0 0 12px #00BFFF, 0 0 28px rgba(0,191,255,0.7); }
}
.pnode-pulser {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00BFFF;
  box-shadow: 0 0 8px #00BFFF, 0 0 20px rgba(0,191,255,0.5);
  animation: pulser-breathe 3s ease-in-out infinite;
}

/* Joint hover/active states */
.pnode:hover .pnode-box,
.pnode.active .pnode-box {
  border-color: rgba(0,191,255,0.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 0 16px rgba(0,191,255,0.2),
    0 2px 8px rgba(0,0,0,0.6);
}
.pnode.failure .pnode-box {
  border-color: rgba(180,184,193,0.5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.6);
}
.pnode.failure .pnode-pulser {
  background: rgba(180,184,193,0.6);
  box-shadow: none;
  animation: none;
}

/* Gate nodes */
.gnode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}
.gnode-diamond {
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(180,184,193,0.35);
  background: #060810;
  transform: rotate(45deg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}
.gnode:hover .gnode-diamond,
.gnode.active .gnode-diamond {
  border-color: rgba(0,191,255,0.6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 0 10px rgba(0,191,255,0.25);
}
.gnode.failure .gnode-diamond {
  border-color: rgba(180,184,193,0.5);
  box-shadow: none;
}

/* Node labels */
.node-label {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(180,184,193,0.7);
  white-space: nowrap;
  text-align: center;
  margin-top: 48px;
}
.gnode .node-label {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: rgba(180,184,193,0.5);
  margin-top: 36px;
}

/* Status readout */
.pipeline-status-readout {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 16px;
  min-height: 1em;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
}

/* Legend */
.pipeline-legend {
  display: flex;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.pipeline-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: rgba(180,184,193,0.5);
}
.legend-gate-sym {
  display: inline-block;
  width: 10px; height: 10px;
  border: 1px solid rgba(180,184,193,0.4);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.legend-joint-sym {
  display: inline-block;
  width: 12px; height: 12px;
  border: 1px solid rgba(180,184,193,0.4);
  border-radius: 2px;
  background: rgba(22,27,40,0.8);
  flex-shrink: 0;
}

/* Reduced motion — static particle dot only */
@media (prefers-reduced-motion: reduce) {
  .pipeline-particle { animation: none; left: 50%; opacity: 0.6; }
  .pipeline-particle:nth-child(2),
  .pipeline-particle:nth-child(3) { display: none; }
  .pnode-pulser { animation: none; }
}

/* Phase E — Pipeline Node Stagger */
/* NOTE: .docs-grid has perspective/rotateX/preserve-3d (Phase D) — reveal is NOT
   applied to .docs-grid to avoid clobbering that transform. Sections, headings,
   .pipeline-hud, and .glass-card are .reveal targets. Cards are stagger targets. */
.pipeline-hud .pnode,
.pipeline-hud .gnode {
  opacity: 0;
  transition: opacity 300ms cubic-bezier(0.16,1,0.3,1);
}
.pipeline-hud.is-visible .pnode,
.pipeline-hud.is-visible .gnode {
  opacity: 1;
}
/* Node stagger: 10 nodes, 80ms apart, 300ms onset delay */
/* Order: G_IDEM, S1, G1, G1A, S2, G2, S3, S4, G4, S5 — confirmed from [data-node-id] in index.html */
.pipeline-hud.is-visible [data-node-id="G_IDEM"] { transition-delay: 300ms; }
.pipeline-hud.is-visible [data-node-id="S1"]     { transition-delay: 380ms; }
.pipeline-hud.is-visible [data-node-id="G1"]     { transition-delay: 460ms; }
.pipeline-hud.is-visible [data-node-id="G1A"]    { transition-delay: 540ms; }
.pipeline-hud.is-visible [data-node-id="S2"]     { transition-delay: 620ms; }
.pipeline-hud.is-visible [data-node-id="G2"]     { transition-delay: 700ms; }
.pipeline-hud.is-visible [data-node-id="S3"]     { transition-delay: 780ms; }
.pipeline-hud.is-visible [data-node-id="S4"]     { transition-delay: 860ms; }
.pipeline-hud.is-visible [data-node-id="G4"]     { transition-delay: 940ms; }
.pipeline-hud.is-visible [data-node-id="S5"]     { transition-delay: 1020ms; }

/* ─── GRIDS ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Docs card row: single nowrap flex row — cards never wrap */
.docs-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: stretch;
  perspective: 1200px;
  transform: perspective(1200px) rotateX(6deg);
  transform-style: preserve-3d;
}
.docs-grid .doc-card {
  flex: 1 1 0;
  min-width: 0; /* allow shrink below natural content width */
}

/* ─── DOC CARDS ──────────────────────────────────────────── */
.doc-card {
  background: rgba(22,27,40,0.6);
  border: 1px solid var(--chromium-border);
  border-left-width: 2px;
  border-radius: 12px;
  padding: 24px;
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.25);
  opacity: 0;
  transform: translateY(6px);
  transition: border-color 0.3s ease,
              opacity 400ms cubic-bezier(0.16,1,0.3,1),
              transform 400ms cubic-bezier(0.16,1,0.3,1),
              box-shadow 300ms ease,
              filter 300ms ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.doc-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180,184,193,0.25), transparent);
  pointer-events: none;
}
.doc-card:hover {
  border-color: rgba(0,191,255,0.35);
  transform: translateY(-2px) translateZ(4px);
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.30), 0 4px 16px rgba(0,0,0,0.3);
}
.doc-card.active {
  border-color: rgba(0,191,255,0.4);
  box-shadow: 0 0 32px rgba(0,191,255,0.06);
}

/* Phase E — Card Stagger */
.doc-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Restore Phase D hover lift — .doc-card.is-visible:hover has specificity (0,3,0)
   which beats .doc-card.is-visible (0,2,0), preserving translateY(-2px) translateZ(4px). */
.doc-card.is-visible:hover {
  transform: translateY(-2px) translateZ(4px);
}
/* Stagger delays — CSS nth-child; no JS setTimeout required */
.doc-card.is-visible:nth-child(1) { transition-delay: 0ms; }
.doc-card.is-visible:nth-child(2) { transition-delay: 60ms; }
.doc-card.is-visible:nth-child(3) { transition-delay: 120ms; }
.doc-card.is-visible:nth-child(4) { transition-delay: 180ms; }
.doc-card.is-visible:nth-child(5) { transition-delay: 240ms; }

/* Layer accent variants */
.doc-card.governance      { border-left-color: var(--layer-governance); }
.doc-card.pipeline-layer  { border-left-color: var(--layer-pipeline); }
.doc-card.artifact-layer  { border-left-color: var(--layer-artifact); }

/* NOTE: delta-brief::before status dot removed — Phase D post-fix.
   Rationale: rendered as visual noise at card scale. Dot was a 6px
   #00BFFF circle at top-right with delta-pulse animation. Removed
   in favor of card elevation (translateZ) and shimmer as sole
   distinguishing signals. */
.doc-card.delta-brief {
  background: #111520;
  backdrop-filter: none;
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.45);
  transform: translateZ(20px);
  overflow: hidden;
}
/* Phase E fix: explicit rule prevents source-order fragility.
   Without this, translateZ(20px) wins only because .doc-card.delta-brief
   happens to appear after .doc-card.is-visible in the file. */
.doc-card.delta-brief.is-visible {
  transform: translateZ(20px);
}
/* Phase F: compound hover — specificity (0,4,0) beats .doc-card.is-visible:hover (0,3,0).
   Lifts from translateZ(20px) base: Y up 2px, Z forward to 24px. */
.doc-card.delta-brief.is-visible:hover {
  transform: translateY(-2px) translateZ(24px);
}

@keyframes delta-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
.doc-card.delta-brief::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.08) 55%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: delta-shimmer 1.4s ease 1.2s forwards;
  pointer-events: none;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 4px var(--blue); opacity: 0.7; }
  50% { box-shadow: 0 0 10px var(--blue), 0 0 20px rgba(0,191,255,0.3); opacity: 1; }
}
.doc-card.delta-brief .doc-card-status {
  animation: dot-pulse 4s ease-in-out infinite;
}

.doc-card-layer {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.doc-card-name {
  font-family: var(--font-primary);
  font-size: 13px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--white);
  margin-bottom: 8px;
}
.doc-card-desc {
  font-size: 12px; font-weight: 300;
  color: var(--white-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}
.doc-card-meta {
  display: flex; gap: 16px; align-items: center;
}
.doc-card-format {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.30em; text-transform: uppercase;
  color: var(--blue);
  padding: 3px 8px;
  border: 1px solid var(--chromium-border);
  border-radius: 2px;
}
.doc-card-status {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 6px var(--blue);
  flex-shrink: 0;
}
.doc-card-status.inactive {
  background: var(--chromium);
  box-shadow: none;
  opacity: 0.4;
  animation: none !important;
}

/* ─── DETAIL PANEL ───────────────────────────────────────── */
@keyframes panel-open {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.doc-detail-panel {
  display: none;
  margin-top: 12px;
  background: rgba(22,27,40,0.75);
  backdrop-filter: blur(20px);
  border: 1px solid var(--chromium-border);
  border-top: 2px solid var(--blue);
  border-radius: 12px;
  padding: 36px;
  position: relative;
}
.doc-detail-panel::before {
  content: '';
  position: absolute; top: 2px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,191,255,0.25), transparent);
  pointer-events: none;
}
.doc-detail-panel.open {
  display: block;
  animation: panel-open 300ms ease both;
}

/* Detail panel content typography */
.doc-detail-panel h1 {
  font-family: var(--font-primary);
  font-weight: 100;
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}
.doc-detail-panel h2 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 28px;
  margin-bottom: 10px;
}
.doc-detail-panel h3 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chromium);
  margin-top: 18px;
  margin-bottom: 8px;
}
.doc-detail-panel p {
  font-size: 13px;
  color: var(--white-dim);
  line-height: 1.75;
  margin-bottom: 10px;
  max-width: 65ch;
}
.doc-detail-panel strong { color: var(--white); font-weight: 500; }
.doc-detail-panel code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: var(--blue);
  background: rgba(0,191,255,0.08);
  padding: 2px 6px;
  border-radius: 3px;
}
.doc-detail-panel ul,
.doc-detail-panel ol {
  padding-left: 20px;
  margin-bottom: 12px;
}
.doc-detail-panel li {
  font-size: 13px;
  color: var(--white-dim);
  line-height: 1.7;
  margin-bottom: 4px;
}
.doc-detail-panel table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  margin-bottom: 16px;
}
.doc-detail-panel th {
  text-align: left;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chromium);
  padding: 8px 12px;
  border-bottom: 1px solid var(--chromium-border);
}
.doc-detail-panel td {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--white-dim);
  border-bottom: 1px solid rgba(180,184,193,0.08);
  line-height: 1.5;
}

/* Artifact tree header — Task 4 */
.artifact-tree-header {
  font-family: Inter, sans-serif;
  font-size: 0.85rem;
  color: rgba(180,184,193,0.6);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  max-width: 48ch;
}

/* Doc tree */
.doc-tree {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  line-height: 1.9;
  color: var(--chromium);
  padding: 28px;
  background: rgba(6,8,16,0.8);
  border: 1px solid var(--chromium-border);
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 40px;
}

/* ─── SPEC ELEMENTS ──────────────────────────────────────── */
.spec-label {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.spec-value {
  font-size: 14px; font-weight: 400;
  color: var(--white);
  line-height: 1.7;
  margin-bottom: 12px;
  max-width: 65ch;
}
.spec-value strong { color: var(--white); font-weight: 500; }
.spec-value code, code.inline {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--blue);
  background: rgba(0,191,255,0.08);
  padding: 2px 6px;
  border-radius: 3px;
}
.spec-note {
  font-size: 12px;
  color: var(--white-dim);
  line-height: 1.6;
  max-width: 65ch;
}
.mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--chromium);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  margin-top: 100px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--chromium-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  font-family: var(--font-primary);
  font-size: 11px; font-weight: 200;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--chromium);
}
.footer-meta {
  font-size: 10px;
  color: rgba(180,184,193,0.4);
  letter-spacing: 0.1em;
  text-align: right;
  line-height: 1.8;
}

/* ─── DOCTRINE ANCHOR ───────────────────────────────────── */
/* Phase F — Doctrine Anchor */
.doctrine-anchor {
  padding-top: clamp(4rem, 8vh, 6rem);
  padding-right: 1.5rem;
  padding-left: 1.5rem;
  text-align: center;
}

.doctrine-rule {
  border: none;
  border-top: 1px solid rgba(180,184,193,0.15);
  max-width: 48ch;
  margin: 0 auto clamp(2.5rem, 5vh, 3.5rem);
}

.doctrine-claim {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 300;
  color: rgba(180,184,193,0.85);
  letter-spacing: 0.04em;
  line-height: 1.5;
  max-width: 48ch;
  margin: 0 auto;
}

/* Final Point-Fix — Closing Composition */
.closing-composition {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 80px;
}

.contact-line {
  margin-top: 48px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(180,184,193,0.70);
  line-height: 1.8;
  text-align: center;
}

.contact-line a {
  color: #00BFFF;
  text-decoration: none;
  border-bottom: none;
  cursor: default;
}

.contact-line a:hover {
  border-bottom: none;
  color: #00BFFF;
}

.contact-line a:focus-visible {
  outline: 1px solid rgba(0,191,255,0.45);
  outline-offset: 4px;
}

.footer-rule {
  border: none;
  border-top: 1px solid rgba(180,184,193,0.12);
  margin-bottom: 32px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .docs-grid { flex-direction: column; }
  .pipeline-hud { padding: 48px 20px 40px; }
  .nav { padding: 0 24px; }
  .hero-content { padding: 140px 24px 80px; }
  .wrapper { padding: 80px 24px; }
  .footer { flex-direction: column; gap: 16px; text-align: center; }
  .footer-meta { text-align: center; }
}

/* ─── REDUCED MOTION ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .scan-line { animation: none; display: none; }
  .hero-scroll-line { animation: none; }
  .doc-card.delta-brief::after { animation: none; }
  .doc-card.delta-brief .doc-card-status { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  /* Phase E — reduced motion fallbacks */
  .reveal,
  .doc-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .nav {
    transform: none;
    opacity: 1;
    transition: none;
  }
  .pipeline-hud .pnode,
  .pipeline-hud .gnode {
    opacity: 1;
    transition: none;
  }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
