/* ==========================================================================
   edgeCore Docs — Industrial Console + Protocol-first UI
   Engineering typography · Functional components · Deterministic motion
   ========================================================================== */

:root {
  /* Background Layers */
  --bg-deep: #090909;
  --bg: #0D0D0F;
  --bg-soft: #101114;
  --bg-elevated: #16181B;
  --bg-panel: #181A1D;
  --bg-surface: #1C1D20;

  /* Text */
  --text: #FFFFFF;
  --text-soft: #D7D7D7;
  --text-muted: #AAAAAA;
  --text-dim: #777777;

  /* Gold Palette */
  --gold: #C8A75B;
  --gold-light: #DDBB73;
  --gold-bright: #E8D5A3;
  --gold-deep: #B38F43;
  --gold-dark: #8F7341;
  --gold-hover: #F0D48A;
  --gold-glow: rgba(200, 167, 91, 0.25);
  --gold-glow-strong: rgba(200, 167, 91, 0.45);
  --gold-soft: rgba(200, 167, 91, 0.12);
  --gold-bg: rgba(200, 167, 91, 0.08);
  --gold-bg-strong: rgba(200, 167, 91, 0.10);
  --gold-border: rgba(200, 167, 91, 0.25);
  --gold-border-hover: rgba(221, 187, 115, 0.55);
  --gold-line: rgba(200, 167, 91, 0.15);
  --gold-ghost: rgba(200, 167, 91, 0.04);
  --gold-ghost-strong: rgba(200, 167, 91, 0.06);
  --gold-selection: rgba(200, 167, 91, 0.35);

  /* Semantic */
  --success: #4ADE80;
  --warning: #C8A75B;
  --error: #EF4444;
  --tip: #60A5FA;
  --success-bg: rgba(74, 222, 128, 0.12);
  --success-border: rgba(74, 222, 128, 0.3);
  --success-glow: rgba(74, 222, 128, 0.5);
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-border: rgba(239, 68, 68, 0.3);
  --error-soft: rgba(239, 68, 68, 0.06);
  --tip-bg: rgba(96, 165, 250, 0.12);
  --tip-border: rgba(96, 165, 250, 0.3);
  --tip-soft: rgba(96, 165, 250, 0.06);

  /* Glass */
  --glass: rgba(25, 25, 25, 0.55);
  --glass-strong: rgba(22, 24, 27, 0.85);
  --blur-xs: 12px;
  --blur-sm: 18px;
  --blur-md: 24px;

  /* Shadow */
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 10px 40px rgba(200, 167, 91, 0.12);
  --shadow-gold-lg: 0 20px 60px rgba(200, 167, 91, 0.18);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.08);

  /* Radius — Apple-style generous */
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* Layout */
  --shell-width: 1920px;

  /* Animation — Apple-style cubic-bezier */
  --transition-fast: 150ms ease;
  --transition-base: 250ms cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 350ms cubic-bezier(0.25, 1, 0.5, 1);
  --transition-scene: 1.2s cubic-bezier(0.16, 1, 0.3, 1);

  /* Header */
  --header-bg: rgba(9, 9, 9, 0.75);
  --header-border: rgba(200, 167, 91, 0.18);

  /* Button — flat engineering controls, no marketing gradients */
  --button-primary-text: #0D0D0F;
  --button-primary-bg: #C8A75B;
  --button-secondary-bg: transparent;
  --button-border: rgba(200, 167, 91, 0.35);

  /* Code Blocks (dark) */
  --code-inline-bg: rgba(28, 29, 32, 0.8);
  --code-inline-color: #E8D5A3;
  --code-inline-border: rgba(200, 167, 91, 0.15);
  --code-block-bg: #111111;
  --code-block-color: #D7D7D7;
  --tok-keyword: #7dd3fc;
  --tok-string: #86efac;
  --tok-number: #fca5a5;

  /* Arch Flow (dark) */
  --arch-bg: rgba(12, 13, 15, 0.72);
  --arch-step-bg: rgba(22, 23, 26, 0.85);
  --arch-step-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  --arch-flow-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35), 0 0 24px rgba(200, 167, 91, 0.06);
  --arch-status-bar-bg: rgba(200, 167, 91, 0.08);
  --arch-status-bar-border: rgba(200, 167, 91, 0.12);
}

/* =========================================
   Light Theme
   ========================================= */
[data-theme="light"] {
  --bg-deep: #F5F5F7;
  --bg: #FAFAFA;
  --bg-soft: #F0F0F2;
  --bg-elevated: #E8E8ED;
  --bg-panel: #FFFFFF;
  --bg-surface: #FBFBFD;

  --text: #1D1D1F;
  --text-soft: #3A3A3C;
  --text-muted: #6E6E73;
  --text-dim: #999999;

  --gold: #B8933F;
  --gold-light: #A07D2C;
  --gold-bright: #C8A75B;
  --gold-deep: #8B6914;
  --gold-dark: #6B5210;
  --gold-hover: #D4A84B;
  --gold-glow: rgba(184, 147, 63, 0.15);
  --gold-glow-strong: rgba(184, 147, 63, 0.3);
  --gold-soft: rgba(184, 147, 63, 0.08);
  --gold-bg: rgba(184, 147, 63, 0.05);
  --gold-bg-strong: rgba(184, 147, 63, 0.07);
  --gold-border: rgba(184, 147, 63, 0.2);
  --gold-border-hover: rgba(160, 125, 44, 0.45);
  --gold-line: rgba(184, 147, 63, 0.12);
  --gold-ghost: rgba(184, 147, 63, 0.03);
  --gold-ghost-strong: rgba(184, 147, 63, 0.05);
  --gold-selection: rgba(184, 147, 63, 0.3);

  /* Semantic */
  --success: #16a34a;
  --warning: #B8933F;
  --error: #dc2626;
  --tip: #3b82f6;
  --success-bg: rgba(22, 163, 74, 0.1);
  --success-border: rgba(22, 163, 74, 0.25);
  --success-glow: rgba(22, 163, 74, 0.45);
  --error-bg: rgba(220, 38, 38, 0.1);
  --error-border: rgba(220, 38, 38, 0.25);
  --error-soft: rgba(220, 38, 38, 0.05);
  --tip-bg: rgba(59, 130, 246, 0.1);
  --tip-border: rgba(59, 130, 246, 0.25);
  --tip-soft: rgba(59, 130, 246, 0.05);

  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.85);

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.10);
  --shadow-gold: 0 4px 24px rgba(184, 147, 63, 0.08);
  --shadow-gold-lg: 0 8px 40px rgba(184, 147, 63, 0.12);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.04);

  --header-bg: rgba(245, 245, 247, 0.75);
  --header-border: rgba(184, 147, 63, 0.15);

  --button-primary-text: #FFFFFF;
  --button-primary-bg: #B8933F;
  --button-secondary-bg: transparent;
  --button-border: rgba(184, 147, 63, 0.4);

  /* Code Blocks (light) */
  --code-inline-bg: rgba(0, 0, 0, 0.06);
  --code-inline-color: #8B6914;
  --code-inline-border: rgba(184, 147, 63, 0.2);
  --code-block-bg: #F0F0F3;
  --code-block-color: #1D1D1F;
  --tok-keyword: #2563eb;
  --tok-string: #059669;
  --tok-number: #dc2626;

  /* Arch Flow (light) */
  --arch-bg: rgba(240, 240, 243, 0.72);
  --arch-step-bg: rgba(255, 255, 255, 0.88);
  --arch-step-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --arch-flow-shadow: inset 0 0 40px rgba(0, 0, 0, 0.04), 0 0 24px rgba(184, 147, 63, 0.06);
  --arch-status-bar-bg: rgba(184, 147, 63, 0.08);
  --arch-status-bar-border: rgba(184, 147, 63, 0.12);
}


