/* =========================================================================
 * MVZ Roth — Self-hosted fonts (no external connection, DSGVO-compliant)
 *
 * Fraunces — Variable expressive serif (display, headlines)
 * Inter Tight — Modern refined sans-serif (body, UI)
 *
 * No connections to Google servers. All fonts locally served.
 * ========================================================================= */

/* -------------------------------------------------------------------------
 * One file per family and style, not per weight.
 * -------------------------------------------------------------------------
 * Both families ship as VARIABLE fonts with a 100–900 weight axis, so the six
 * weights the theme uses all live in a single file. Declaring them as six
 * separate @font-face rules pointing at six copies of that same file made the
 * browser download it once per weight: the front page fetched 7 woff2 files /
 * 292 KB where 3 files / 127 KB carry exactly the same typefaces.
 *
 * A weight RANGE (`font-weight: 100 900`) is what tells the browser this is a
 * variable face and lets it instance any weight from the one download.
 *
 * Inter Tight's italic is the exception — it ships static at 400, so it keeps
 * a single weight and the browser synthesises bolder italics, which the design
 * does not use.
 * ---------------------------------------------------------------------- */

/* ----- INTER TIGHT (Body) ----- */
@font-face {
    font-family: 'Inter Tight';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../../fonts/inter-tight-v7-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter Tight';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../../fonts/inter-tight-v7-latin-italic.woff2') format('woff2');
}

/* ----- FRAUNCES (Display) ----- */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../../fonts/fraunces-v32-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('../../fonts/fraunces-v32-latin-italic.woff2') format('woff2');
}

/* -------------------------------------------------------------------------
 * Metric-compatible fallbacks
 * -------------------------------------------------------------------------
 * With font-display:swap the first paint uses the system fallback. Matching its
 * metrics to the webfont keeps the swap from shifting layout (CLS ≈ 0).
 * Values derived from the ascent/descent/x-height ratios of each family.
 * ---------------------------------------------------------------------- */
@font-face {
    font-family: 'Inter Tight Fallback';
    src: local('Arial'), local('Helvetica Neue'), local('Liberation Sans');
    ascent-override: 96%;
    descent-override: 24%;
    line-gap-override: 0%;
    size-adjust: 101%;
}
@font-face {
    font-family: 'Fraunces Fallback';
    src: local('Georgia'), local('Times New Roman'), local('Liberation Serif');
    ascent-override: 92%;
    descent-override: 24%;
    line-gap-override: 0%;
    size-adjust: 106%;
}
