/*
 * RuneGrove type — two self-hosted families (docs/superpowers/specs/2026-10-15-type-system-design.md).
 *
 * Linked from public/index.html AND from the article srcdoc iframe (ArticleDetailPage.js), which
 * is why this file lives in public/ rather than src/: one file, both documents.
 *
 *   Zodiak             headlines            Fontshare, ITF Free Font License 2.0 (zodiak/v1/FFL.txt)
 *   Zodiak Text        reading text         the SAME two Zodiak files at size-adjust 90%
 *   Schibsted Grotesk  interface + numbers  SIL OFL 1.1 (schibsted-grotesk/v1/OFL.txt)
 *
 * ⚠️ FFL §02 forbids subsetting, format conversion or any modification of the Zodiak files.
 * They are Fontshare's Zodiak_Complete/Fonts/WEB/fonts/ bytes, pinned by SHA-256 in
 * src/styles/fontLoading.test.js. size-adjust below is a CSS descriptor, not a file change.
 *
 * Why "Zodiak Text": Zodiak's x-height is 0.498 and Spectral's (the old reading face) 0.450,
 * so at one font-size Zodiak reads ~11% larger and ~9.5% wider. 90% puts it at 0.448 / 11.96 —
 * Spectral's metrics — so ~66 reading rules keep their look without each being retuned.
 * Both families point at the same URLs, so the browser downloads each file once.
 *
 * Fallback faces: local Georgia / Arial with metric overrides computed from the font tables
 * (fontTools, Oct 15 2026; inputs in the implementation plan), so the swap from fallback to web
 * font does not shift the layout. Zodiak is measured at weight 600 (headings), Zodiak Text at
 * 400 (reading), Schibsted at 400.
 */

/* ---------- Zodiak: headlines (variable 100–900) ---------- */
@font-face {
    font-family: 'Zodiak';
    src: url('/fonts/zodiak/v1/Zodiak-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Zodiak';
    src: url('/fonts/zodiak/v1/Zodiak-VariableItalic.woff2') format('woff2');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* ---------- Zodiak Text: reading text — same files, 90% ---------- */
@font-face {
    font-family: 'Zodiak Text';
    src: url('/fonts/zodiak/v1/Zodiak-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    size-adjust: 90%;
}
@font-face {
    font-family: 'Zodiak Text';
    src: url('/fonts/zodiak/v1/Zodiak-VariableItalic.woff2') format('woff2');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
    size-adjust: 90%;
}

/* ---------- Schibsted Grotesk: interface + numbers (variable 400–900) ---------- */
/* latin-ext */
@font-face {
    font-family: 'Schibsted Grotesk';
    src: url('/fonts/schibsted-grotesk/v1/SchibstedGrotesk-latin-ext.woff2') format('woff2');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Schibsted Grotesk';
    src: url('/fonts/schibsted-grotesk/v1/SchibstedGrotesk-latin.woff2') format('woff2');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext, italic */
@font-face {
    font-family: 'Schibsted Grotesk';
    src: url('/fonts/schibsted-grotesk/v1/SchibstedGrotesk-Italic-latin-ext.woff2') format('woff2');
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin, italic */
@font-face {
    font-family: 'Schibsted Grotesk';
    src: url('/fonts/schibsted-grotesk/v1/SchibstedGrotesk-Italic-latin.woff2') format('woff2');
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Metric-matched fallbacks (no layout shift on swap) ---------- */
@font-face {
    font-family: 'Zodiak Fallback';
    src: local('Georgia');
    size-adjust: 117.82%;
    ascent-override: 84.02%;
    descent-override: 23.76%;
    line-gap-override: 7.64%;
}
@font-face {
    font-family: 'Zodiak Text Fallback';
    src: local('Georgia');
    size-adjust: 101.49%;
    ascent-override: 87.79%;
    descent-override: 24.83%;
    line-gap-override: 7.98%;
}
@font-face {
    font-family: 'Schibsted Grotesk Fallback';
    src: local('Arial');
    size-adjust: 105.22%;
    ascent-override: 92.81%;
    descent-override: 24.50%;
    line-gap-override: 0%;
}
