/**
 * Beyond the Stack — design tokens
 * Source of truth mirrored from src/design/tokens.css
 */

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/poppins-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/poppins-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/poppins-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/poppins-700.woff2') format('woff2');
}

:root {
    /* Color — semantic */
    --color-bg: #F3F6FA;
    --color-surface: #FFFFFF;
    --color-text: #1A245E;
    --color-text-muted: #525F87;
    --color-border: #E5E9F4;
    --color-accent: #2864F0;
    --color-accent-hover: #1c54d1;
    --color-tag: #E5E9F4;

    /* Legacy aliases */
    --bg-color: var(--color-bg);
    --primary-blue: var(--color-accent);
    --dark-navy: var(--color-text);
    --medium-grey: var(--color-text-muted);
    --light-grey-border: var(--color-border);
    --tag-bg: var(--color-tag);
    --white: var(--color-surface);

    /* Type */
    --font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    --font-display: var(--font-family);
    --font-body: var(--font-family);
    --text-display: clamp(2rem, 4vw + 1rem, 3.25rem);
    --text-title: clamp(1.75rem, 2vw + 1rem, 2.5rem);
    --text-subtitle: clamp(1.25rem, 1vw + 1rem, 1.5rem);
    --text-body: 1.125rem;
    --text-meta: 0.875rem;
    --leading-display: 1.15;
    --leading-body: 1.65;
    --measure-prose: 62ch;

    /* Space */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4.5rem;
    --space-section: clamp(2.5rem, 5vw, 4.5rem);
    --space-section-tight: clamp(1.5rem, 3vw, 2.5rem);

    /* Shape */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0f1117;
        --color-surface: #1a1f2e;
        --color-text: #e2e8f0;
        --color-text-muted: #94a3b8;
        --color-border: #1e293b;
        --color-accent: #5b8cff;
        --color-accent-hover: #7aa2ff;
        --color-tag: #1e293b;
    }
}
