/* =====================================================================
   Self-hosted webfonts.

   No request may leave for fonts.googleapis.com or fonts.gstatic.com on a
   production page — it is both a performance cost and a GDPR liability
   (PRD v2.0 §10.5, acceptance criterion 9).

   Regenerating these files: scripts/fetch-fonts.sh in the repo README. The
   icon font is a SUBSET — see the note above the Material Symbols rule
   before adding a new icon name to a field.
   ===================================================================== */

/* ---------- DM Sans ----------
   Variable across optical size (9–40) and weight (300–900), so one file per
   subset covers every weight the design uses. `swap` keeps text readable
   while the font loads. */

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 900;
    font-stretch: 100%;
    font-display: swap;
    src: url('../fonts/dm-sans-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+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 300 900;
    font-stretch: 100%;
    font-display: swap;
    src: url('../fonts/dm-sans-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;
}

/* Italic is used by the Swedish hero quote. */
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 300 900;
    font-stretch: 100%;
    font-display: swap;
    src: url('../fonts/dm-sans-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+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 300 900;
    font-stretch: 100%;
    font-display: swap;
    src: url('../fonts/dm-sans-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;
}

/* ---------- Material Symbols Outlined ----------
   SUBSET — 111 icons, 20 KB. The full variable font is 3.9 MB, which no
   amount of caching makes acceptable on a 4G phone.

   Only the FILL axis is variable (the `.fill` modifier needs it); opsz,
   wght and GRAD are pinned to the single values the design asks for, which
   is where most of the saving comes from.

   An icon name that is not in the subset renders as its literal text, e.g.
   the word "syringe". The icon fields in wp-admin list the available names.
   To add one, re-run the fetch script with the name included and rebuild.

   `block` rather than `swap`: a brief blank is better than a flash of the
   ligature text, which reads as broken content rather than as a loading
   state. */
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../fonts/material-symbols-outlined-subset.woff2') format('woff2');
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
