/*
 * marketing-fonts.css - the font faces the public site uses (W-04).
 *
 * Why this file exists next to fonts.css: the portal keeps the complete Inter and Noto Sans Bengali
 * faces, because a portal prints children's names and every Bangla conjunct a name can contain. A
 * marketing page is a fixed set of English words plus two or three Bangla lines, and measured in a
 * browser it was downloading 252 kB of fonts to draw them: four Inter roman subsets, then the full
 * Bengali block in two weights because the brand line is set at weight 600 and no 600 face exists.
 *
 * These faces are subsets of the same two families, generated once with fontTools:
 *
 *   Inter 400, 600 and 700, ASCII plus the typographic punctuation this site uses:
 *     pyftsubset public/assets/fonts/inter-400-latin.woff2 --flavor=woff2 --no-hinting \
 *         --desubroutinize --layout-features=kern \
 *         --unicodes=U+0020-007E,U+2014,U+2013,U+2019,U+2018,U+201C,U+201D,U+2026,U+00B7,U+00D7,U+2192,U+2190,U+00B0,U+2022,U+00A7,U+20AC,U+00A3,U+00A5,U+00A9,U+00AE,U+2122,U+00B1 \
 *         --output-file=public/assets/fonts/inter-400-site.woff2
 *     (repeat for inter-600-latin.woff2 -> inter-600-site.woff2 and 700)
 *
 *   Noto Sans Bengali 400, the Bangla characters the marketing shell itself shows:
 *     pyftsubset public/assets/fonts/noto-sans-bengali-400-bengali.woff2 --flavor=woff2 --no-hinting \
 *         --desubroutinize --layout-features=akhn,blwf,blws,ccmp,cjct,fina,half,init,locl,mark,medl,mkmk,nukt,pres,pstf,psts,rkrf,rphf,abvs,blhs,dist,haln,rtla,valt \
 *         --unicodes=U+0964,U+0982,U+0986,U+0987,U+098F,U+0995,U+099C,U+099F,U+09A6,U+09A8,U+09AA,U+09AB,U+09AC,U+09AE,U+09AF,U+09B0,U+09B2,U+09B8,U+09BE,U+09C1,U+09C7,U+09CB,U+09CD,U+09E6,U+09E7,U+09E8,U+09E9,U+09EA,U+09EB,U+09EC,U+09ED,U+09EE,U+09EF,U+200C,U+200D \
 *         --output-file=public/assets/fonts/noto-sans-bengali-400-chrome.woff2
 *
 * The layout preloads the two Inter faces an above-the-fold render waits for and nothing else. Every
 * subset keeps the Bengali shaping features of the original file (conjuncts, half forms, reph), so a
 * subset face shapes a conjunct exactly like the full one; a character that is in neither set falls back
 * to the system font for that character alone, which is why the Bengali set here is the whole alphabet
 * rather than the handful of letters the current pages happen to use.
 *
 * Bangla reading pages link marketing-fonts-bn.css as well, which adds the wider Bengali alphabet.
 *
 * License: Inter and Noto Sans Bengali are both SIL Open Font License 1.1, which permits subsetting and
 * redistribution. No font is loaded from a CDN: the strict CSP (`font-src 'self'`) forbids it.
 */

@font-face {
    font-family: 'Inter Site';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/inter-400-site.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Site';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/inter-600-site.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter Site';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/assets/fonts/inter-700-site.woff2') format('woff2');
}

/*
 * The two Bangla lines in the shell (the brand mark, the language switch and the footer sentence) at the
 * two weights the stylesheet asks for. Both weights point at one file: a 600 rule without its own file
 * would make the browser synthesise a bold, which on Bangla looks worse than the same file reused.
 */
@font-face {
    font-family: 'Noto Sans Bengali Chrome';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fonts/noto-sans-bengali-400-chrome.woff2') format('woff2');
}

@font-face {
    font-family: 'Noto Sans Bengali Chrome';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/assets/fonts/noto-sans-bengali-400-chrome.woff2') format('woff2');
}

/* The stack every marketing page uses. marketing-fonts-bn.css replaces it for a Bangla reading page. */
:root {
    --font: 'Inter Site', 'Noto Sans Bengali Chrome', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
