/*
 * Montserrat — the Darma Henwa brand typeface.
 *
 * SIL Open Font License 1.1; the licence text ships beside the files at
 * /assets/fonts/OFL.txt. "Montserrat" is a Reserved Font Name under that
 * licence, so the family name below must not be changed.
 *
 * These are VARIABLE fonts: one file per subset covers the whole 100-900
 * weight axis, which is why `font-weight` is a range. The `unicode-range`
 * descriptors mean a browser only downloads the latin-ext file when a page
 * actually contains a character from that block, and the italic files only
 * when something is italic. A normal page pulls just the 35 KB latin file.
 *
 * Montserrat has no CJK glyphs. The `zh` locale is produced at runtime by
 * the Google Translate widget, so every font-family rule on the site must
 * end in a generic family (see --dh-font in custom.css) or Chinese text
 * falls back to the browser's default serif.
 *
 * This file is separate from custom.css so the TinyMCE editor can reuse it
 * via `content_css` (config/moonshine_tinymce.php) without duplicating the
 * @font-face blocks.
 */

/* latin — normal */
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/montserrat-latin-wght-normal.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;
}

/* latin-ext — normal */
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/montserrat-latin-ext-wght-normal.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-20C4, U+2113, U+2C60-2C7F,
        U+A720-A7FF;
}

/* latin — italic */
@font-face {
    font-family: "Montserrat";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/montserrat-latin-wght-italic.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;
}

/* latin-ext — italic */
@font-face {
    font-family: "Montserrat";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/montserrat-latin-ext-wght-italic.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-20C4, U+2113, U+2C60-2C7F,
        U+A720-A7FF;
}

/*
 * Default for the editor iframe, which loads this file on its own. The
 * public site re-declares the same thing on `body` in custom.css.
 */
body {
    font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
}
