/* DataEI — base.css
 * Variables, reset, typography
 * Dark mode default, light mode via [data-theme="light"]
 */

/* ===== Color Tokens — Dark Mode (Default) ===== */
:root {
    --bg-base: #0A0E1A;
    --bg-surface: #111827;
    --bg-surface-alt: #1A2332;
    --bg-elevated: #1E293B;
    --border-subtle: rgba(255, 214, 0, 0.12);
    --border-default: rgba(255, 214, 0, 0.25);
    --border-active: #FFD600;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --accent-yellow: #FFD600;
    --accent-yellow-glow: rgba(255, 214, 0, 0.4);
    --accent-cyan: #00D4FF;
    --accent-cyan-dim: #0891B2;
    --accent-amber: #F59E0B;
    --accent-green: #10B981;
    --accent-red: #EF4444;
    --accent-purple: #A78BFA;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1280px;
    --gutter: 24px;
    --transition: 300ms ease-out;
    --glow-inset: inset 0 0 20px rgba(255, 214, 0, 0.03);

    color-scheme: dark;
}

/* ===== Color Tokens — Light Mode ===== */
[data-theme="light"] {
    --bg-base: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-alt: #F1F5F9;
    --bg-elevated: #E2E8F0;
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-default: rgba(15, 23, 42, 0.15);
    --border-active: #B45309;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --accent-yellow: #B45309;
    --accent-yellow-bright: #FFD600;
    --accent-cyan: #0284C7;
    --accent-cyan-dim: #0284C7;
    --accent-amber: #D97706;
    --accent-green: #059669;
    --accent-red: #DC2626;
    --accent-purple: #7C3AED;
    --accent-yellow-glow: rgba(180, 83, 9, 0.25);

    color-scheme: light;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.6;
    background: var(--bg-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--accent-yellow); text-decoration: none; transition: color 200ms; }
a:hover { color: var(--accent-cyan); }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.hero { font-size: 3.5rem; font-weight: 700; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
p { margin-bottom: 1rem; }
.mono { font-family: var(--font-mono); }
.data-large { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 700; color: var(--accent-yellow); }
.data-medium { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; color: var(--accent-yellow); }
.data-small { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 400; color: var(--text-muted); }
.label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Layout Helpers ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
main { flex: 1 0 auto; padding-top: 70px; }
.grid { display: grid; gap: var(--gutter); }
.grid-7-5 { grid-template-columns: 7fr 5fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
    .grid-7-5, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.section { padding: 3rem 0; }
.section-divider {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 2rem 0;
    position: relative;
}
.section-divider::after {
    content: '';
    position: absolute;
    left: 0; top: -1px;
    width: 40px; height: 2px;
    background: var(--accent-yellow);
}

/* ===== Accessibility ===== */
:focus-visible { outline: 2px solid var(--accent-yellow); outline-offset: 2px; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== Reduced Motion ===== */
@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;
    }
}