/*
 * Cairo, self-hosted.
 *
 * Replaces the Google Fonts stylesheet, which put a third-party origin on the
 * critical path: a DNS lookup, a TLS handshake, a CSS fetch and then the font
 * fetch, all in series before text could paint.
 *
 * Two files per weight. Latin is small; Arabic is larger because it needs the
 * init/medi/fina/isol, rlig, mark and mkmk OpenType features for letters to
 * join. Subsetting Arabic without them renders text as disconnected letters,
 * which is the usual reason self-hosted Arabic looks wrong.
 *
 * unicode-range means the browser downloads only what a page uses: an English
 * page pulls the Latin file per weight and never touches the Arabic ones.
 *
 * Weights match what the Google Fonts request asked for (300 to 800). 300 is
 * included because .title-light in sections.css uses it -- Cairo does ship a
 * Light weight, so omitting it would have silently rendered that text heavier.
 *
 * Files come from the @fontsource/cairo package. Cairo is licensed under the
 * SIL Open Font License; see static/fonts/LICENSE.txt.
 */

/* --- 300 ------------------------------------------------------------------ */
@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-300-latin.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+20AC, U+2122, U+00D7, U+00B7;
}

@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-300-arabic.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* --- 400 ------------------------------------------------------------------ */
@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-400-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+20AC, U+2122, U+00D7, U+00B7;
}

@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-400-arabic.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* --- 500 ------------------------------------------------------------------ */
@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-500-latin.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+20AC, U+2122, U+00D7, U+00B7;
}

@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-500-arabic.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* --- 600 ------------------------------------------------------------------ */
@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-600-latin.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+20AC, U+2122, U+00D7, U+00B7;
}

@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-600-arabic.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* --- 700 ------------------------------------------------------------------ */
@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-700-latin.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+20AC, U+2122, U+00D7, U+00B7;
}

@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-700-arabic.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* --- 800 ------------------------------------------------------------------ */
@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-800-latin.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193, U+20AC, U+2122, U+00D7, U+00B7;
}

@font-face {
    font-family: Cairo;
    src: url('../static/fonts/cairo-800-arabic.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