/* =========================================
   Theme Toggle Button
   ========================================= */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--gold-border);
  background: var(--glass);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all var(--transition-base);
  color: var(--text-muted);
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--gold-border-hover);
  color: var(--gold-light);
  background: var(--gold-soft);
}

/* =========================================
   Base
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Industrial console background — subtle grid instead of aurora */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(var(--gold-ghost) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-ghost) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 30% at 50% 0%, var(--gold-ghost) 0%, transparent 60%);
}

a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--gold-light); }

img { display: block; max-width: 100%; height: auto; }

::selection {
  background: var(--gold-selection);
  color: var(--text);
}

/* ── Focus visible — global accessibility ── */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.theme-toggle:focus-visible {
  outline-color: var(--gold-border-hover);
  box-shadow: 0 0 0 4px var(--gold-glow);
}

.button-link:focus-visible {
  outline-color: var(--gold-border-hover);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

code, pre { font-family: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace; }

/* Layout shells */
.shell, .shell--wide {
  width: min(100% - 48px, var(--shell-width));
  margin: 0 auto;
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  transition: var(--transition-base);
}

.site-header__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0;
}

.site-brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.site-nav a:hover {
  color: var(--gold-light);
  background: var(--gold-soft);
}

/* Page layout */
.page-home {
  background-color: var(--bg-deep);
  color: var(--text);
}

.landing-main {
  padding-top: 40px;
  padding-bottom: 80px;
}

.page-main {
  padding: 0 0 60px;
}

/* =========================================
   Markdown body (document pages)
   ========================================= */
.markdown-body {
  padding: clamp(32px, 4vw, 52px);
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: var(--blur-xs);
  -webkit-backdrop-filter: var(--blur-xs);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow);
  line-height: 1.9;
  font-size: 1.02rem;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  color: var(--text);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.markdown-body h1 { margin-top: 0; font-size: clamp(1.8rem, 2.4vw, 2.6rem); }
.markdown-body h2 { margin-top: 2.2em; padding-bottom: 0.5em; border-bottom: 1px solid var(--gold-border); font-size: 1.6rem; }
.markdown-body h3 { margin-top: 1.6em; font-size: 1.25rem; color: var(--text-soft); }

.markdown-body p, .markdown-body li, .markdown-body blockquote { color: var(--text-muted); }
.markdown-body ul, .markdown-body ol { padding-left: 1.3rem; }

.markdown-body blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--gold);
  background: var(--gold-ghost-strong);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.markdown-body a {
  color: var(--gold-light);
  border-bottom: 1px solid transparent;
  transition: var(--transition-fast);
}

.markdown-body a:hover { color: var(--gold-hover); border-bottom-color: var(--gold); }

.markdown-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.6rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-border);
  overflow: hidden;
  display: block;
  overflow-x: auto;
}

.markdown-body thead {
  background: linear-gradient(135deg, var(--gold-bg) 0%, var(--gold-ghost) 100%);
}

.markdown-body th, .markdown-body td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gold-border);
  text-align: left;
  font-size: 0.95rem;
}

.markdown-body th {
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.markdown-body tbody tr:last-child td { border-bottom: none; }
.markdown-body tbody tr:hover td { background: var(--gold-ghost); }

.markdown-body code {
  padding: 0.25em 0.6em;
  border-radius: var(--radius-xs);
  background: var(--code-inline-bg);
  color: var(--code-inline-color);
  font-size: 0.9em;
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;
  border: 1px solid var(--code-inline-border);
}

.markdown-body pre {
  position: relative;
  overflow-x: auto;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: var(--code-block-bg);
  border: 1px solid var(--gold-border);
  margin: 1.5rem 0;
}

.markdown-body pre::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), transparent);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: var(--code-block-color);
  border: none;
  font-size: 0.9rem;
  line-height: 1.7;
}

.markdown-body .tok-keyword { color: var(--tok-keyword); }
.markdown-body .tok-string { color: var(--tok-string); }
.markdown-body .tok-number { color: var(--tok-number); }

.markdown-body hr { border: 0; border-top: 1px solid var(--gold-border); margin: 2.5rem 0; }

/* Copy button */
.copy-button {
  position: absolute;
  top: 12px; right: 12px;
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}

.copy-button:hover { border-color: var(--gold); color: var(--gold-light); }
.copy-button.copied { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }

/* =========================================
   404 page
   ========================================= */
.page-not-found {
  text-align: center;
  padding: 80px 20px;
}

.page-not-found h1 {
  font-size: 5rem;
  color: var(--gold);
  margin: 0 0 8px;
  font-weight: 800;
}

.page-not-found h2 { margin: 0 0 16px; color: var(--text); }
.page-not-found p { color: var(--text-muted); }
.page-not-found__actions { margin-top: 28px; }
.page-not-found__meta { margin-top: 48px; font-size: 0.8125rem; color: var(--text-dim); }

/* =========================================
   Section index layout
   ========================================= */
.section-index-main { padding: 0 0 60px; }
.section-index-main .markdown-body { margin-top: 0; }

.section-index-hero {
  margin-bottom: 28px;
  padding: clamp(32px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: var(--blur-xs);
  -webkit-backdrop-filter: var(--blur-xs);
  color: var(--text);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow);
}

.section-index-hero .eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.section-index-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.08;
  color: var(--text);
}

.section-index-hero p {
  max-width: 900px;
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.section-index-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* =========================================
   Landing — Hero Section
   ========================================= */
.hero-section {
  width: 100%;
  margin: 0 0 32px;
  padding: clamp(40px, 5vw, 72px);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-xl);
  background: var(--glass);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  box-shadow: var(--shadow), var(--shadow-gold);
  overflow: hidden;
  position: relative;
}

/* Two-column hero layout */
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

/* Engineering panel accent — uniform top border */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  opacity: 0.45;
  z-index: 2;
  pointer-events: none;
}

