/* tokens.css — Design token system for the Surf Suite
   Canonical source of truth for colors, typography, spacing, radii, shadows.
   Load BEFORE any other stylesheet so tokens are available everywhere.

   Light-first (matches app.css conventions).
   Dark mode via [data-theme="dark"].
*/

:root {
    /* ── Colors — primary / accent ── */
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-light: #eff6ff;

    /* ── Colors — semantic ── */
    --color-success: #22c55e;
    --color-success-light: #f0fdf4;
    --color-warning: #f59e0b;
    --color-warning-light: #fffbeb;
    --color-danger: #ef4444;
    --color-danger-light: #fef2f2;
    --color-purple: #8b5cf6;
    --color-purple-light: #f5f3ff;

    /* ── Colors — surfaces ── */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-alt: #ffffff;
    --color-hover-bg: #f1f5f9;

    /* ── Colors — text ── */
    --color-text: #0f172a;
    --color-text-secondary: #334155;
    --color-text-muted: #5b6b7d;

    /* ── Colors — borders ── */
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;

    /* ── Colors — code ── */
    --color-code-bg: #f1f5f9;
    --color-pre-bg: #0f172a;
    --color-pre-text: #e2e8f0;

    /* ── Typography ── */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;

    /* ── Font sizes ── */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;

    /* ── Spacing ── */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;

    /* ── Border radii ── */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* ── Shadows ── */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);

    /* ── Transitions ── */
    --transition-fast: 150ms ease;
}

/* ── Dark theme ── */
[data-theme="dark"] {
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-light: #172554;

    --color-success-light: #052e16;
    --color-warning-light: #451a03;
    --color-danger-light: #450a0a;
    --color-purple-light: #2e1065;

    --color-bg: #0a0a0f;
    --color-surface: #111118;
    --color-surface-alt: #111118;
    --color-hover-bg: #16161f;

    --color-text: #e5e5ef;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #8b8ba0;

    --color-border: #1e1e2a;
    --color-border-hover: #2a2a3a;

    --color-code-bg: #16161f;
    --color-pre-bg: #0a0a0f;
    --color-pre-text: #e2e8f0;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 1px 3px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
}
