/*
 * Self-hosted fonts.
 *
 * Served from this origin rather than Google's, because the audience is on low-end
 * Android over mobile data: a third-party font host costs a DNS lookup, a TLS
 * handshake and a second connection before the first Bangla glyph can paint. It also
 * means no request to a third party is made on a customer's behalf.
 *
 * Only what this site renders is shipped. Inter is the variable build, so its whole
 * 400–700 range is one 47 KB file instead of four static ones, and only its `latin`
 * subset — `latin-ext` is Eastern European diacritics that never appear here, and is
 * larger than `latin` itself. Hind Siliguri has no variable build, so its four weights
 * stay separate, and only `bengali` is shipped: Latin inside a Bangla element falls
 * through to Inter, which is what the design asks for anyway.
 *
 * `font-display: swap` throughout — text in a fallback face is readable; invisible
 * text is not.
 *
 * Both families are SIL Open Font License 1.1, which permits self-hosting.
 *
 * Regenerate by re-running the phase 8 font step; do not hand-edit the unicode-range
 * values, which are what stop a Latin-only page downloading the Bengali file.
 */

/* Inter 400 700 — latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/inter-400-700-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;
}

/* Hind Siliguri 400 — bengali */
@font-face {
  font-family: 'Hind Siliguri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/hind-siliguri-400-bengali.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;
}

/* Hind Siliguri 500 — bengali */
/*
 * 500-600, not 600. The medium step used to ship its own ~73 kB file to serve three
 * declarations — the field label, the tag pill and the table head — which is 11% of the
 * homepage's transferred bytes for half a weight step. Widening this descriptor lets the
 * semibold file answer a 500 request with a real glyph rather than a synthesised one,
 * and downloads nothing extra. DESIGN.md records that the medium role now renders at
 * semibold; if a Hind Siliguri variable build ever ships, this is where it comes back.
 */
@font-face {
  font-family: 'Hind Siliguri';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url(../fonts/hind-siliguri-600-bengali.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;
}

/* Hind Siliguri 700 — bengali */
@font-face {
  font-family: 'Hind Siliguri';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/hind-siliguri-700-bengali.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;
}