.hero-section::after {
  content: "RUNTIME";
  position: absolute;
  top: 14px; right: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold-dark);
  opacity: 0.7;
  z-index: 2;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 8px;
  box-shadow: 0 0 6px var(--success-glow);
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-copy h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 500;
  color: var(--text-soft);
  margin: 8px 0 20px;
  letter-spacing: -0.01em;
  max-width: 620px;
}

.hero-tagline {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--text);
  margin-bottom: 14px;
  font-weight: 600;
}

/* Typewriter effect — engineering mono telemetry line */
.hero-typewriter {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 14px;
  min-height: 32px;
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  font-weight: 600;
  color: var(--gold-light);
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;
}

.typewriter-cursor {
  display: inline-block;
  color: var(--gold);
  font-weight: 300;
  animation: tw-cursor-blink 0.9s steps(1) infinite;
}

.typewriter-text {
  display: inline-block;
  min-width: 1ch;
}

@keyframes tw-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 24px;
  max-width: 680px;
}

/* =========================================
   Hero Visual — AI Core Effects
   Five industrial-AI motion scenes cycle every 60s with blur cross-fade.
   All scenes share a unified fx-viewport (300×300px) to guarantee
   visual size consistency. Max outer radius clamped to 130px.
   ========================================= */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 320px;
  height: 320px;
  min-height: 320px;
  margin: 0 auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* Scene container — blur cross-fade with scale normalization */
.fx-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.92);
  filter: blur(8px);
  transition: opacity var(--transition-scene),
            transform var(--transition-scene),
            filter var(--transition-scene);
  pointer-events: none;
  z-index: 1;
}

.fx-scene--active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0px);
  pointer-events: auto;
  z-index: 2;
}

/* Unified viewport — locks the canvas center and boundary */
.fx-viewport {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================
   Shared center logo — fixed 64×64, exact center
   ========================================= */
.fx-logo {
  position: absolute;
  z-index: 10;
  width: 64px; height: 64px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold-bright);
  animation: fx-logo-breathe 3s ease-in-out infinite;
}

.fx-logo::before,
.fx-logo::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--gold-border-hover);
  opacity: 0;
  pointer-events: none;
  animation: fx-logo-ripple 3s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}
.fx-logo::after { animation-delay: 1.5s; }

.fx-logo svg {
  position: relative;
  z-index: 2;
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 14px var(--gold-glow-strong));
}

.fx-logo-core {
  filter: drop-shadow(0 0 10px var(--gold-glow-strong));
}

.fx-logo-orbit {
  transform-origin: 32px 32px;
  animation: fx-logo-spin 10s linear infinite;
}

@keyframes fx-logo-breathe {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(200,167,91,0.5)); transform: translate(-50%, -50%) scale(1); }
  50% { filter: drop-shadow(0 0 22px rgba(200,167,91,0.95)); transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes fx-logo-ripple {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
}

@keyframes fx-logo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =========================================
   Generic node (pulsing dot) & tick mark
   ========================================= */
.fx-node {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--d); height: var(--d);
  margin: calc(-1 * var(--d) / 2) 0 0 calc(-1 * var(--d) / 2);
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 14px var(--gold-glow-strong), 0 0 28px var(--gold-glow);
  transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a)));
  animation: fx-node-pulse 2.4s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes fx-node-pulse {
  0%, 100% { opacity: 0.4; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))) scale(1); }
  50% { opacity: 1; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a))) scale(1.6); }
}

.fx-tick {
  position: absolute;
  top: 50%; left: 50%;
  width: 1px; height: var(--l);
  margin: calc(-1 * var(--l) / 2) 0 0 -0.5px;
  background: var(--gold-border);
  transform: rotate(var(--a)) translateY(calc(-1 * var(--r)));
  opacity: 0.35;
}

/* =========================================
   Scene containers — all anchored to 100% of viewport
   ========================================= */
.fx-core, .fx-lattice, .fx-radar, .fx-field, .fx-beacon,
.fx-nexus, .fx-pulse, .fx-matrix, .fx-orbit, .fx-beam, .fx-flux, .fx-swarm {
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Effect 1: Core reactor ── */
.fx-core__ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border-color: var(--gold-border);
  transform: translate(-50%, -50%);
}

.fx-core__ring--solid {
  width: 220px; height: 220px;
  border: 2.5px solid var(--gold-border-hover);
  animation: fx-core-spin 12s linear infinite;
  box-shadow: 0 0 50px var(--gold-glow-strong), inset 0 0 50px var(--gold-glow);
}

.fx-core__ring--dashed {
  width: 260px; height: 260px;
  border: 1.5px dashed var(--gold-border);
  opacity: 0.7;
  animation: fx-core-spin 18s linear infinite reverse;
}

.fx-core__ring--dotted {
  width: 300px; height: 300px;
  border: 1.5px dotted var(--gold-border);
  opacity: 0.55;
  animation: fx-core-spin 26s linear infinite;
}

.fx-core__ring--outer-ticks {
  width: 260px; height: 260px;
  border: none;
  animation: fx-core-spin 40s linear infinite;
}

.fx-core__nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-core__pulse-wave {
  position: absolute;
  top: 50%; left: 50%;
  width: 160px; height: 160px;
  margin: -80px 0 0 -80px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border-hover);
  opacity: 0;
  animation: fx-core-wave 3s ease-out infinite;
}

@keyframes fx-core-wave {
  0% { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(1.9); opacity: 0; }
}

@keyframes fx-core-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── Effect 2: Data lattice network ── */
.fx-lattice__svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: visible;
  z-index: 1;
}

.fx-lattice__guide {
  fill: none;
  stroke: var(--gold-border);
  stroke-width: 0.5;
  opacity: 0.1;
  stroke-dasharray: 2 4;
}

.fx-lattice__link {
  stroke: var(--gold-border);
  stroke-width: 1;
  opacity: 0.28;
  fill: none;
}

.fx-lattice__link--flow {
  stroke: var(--gold-border-hover);
  stroke-width: 1.2;
  stroke-dasharray: 4 6;
  opacity: 0.45;
  animation: fx-lattice-dash 3s linear infinite;
}

@keyframes fx-lattice-dash {
  to { stroke-dashoffset: -10; }
}

.fx-lattice__node {
  fill: var(--gold-bright);
  filter: drop-shadow(0 0 6px var(--gold-glow));
  animation: fx-lattice-node-pulse 3s ease-in-out infinite;
  animation-delay: var(--delay);
}

.fx-lattice__node--r2 { animation-duration: 3.5s; }

@keyframes fx-lattice-node-pulse {
  0%, 100% { opacity: 0.55; filter: drop-shadow(0 0 4px var(--gold-glow)); }
  50% { opacity: 1; filter: drop-shadow(0 0 10px var(--gold-glow-strong)); }
}

