/* The shop's typefaces, served from the shop.
 *
 * WHY THESE ARE HERE AND NOT ON GOOGLE
 * A phone in Dhaka on a slow connection paid for two extra origins before it could read a word:
 * a DNS lookup and a TLS handshake to fonts.googleapis.com for a stylesheet, then the same again
 * to fonts.gstatic.com for the files — 300–600 ms on a bad day, before the first letter. And the
 * stylesheet asked for eight weights across three families, 217 KB, most of which the page never
 * set in.
 *
 * These four files are Google's own variable fonts, subset to what a shop page prints (Latin,
 * punctuation, currency signs, the taka sign) — 96 KB in three files for a serif look, one
 * request each, on the same connection the page came over, and preloaded by app/views/_fonts.php.
 *
 * VARIABLE, so one file carries every weight a look asks for; a look that sets 300 and 700 costs
 * the same bytes as one that sets only 500. Bengali keeps its whole block: shaping needs every
 * conjunct, and the taka sign lives in it.
 *
 * font-display: swap — text is readable in the fallback face at once and re-set when the file
 * lands. The size-adjust lines make that swap move nothing: each fallback is scaled to the metrics
 * of the face it stands in for, so a headline does not jump when Cormorant arrives.
 */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/jost-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Bengali only. Digits and Latin in a price fall through to the body face, so "৳999" sets the
 * taka sign here and the figures in Jost — one consistent line, and no second Latin file. */
@font-face {
  font-family: 'Noto Sans Bengali';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/noto-sans-bengali.woff2') format('woff2');
  unicode-range: U+0980-09FF, U+1CD0-1CF9, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}

/* Metric-matched stand-ins, so the swap from fallback to web font moves nothing on the page. */
@font-face {
  font-family: 'Cormorant Garamond Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 107%; ascent-override: 92%; descent-override: 28%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Jost Fallback';
  src: local('Helvetica Neue'), local('Helvetica'), local('Arial');
  size-adjust: 98%; ascent-override: 105%; descent-override: 29%; line-gap-override: 0%;
}
@font-face {
  font-family: 'Manrope Fallback';
  src: local('Helvetica Neue'), local('Helvetica'), local('Arial');
  size-adjust: 103%; ascent-override: 103%; descent-override: 28%; line-gap-override: 0%;
}
