/* ═══════════════════════════════════════════════════════════════
   NEURALFUSION™ · COGNITIVE OPERATING SYSTEM · v5.0
   Premium Typography Architecture · Editorial × Futuristic
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,450;0,9..40,500;0,9..40,600;1,9..40,400&family=Syne:wght@400;500;600;700;800&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&f[]=satoshi@400,500,700,900&display=swap');

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

:root {
  /* ── Deep Space Palette ──────────────────────────────────── */
  --void:    #03070F;
  --abyss:   #050C1A;
  --deep:    #071020;
  --surface: #0A1628;
  --panel:   #0E1E36;
  --raised:  #122244;

  /* ── Gold Accent System ──────────────────────────────────── */
  --gold:         #C4A050;
  --gold-bright:  #E2BE78;
  --gold-soft:    #D4AF6A;
  --gold-dim:     rgba(196,160,80,0.08);
  --gold-glow:    rgba(196,160,80,0.18);
  --gold-mist:    rgba(196,160,80,0.04);
  --gold-border:  rgba(196,160,80,0.14);
  --gold-active:  rgba(196,160,80,0.32);

  /* ── Legacy aliases (keeps JS C.cyan tokens working) ──────── */
  --cyan:       #C4A050;
  --cyan-bright:#E2BE78;
  --cyan-dim:   rgba(196,160,80,0.08);
  --cyan-glow:  rgba(196,160,80,0.18);

  /* ── Glass System ─────────────────────────────────────────── */
  --glass-1:   rgba(10, 22, 40, 0.55);
  --glass-2:   rgba(14, 30, 54, 0.65);
  --glass-3:   rgba(18, 34, 68, 0.72);
  --glass-4:   rgba(8, 16, 32, 0.80);
  --glass-border: rgba(196,160,80,0.12);
  --glass-border-h: rgba(196,160,80,0.28);
  --glass-shine: rgba(255,255,255,0.03);

  /* ── Brain Color System ───────────────────────────────────── */
  --analytical:      #C4A050;
  --analytical-dim:  rgba(196,160,80,0.10);
  --analytical-glow: rgba(196,160,80,0.20);
  --intuitive:       #E2BE78;
  --intuitive-dim:   rgba(226,190,120,0.10);
  --intuitive-glow:  rgba(226,190,120,0.20);
  --associative:     #7AAFCF;
  --associative-dim: rgba(122,175,207,0.10);
  --associative-glow:rgba(122,175,207,0.20);
  --reflective:      #D4AF6A;
  --reflective-dim:  rgba(212,175,106,0.10);
  --reflective-glow: rgba(212,175,106,0.20);

  /* ── Border System ────────────────────────────────────────── */
  --border:        rgba(196,160,80,0.12);
  --border-bright: rgba(196,160,80,0.30);
  --border-dim:    rgba(196,160,80,0.06);

  /* ── Typography ───────────────────────────────────────────── */
  --text:       #F0E8D0;
  --text-muted: #8A7A5A;
  --text-dim:   #3A4A62;
  --text-ghost: rgba(240,232,208,0.4);

  /* ── Typography Fonts ─────────────────────────────────────────── */
  /* HERO DISPLAY — Clash Display: geometric, editorial, bold authority */
  --font-display: 'Clash Display', 'Syne', 'DM Sans', sans-serif;
  /* BODY — Satoshi: clean modern grotesque, medium contrast, readable */
  --font-body:    'Satoshi', 'DM Sans', sans-serif;
  /* SYSTEM MONO — Space Mono: structured, futuristic metadata labels */
  --font-mono:    'Space Mono', 'Courier New', monospace;

  /* ── Type Scale — Tight Editorial System ─────────────────────── */
  --text-xxs:  9px;
  --text-xs:  11px;
  --text-sm:  13px;
  --text-base:15px;
  --text-lg:  18px;
  --text-xl:  22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --text-4xl: 48px;
  --text-5xl: 64px;
  --text-6xl: 80px;

  /* ── Headline Typography Tokens ───────────────────────────────── */
  --hero-size:        clamp(48px, 8vw, 96px);
  --hero-weight:      900;
  --hero-leading:     0.92;
  --hero-tracking:    -0.045em;

  --h1-size:          clamp(38px, 5.5vw, 72px);
  --h1-weight:        800;
  --h1-leading:       0.96;
  --h1-tracking:      -0.038em;

  --h2-size:          clamp(28px, 4vw, 52px);
  --h2-weight:        800;
  --h2-leading:       1.00;
  --h2-tracking:      -0.028em;

  --h3-size:          clamp(20px, 2.5vw, 32px);
  --h3-weight:        700;
  --h3-leading:       1.08;
  --h3-tracking:      -0.02em;

  --h4-size:          clamp(16px, 1.8vw, 22px);
  --h4-weight:        700;
  --h4-leading:       1.15;
  --h4-tracking:      -0.01em;

  /* ── Body Typography Tokens ───────────────────────────────────── */
  --body-size:        15px;
  --body-weight:      400;
  --body-leading:     1.72;
  --body-tracking:    0.008em;

  --body-lg-size:     17px;
  --body-lg-leading:  1.68;

  /* ── Label / Capsule Typography ───────────────────────────────── */
  --label-size:       10px;
  --label-weight:     700;
  --label-tracking:   0.28em;

  --label-sm-size:    9px;
  --label-sm-tracking:0.32em;

  /* ── Button Typography ────────────────────────────────────────── */
  --btn-size:         11px;
  --btn-weight:       800;
  --btn-tracking:     0.14em;

  /* ── Spacing ─────────────────────────────────────────────── */
  --bento-gap: 14px;
  --bento-gap-md: 16px;
  --bento-gap-lg: 20px;
  --bento-radius: 16px;
  --bento-radius-sm: 12px;
  --bento-radius-lg: 20px;

  /* ── Blur ─────────────────────────────────────────────────── */
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
  --blur-xl: blur(40px);

  --bottom-nav-h: 64px;
}