.fx-lattice__pulses {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.fx-lattice__pulse {
  position: absolute;
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 12px var(--gold-glow-strong), 0 0 24px var(--gold-glow);
  offset-distance: 0%;
  offset-rotate: 0deg;
  animation: fx-lattice-flow 3.5s linear infinite;
  animation-delay: var(--delay);
}

@keyframes fx-lattice-flow {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

.fx-lattice__scan {
  position: absolute;
  top: 50%; left: 50%;
  width: 260px; height: 260px;
  margin: -130px 0 0 -130px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--gold-glow) 25deg, transparent 50deg);
  opacity: 0.25;
  animation: fx-lattice-scan 8s linear infinite;
  pointer-events: none;
}

@keyframes fx-lattice-scan {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fx-lattice__boundary {
  position: absolute;
  top: 50%; left: 50%;
  width: 260px; height: 260px;
  margin: -130px 0 0 -130px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border);
  opacity: 0.2;
  pointer-events: none;
}

/* ── Effect 3: Radar sweep ── */
.fx-radar__outer-ring {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border-hover);
  box-shadow: 0 0 16px var(--gold-glow), inset 0 0 16px var(--gold-glow);
}

.fx-radar__rings {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  pointer-events: none;
}

.fx-radar__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--gold-border);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.fx-radar__ring.r1 { width: 85px; height: 85px; opacity: 0.5; }
.fx-radar__ring.r2 { width: 170px; height: 170px; opacity: 0.4; }
.fx-radar__ring.r3 { width: 260px; height: 260px; border-style: solid; opacity: 0.2; }

.fx-radar__crosshair {
  position: absolute;
  width: 260px; height: 260px;
  pointer-events: none;
}
.fx-radar__crosshair::before,
.fx-radar__crosshair::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  background: var(--gold-border);
  opacity: 0.4;
}
.fx-radar__crosshair::before {
  width: 100%; height: 1px;
  transform: translate(-50%, -50%);
}
.fx-radar__crosshair::after {
  width: 1px; height: 100%;
  transform: translate(-50%, -50%);
}

.fx-radar__degrees {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-radar__sweep-arm {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  animation: fx-radar-sweep 4s linear infinite;
}

.fx-radar__sweep-sector {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(200,167,91,0.05) 30deg, rgba(200,167,91,0.35) 60deg, transparent 61deg);
}

@keyframes fx-radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.fx-radar__blip-wrapper {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  transform: rotate(var(--a)) translateX(var(--r));
  opacity: 0;
  animation: fx-radar-blip 3s ease-in-out infinite;
  animation-delay: var(--delay);
}

.fx-radar__blip {
  position: absolute;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 12px var(--gold-glow-strong);
}

.fx-radar__target-box {
  position: absolute;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 1px solid var(--gold-bright);
  animation: fx-target-pulse 1s ease-in-out infinite;
}

@keyframes fx-target-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 1; }
}

@keyframes fx-radar-blip {
  0%, 100% { opacity: 0; }
  20% { opacity: 1; }
  40% { opacity: 0; }
}

/* ── Effect 4: Vector Field ── */
.fx-field__boundary {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border);
  box-shadow: inset 0 0 18px var(--gold-glow);
}

.fx-field__polar-grid {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 35%, var(--gold-ghost) 36%, transparent 37%),
    radial-gradient(circle at center, transparent 65%, var(--gold-ghost) 66%, transparent 67%);
  pointer-events: none;
}

.fx-field__cross-axis {
  position: absolute;
  width: 260px; height: 260px;
  pointer-events: none;
}
.fx-field__cross-axis::before,
.fx-field__cross-axis::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  background: var(--gold-border);
  opacity: 0.3;
}
.fx-field__cross-axis::before {
  width: 100%; height: 1px;
  transform: translate(-50%, -50%);
}
.fx-field__cross-axis::after {
  width: 1px; height: 100%;
  transform: translate(-50%, -50%);
}

.fx-field__reticle {
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid var(--gold-bright);
  opacity: 0.8;
}
.fx-field__reticle--tl { top: 22px; left: 22px; border-right: none; border-bottom: none; }
.fx-field__reticle--tr { top: 22px; right: 22px; border-left: none; border-bottom: none; }
.fx-field__reticle--bl { bottom: 22px; left: 22px; border-right: none; border-top: none; }
.fx-field__reticle--br { bottom: 22px; right: 22px; border-left: none; border-top: none; }

.fx-field__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-field__stream-line {
  position: absolute;
  top: 50%; left: 50%;
  width: 260px; height: 1px;
  margin-top: -0.5px;
  margin-left: -130px;
  transform: rotate(var(--a));
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}

.fx-field__stream-packet {
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 2px;
  margin-top: -1px;
  margin-left: -6px;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-glow-strong);
  animation: fx-field-packet-flow 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: var(--delay);
  transform: rotate(var(--a)) translateX(0);
}

@keyframes fx-field-packet-flow {
  0% { transform: rotate(var(--a)) translateX(30px) scaleX(0.5); opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(120px) scaleX(1.5); opacity: 0; }
}

/* ── Effect 5: Beacon ── */
.fx-beacon__boundary {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  opacity: 0.25;
}

.fx-beacon__cone {
  position: absolute;
  bottom: 50%; left: 50%;
  width: 140px; height: 130px;
  margin-left: -70px;
  background: linear-gradient(0deg, rgba(200,167,91,0.35), transparent);
  clip-path: polygon(50% 100%, 10% 0%, 90% 0%);
  animation: fx-beacon-cone 2.5s ease-in-out infinite;
}

@keyframes fx-beacon-cone {
  0%, 100% { opacity: 0.4; transform: scaleX(0.85); }
  50% { opacity: 0.85; transform: scaleX(1.1); }
}

.fx-beacon__ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border-hover);
  opacity: 0;
  animation: fx-beacon-ring 2.8s ease-out infinite;
  animation-delay: var(--delay);
}

@keyframes fx-beacon-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(6.5); opacity: 0; }
}

/* ── Effect 6: Nexus ── */
.fx-nexus__boundary {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border);
  box-shadow: inset 0 0 16px var(--gold-glow);
}

.fx-nexus__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-nexus__svg {
  position: absolute;
  width: 300px; height: 300px;
  top: 0; left: 0;
  pointer-events: none;
}

.fx-nexus__synapse {
  stroke: var(--gold-border);
  stroke-width: 1;
  opacity: 0.22;
  stroke-dasharray: 2 3;
}

.fx-nexus__synapse--active {
  stroke: var(--gold-border-hover);
  stroke-width: 1.2;
  opacity: 0.55;
  stroke-dasharray: 4 6;
  animation: fx-synapse-dash 2.5s linear infinite;
}

@keyframes fx-synapse-dash {
  to { stroke-dashoffset: -20; }
}

