/* ============================================================
   NekoGen V2 — DESIGN TOKENS
   Dark Premium · Neo Manga · Cyberpunk elegance
   Single source of truth for the design system.
   ============================================================ */

:root {
    /* ---------- Core palette ---------- */
    --color-bg: #06070f;                       /* deep black-blue */
    --color-bg-rgb: 6, 7, 15;
    --color-bg-raised: #0a0c18;                /* midnight blue */
    --color-surface: rgba(13, 15, 30, 0.82);
    --color-surface-rgb: 13, 15, 30;
    --color-surface-hover: rgba(22, 25, 48, 0.9);
    --color-surface-brighter: rgba(32, 36, 68, 0.95);
    --color-border: rgba(255, 255, 255, 0.07);
    --color-border-strong: rgba(255, 255, 255, 0.14);
    --color-border-glow: rgba(139, 92, 246, 0.35);

    /* ---------- Accents ---------- */
    --color-primary: #8b5cf6;                  /* neon violet */
    --color-primary-rgb: 139, 92, 246;
    --color-primary-soft: #a78bfa;
    --color-secondary: #22d3ee;                /* cyan */
    --color-secondary-rgb: 34, 211, 238;
    --color-accent: #6366f1;                   /* indigo */
    --color-accent-rgb: 99, 102, 241;
    --color-success: #34d399;
    --color-success-rgb: 52, 211, 153;
    --color-error: #fb7185;
    --color-error-rgb: 251, 113, 133;
    --color-warning: #fbbf24;
    --color-warning-rgb: 251, 191, 36;

    /* ---------- Text ---------- */
    --color-text: #f4f4f8;                     /* off-white */
    --color-text-dim: #9aa3b8;
    --color-text-muted: #626b80;
    --color-text-inverse: #06070f;

    /* ---------- Gradients ---------- */
    --grad-neon: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --grad-primary: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #6366f1 100%);
    --grad-surface: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 100%);
    --grad-dark: linear-gradient(180deg, #0a0c18 0%, #06070f 100%);
    --grad-text: linear-gradient(92deg, #f4f4f8 0%, #a78bfa 55%, #22d3ee 100%);

    /* ---------- Typography ---------- */
    --font-sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.25rem;
    --text-4xl: 3rem;
    --text-5xl: 3.75rem;

    --leading-tight: 1.15;
    --leading-normal: 1.6;
    --tracking-wide: 0.04em;
    --tracking-wider: 0.12em;

    /* ---------- Spacing ---------- */
    --space-2xs: 0.125rem;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* ---------- Radius ---------- */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* ---------- Shadows & glows ---------- */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 24px 60px -16px rgba(0, 0, 0, 0.7);
    --glow-primary: 0 0 18px rgba(var(--color-primary-rgb), 0.35);
    --glow-primary-lg: 0 0 42px rgba(var(--color-primary-rgb), 0.45);
    --glow-secondary: 0 0 18px rgba(var(--color-secondary-rgb), 0.3);
    --glow-text: 0 0 12px rgba(var(--color-primary-rgb), 0.5);
    --glow-button: 0 8px 24px -6px rgba(var(--color-primary-rgb), 0.55);

    /* ---------- Glass ---------- */
    --glass-bg: rgba(13, 15, 30, 0.6);
    --glass-blur: blur(16px) saturate(140%);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);

    /* ---------- Motion ---------- */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.15s var(--ease-out);
    --transition-base: 0.3s var(--ease-out);
    --transition-slow: 0.6s var(--ease-out);

    /* ---------- Z-index scale ---------- */
    --z-nav: 100;
    --z-dropdown: 200;
    --z-modal: 500;
    --z-toast: 800;
    --z-loader: 1000;
}

/* Theme Variant: Neo Noir (monochrome elegance) */
html.theme-noir {
    --color-bg: #010103;
    --color-bg-raised: #08080a;
    --color-surface: rgba(10, 10, 12, 0.85);
    --color-primary: #ffffff;
    --color-primary-rgb: 255, 255, 255;
    --color-secondary: #9ca3af;
    --color-secondary-rgb: 156, 163, 175;
    --color-border-glow: rgba(255, 255, 255, 0.12);
    --glow-primary: 0 0 12px rgba(255, 255, 255, 0.15);
    --glow-button: 0 8px 24px -6px rgba(255, 255, 255, 0.2);
    --grad-neon: linear-gradient(135deg, #ffffff, #888888);
    --grad-primary: linear-gradient(135deg, #e5e7eb, #9ca3af);
    --grad-text: linear-gradient(92deg, #ffffff, #9ca3af);
}

/* Reduced motion — accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
