/* ════════════════════════════════════════════════════════════════════
   PF DESIGN SYSTEM — Self-hosted web fonts  (PL-1, 2026-09-08)
   ────────────────────────────────────────────────────────────────────
   Replaces the Google Fonts CDN <link> the layouts carried (Inter /
   Source Serif Pro / JetBrains Mono). Same families and the SAME faces
   the CDN actually delivered, now served from this origin: no
   third-party request, no IP logging (GDPR — Danish market), works
   offline, and the CSP no longer admits the two Google font origins.
   docs/design/ADMIN-DESIGN-SYSTEM-PLAN §B5 "Fonts".

   FILES  wwwroot/fonts/<family>/ — each directory ships its OFL.txt;
   version / source URL / sha256 per file in wwwroot/lib/LICENSES.md.
     inter/InterVariable.woff2                    Inter 4.1              wght axis (variable)
     source-serif-4/SourceSerif4-Semibold.woff2   Source Serif 4.005R    600
     source-serif-4/SourceSerif4-Bold.woff2       Source Serif 4.005R    700
     jetbrains-mono/JetBrainsMono-Regular.woff2   JetBrains Mono 2.304   400
     jetbrains-mono/JetBrainsMono-Medium.woff2    JetBrains Mono 2.304   500
     archivo/archivo-latin[-ext]-wdth-normal.woff2       Archivo v25      wght + wdth axes (CORP-6)
     public-sans/public-sans-latin[-ext]-wght-normal.woff2 Public Sans v21  wght axis (CORP-6)

   CORP-6 (2026-10-12) — Archivo + Public Sans are the "corporate" font pair of
   the tenant website font choice (feature.website.webfonts.v1). Tenant sites
   load this sheet ONLY while that flag is ON and the tenant picked a pair, so a
   site on the template default never gets 'Inter' defined and renders as before.
   These two come as the Google Fonts latin / latin-ext subsets (fontsource
   5.3.0 build, unmodified; neither family has a Reserved Font Name), split by
   unicode-range: Danish, Swedish and Norwegian are in the latin file; the
   latin-ext file is fetched only for text that needs it. No italic faces —
   the browser synthesises, as for the families above.

   WHY EXACTLY THESE FACES (weight audit 2026-09-08 — matching stays
   identical to what the CDN served, so rendering does not change):
     • Inter — the CDN served ONE variable file for wght 400/500/600/700;
       so does this sheet. The descriptor is clamped to 400–700 so any
       other weight snaps exactly as before (300 → 400, 800 → 700).
     • Source Serif — the CSS asks for 500/600/700, but the legacy CDN
       family ("Source Serif Pro") has no 500: only 600 + 700 were ever
       delivered and 500 resolved to the 600 face. Same two faces here.
       Declared under BOTH names — 'Source Serif 4' (canonical, plan §B5)
       and 'Source Serif Pro' (what --platforma-font-serif and ~20 legacy
       rules name). Identical URLs → one download.
     • JetBrains Mono — 400 + 500 (the two faces delivered); 600/700 keep
       synthesising bold from Medium as before.
     • No italic faces were ever loaded (browsers synthesise) — unchanged.

   SUBSETTING — none. fonttools/pyftsubset is not available on the build
   host, so the OFFICIAL release woff2 files ship unmodified (full
   charset: Latin, Latin-ext incl. æøå äö ü ß, Greek, Cyrillic, …).
   Unmodified files also stay clear of the OFL Reserved-Font-Name clause
   ("Source" is an Adobe RFN — a subset is a Modified Version and would
   have to be renamed internally). Follow-up: pyftsubset to Latin +
   Nordic, keep sha256 provenance, rename Source Serif in the name table.

   CACHING — the URLs carry ?v=<upstream version>: Program.cs serves any
   static asset with a v= query as `public, max-age=31536000, immutable`
   (RR.3). Bump the version here AND in the layouts' <link rel="preload">
   (they must be byte-identical URLs or the preload is fetched twice).

   LOADING — font-display: swap (text is never invisible). The layouts
   preload the hero files with crossorigin: fonts always fetch in CORS
   mode, so a preload without it is a wasted, duplicated request.
   ════════════════════════════════════════════════════════════════════ */

/* ── Inter (UI sans) — variable, wght 400–700 ─────────────────────── */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/inter/InterVariable.woff2?v=4.1') format('woff2');
}

/* ── Source Serif 4 (editorial headings) — canonical name ─────────── */
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/source-serif-4/SourceSerif4-Semibold.woff2?v=4.005R') format('woff2');
}

@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/source-serif-4/SourceSerif4-Bold.woff2?v=4.005R') format('woff2');
}

/* ── 'Source Serif Pro' — the legacy family name the existing CSS uses.
      Same files as above; the browser fetches each URL once. New CSS
      should name var(--platforma-font-serif) / 'Source Serif 4'. ─────── */
@font-face {
    font-family: 'Source Serif Pro';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/source-serif-4/SourceSerif4-Semibold.woff2?v=4.005R') format('woff2');
}

@font-face {
    font-family: 'Source Serif Pro';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/source-serif-4/SourceSerif4-Bold.woff2?v=4.005R') format('woff2');
}

/* ── JetBrains Mono (code / identifiers) — 400 + 500 ──────────────── */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2?v=2.304') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2?v=2.304') format('woff2');
}

/* ── Archivo (CORP-6, corporate headings) — variable wght 100–900, wdth 62–125 % ── */
@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url('/fonts/archivo/archivo-latin-wdth-normal.woff2?v=25') format('woff2');
    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;
}

@font-face {
    font-family: 'Archivo';
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url('/fonts/archivo/archivo-latin-ext-wdth-normal.woff2?v=25') format('woff2');
    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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Public Sans (CORP-6, corporate body text) — variable wght 100–900 ── */
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/public-sans/public-sans-latin-wght-normal.woff2?v=21') format('woff2');
    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;
}

@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/public-sans/public-sans-latin-ext-wght-normal.woff2?v=21') format('woff2');
    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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
