/**
 * tokens.css — Design-Tokens (Farben + Schriftfamilien) für die Curriculum-Map.
 *
 * Quelle: docs/curriculum-source/reference-implementation/styles.css. OKLCH ist
 * Default; @supports-Block aktiviert RGB-Fallback für Browser ohne OKLCH (vor
 * Frühjahr 2023). Webfonts seit MVP-Release self-hosted unter assets/fonts/
 * (Inter sans, Instrument Serif, JetBrains Mono — Quelle Fontsource via
 * jsdelivr-CDN, latin-Subset, ~180 KB total).
 */

/* ============================================================
   @font-face — Self-Hosting der drei Designsystem-Schriften.
   `font-display: swap` zeigt System-Fallback während des Loads,
   tauscht sobald WOFF2 da. Reduziert FOIT (Flash of Invisible Text).
   AssetMapper hashed die WOFF2-URLs, daher `asset()`-fähige Pfade.
   ============================================================ */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/inter-400-poxsSdI.woff2") format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/inter-500-Uwgfwtt.woff2") format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/inter-600-keCwlca.woff2") format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/inter-700-_eucScQ.woff2") format('woff2');
}

@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/instrument-serif-400-9W389ra.woff2") format('woff2');
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/instrument-serif-400-italic-UJbcIJF.woff2") format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-400-zjT1pI9.woff2") format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/jetbrains-mono-500-l4pIovd.woff2") format('woff2');
}

:root {
    /* Farben aus reference-implementation/styles.css */
    --bg:        oklch(96% 0.013 60);
    --surface:   oklch(99% 0.008 60);
    --ink:       oklch(22% 0.014 50);
    --ink-soft:  oklch(45% 0.014 50);
    --line:      oklch(88% 0.013 60);
    --line-soft: oklch(94% 0.012 60);
    --accent:    oklch(55% 0.16 35);
    --accent-2:  oklch(50% 0.08 220);

    /* Schriftfamilien — System-Fallbacks bleiben, falls WOFF2 mal nicht lädt
       (CSP, Network-Glitch, schlechtes Mobile-Netz). */
    --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
    --sans:  'Inter', -apple-system, system-ui, sans-serif;
    --mono:  'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

/* RGB-Fallback für ältere Browser (vor Frühjahr 2023). */
@supports not (color: oklch(0% 0 0)) {
    :root {
        --bg:        rgb(245, 242, 236);
        --surface:   rgb(254, 252, 248);
        --ink:       rgb(35, 31, 28);
        --ink-soft:  rgb(108, 102, 96);
        --line:      rgb(220, 215, 207);
        --line-soft: rgb(238, 234, 227);
        --accent:    rgb(199, 100, 74);
        --accent-2:  rgb(64, 116, 145);
    }
}