/* ── DESKTOP SCALE ─────────────────────────────────────────── */
@media (min-width: 900px) {
  :root {
    --text-3xl: 40px;
    --text-4xl: 56px;
    --text-5xl: 72px;
    --text-6xl: 96px;
    --bento-gap: 18px;
    --bento-gap-md: 20px;
    --bento-gap-lg: 24px;
    --body-size: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   BASE RESET & GLOBAL
═══════════════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: var(--body-leading);
  letter-spacing: var(--body-tracking);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  overflow-x: hidden;
  max-width: 100vw;

  /* Atmospheric background */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196,160,80,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(122,175,207,0.04) 0%, transparent 50%);
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: rgba(196,160,80,0.18); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(196,160,80,0.32); }

#root { min-height: 100vh; }

/* ── HEADINGS ─────────────────────────────────────────────── */

/* Hero-level: max visual dominance */
.hero-headline,
.type-hero {
  font-family: var(--font-display) !important;
  font-size: var(--hero-size) !important;
  font-weight: var(--hero-weight) !important;
  line-height: var(--hero-leading) !important;
  letter-spacing: var(--hero-tracking) !important;
  color: var(--text);
  font-feature-settings: 'kern' 1, 'ss01' 1;
}

h1 {
  font-family: var(--font-display);
  font-size: var(--h1-size) !important;
  font-weight: var(--h1-weight);
  line-height: var(--h1-leading);
  color: var(--text);
  letter-spacing: var(--h1-tracking);
  font-feature-settings: 'kern' 1;
}
h2 {
  font-family: var(--font-display);
  font-size: var(--h2-size) !important;
  font-weight: var(--h2-weight);
  line-height: var(--h2-leading);
  color: var(--text);
  letter-spacing: var(--h2-tracking);
}
h3 {
  font-family: var(--font-display);
  font-size: var(--h3-size) !important;
  font-weight: var(--h3-weight);
  line-height: var(--h3-leading);
  color: var(--text);
  letter-spacing: var(--h3-tracking);
}
h4 {
  font-family: var(--font-display);
  font-size: var(--h4-size) !important;
  font-weight: var(--h4-weight);
  line-height: var(--h4-leading);
  color: var(--text);
  letter-spacing: var(--h4-tracking);
}

p {
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--body-leading);
  color: var(--text-muted);
  max-width: 62ch;
  font-weight: 400;
}

