/* ═══════════════════════════════════════════════════════
   NOVA Support Pool — Design Tokens v2
   Light (default) · Soft Dark (override) · Auto via media
   ═══════════════════════════════════════════════════════ */

/* ── LIGHT THEME (Default) ────────────────────────────── */
:root {
  /* Backgrounds — kein reines Weiß */
  --bg-base:          #f7f8fb;
  --bg-elevated:      #ffffff;
  --bg-overlay:       #eef0f5;
  --bg-glass:         rgba(255, 255, 255, 0.72);
  --bg-glass-hover:   rgba(255, 255, 255, 0.88);
  --bg-glass-active:  rgba(255, 255, 255, 0.95);

  /* Borders */
  --border-subtle:    rgba(15, 16, 32, 0.06);
  --border-default:   rgba(15, 16, 32, 0.10);
  --border-strong:    rgba(15, 16, 32, 0.18);

  /* Text — kein reines Schwarz */
  --text-primary:     #1a1b2e;
  --text-secondary:   #52556b;
  --text-tertiary:    #8a8fa5;
  --text-inverse:     #eef0f5;

  /* Akzente — identisch in beiden Themes */
  --accent-primary:         #7c3aed;
  --accent-primary-hover:   #6d28d9;
  --accent-primary-soft:    rgba(124, 58, 237, 0.10);
  --accent-secondary:       #06b6d4;
  --accent-secondary-soft:  rgba(6, 182, 212, 0.10);
  --accent-success:         #10b981;
  --accent-success-soft:    rgba(16, 185, 129, 0.10);
  --accent-warning:         #f59e0b;
  --accent-warning-soft:    rgba(245, 158, 11, 0.10);
  --accent-danger:          #ef4444;
  --accent-danger-soft:     rgba(239, 68, 68, 0.10);
  --accent-error:           #ef4444; /* alias */
  --accent-gold:            #e8b84b;
  --accent-gold-soft:       rgba(232, 184, 75, 0.10);

  /* Gradients */
  --gradient-primary:  linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --gradient-gold:     linear-gradient(135deg, #f5c842 0%, #c47200 100%);
  --gradient-danger:   linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  --gradient-success:  linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-hero:     linear-gradient(135deg, #f0f0fa 0%, #ede8ff 50%, #e8f4ff 100%);

  /* Spacing (8px grid) — sp-* aliases kept for compat */
  --space-1: 4px;   --sp-1: 4px;
  --space-2: 8px;   --sp-2: 8px;
  --space-3: 12px;  --sp-3: 12px;
  --space-4: 16px;  --sp-4: 16px;
  --space-5: 20px;  --sp-5: 20px;
  --space-6: 24px;  --sp-6: 24px;
  --space-8: 32px;  --sp-8: 32px;
  --space-10: 40px; --sp-10: 40px;
  --space-12: 48px; --sp-12: 48px;
  --space-16: 64px; --sp-16: 64px;

  /* Typography */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --text-xs:   11px; --text-sm:   13px; --text-base: 15px;
  --text-lg:   17px; --text-xl:   20px; --text-2xl:  26px;
  --text-3xl:  34px; --text-4xl:  42px;

  --weight-regular:  400; --weight-medium:   500;
  --weight-semibold: 600; --weight-bold:     700; --weight-black: 800;

  --leading-tight: 1.2; --leading-snug: 1.35;
  --leading-normal: 1.5; --leading-relaxed: 1.7;

  /* Radii */
  --radius-sm:   8px;  --radius-md:   12px;
  --radius-lg:   16px; --radius-xl:   24px;
  --radius-2xl:  32px; --radius-full: 9999px;

  /* Shadows (Light: soft) */
  --shadow-sm:           0 1px 2px rgba(15, 16, 32, 0.06);
  --shadow-md:           0 4px 12px rgba(15, 16, 32, 0.08);
  --shadow-lg:           0 12px 32px rgba(15, 16, 32, 0.12);
  --shadow-xl:           0 24px 64px rgba(15, 16, 32, 0.16);
  --shadow-glow-primary: 0 0 24px rgba(124, 58, 237, 0.25);
  --shadow-glow-gold:    0 0 24px rgba(232, 184, 75, 0.25);
  --shadow-glow-success: 0 0 24px rgba(16, 185, 129, 0.25);
  --shadow-glow-danger:  0 0 24px rgba(239, 68, 68, 0.25);
  --shadow-glow-cyan:    0 0 24px rgba(6, 182, 212, 0.25);

  /* Transitions — dur-* aliases kept for compat */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms; --dur-fast: 150ms;
  --duration-base: 250ms; --dur-base: 250ms;
  --duration-slow: 400ms; --dur-slow: 400ms;

  /* Z-Index */
  --z-base: 0; --z-above: 10;
  --z-header: 100; --z-nav: 100;
  --z-dropdown: 200; --z-modal: 500;
  --z-toast: 900; --z-tour: 9000;

  /* Layout */
  --nav-height:    64px;
  --header-height: 56px;
  --max-w:         480px;
}

/* ── SOFT DARK THEME (Auto: system dark) ──────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base:          #0f1020;
    --bg-elevated:      #1a1b2e;
    --bg-overlay:       #242640;
    --bg-glass:         rgba(26, 27, 46, 0.72);
    --bg-glass-hover:   rgba(26, 27, 46, 0.85);
    --bg-glass-active:  rgba(26, 27, 46, 0.95);

    --border-subtle:    rgba(255, 255, 255, 0.06);
    --border-default:   rgba(255, 255, 255, 0.10);
    --border-strong:    rgba(255, 255, 255, 0.18);

    --text-primary:     #eef0f5;
    --text-secondary:   #b4b8c8;
    --text-tertiary:    #7a7f95;
    --text-inverse:     #1a1b2e;

    --accent-primary:         #8b5cf6;
    --accent-primary-hover:   #a78bfa;
    --accent-primary-soft:    rgba(139, 92, 246, 0.15);

    --shadow-sm:           0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow-md:           0 4px 12px rgba(0, 0, 0, 0.40);
    --shadow-lg:           0 12px 32px rgba(0, 0, 0, 0.50);
    --shadow-xl:           0 24px 64px rgba(0, 0, 0, 0.60);
    --shadow-glow-primary: 0 0 24px rgba(139, 92, 246, 0.40);
    --shadow-glow-gold:    0 0 24px rgba(232, 184, 75, 0.40);
    --shadow-glow-success: 0 0 24px rgba(16, 185, 129, 0.40);
    --shadow-glow-danger:  0 0 24px rgba(239, 68, 68, 0.40);
    --shadow-glow-cyan:    0 0 24px rgba(6, 182, 212, 0.40);

    --gradient-hero: linear-gradient(135deg, #0a0a14 0%, #1a0a2e 50%, #0a1428 100%);
  }
}

/* ── SOFT DARK THEME (Explicit) ───────────────────────── */
[data-theme="dark"] {
  --bg-base:          #0f1020;
  --bg-elevated:      #1a1b2e;
  --bg-overlay:       #242640;
  --bg-glass:         rgba(26, 27, 46, 0.72);
  --bg-glass-hover:   rgba(26, 27, 46, 0.85);
  --bg-glass-active:  rgba(26, 27, 46, 0.95);

  --border-subtle:    rgba(255, 255, 255, 0.06);
  --border-default:   rgba(255, 255, 255, 0.10);
  --border-strong:    rgba(255, 255, 255, 0.18);

  --text-primary:     #eef0f5;
  --text-secondary:   #b4b8c8;
  --text-tertiary:    #7a7f95;
  --text-inverse:     #1a1b2e;

  --accent-primary:         #8b5cf6;
  --accent-primary-hover:   #a78bfa;
  --accent-primary-soft:    rgba(139, 92, 246, 0.15);

  --shadow-sm:           0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md:           0 4px 12px rgba(0, 0, 0, 0.40);
  --shadow-lg:           0 12px 32px rgba(0, 0, 0, 0.50);
  --shadow-xl:           0 24px 64px rgba(0, 0, 0, 0.60);
  --shadow-glow-primary: 0 0 24px rgba(139, 92, 246, 0.40);
  --shadow-glow-gold:    0 0 24px rgba(232, 184, 75, 0.40);
  --shadow-glow-success: 0 0 24px rgba(16, 185, 129, 0.40);
  --shadow-glow-danger:  0 0 24px rgba(239, 68, 68, 0.40);
  --shadow-glow-cyan:    0 0 24px rgba(6, 182, 212, 0.40);

  --gradient-hero: linear-gradient(135deg, #0a0a14 0%, #1a0a2e 50%, #0a1428 100%);
}

/* ── Glassmorphism utility classes ────────────────────── */
.card--glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}
@supports not (backdrop-filter: blur(1px)) {
  .card--glass { background: var(--bg-elevated); }
}
