/* ==========================================================================
   CYCLEPACK VFS ENGINE — DESIGN SYSTEM & STYLESHEET
   Obsidian Dark Engine Design System | v0.9.0 Production (Commercial SDK)
   ========================================================================== */

/* Used by whitepaper.html only; the landing page has css/landing.css. No @import of web
   fonts here: it made every page that loads this file fetch from a third party, serially,
   before first paint. A page that wants Inter / JetBrains Mono / Outfit links them itself,
   and the stacks below fall back to system fonts when it does not. */

:root {
  /* Core Theme: Obsidian Dark Engine */
  --bg-base: #090D16;
  --bg-deep: #050811;
  --bg-surface: #0E1626;
  --bg-surface-glass: rgba(14, 22, 38, 0.75);
  --bg-surface-hover: rgba(22, 34, 58, 0.9);
  --bg-card: rgba(15, 23, 42, 0.7);
  --bg-card-hover: rgba(20, 32, 56, 0.9);

  /* Accents & Brand Colors */
  --accent-cyan: #00F0FF;
  --accent-cyan-glow: rgba(0, 240, 255, 0.35);
  --accent-cyan-dim: rgba(0, 240, 255, 0.12);
  --accent-violet: #7928CA;
  --accent-violet-glow: rgba(121, 40, 202, 0.35);
  --accent-purple-light: #A855F7;
  --accent-rust: #F74C00;
  --accent-rust-glow: rgba(247, 76, 0, 0.35);
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;

  /* Typography Colors */
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --text-dark: #090D16;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(30, 41, 59, 0.85);
  --border-highlight: rgba(0, 240, 255, 0.4);
  --border-glow-violet: rgba(121, 40, 202, 0.4);

  /* Typography Stacks */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, monospace;

  /* Layout & Transitions */
  --container-max: 1240px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

::selection {
  background: var(--accent-cyan);
  color: var(--bg-base);
}

/* ==========================================================================
   Ambient Glow Backdrops & Precision Grid Pattern
   ========================================================================== */
.ambient-mesh {
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 40%, rgba(121, 40, 202, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(247, 76, 0, 0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: -2;
}

.ambient-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 90%);
  pointer-events: none;
  z-index: -1;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 20%, #A5F3FC 55%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-gradient-violet {
  background: linear-gradient(135deg, #FFFFFF 10%, #E9D5FF 50%, var(--accent-purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-cyan { color: var(--accent-cyan); }
.text-violet { color: var(--accent-purple-light); }
.text-rust { color: var(--accent-rust); }
.text-emerald { color: var(--accent-emerald); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Buttons & Interactive UI
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-cyan);
  color: var(--bg-deep);
  font-weight: 700;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
}

.btn-primary:hover {
  background-color: #33F4FF;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

.btn-secondary {
  background-color: #141B2D;
  color: var(--text-main);
  border-color: #334155;
}

.btn-secondary:hover {
  background-color: #1E293B;
  border-color: var(--accent-cyan);
  color: #FFF;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-cyan-glow {
  background: rgba(0, 240, 255, 0.08);
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.btn-cyan-glow:hover {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.0625rem;
}

/* ==========================================================================
   Global Navigation Bar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--transition-fast);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 2rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-name span {
  color: var(--accent-cyan);
}

.version-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--accent-cyan);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* ==========================================================================
   Section 1: Hero Section
   ========================================================================== */
.hero, .hero-section {
  padding-top: 150px;
  padding-bottom: 70px;
  text-align: center;
  position: relative;
}

.hero-status-pill, .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  background: rgba(14, 22, 38, 0.9);
  border: 1px solid rgba(247, 76, 0, 0.35);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #FDBA74;
  margin-bottom: 2rem;
  box-shadow: 0 0 20px rgba(247, 76, 0, 0.15);
  letter-spacing: 0.02em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-rust);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-rust);
  animation: pulseRust 2s infinite;
}

@keyframes pulseRust {
  0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(247, 76, 0, 0.7); }
  70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 8px rgba(247, 76, 0, 0); }
  100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(247, 76, 0, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  max-width: 1050px;
  margin: 0 auto 1.5rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.hero-subhead {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: #CBD5E1;
  font-weight: 500;
  max-width: 860px;
  margin: 0 auto 1.5rem;
  line-height: 1.45;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 740px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-desc strong {
  color: #FFF;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-proof-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.85rem 1.6rem;
  background: rgba(14, 22, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  max-width: fit-content;
  margin: 0 auto;
}

.hero-proof-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-proof-sep {
  color: var(--border-subtle);
}

/* ==========================================================================
   Section 2: "Show, Don't Tell" Code Terminal (Rich Lua Examples)
   ========================================================================== */
.terminal-section {
  padding: 30px 0 90px;
}

.code-ide {
  background: #0B111E;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 240, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.code-ide-header {
  background: #080D17;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.tab-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-trigger:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-trigger.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.25);
}

.tab-trigger.lua-tab.active {
  color: #C084FC;
  background: rgba(121, 40, 202, 0.12);
  border-color: rgba(121, 40, 202, 0.3);
}

.tab-icon {
  width: 13px;
  height: 13px;
}

.code-body-wrapper {
  position: relative;
}

.code-copy-icon-btn {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(14, 22, 38, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-copy-icon-btn:hover {
  background: rgba(22, 34, 58, 0.95);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
  transform: scale(1.05);
}

.code-copy-icon-btn.copied {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.code-pane {
  display: none;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.65;
}

.code-pane.active {
  display: block;
}

.code-pane pre {
  margin: 0;
}

/* Syntax Highlighting */
.syn-comment { color: #64748B; font-style: italic; }
.syn-keyword { color: #F43F5E; font-weight: 600; }
.syn-type { color: #38BDF8; }
.syn-func { color: #A855F7; }
.syn-string { color: #34D399; }
.syn-num { color: #F59E0B; }
.syn-attr { color: #FDBA74; }
.syn-macro { color: #00F0FF; font-weight: 600; }

.terminal-footer-strip {
  background: #080D17;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.sdk-distribution-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-cyan);
}

/* ==========================================================================
   Section 3: Technical Pillars (Architecture Grid)
   ========================================================================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-title-wrap {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 4rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent-cyan-dim);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-full);
}

.section-heading {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin-bottom: 1rem;
}

.section-subtext {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.arch-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.6rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
}

.arch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.arch-card:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 240, 255, 0.08);
}

.arch-card:hover::before {
  opacity: 1;
}

.arch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.arch-card-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(121, 40, 202, 0.15);
  border: 1px solid rgba(121, 40, 202, 0.35);
  color: #C084FC;
}

.arch-pill.cyan {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--accent-cyan);
}

.arch-pill.rust {
  background: rgba(247, 76, 0, 0.12);
  border-color: rgba(247, 76, 0, 0.35);
  color: #FB923C;
}

.arch-pill.emerald {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34D399;
}

.arch-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.arch-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.55;
  flex-grow: 1;
}

.arch-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
}

.arch-bullet-item {
  font-size: 0.8125rem;
  color: #CBD5E1;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}

.arch-bullet-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-cyan);
}

.arch-bullet-item strong {
  color: #FFF;
}

/* ==========================================================================
   Section 4: Micro-Benchmarks & Performance Dashboard
   ========================================================================== */
.benchmarks-section {
  background: linear-gradient(180deg, transparent 0%, rgba(14, 22, 38, 0.4) 50%, transparent 100%);
}

.benchmarks-box {
  background: #0B111E;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  margin-bottom: 3.5rem;
}

.benchmarks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.5rem;
}

.benchmarks-header-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.benchmarks-header-info p {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
}

.bench-tabs {
  display: flex;
  gap: 0.5rem;
  background: #060911;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.bench-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bench-tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Benchmark Bar List */
.bench-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.bench-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.bench-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.bench-name {
  color: var(--text-main);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bench-winner-tag {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.bench-val {
  font-weight: 700;
}

.bench-bar-track {
  height: 28px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bench-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-cyclepack {
  background: linear-gradient(90deg, #00F0FF, #38BDF8);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.fill-iostore {
  background: linear-gradient(90deg, #818CF8, #6366F1);
  color: #FFF;
}

.fill-sqlite {
  background: rgba(255, 255, 255, 0.25);
  color: #FFF;
}

.fill-libc {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
}

.fill-physfs {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-subtle);
}

/* Stat Metric Highlight Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.metric-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.metric-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

.metric-card.violet::after {
  background: var(--accent-purple-light);
  box-shadow: 0 0 12px var(--accent-purple-light);
}

.metric-card.rust::after {
  background: var(--accent-rust);
  box-shadow: 0 0 12px var(--accent-rust);
}

.metric-card.emerald::after {
  background: var(--accent-emerald);
  box-shadow: 0 0 12px var(--accent-emerald);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.metric-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.metric-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.metric-subtitle {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  line-height: 1.4;
}

/* ==========================================================================
   Section 5: Commercial & Enterprise Tiers (Pricing)
   ========================================================================== */
.pricing-section {
  position: relative;
}

.billing-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.toggle-label {
  color: var(--text-muted);
  cursor: pointer;
}

.toggle-label.active {
  color: var(--text-main);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  background: #1E293B;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: transform var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  transform: translateX(24px);
}

.save-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-smooth);
}

.pricing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.pricing-card.featured {
  background: rgba(14, 25, 48, 0.85);
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
  transform: scale(1.03);
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-6px);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.25);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple-light));
  color: #000;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.pricing-card-tier {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.pricing-card.featured .pricing-card-tier {
  color: var(--accent-cyan);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}

.price-val {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.price-sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.pricing-rev-cap {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  margin-bottom: 1.8rem;
  min-height: 2.2rem;
}

.pricing-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2.2rem;
  flex-grow: 1;
}

.pricing-feature-item {
  font-size: 0.9rem;
  color: #CBD5E1;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.pricing-feature-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-cyan);
}

.pricing-card.featured .pricing-feature-item svg {
  color: var(--accent-cyan);
}

.pricing-feature-item.highlight {
  color: #FFF;
  font-weight: 600;
}

/* Feature Comparison Table Accordion */
.pricing-matrix-toggle {
  margin-top: 3.5rem;
  text-align: center;
}

.feature-table-wrap {
  display: none;
  margin-top: 2rem;
  background: #0B111E;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  text-align: left;
}

.feature-table-wrap.active {
  display: block;
}

/* Feature Matrix Category Navigation Bar */
.matrix-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  background: #080D17;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  flex-wrap: nowrap;
}

.matrix-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.matrix-cat-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.matrix-cat-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.3);
  font-weight: 600;
}

.feature-table-scroll {
  overflow-x: auto;
  width: 100%;
}

.feature-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.feature-table th, .feature-table td {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-table thead th {
  background: #070B14;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.feature-table tr.category-header-row th {
  background: rgba(14, 22, 38, 0.95);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.4rem;
  border-top: 1px solid rgba(0, 240, 255, 0.15);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
}

.feature-table tr.feature-row:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.feature-table tr.hidden-row {
  display: none !important;
}

.feature-table .cell-included {
  color: var(--accent-emerald);
  font-weight: 600;
}

.feature-table .cell-enterprise {
  color: var(--accent-cyan);
  font-weight: 600;
}

.feature-table .cell-dash {
  color: var(--text-subtle);
}

/* ==========================================================================
   Section 6: Production Ecosystem Integrations (Marquee & Showcase)
   ========================================================================== */
.ecosystem-section {
  padding: 80px 0 100px;
  overflow: hidden;
}

.marquee-container {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  margin-bottom: 3.5rem;
}

.marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: marqueeScroll 35s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.4rem;
  background: rgba(14, 22, 38, 0.75);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-main);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.engine-pill:hover {
  border-color: var(--accent-cyan);
  background: rgba(20, 32, 56, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.engine-pill svg, .engine-pill img {
  width: 20px;
  height: 20px;
}

/* Interactive Engine Drop-in Snippet Tabs */
.engine-snippet-container {
  background: #0B111E;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.engine-selector-bar {
  display: flex;
  background: #070B14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.engine-sel-btn {
  background: transparent;
  border: none;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.engine-sel-btn:hover {
  color: var(--text-main);
}

.engine-sel-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.04);
}

.engine-code-content {
  display: none;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.engine-code-content.active {
  display: block;
}

/* ==========================================================================
   Section 7: Bottom CTA Banner & DevTools Footer
   ========================================================================== */
.bottom-cta-section {
  padding: 60px 0 100px;
}

.cta-banner {
  background: radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.15) 0%, rgba(14, 22, 38, 0.95) 75%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 4.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 240, 255, 0.1);
}

.cta-banner-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 820px;
  margin: 0 auto 1.2rem;
  font-weight: 900;
}

.cta-banner-sub {
  font-size: 1.15rem;
  color: #CBD5E1;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.cta-banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: #050811;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand h4 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 280px;
  margin-bottom: 1.5rem;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 1.2rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   INTERACTIVE BETA / SDK REQUEST MODAL
   ========================================================================== */
body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  background: #0C1322;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 240, 255, 0.14);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 2.2rem;
  position: relative;
  transform: scale(0.94) translateY(18px);
  opacity: 0;
  box-sizing: border-box;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.modal-card::-webkit-scrollbar {
  width: 6px;
}

.modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.modal-backdrop.active .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFF;
  border-color: var(--accent-cyan);
}

.modal-header {
  margin-bottom: 1.4rem;
  padding-right: 1.5rem;
}

.modal-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

.modal-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.85rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input, .form-select, .form-textarea {
  background: #070B14;
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select option {
  background: #0C1322;
  color: #FFF;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.22);
}

.form-textarea {
  resize: none;
  min-height: 60px;
}

.form-note {
  font-size: 0.74rem;
  color: var(--text-subtle);
  line-height: 1.35;
}

/* Success Confirmation State */
.modal-success-state {
  display: none;
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.modal-success-state.active {
  display: block;
}

.success-icon {
  width: 58px;
  height: 58px;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--accent-emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  color: var(--accent-emerald);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.3);
}

.success-title {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.success-desc {
  font-size: 0.92rem;
  color: #CBD5E1;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.app-token-box {
  background: #070B14;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.token-copy-btn {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--accent-cyan);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
}

.token-copy-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--accent-cyan);
}

/* Spin Loading Animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   Scroll Reveal Animation
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .arch-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 550px; margin: 0 auto; }
  .pricing-card.featured { transform: none; }
  .pricing-card.featured:hover { transform: translateY(-6px); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-cyan-glow { display: none; }
  .mobile-menu-toggle { display: block; }
  /* main.js toggles .open on the menu button's click; no inline styles to clear later. */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: rgba(9, 13, 22, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .arch-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .hero-proof-bar { flex-direction: column; gap: 0.6rem; border-radius: var(--radius-md); }
  .hero-proof-sep { display: none; }
  .cta-banner { padding: 3rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .modal-card { padding: 1.8rem 1.2rem; }
}

/* ==========================================================================
   Request modal: failure state (built by js/main.js) and keyboard focus
   ========================================================================== */
.modal-error-state {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.modal-error-state .error-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #FCA5A5;
}

.modal-error-state .error-detail {
  font-size: 0.92rem;
  color: #E2E8F0;
  margin-bottom: 0.75rem;
}

.modal-error-state .error-contact:empty {
  display: none;
}

.modal-error-state .error-contact {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

/* ==========================================================================
   Reduced motion: no animation or transition, no smooth scrolling
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none !important; }
}

/* Visually hidden, still read by screen readers (js/main.js puts the copy status here). */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
