/* Design System - CSS Variables */
:root {
    /* Colors - Pan-African Theme (White Background) */
    --color-background: #ffffff;
    --color-panel: rgba(26, 26, 36, 0.04);
    --color-panel-hover: rgba(26, 26, 36, 0.08);
    --color-border: rgba(252, 221, 9, 0.4);
    --color-border-strong: rgba(252, 221, 9, 0.7);
    --color-accent: #0a0a0b;
    --color-accent-red: #E31E24;
    --color-accent-green: #00843D;
    --color-accent-gold: #D4A400;
    --color-accent-yellow: #FFD700;
    --color-text-primary: #1a1a24;
    --color-text-secondary: #4a4a54;
    --color-text-muted: #7a7a84;

    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;

    /* Font sizes with fluid scaling */
    --font-size-base: clamp(15px, 1.1vw, 17px);
    --font-size-small: clamp(12px, 0.9vw, 13px);
    --font-size-h1: clamp(2.5rem, 5vw, 3.5rem);
    --font-size-h2: clamp(2rem, 4vw, 2.5rem);
    --font-size-h3: clamp(1.5rem, 3vw, 2rem);
    --font-size-h4: clamp(1.25rem, 2.5vw, 1.5rem);

    /* Line heights */
    --line-height-base: 1.6;
    --line-height-heading: 1.2;
    --line-height-tight: 1.4;

    /* Letter spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.02em;

    /* Spacing scale - Reduced */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.75rem;
    --space-lg: 2.75rem;
    --space-xl: 3.5rem;
    --space-2xl: 4.5rem;
    --space-section: clamp(2rem, 5vh, 3rem);

    /* Layout */
    --max-width-content: 1200px;
    --max-width-text: 65ch;
    --max-width-narrow: 45ch;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* Shadows - Pan-African Glow (White BG) */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 20px rgba(252, 221, 9, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12), 0 0 30px rgba(252, 221, 9, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 50px rgba(252, 221, 9, 0.3);
    --shadow-glow-gold: 0 0 40px rgba(252, 221, 9, 0.35);
    --shadow-glow-red: 0 0 40px rgba(227, 30, 36, 0.35);
    --shadow-glow-green: 0 0 40px rgba(0, 132, 61, 0.35);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-smooth: 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Parallax speeds */
    --parallax-vignette: 0.1;
    --parallax-glow: 0.2;
    --parallax-grid: 0.4;
    --parallax-logo: 0.6;

    /* Z-index layers */
    --z-parallax: -1;
    --z-content: 1;
    --z-header: 100;
    --z-modal: 1000;
}

/* Base typography */
body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    line-height: var(--line-height-heading);
    letter-spacing: var(--tracking-tight);
    color: var(--color-accent);
    font-weight: 600;
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

h4 {
    font-size: var(--font-size-h4);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0.01ms;
        --transition-medium: 0.01ms;
        --transition-slow: 0.01ms;
        --transition-bounce: 0.01ms;
        --transition-smooth: 0.01ms;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Disable parallax */
    .parallax-layer {
        transform: none !important;
    }
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Selection styling */
::selection {
    background-color: rgba(252, 221, 9, 0.3);
    color: var(--color-accent);
}
