/* premium-dark.css — Sturdy global premium dark theme
 * Provides the new color system, glassmorphism utilities, and typography overrides.
 * Loaded by all public HTML pages; page-specific styles still live inline. */

:root {
    /* ── Backgrounds ── */
    --bg: #0a0a0f;
    --bg-gradient: linear-gradient(135deg, #0a0a0f 0%, #0d1117 50%, #0a0e1a 100%);
    --bg-card: rgba(15, 15, 25, 0.65);
    --bg-raised: rgba(22, 22, 40, 0.7);
    --bg-card-solid: #0f0f19;
    --bg-raised-solid: #161628;

    /* ── Primary accents: purple/indigo neon ── */
    --primary: #7c3aed;
    --primary-light: #8b5cf6;
    --primary-dim: rgba(124, 58, 237, 0.12);
    --primary-border: rgba(124, 58, 237, 0.22);
    --primary-glow: rgba(124, 58, 237, 0.35);
    --secondary: #6366f1;
    --secondary-dim: rgba(99, 102, 241, 0.12);
    --accent-blue: #3b82f6;

    /* ── Semantic accents ── */
    --green: #22c55e;
    --green-dim: rgba(34, 197, 94, 0.10);
    --green-border: rgba(34, 197, 94, 0.22);
    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.10);
    --orange: #f59e0b;
    --orange-dim: rgba(245, 158, 11, 0.10);

    /* ── Legacy compat — amber aliases → primary purple ── */
    --amber: #7c3aed;
    --amber-dim: rgba(124, 58, 237, 0.12);
    --amber-border: rgba(124, 58, 237, 0.22);

    /* ── Text ── */
    --text: #f0f0f8;
    --text-2: #9ca3af;
    --text-3: #6b7280;

    /* ── Borders ── */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* ── Global resets ── */
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ── Glassmorphism card mixin ── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Primary button ── */
.btn-primary-purple {
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 16px var(--primary-glow);
}

.btn-primary-purple:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.5);
}

/* ── Subtle grain ── */
.grain-overlay::before {
    content: '';
    position: fixed;
    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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 999;
    opacity: 0.3;
}
