/* ==========================================================================
   CODEWERK LABS — SCHRIFTEN
   Self-hosted. Keine Verbindung zu fonts.googleapis.com oder
   fonts.gstatic.com — das ist gleichzeitig Datenschutz-, Performance-
   und CSP-Entscheidung (ARCHITECTURE.md §6).

   Beide Familien sind Variable Fonts. Google liefert für Inter bei
   jedem angeforderten Gewicht dieselbe Datei aus — geprüft per Hash.
   Eine Datei statt drei spart 266 KB.

   Lizenz: SIL Open Font License 1.1 (beide). Self-Hosting erlaubt.

   Signifier und Söhne aus dem Masterprompt sind kommerziell
   lizenzpflichtig (offener Punkt O-8). Wird lizenziert, werden hier
   die Quellen getauscht — die Tokens in tokens.css bleiben unberührt.

   unicode-range trennt latin von latin-ext: Deutsche Texte brauchen
   nur latin (48 KB), latin-ext (85 KB) lädt der Browser erst, wenn
   ein Zeichen daraus tatsächlich vorkommt.
   ========================================================================== */

/* ── Inter — UI, Fließtext, Navigation ─────────────────────────────────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;          /* Variable: deckt alle Gewichte ab */
  font-display: swap;            /* Text sofort sichtbar, kein FOIT */
  src: url('../fonts/inter-var-latin.woff2') 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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-var-latin-ext.woff2') 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;
}

/* ── Source Serif 4 — Display, Headlines ──────────────────────────────── */

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/source-serif-var-latin.woff2') 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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/source-serif-var-latin-ext.woff2') 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;
}

/* Echtes Kursiv, kein synthetisch geneigtes.
   Der kursive Akzent in Headlines (§20) ist ein Markenelement —
   eine schräg gestellte Aufrechte wäre dafür zu schwach. */

@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/source-serif-var-italic-latin.woff2') 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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/source-serif-var-italic-latin-ext.woff2') 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;
}


/* ── Metrik-angepasste Ersatzschriften ──────────────────────────────────
   Anlass (QA 2026-09-23): CLS 0,156 auf der Startseite. Die H1 stand
   bis zum Laden von Source Serif 4 in Georgia — Georgia läuft ~10 %
   breiter, die Headline brach in fünf statt vier Zeilen um, und beim
   Schriftwechsel rutschte die ganze Seite 84 px nach oben.

   Diese Faces verpacken die lokal vorhandene Systemschrift so, dass
   sie Laufweite und Zeilenhöhe der Webfont trifft. Der Wechsel
   passiert dann ohne Umbruchänderung.

   Werte gemessen, nicht geschätzt:
     size-adjust   = Breite Webfont / Breite Systemschrift, per Canvas
                     über den gesamten Seitentext (tests/performance)
     ascent/descent = hhea-Metrik der Webfont / size-adjust (fontTools)
       Source Serif 4: UPM 1000, asc 1036, desc 335
       Inter:          UPM 2048, asc 1984, desc 494                    */

@font-face {
  font-family: 'Source Serif Fallback';
  font-style: normal;
  src: local('Georgia');
  size-adjust: 90.83%;
  ascent-override: 114.06%;
  descent-override: 36.88%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Source Serif Fallback';
  font-style: italic;
  src: local('Georgia Italic'), local('Georgia-Italic');
  size-adjust: 84.89%;
  ascent-override: 122.04%;
  descent-override: 39.46%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Inter Fallback';
  font-style: normal;
  src: local('Arial'), local('ArialMT');
  size-adjust: 105.81%;
  ascent-override: 91.55%;
  descent-override: 22.80%;
  line-gap-override: 0%;
}