/* Strong in body = bright highlight text */
p strong, .body-highlight {
  color: var(--text);
  font-weight: 600;
}

/* Section subtitle / lead copy */
.type-lead {
  font-family: var(--font-body) !important;
  font-size: clamp(16px, 2vw, 20px) !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  letter-spacing: 0.005em !important;
  color: var(--text-muted) !important;
}

/* Section overline / eyebrow */
.type-overline {
  font-family: var(--font-mono) !important;
  font-size: var(--label-size) !important;
  font-weight: var(--label-weight) !important;
  letter-spacing: var(--label-tracking) !important;
  text-transform: uppercase !important;
  color: var(--gold) !important;
}

/* Editorial callout number */
.type-stat {
  font-family: var(--font-display) !important;
  font-size: clamp(40px, 6vw, 80px) !important;
  font-weight: 900 !important;
  line-height: 0.9 !important;
  letter-spacing: -0.04em !important;
  color: var(--text) !important;
}

/* Section title — compact, weighted */
.type-section-title {
  font-family: var(--font-display) !important;
  font-size: clamp(24px, 3.5vw, 42px) !important;
  font-weight: 800 !important;
  line-height: 1.02 !important;
  letter-spacing: -0.025em !important;
  color: var(--text) !important;
}

/* Card title */
.type-card-title {
  font-family: var(--font-display) !important;
  font-size: clamp(17px, 2vw, 22px) !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.015em !important;
  color: var(--text) !important;
}

/* ═══════════════════════════════════════════════════════════════
   SPLASH SCREEN
═══════════════════════════════════════════════════════════════ */
#splash {
  position: fixed; inset: 0;
  background: var(--void);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1);
}
#splash.hidden { opacity: 0; pointer-events: none; }
.splash-inner { text-align: center; padding: 0 24px; }