.fx-nexus__node-halo {
  fill: none;
  stroke: var(--gold-bright);
  stroke-width: 1;
  opacity: 0;
  animation: fx-node-halo 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
  animation-delay: var(--delay);
}

@keyframes fx-node-halo {
  0% { r: 2px; opacity: 0.8; }
  100% { r: 6px; opacity: 0; }
}

.fx-nexus__node-core {
  fill: var(--gold-bright);
  filter: drop-shadow(0 0 4px var(--gold-glow-strong));
  transform-box: fill-box;
  transform-origin: center;
  animation: fx-node-fire 2.2s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

@keyframes fx-node-fire {
  0% { opacity: 0.3; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 6px var(--gold-hover)); }
}

.fx-nexus__svg-impulse {
  fill: var(--gold-bright);
  filter: drop-shadow(0 0 6px var(--gold-glow-strong));
  offset-distance: 0%;
  animation: fx-impulse-travel var(--dur) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: var(--delay);
}

@keyframes fx-impulse-travel {
  0% { offset-distance: 0%; opacity: 0; transform: scale(0.5); }
  15% { opacity: 1; transform: scale(1); }
  85% { opacity: 1; transform: scale(1); }
  100% { offset-distance: 100%; opacity: 0; transform: scale(0.5); }
}

/* ── Effect 7: Pulse ── */
.fx-pulse__boundary {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border);
  box-shadow: 0 0 12px var(--gold-glow);
}

.fx-pulse__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-pulse__wave {
  position: absolute;
  top: 50%; left: 50%;
  width: 60px; height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border-hover);
  opacity: 0;
  animation: fx-pulse-expand 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
  animation-delay: var(--delay);
}

@keyframes fx-pulse-expand {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(4.3); opacity: 0; }
}

/* ── Effect 8: Matrix ── */
.fx-matrix__frame {
  position: absolute;
  width: 260px; height: 260px;
  border: 1px solid var(--gold-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fx-matrix__grid {
  width: 180px; height: 180px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 12px;
}

.fx-matrix__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  opacity: 0.2;
  margin: auto;
  transition: opacity 0.3s, transform 0.3s;
  animation: fx-matrix-blink 2.5s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes fx-matrix-blink {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.4); box-shadow: 0 0 8px var(--gold-glow-strong); }
}

.fx-matrix__scanbar {
  position: absolute;
  width: 220px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 10px var(--gold-glow-strong);
  animation: fx-matrix-scan 3s ease-in-out infinite alternate;
}

@keyframes fx-matrix-scan {
  0% { transform: translateY(-90px); opacity: 0.2; }
  50% { opacity: 1; }
  100% { transform: translateY(90px); opacity: 0.2; }
}

/* ── Effect 9: Orbit Matrix ── */
.fx-orbit__boundary {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border);
  box-shadow: inset 0 0 20px var(--gold-glow);
}

.fx-orbit__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-orbit__ring-3d {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--w); height: var(--h);
  margin: calc(-1 * var(--h) / 2) 0 0 calc(-1 * var(--w) / 2);
  border-radius: 50%;
  border: 1.2px solid var(--gold-border-hover);
  transform: rotate(var(--rot)) rotateX(65deg);
  animation: fx-orbit-spin var(--dur) linear infinite var(--dir);
}

@keyframes fx-orbit-spin {
  from { transform: rotate(var(--rot)) rotateX(65deg) rotateZ(0deg); }
  to { transform: rotate(var(--rot)) rotateX(65deg) rotateZ(360deg); }
}

.fx-orbit__satellite {
  position: absolute;
  top: 0; left: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-glow-strong);
}

/* ── Effect 10: Data Beam ── */
.fx-beam__boundary {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1px dashed var(--gold-border);
  opacity: 0.35;
}

.fx-beam__axis {
  position: absolute;
  top: 50%; left: 50%;
  width: 260px; height: 2px;
  margin: -1px 0 0 -130px;
  background: linear-gradient(90deg, transparent, var(--gold-border), var(--gold-bright), var(--gold-border), transparent);
  transform: rotate(var(--a));
  opacity: 0.6;
}

.fx-beam__pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 14px var(--gold-glow-strong);
  animation: fx-beam-shoot 2.2s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
  animation-delay: var(--delay);
  transform: rotate(var(--a)) translateX(0);
}

@keyframes fx-beam-shoot {
  0% { transform: rotate(var(--a)) translateX(0) scale(0.5); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(130px) scale(1.2); opacity: 0; }
}

.fx-beam__receiver {
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border: 1.5px solid var(--gold-bright);
  transform: rotate(var(--a)) translateX(130px) rotate(45deg);
  box-shadow: 0 0 8px var(--gold-glow);
}

/* ── Effect 11: Flux Field ── */
.fx-flux__boundary {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-border);
  box-shadow: inset 0 0 15px var(--gold-glow);
}

.fx-flux__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-flux__svg {
  position: absolute;
  width: 300px; height: 300px;
  top: 0; left: 0;
  pointer-events: none;
}

.fx-flux__arc-cw {
  fill: none;
  stroke: var(--gold-border-hover);
  stroke-width: 1.5;
  stroke-dasharray: 60 120;
  transform-origin: 150px 150px;
  animation: fx-spin-cw 8s linear infinite;
}

.fx-flux__arc-ccw {
  fill: none;
  stroke: var(--gold-bright);
  stroke-width: 1.2;
  stroke-dasharray: 40 100;
  stroke-opacity: 0.7;
  transform-origin: 150px 150px;
  animation: fx-spin-ccw 11s linear infinite;
}

@keyframes fx-spin-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fx-spin-ccw {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.fx-flux__spark {
  fill: var(--gold-bright);
  filter: drop-shadow(0 0 6px var(--gold-glow-strong));
  animation: fx-spark-twinkle 1.8s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

@keyframes fx-spark-twinkle {
  0% { opacity: 0.2; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.4); }
}

/* ── Effect 12: Quantum Swarm V2 ── */
.fx-swarm__boundary {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1px dashed var(--gold-border);
  opacity: 0.3;
}

.fx-swarm__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-swarm__svg {
  position: absolute;
  width: 300px; height: 300px;
  top: 0; left: 0;
  pointer-events: none;
}

.fx-swarm__hive-core {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  margin: -40px 0 0 -40px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow-strong) 0%, rgba(200, 167, 91, 0.05) 60%, transparent 80%);
  animation: fx-hive-pulse 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes fx-hive-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.65; }
  50% { transform: scale(1.15); opacity: 1; }
}

.fx-swarm__orbit-guide {
  fill: none;
  stroke: var(--gold-border);
  stroke-width: 0.6;
  stroke-dasharray: 2 6;
  opacity: 0.2;
}

.fx-swarm__bee--guard {
  fill: #FFFFFF;
  filter: drop-shadow(0 0 6px var(--gold-bright));
  offset-distance: 0%;
  animation: fx-bee-guard-flight var(--dur) linear infinite;
  animation-delay: var(--delay);
}

