/* css/pb/fonts.css — self-hosted Inter + Noto Sans Bengali (see wwwroot/fonts/README.md for
   versions + licences). font-display: swap avoids invisible text while the woff2 loads; the two
   "Fallback" faces are metric-matched to Arial (capsize-generated overrides) so the swap does not
   reflow the page — CLS stays at the fallback's layout, not the web font's. Loaded before
   tokens.css (--brand-font references 'Inter'; --brand-font-bn references 'Noto Sans Bengali'). */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter/InterVariable.woff2') format('woff2-variations'),
       url('/fonts/inter/InterVariable.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter/InterVariable-Italic.woff2') format('woff2-variations'),
       url('/fonts/inter/InterVariable-Italic.woff2') format('woff2');
}

/* Noto Sans Bengali, restricted to the script's own code points (the values the shipped binary was
   itself subsetted to — see README) plus the punctuation Bengali text actually uses: the danda
   U+0964-0965, ZWNJ/ZWJ U+200C-200D for conjunct control, the Taka/Rupee-adjacent U+20B9, and the
   dotted-circle placeholder U+25CC diacritics render against. A browser only downloads this file
   for text that falls in the range, so an EN page never pays for it. */
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/noto-sans-bengali/NotoSansBengali-Variable.woff2') format('woff2-variations'),
       url('/fonts/noto-sans-bengali/NotoSansBengali-Variable.woff2') format('woff2');
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1,
    U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}

/* Metric-matched fallback (capsize-generated overrides against Arial): sized so the fallback occupies
   the same box Inter would, so a page that lists 'Inter', 'Inter Fallback', ... before its system
   fallback does not reflow (CLS) between the swap's first paint and the woff2 decoding. Declared here
   for WP1.2's base.css body rule to reference; this PR's --brand-font stack is unchanged. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
  size-adjust: 107.06%;
}