.splash-logo-ring {
  width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid rgba(196,160,80,0.25);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px; position: relative;
  box-shadow:
    0 0 60px rgba(196,160,80,0.08),
    inset 0 0 30px rgba(196,160,80,0.04);
  animation: ringPulse 2.5s ease-in-out infinite;
  backdrop-filter: var(--blur-sm);
}
.splash-logo-ring::before {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(196,160,80,0.08);
}
.splash-logo-ring::after {
  content: ''; position: absolute; inset: -12px; border-radius: 50%;
  border: 1px solid rgba(196,160,80,0.04);
}
.splash-neural { font-size: 30px; color: var(--gold); }
.splash-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: 5px; margin-bottom: 10px;
  text-transform: uppercase;
}
.splash-sub {
  font-family: var(--font-mono);
  font-size: var(--label-sm-size); color: var(--gold); letter-spacing: var(--label-sm-tracking);
  text-transform: uppercase; margin-bottom: 36px;
  opacity: 0.7;
}
.splash-track {
  width: 200px; height: 1px; background: var(--panel);
  margin: 0 auto; overflow: hidden;
}
.splash-fill {
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: scanLine 1.6s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════
   KEYFRAME ANIMATIONS
═══════════════════════════════════════════════════════════════ */
@keyframes scanLine  { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

@keyframes ringPulse {
  0%,100% { box-shadow: 0 0 30px rgba(196,160,80,0.08), inset 0 0 20px rgba(196,160,80,0.04); }
  50%      { box-shadow: 0 0 80px rgba(196,160,80,0.16), inset 0 0 40px rgba(196,160,80,0.08); }
}

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

@keyframes float   {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

@keyframes neuralPulse {
  0%,100% { opacity: 0.4; transform: scale(1); }
  50%     { opacity: 1;   transform: scale(1.06); }
}

@keyframes scanH {
  0%   { transform: translateX(-100%); opacity: 0; }
  15%  { opacity: 0.6; }
  85%  { opacity: 0.6; }
  100% { transform: translateX(100%); opacity: 0; }
}

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

@keyframes orbitDot {
  from { transform: rotate(0deg)   translateX(40px) rotate(0deg);   }
  to   { transform: rotate(360deg) translateX(40px) rotate(-360deg);}
}

@keyframes gridShimmer { 0%,100% { opacity:0.025; } 50% { opacity:0.05; } }

@keyframes dataStream {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0; }
}

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

@keyframes progressFill {
  from { width: 0; }
  to   { width: var(--target-width, 70%); }
}

@keyframes ringDraw {
  from { stroke-dasharray: 0, 283; }
  to   { stroke-dasharray: var(--dash,200), 283; }
}

@keyframes bentoReveal {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmerSlide {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(300%) skewX(-15deg); }
}

@keyframes pulseRing {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes glowBreath {
  0%,100% { box-shadow: 0 0 20px rgba(196,160,80,0.08), 0 8px 32px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 40px rgba(196,160,80,0.16), 0 8px 32px rgba(0,0,0,0.4); }
}

@keyframes nodeAppear {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

.fade-up { animation: fadeUp 0.5s ease both; }
.fade-in { animation: fadeIn 0.4s ease both; }

/* ═══════════════════════════════════════════════════════════════
   BENTO GRID SYSTEM
═══════════════════════════════════════════════════════════════ */

/* Master bento container */
.bento-grid {
  display: grid;
  gap: var(--bento-gap);
  width: 100%;
}

/* ── Mobile: single column ─ */
.bento-grid { grid-template-columns: 1fr; }

/* ── Tablet: 2 cols ─ */
@media (min-width: 640px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Desktop: 12-col base grid ─ */
@media (min-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: var(--bento-gap-lg);
  }
}

/* ── Column Span Classes ─────────────────────────────────── */
@media (min-width: 900px) {
  .bento-col-2  { grid-column: span 2; }
  .bento-col-3  { grid-column: span 3; }
  .bento-col-4  { grid-column: span 4; }
  .bento-col-5  { grid-column: span 5; }
  .bento-col-6  { grid-column: span 6; }
  .bento-col-7  { grid-column: span 7; }
  .bento-col-8  { grid-column: span 8; }
  .bento-col-9  { grid-column: span 9; }
  .bento-col-10 { grid-column: span 10; }
  .bento-col-12 { grid-column: span 12; }
}

/* ── Tablet spans (2-col grid) ─ */
@media (min-width: 640px) and (max-width: 899px) {
  .bento-tab-1 { grid-column: span 1; }
  .bento-tab-2 { grid-column: span 2; }
}

/* ── Row Spans ─────────────────────────────────────────────── */
.bento-row-2 { grid-row: span 2; }
.bento-row-3 { grid-row: span 3; }

/* ═══════════════════════════════════════════════════════════════
   GLASS CARD BASE
═══════════════════════════════════════════════════════════════ */

.bento-card {
  position: relative;
  border-radius: var(--bento-radius);
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 8px 32px rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.3);
}

/* Inner glass shine line at top */
.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.06) 30%,
    rgba(255,255,255,0.10) 50%,
    rgba(255,255,255,0.06) 70%,
    transparent 100%);
  z-index: 2;
}

/* Hover state */
.bento-card:hover {
  border-color: var(--glass-border-h);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 16px 48px rgba(0,0,0,0.5),
    0 4px 16px rgba(196,160,80,0.06);
  transform: translateY(-2px);
}

/* ── Card Size Variants ─────────────────────────────────────── */
.bento-card-hero    { min-height: 320px; }
.bento-card-large   { min-height: 260px; }
.bento-card-medium  { min-height: 200px; }
.bento-card-small   { min-height: 140px; }
.bento-card-micro   { min-height: 100px; }

@media (min-width: 900px) {
  .bento-card-hero    { min-height: 420px; }
  .bento-card-large   { min-height: 300px; }
  .bento-card-medium  { min-height: 220px; }
  .bento-card-small   { min-height: 160px; }
  .bento-card-micro   { min-height: 120px; }
}