@keyframes fx-bee-guard-flight {
  0% { offset-distance: 0%; opacity: 0.5; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2) translate(var(--jx, 1px), var(--jy, -1px)); }
  100% { offset-distance: 100%; opacity: 0.5; transform: scale(0.8); }
}

.fx-swarm__bee--patrol {
  fill: var(--gold-bright);
  filter: drop-shadow(0 0 5px var(--gold-glow-strong));
  offset-distance: 0%;
  animation: fx-bee-patrol-flight var(--dur) cubic-bezier(0.37, 0, 0.63, 1) infinite;
  animation-delay: var(--delay);
}

@keyframes fx-bee-patrol-flight {
  0% { offset-distance: 0%; opacity: 0.3; transform: scale(0.7); }
  25% { opacity: 0.9; transform: scale(1.1) translate(var(--jx, 2px), var(--jy, -2px)); }
  60% { opacity: 0.95; transform: scale(1) translate(calc(-1 * var(--jx, 2px)), var(--jy, 2px)); }
  100% { offset-distance: 100%; opacity: 0.3; transform: scale(0.7); }
}

.fx-swarm__bee--forager {
  fill: var(--gold-light);
  filter: drop-shadow(0 0 7px var(--gold-glow-strong));
  offset-distance: 0%;
  animation: fx-bee-forager-life var(--dur) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: var(--delay);
}

@keyframes fx-bee-forager-life {
  0% { offset-distance: 0%; opacity: 0.1; transform: scale(0.4) translate(0, 0); }
  30% { opacity: 0.9; transform: scale(1.2) translate(var(--jx, 3px), var(--jy, -3px)); }
  50% { opacity: 1; transform: scale(1.1) translate(calc(-1 * var(--jx, 3px)), calc(-1 * var(--jy, 3px))); }
  75% {
    opacity: 1;
    transform: scale(0.5) translate(var(--cx, 0px), var(--cy, 0px));
    filter: drop-shadow(0 0 12px #FFFFFF);
  }
  100% { offset-distance: 100%; opacity: 0.1; transform: scale(0.4) translate(0, 0); }
}

/* =========================================
   Hero values + actions
   ========================================= */

.hero-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.value-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(200, 167, 91, 0.05);
  border: 1px solid rgba(200, 167, 91, 0.15);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
}

.value-tag::before {
  content: "·";
  color: var(--gold);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================================
   Buttons — engineering controls
   ========================================= */
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: all var(--transition-base);
  cursor: pointer;
}

.button-link--primary {
  color: var(--button-primary-text);
  background: var(--button-primary-bg);
  border: 1px solid var(--button-primary-bg);
}

.button-link--primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--button-primary-text);
}

.button-link--secondary {
  color: var(--text-soft);
  border-color: var(--button-border);
  background: var(--button-secondary-bg);
}

.button-link--secondary:hover {
  border-color: var(--gold-border-hover);
  background: var(--gold-bg);
  color: var(--gold-light);
}

/* =========================================
   Landing Sections
   ========================================= */
.landing-section {
  margin-bottom: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: var(--blur-xs);
  -webkit-backdrop-filter: var(--blur-xs);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow);
}

/* Section heading */
.section-heading {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gold-line);
}

.section-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Section body text */
.section-body {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* =========================================
   Grid Systems
   ========================================= */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.grid-2 > .landing-section {
  margin-bottom: 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cards-grid--four { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.cards-grid--two { grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* =========================================
   Feature Cards — Capability style
   ========================================= */
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: var(--blur-xs);
  -webkit-backdrop-filter: var(--blur-xs);
  border: 1px solid var(--gold-border);
  background-image:
    linear-gradient(var(--gold-ghost-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-ghost-strong) 1px, transparent 1px);
  background-size: 12px 12px;
  background-position: center;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 8px; left: 8px;
  width: 16px; height: 16px;
  border-top: 2px solid var(--gold-light);
  border-left: 2px solid var(--gold-light);
}

.feature-card::after {
  content: "";
  position: absolute;
  bottom: 8px; right: 8px;
  width: 16px; height: 16px;
  border-bottom: 2px solid var(--gold-light);
  border-right: 2px solid var(--gold-light);
  opacity: 0.5;
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: var(--gold-border-hover);
  box-shadow: var(--shadow-gold-lg);
  transform: translateY(-4px);
}

.feature-card:hover::after {
  opacity: 1;
  width: 22px; height: 22px;
  box-shadow: 3px 3px 8px var(--gold-border);
}

.feature-card__tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold-light);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.92rem;
  flex: 1;
}

.feature-card--capability {
  padding: 28px;
  background: var(--glass);
  backdrop-filter: var(--blur-xs);
  -webkit-backdrop-filter: var(--blur-xs);
  border: 1px solid var(--gold-border);
  background-image:
    linear-gradient(var(--gold-ghost-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-ghost-strong) 1px, transparent 1px);
  background-size: 12px 12px;
  background-position: center;
}

.feature-card--capability::before {
  content: "";
  position: absolute;
  top: 8px; left: 8px;
  width: 16px; height: 16px;
  border-top: 2px solid var(--gold-light);
  border-left: 2px solid var(--gold-light);
}

.feature-card--capability::after {
  content: "";
  position: absolute;
  bottom: 8px; right: 8px;
  width: 16px; height: 16px;
  border-bottom: 2px solid var(--gold-light);
  border-right: 2px solid var(--gold-light);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.feature-card--capability:hover {
  border-color: var(--gold-border-hover);
  box-shadow: var(--shadow-gold-lg);
  transform: translateY(-4px);
}

.feature-card--capability:hover::after {
  opacity: 1;
  width: 22px; height: 22px;
  box-shadow: 3px 3px 8px var(--gold-border);
}

.feature-card--capability h3 {
  font-size: 1.15rem;
  color: var(--text);
}

.feature-card--capability p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.feature-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: auto;
  padding-top: 4px;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.mini-link:hover { color: var(--gold-hover); }

/* =========================================
   Architecture Flow — Industrial Pipeline
   ========================================= */
.arch-flow {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: stretch;
  gap: 0;
  width: 100%;
  padding: 28px 22px;
  border-radius: var(--radius-md);
  background: var(--arch-bg);
  border: 1px solid var(--gold-border);
  box-shadow: var(--arch-flow-shadow);
  overflow: hidden;
  font-family: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;
}

/* Top status bar */
.arch-flow::before {
  content: "PIPELINE STATUS: ONLINE";
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 5px 14px;
  background: var(--arch-status-bar-bg);
  border-bottom: 1px solid var(--arch-status-bar-border);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  z-index: 3;
}

.arch-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.arch-flow .arch-step,
.arch-flow .arch-arrow {
  position: relative;
  z-index: 2;
}

.arch-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 14px;
  margin-top: 14px;
  background: var(--arch-step-bg);
  border: 1px solid var(--gold-border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  box-shadow: var(--arch-step-shadow);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.arch-step:hover {
  border-color: var(--gold-border-hover);
  box-shadow: 0 4px 18px var(--gold-glow), var(--arch-step-shadow);
}

.arch-step__num {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
}

.arch-step__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}

.arch-step__proto {
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.arch-step__status {
  position: absolute;
  top: 8px; right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 5px var(--success-glow);
}

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 16px;
  height: 28px;
  margin-top: 14px;
  color: var(--gold-dark);
  font-weight: bold;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.arch-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* =========================================
   Design Principles
   ========================================= */
.principles-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.principle-item {
  padding: 14px 18px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  background: var(--gold-ghost-strong);
  border: 1px solid var(--gold-line);
  border-left: 3px solid var(--gold);
  font-size: 0.92rem;
  color: var(--text-soft);
  font-weight: 500;
  transition: var(--transition-fast);
}

.principle-item:last-child { margin-bottom: 0; }

.principle-item:hover {
  border-color: var(--gold-border);
  background: var(--gold-bg-strong);
}

/* =========================================
   Project Overview Table
   ========================================= */
.overview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-border);
  overflow: hidden;
  font-size: 0.93rem;
}

.overview-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--gold-line);
  color: var(--text-muted);
}

