/* Inter 4.1, self-hosted (https://rsms.me/inter, SIL Open Font License 1.1,
   LICENSE.txt in this directory). The two WOFF2 files are the unmodified
   variable fonts of the official release (github.com/rsms/inter, v4.1, web/).
   Inter is the second face of the stack, after Satoshi (public/fonts/satoshi):
   it draws what Satoshi cannot, which is Cyrillic, Greek, Vietnamese, the rest
   of Latin Extended, and the hryvnia and ruble signs. The unicode-range below
   is how a page gets there without paying for it: a page of Latin text never
   asks for either file. The italic file is fetched only for italic text in
   those scripts. Kept in sync with the same faces in src/index.css. */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0300-036F, U+0370-03FF, U+0400-052F, U+1C80-1C8F, U+1E00-1FFF, U+20A0-20C0, U+2116, U+2C60-2C7F, U+2DE0-2DFF, U+A640-A69F, U+A720-A7FF, U+FE2E-FE2F;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter/InterVariable-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0300-036F, U+0370-03FF, U+0400-052F, U+1C80-1C8F, U+1E00-1FFF, U+20A0-20C0, U+2116, U+2C60-2C7F, U+2DE0-2DFF, U+A640-A69F, U+A720-A7FF, U+FE2E-FE2F;
}

/* Inter as the whole text face, for a page whose language Satoshi cannot spell
   (Vietnamese: 48 of 74 test letters are missing, and a word drawn half in
   Satoshi and half in Inter, with Inter's taller x-height, looks broken). The
   same two files as above under another family name, without the
   unicode-range, so Basic Latin is drawn by Inter too; the browser fetches
   each file once. Used only by html:lang(vi) in src/index.css. */
@font-face {
  font-family: 'Inter Text';
  src: url('/fonts/inter/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter Text';
  src: url('/fonts/inter/InterVariable-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Metric-override fallback. `font-display: swap` shows a fallback font until
   Inter loads; without matched metrics that swap reflows text (line-height and
   width change) and adds layout shift (CLS). This face wraps a locally
   installed Arial and re-declares Inter's own metrics, so the pre-swap box
   matches Inter. Listed immediately after 'Inter' in the font stack
   (src/index.css, tailwind.config.js), the swap-in is metric-neutral. It has no
   unicode-range on purpose: it is the last named family, and a character Inter
   is not asked for (Japanese, Korean) finds no glyph in Arial either and falls
   to the system stack.
   Inter (InterVariable.woff2, default instance): unitsPerEm 2048; hhea
   ascender 1984, descender 494, lineGap 0; average advance of English text
   983.795 (a-z and space weighted by letter frequency, the measure capsize and
   next/font use; OS/2 xAvgCharWidth averages all ~2,500 glyphs and is no
   guide to running text). Arial: unitsPerEm 2048, same average 915.393.
   size-adjust = 983.795 / 915.393; each override = Inter's value /
   (2048 * size-adjust). */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  font-weight: 100 900;
  font-style: normal;
  size-adjust: 107.47%;
  ascent-override: 90.14%;
  descent-override: 22.44%;
  line-gap-override: 0%;
}