/* ── Card Theme Accents ─────────────────────────────────────── */
.bento-card-gold {
  background: linear-gradient(135deg, rgba(196,160,80,0.10) 0%, var(--glass-2) 60%);
  border-color: rgba(196,160,80,0.20);
}
.bento-card-gold::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at 0% 0%, rgba(196,160,80,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.bento-card-cyan {
  background: linear-gradient(135deg, rgba(122,175,207,0.08) 0%, var(--glass-2) 60%);
  border-color: rgba(122,175,207,0.18);
}
.bento-card-cyan::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at 100% 0%, rgba(122,175,207,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.bento-card-deep {
  background: var(--glass-4);
  border-color: rgba(255,255,255,0.04);
}

.bento-card-bright {
  background: linear-gradient(145deg, rgba(196,160,80,0.14) 0%, rgba(14,30,54,0.85) 50%);
  border-color: rgba(196,160,80,0.28);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 12px 40px rgba(0,0,0,0.45),
    0 0 60px rgba(196,160,80,0.08);
}

/* ── Card Padding ─────────────────────────────────────────── */
.bento-p-sm  { padding: 20px; }
.bento-p-md  { padding: 24px; }
.bento-p-lg  { padding: 32px; }
.bento-p-xl  { padding: 40px; }

@media (min-width: 900px) {
  .bento-p-sm  { padding: 24px; }
  .bento-p-md  { padding: 28px; }
  .bento-p-lg  { padding: 36px; }
  .bento-p-xl  { padding: 48px; }
}

/* ── Bento Label (overline) ──────────────────────────────── */
.bento-label {
  font-family: var(--font-mono);
  font-size: var(--label-sm-size);
  letter-spacing: var(--label-sm-tracking);
  text-transform: uppercase;
  color: var(--gold);
  font-weight: var(--label-weight);
  opacity: 0.85;
  margin-bottom: 12px;
  display: block;
}

.bento-label-dim {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  opacity: 0.6;
  display: block;
}

/* ── Bento Metric Display ──────────────────────────────────── */
.bento-metric {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 0.9;
}

.bento-metric-sm {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 0.95;
}

/* ── Bento Tag ─────────────────────────────────────────────── */
.bento-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 100px;
  background: rgba(196,160,80,0.08);
  border: 1px solid rgba(196,160,80,0.18);
  font-family: var(--font-mono);
  font-size: var(--label-sm-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  font-weight: var(--label-weight);
  color: var(--gold);
  white-space: nowrap;
}

.bento-tag-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
  animation: neuralPulse 2s ease-in-out infinite;
}

/* ── Shimmer Overlay ──────────────────────────────────────── */
.bento-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40%; height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.03),
    transparent);
  transform: translateX(-100%) skewX(-15deg);
  transition: none;
}
.bento-card:hover .bento-shimmer::after {
  animation: shimmerSlide 0.7s ease forwards;
}

/* ── Animated border glow on hover ───────────────────────── */
.bento-glow-hover:hover {
  animation: glowBreath 2s ease-in-out infinite;
}

/* ── Bento Progress Bar ───────────────────────────────────── */
.bento-progress-track {
  height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 100px;
  overflow: hidden;
}
.bento-progress-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 8px rgba(196,160,80,0.4);
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}

/* ── Brain Badge ─────────────────────────────────────────── */
.brain-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 20px;
  backdrop-filter: var(--blur-sm);
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

/* ── Bento Divider ───────────────────────────────────────── */
.bento-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(196,160,80,0.12),
    transparent);
  margin: 20px 0;
}