.overview-table tr:last-child td { border-bottom: none; }
.overview-table tr:nth-child(even) td { background: var(--gold-ghost); }
.overview-table tr:hover td { background: var(--gold-ghost-strong); }

.overview-table .overview-label {
  width: 140px;
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* =========================================
   Roadmap & Tables
   ========================================= */
.roadmap-intro {
  margin-bottom: 24px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--gold-ghost-strong);
  border: 1px solid var(--gold-line);
  border-left: 3px solid var(--gold);
}

.roadmap-intro h4 {
  color: var(--text);
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.roadmap-intro p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.priority-label { font-weight: 600; }
.priority-label--high { color: #fca5a5; }
.priority-label--medium { color: #fcd34d; }
.priority-label--planned { color: #7dd3fc; }

.quarter-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 14px;
}

.quarter-header h3 {
  color: var(--text);
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.quarter-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.quarter-badge--active {
  background: rgba(200, 167, 91, 0.15);
  color: var(--gold-light);
  border: 1px solid var(--gold-border);
}

.quarter-badge--planned {
  background: var(--gold-bg);
  color: var(--gold-dark);
  border: 1px solid var(--gold-line);
}

.roadmap-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  margin-bottom: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gold-border);
  overflow: hidden;
}

.roadmap-table th {
  background: linear-gradient(135deg, var(--gold-bg), var(--gold-ghost));
  color: var(--gold-light);
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold-border);
}

.roadmap-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--gold-line);
  color: var(--text-muted);
}

.roadmap-table tr:last-child td { border-bottom: none; }
.roadmap-table tr td:first-child { color: var(--text); font-weight: 600; }
.roadmap-table tr:nth-child(even) td { background: var(--gold-ghost); }
.roadmap-table tr:hover td { background: var(--gold-ghost-strong); }

/* Badge system */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-high { background: var(--error-bg); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.badge-med { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-progress { background: rgba(200, 167, 91, 0.15); color: var(--gold-light); border: 1px solid var(--gold-border); }
.badge-research { background: rgba(96, 165, 250, 0.15); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.35); }
.badge-pending { background: rgba(119, 119, 119, 0.15); color: var(--text-dim); border: 1px solid rgba(119, 119, 119, 0.35); }

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.status-badge--done { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.status-badge--progress { background: var(--gold-soft); color: var(--gold-light); border: 1px solid var(--gold-border); }
.status-badge--research { background: var(--tip-bg); color: var(--tip); border: 1px solid var(--tip-border); }
.status-badge--pending { background: rgba(119, 119, 119, 0.12); color: var(--text-dim); border: 1px solid rgba(119, 119, 119, 0.3); }

.priority-badge { display: inline; font-size: inherit; font-weight: 700; padding: 0; border-radius: 0; background: none; }
.priority-badge--high { color: #fca5a5; }
.priority-badge--medium { color: #fcd34d; }
.priority-badge--low { color: var(--text-dim); }

/* Milestone grid */
.milestone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 20px;
}

.milestone-item {
  background: var(--gold-ghost);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
}

.milestone-item:hover {
  border-color: var(--gold-border);
  background: var(--gold-bg);
}

.milestone-item--new {
  background: var(--gold-bg);
  border-color: var(--gold-border);
}

.milestone-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-dim);
}

.milestone-dot--new {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(200, 167, 91, 0.5);
}

.milestone-title {
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
}

.milestone-date {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 2px;
}

.milestone-item--new .milestone-date { color: var(--gold-light); }

.roadmap-footer {
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid var(--gold-line);
}

.roadmap-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.roadmap-footer a { color: var(--gold-light); font-weight: 500; }
.roadmap-footer a:hover { color: var(--gold-hover); }

/* =========================================
   Doc Zones
   ========================================= */
.doc-zones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.doc-zones--wide {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.doc-zone {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--gold-ghost);
  border: 1px solid var(--gold-line);
  transition: var(--transition-fast);
}

.doc-zone:hover {
  border-color: var(--gold-border);
  background: var(--gold-bg);
}

.doc-zone h3 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-line);
  font-size: 0.88rem;
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.doc-zone ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-zone li {
  margin-bottom: 7px;
  font-size: 0.88rem;
}

.doc-zone a {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.doc-zone a:hover { color: var(--gold-light); }

/* =========================================
   Quick Links
   ========================================= */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--gold-ghost-strong);
  border: 1px solid var(--gold-line);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.quick-links a:hover {
  border-color: var(--gold-border);
  background: var(--gold-soft);
  color: var(--gold-light);
}

/* =========================================
   Site Tagline & Footnotes
   ========================================= */
.landing-section--footnotes {
  padding-top: 0;
  padding-bottom: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 0;
}

.footnotes {
  border-top: 1px solid var(--gold-line);
  padding-top: 16px;
}

.footnotes p {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.2;
  margin: 0;
}

.footnotes a { color: var(--gold-light); }
.footnotes a:hover { color: var(--gold-hover); }

/* =========================================
   Alerts
   ========================================= */
.alert {
  margin: 1.5rem 0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 0.95rem;
  line-height: 1.7;
}