/* ── Background Patterns ──────────────────────────────────── */
.bento-noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.5;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.bento-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(196,160,80,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.bento-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(196,160,80,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,160,80,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: gridShimmer 5s ease-in-out infinite;
  pointer-events: none;
}

/* ── Ambient Glow Blobs ──────────────────────────────────── */
.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ── Neural Network SVG Lines ────────────────────────────── */
.neural-node {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: nodeAppear 0.4s ease both;
}

/* ═══════════════════════════════════════════════════════════════
   LEGACY CARD CLASSES (backwards compatible)
═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--glass-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--bento-radius-sm);
  backdrop-filter: var(--blur-sm);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.card-glass {
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--bento-radius-sm);
  backdrop-filter: var(--blur-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ═══════════════════════════════════════════════════════════════
   LABEL & UTILITY
═══════════════════════════════════════════════════════════════ */
.label {
  font-family: var(--font-mono);
  font-size: var(--label-sm-size);
  letter-spacing: var(--label-sm-tracking);
  text-transform: uppercase;
  color: var(--gold);
  font-weight: var(--label-weight);
}

.grid-bg {
  background-image:
    linear-gradient(rgba(196,160,80,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,160,80,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridShimmer 5s ease-in-out infinite;
}

.scroll-panel::-webkit-scrollbar { width: 2px; }
.scroll-panel::-webkit-scrollbar-thumb { background: var(--border); }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
button {
  cursor: pointer;
  transition: all 0.2s ease;
  border: none; outline: none;
}
button:active:not(:disabled) { transform: scale(0.97); }

.btn-primary {
  background: var(--gold);
  color: var(--void);
  font-family: var(--font-display);
  font-weight: var(--btn-weight);
  font-size: var(--btn-size);
  letter-spacing: var(--btn-tracking);
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(196,160,80,0.25);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: translateX(-100%); transition: transform 0.4s;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover {
  background: var(--gold-bright);
  box-shadow: 0 6px 28px rgba(196,160,80,0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: var(--label-sm-size);
  letter-spacing: 0.22em;
  padding: 12px 24px;
  border: 1px solid rgba(196,160,80,0.28);
  border-radius: 8px;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: var(--blur-sm);
  font-weight: 700;
}
.btn-outline:hover {
  background: rgba(196,160,80,0.08);
  border-color: rgba(196,160,80,0.5);
  transform: translateY(-1px);
}

.btn-ghost {
  background: none; border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.005em;
}
.btn-ghost:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════
   INPUTS
═══════════════════════════════════════════════════════════════ */
input, textarea, select {
  background: rgba(10,22,40,0.7);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 450;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  padding: 12px 16px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
  backdrop-filter: var(--blur-sm);
}
input:focus, textarea:focus {
  border-color: rgba(196,160,80,0.4);
  box-shadow: 0 0 0 3px rgba(196,160,80,0.06);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════════ */
.desktop-nav {
  display: none !important;
  align-items: center;
  gap: 4px;
}
.hamburger-btn  { display: flex !important; }
.nav-user-label { display: none !important; }

/* ── BOTTOM NAV ──────────────────────────────────────────── */
.bottom-nav {
  display: flex;
  background: rgba(3,7,15,0.92);
  backdrop-filter: var(--blur-xl);
  border-top: 1px solid var(--glass-border);
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  section {
    padding-left:  16px !important;
    padding-right: 16px !important;
  }
  .card { padding: 16px !important; }
  h1 { font-size: clamp(32px, 9vw, 48px) !important; letter-spacing: -0.03em !important; }
  h2 { font-size: clamp(24px, 7vw, 36px) !important; letter-spacing: -0.025em !important; }
  h3 { font-size: clamp(18px, 5vw, 24px) !important; }

  .btn-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .btn-row .btn-primary,
  .btn-row .btn-outline {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
  .auth-modal-card { padding: 28px 18px !important; }
}

@media (min-width: 640px) {
  .nav-user-label { display: block !important; }
}

@media (min-width: 900px) {
  .desktop-nav    { display: flex !important; }
  .hamburger-btn  { display: none !important; }
  .bottom-nav     { display: none !important; }
  input, textarea, select { font-size: 15px; font-weight: 450; }
}

.desktop-only { display: none !important; }
@media (min-width: 900px) {
  .desktop-only { display: inline-flex !important; }
}

/* ═══════════════════════════════════════════════════════════════
   BENTO REVEAL ANIMATIONS — staggered entrance
═══════════════════════════════════════════════════════════════ */
.bento-card {
  animation: bentoReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bento-card:nth-child(1)  { animation-delay: 0.05s; }
.bento-card:nth-child(2)  { animation-delay: 0.10s; }
.bento-card:nth-child(3)  { animation-delay: 0.15s; }
.bento-card:nth-child(4)  { animation-delay: 0.20s; }
.bento-card:nth-child(5)  { animation-delay: 0.25s; }
.bento-card:nth-child(6)  { animation-delay: 0.30s; }
.bento-card:nth-child(7)  { animation-delay: 0.35s; }
.bento-card:nth-child(8)  { animation-delay: 0.40s; }
.bento-card:nth-child(9)  { animation-delay: 0.45s; }
.bento-card:nth-child(10) { animation-delay: 0.50s; }

/* ═══════════════════════════════════════════════════════════════
   SECTION UTILITY
═══════════════════════════════════════════════════════════════ */
.bento-section {
  padding: 48px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .bento-section { padding: 64px 28px; }
}

@media (min-width: 900px) {
  .bento-section { padding: 80px 40px; }
}

/* ── Section heading block ─────────────────────────────────── */
.bento-section-header {
  margin-bottom: 36px;
}
@media (min-width: 900px) {
  .bento-section-header { margin-bottom: 48px; }
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL TYPOGRAPHY OVERRIDES — Cognitive OS System v5.0
   Covers inline React styles and all component text patterns.
   Clash Display → hero/display | Satoshi → body | Space Mono → labels
═══════════════════════════════════════════════════════════════ */

/* ── Force display font onto all Syne-assigned inline styles ── */
/* The JS injects fontFamily: "'Syne', sans-serif" — we cascade
   Clash Display in front via the CSS variable, so any element
   rendering with var(--font-display) automatically upgrades. */

/* ── Navbar brand wordmark ───────────────────────────────────── */
nav .brand-wordmark,
[class*="nav"] [style*="NEURALFUSION"],
[style*="NEURALFUSION"] {
  font-family: var(--font-display) !important;
  letter-spacing: 0.18em !important;
  font-weight: 800 !important;
}

/* ── All caps system labels with wide tracking ────────────────── */
[style*="letterSpacing"][style*="fontSize: 9"],
[style*="letterSpacing"][style*="fontSize: 8"],
[style*="letterSpacing: 3"],
[style*="letterSpacing: 4"],
[style*="letterSpacing: 2"] {
  font-family: var(--font-mono) !important;
  letter-spacing: var(--label-sm-tracking) !important;
  font-weight: 700 !important;
}

/* ── Syne display font: upgrade to Clash Display ─────────────── */
[style*="Syne"] {
  font-family: 'Clash Display', 'Syne', sans-serif !important;
}

/* ── DM Sans body: upgrade to Satoshi ───────────────────────── */
[style*="DM Sans"] {
  font-family: 'Satoshi', 'DM Sans', sans-serif !important;
}

/* ── Hero headline sizes: tighter tracking, heavier weight ───── */
[style*="fontSize: 48"],
[style*="fontSize: 52"],
[style*="fontSize: 56"],
[style*="fontSize: 60"],
[style*="fontSize: 64"],
[style*="fontSize: 72"],
[style*="fontSize: 80"] {
  font-family: 'Clash Display', 'Syne', sans-serif !important;
  letter-spacing: -0.045em !important;
  line-height: 0.92 !important;
  font-weight: 900 !important;
}

/* ── Large display numerics (metrics / stats) ────────────────── */
[style*="fontSize: 42"],
[style*="fontSize: 36"],
[style*="fontSize: 40"] {
  font-family: 'Clash Display', 'Syne', sans-serif !important;
  letter-spacing: -0.04em !important;
  line-height: 0.92 !important;
  font-weight: 900 !important;
}

/* ── Section headings (24–32px range) ────────────────────────── */
[style*="fontSize: 32"],
[style*="fontSize: 28"],
[style*="fontSize: 30"],
[style*="fontSize: 26"],
[style*="fontSize: 24"] {
  font-family: 'Clash Display', 'Syne', sans-serif !important;
  letter-spacing: -0.028em !important;
  line-height: 1.0 !important;
}

/* ── Card titles (18–22px range) ─────────────────────────────── */
[style*="fontSize: 22"],
[style*="fontSize: 20"],
[style*="fontSize: 18"] {
  letter-spacing: -0.018em !important;
  line-height: 1.1 !important;
}

/* ── Tight body copy (14–16px) ──────────────────────────────── */
[style*="fontSize: 15"],
[style*="fontSize: 14"],
[style*="fontSize: 16"] {
  font-family: 'Satoshi', 'DM Sans', sans-serif !important;
  line-height: 1.68 !important;
  letter-spacing: 0.005em !important;
}

/* ── Button text: bolder, tighter ────────────────────────────── */
button.btn-primary,
[class*="btn-primary"],
button[style*="background"][style*="C4A050"],
button[style*="background"][style*="gold"] {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
}

/* ── System capsule tags / status badges ─────────────────────── */
.bento-tag,
[style*="borderRadius: 100"],
[style*="borderRadius: '100"],
[style*="borderRadius: 20"] {
  font-family: var(--font-mono) !important;
  font-size: var(--label-sm-size) !important;
  letter-spacing: var(--label-tracking) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

/* ── Navbar links ────────────────────────────────────────────── */
nav button,
.desktop-nav button {
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
}

/* ── Footer text ─────────────────────────────────────────────── */
footer {
  font-family: var(--font-body) !important;
}
footer [style*="letterSpacing"] {
  font-family: var(--font-mono) !important;
  letter-spacing: var(--label-sm-tracking) !important;
}
footer [style*="fontWeight: 800"],
footer [style*="fontWeight:800"] {
  font-family: var(--font-display) !important;
  letter-spacing: 0.2em !important;
}

/* ── Input fields ────────────────────────────────────────────── */
input, textarea, select {
  font-family: var(--font-body) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  letter-spacing: 0.005em !important;
  line-height: 1.65 !important;
}
input::placeholder, textarea::placeholder {
  font-weight: 400 !important;
  opacity: 0.55 !important;
}

/* ── Progress / score labels ─────────────────────────────────── */
[style*="letterSpacing: 1"],
[style*="letterSpacing: 1.5"],
[style*="letterSpacing: 2.5"] {
  font-family: var(--font-mono) !important;
}

/* ── Typography hierarchy: strong visual weight contrast ──────── */
strong {
  font-weight: 700 !important;
  color: var(--text) !important;
}

/* ── Monospace code / system metadata ────────────────────────── */
code, kbd, samp, pre {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  letter-spacing: 0.05em !important;
}

/* ── Blockquote editorial style ──────────────────────────────── */
blockquote {
  font-family: var(--font-display) !important;
  font-size: clamp(20px, 2.5vw, 28px) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  color: var(--text) !important;
  border-left: 2px solid var(--gold) !important;
  padding-left: 24px !important;
  margin: 32px 0 !important;
}

/* ── Selection highlight ─────────────────────────────────────── */
::selection {
  background: rgba(196, 160, 80, 0.22);
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY TYPOGRAPHY CLASSES — apply to any element
═══════════════════════════════════════════════════════════════ */

/* Hero display — largest format */
.t-hero {
  font-family: var(--font-display) !important;
  font-size: var(--hero-size) !important;
  font-weight: 900 !important;
  line-height: 0.92 !important;
  letter-spacing: -0.045em !important;
}

/* Section title */
.t-title {
  font-family: var(--font-display) !important;
  font-size: clamp(28px, 4vw, 52px) !important;
  font-weight: 800 !important;
  line-height: 0.98 !important;
  letter-spacing: -0.03em !important;
}

/* Card heading */
.t-heading {
  font-family: var(--font-display) !important;
  font-size: clamp(18px, 2.2vw, 26px) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.018em !important;
}

/* Body copy */
.t-body {
  font-family: var(--font-body) !important;
  font-size: var(--body-size) !important;
  font-weight: 400 !important;
  line-height: 1.72 !important;
  letter-spacing: 0.006em !important;
}

/* System label / capsule tag */
.t-label {
  font-family: var(--font-mono) !important;
  font-size: var(--label-size) !important;
  font-weight: 700 !important;
  letter-spacing: var(--label-tracking) !important;
  text-transform: uppercase !important;
}

/* Tiny metadata label */
.t-micro {
  font-family: var(--font-mono) !important;
  font-size: var(--label-sm-size) !important;
  font-weight: 700 !important;
  letter-spacing: var(--label-sm-tracking) !important;
  text-transform: uppercase !important;
}

/* Numeric / stat display */
.t-stat {
  font-family: var(--font-display) !important;
  font-weight: 900 !important;
  letter-spacing: -0.04em !important;
  line-height: 0.9 !important;
}

/* Muted supporting copy */
.t-muted {
  color: var(--text-muted) !important;
  font-weight: 400 !important;
}

/* Gold accent text */
.t-gold {
  color: var(--gold) !important;
}

/* High-contrast bright text */
.t-bright {
  color: var(--text) !important;
  font-weight: 600 !important;
}