.alert--success { background: rgba(74, 222, 128, 0.06); border-color: rgba(74, 222, 128, 0.25); color: #86efac; }
.alert--warning { background: var(--gold-bg); border-color: var(--gold-border); color: var(--gold-bright); }
.alert--error { background: var(--error-soft); border-color: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.alert--tip { background: var(--tip-soft); border-color: rgba(96, 165, 250, 0.25); color: #93c5fd; }

/* =========================================
   Footer
   ========================================= */
.site-footer {
  width: min(calc(100% - 48px), var(--shell-width));
  margin: 60px auto 0;
  padding: 32px 0;
  border-top: 1px solid var(--gold-border);
}

.site-footer__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer__row a { color: var(--text-muted); transition: var(--transition-fast); }
.site-footer__row a:hover { color: var(--gold-light); }

.site-footer__brand { font-weight: 800; color: var(--text); letter-spacing: 0.04em; font-size: 0.9rem; }
.site-footer__tagline { color: var(--text-dim); font-size: 0.9rem; }
.site-footer__divider { color: var(--gold-dark); opacity: 0.35; user-select: none; font-size: 0.9rem; }
.site-footer__copy { color: var(--text-dim); font-size: 0.9rem; }

/* =========================================
   Scrollbar
   ========================================= */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-elevated); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1180px) {
  .grid-2, .grid-3, .cards-grid, .cards-grid--two {
    grid-template-columns: repeat(2, 1fr);
  }
  .doc-zones--wide { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .shell, .shell--wide {
    width: min(100% - 24px, 100%);
  }

  .site-header__topbar {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 14px 0;
    gap: 10px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 4px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav a {
    padding: 6px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .hero-section {
    margin-top: 0;
    padding: 28px 22px;
    border-radius: var(--radius-lg);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-visual {
    width: 240px;
    height: 240px;
    min-height: 240px;
  }

  .fx-viewport { width: 225px; height: 225px; }

  .fx-logo { width: 48px; height: 48px; }

  .fx-core__ring--solid { width: 165px; height: 165px; }
  .fx-core__ring--dashed { width: 195px; height: 195px; }
  .fx-core__ring--dotted { width: 225px; height: 225px; }
  .fx-core__ring--outer-ticks { width: 195px; height: 195px; }
  .fx-core__nodes .fx-node { --r: 98px !important; --d: 4px !important; }
  .fx-core__pulse-wave { width: 120px; height: 120px; margin: -60px 0 0 -60px; }

  .fx-lattice__scan { width: 195px; height: 195px; margin: -97px 0 0 -97px; }
  .fx-lattice__boundary { width: 195px; height: 195px; margin: -97px 0 0 -97px; }
  .fx-lattice__pulse { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }

  .fx-radar__outer-ring { width: 195px; height: 195px; }
  .fx-radar__rings { width: 195px; height: 195px; }
  .fx-radar__ring.r1 { width: 62px; height: 62px; }
  .fx-radar__ring.r2 { width: 124px; height: 124px; }
  .fx-radar__ring.r3 { width: 185px; height: 185px; }
  .fx-radar__crosshair { width: 195px; height: 195px; }
  .fx-radar__sweep-arm { width: 195px; height: 195px; }

  .fx-field__boundary,
  .fx-field__polar-grid,
  .fx-field__cross-axis { width: 195px; height: 195px; }
  .fx-field__stream-line { width: 195px; margin-left: -97.5px; }
  .fx-field__reticle { width: 10px; height: 10px; }
  .fx-field__reticle--tl { top: 16px; left: 16px; }
  .fx-field__reticle--tr { top: 16px; right: 16px; }
  .fx-field__reticle--bl { bottom: 16px; left: 16px; }
  .fx-field__reticle--br { bottom: 16px; right: 16px; }

  .fx-beacon__boundary { width: 195px; height: 195px; }
  .fx-beacon__cone { width: 105px; height: 98px; margin-left: -52.5px; }
  .fx-beacon__ring { width: 30px; height: 30px; margin: -15px 0 0 -15px; }

  .fx-nexus__boundary,
  .fx-pulse__boundary,
  .fx-orbit__boundary,
  .fx-beam__boundary,
  .fx-flux__boundary,
  .fx-swarm__boundary { width: 195px; height: 195px; }
  .fx-matrix__frame { width: 195px; height: 195px; }
  .fx-matrix__grid { width: 135px; height: 135px; gap: 8px; }
  .fx-matrix__dot { width: 4px; height: 4px; }
  .fx-matrix__scanbar { width: 165px; }
  .fx-nexus__svg,
  .fx-flux__svg,
  .fx-swarm__svg { width: 225px; height: 225px; }
  .fx-swarm__hive-core { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .fx-beam__axis { width: 195px; margin: -1px 0 0 -97.5px; }

  .hero-copy h1 { font-size: 2.2rem; }
  .hero-copy h2 { font-size: 1.15rem; }

  .grid-2, .grid-3, .cards-grid, .cards-grid--two, .cards-grid--four,
  .doc-zones, .doc-zones--wide {
    grid-template-columns: 1fr;
  }

  .landing-section { padding: 22px 18px; margin-bottom: 16px; }
  .markdown-body { padding: 24px 20px; border-radius: var(--radius-md); }
  .feature-card { padding: 22px; border-radius: var(--radius-md); }
  .roadmap-table { display: block; overflow-x: auto; }
  .arch-flow {
    gap: 6px;
    padding: 14px;
    flex-wrap: wrap;
    justify-content: stretch;
    overflow: hidden;
  }
  .arch-step {
    flex: 1 1 calc(33.333% - 16px);
    min-width: 96px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .arch-arrow { width: 16px; }
  .overview-table .overview-label { width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .feature-card:hover, .feature-card--capability:hover,
  .button-link--primary:hover, .button-link--secondary:hover,
  .milestone-item:hover, .doc-zone:hover { transform: none !important; }

  .fx-logo,
  .fx-logo svg,
  .fx-logo::before,
  .fx-logo::after,
  .fx-logo-orbit,
  .fx-core__ring,
  .fx-node,
  .fx-lattice__node,
  .fx-lattice__link--flow,
  .fx-lattice__pulse,
  .fx-lattice__scan,
  .fx-radar__sweep-arm,
  .fx-radar__blip,
  .fx-radar__blip-wrapper,
  .fx-radar__target-box,
  .fx-field__stream-packet,
  .fx-beacon__cone,
  .fx-beacon__ring,
  .fx-nexus__synapse--active,
  .fx-nexus__node-halo,
  .fx-nexus__node-core,
  .fx-nexus__svg-impulse,
  .fx-pulse__wave,
  .fx-matrix__dot,
  .fx-matrix__scanbar,
  .fx-orbit__ring-3d,
  .fx-beam__pulse,
  .fx-flux__arc-cw,
  .fx-flux__arc-ccw,
  .fx-flux__spark,
  .fx-swarm__hive-core,
  .fx-swarm__bee--guard,
  .fx-swarm__bee--patrol,
  .fx-swarm__bee--forager,
  .fx-core__pulse-wave { animation: none !important; }

  .fx-scene {
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.92);
    transition: none;
  }

  .fx-scene--active {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}