/* ============================================================================
   Montserrat — self-hosted
   ----------------------------------------------------------------------------
   Why this file exists (replaces the Google Fonts <link> on every page):

   The site used to load Montserrat from fonts.googleapis.com with
   `&display=swap`. That was the source of a visible flash on every reload:
   `swap` tells the browser "paint immediately with the fallback face, then
   hot-swap to Montserrat the moment it arrives". On a cold cache the webfont
   arrives late enough that a full page of Arial/Helvetica is already on
   screen, and the swap then reflows it. That is the ugly jump.

   Two changes fix it, and they work together:

   1. `font-display: block` instead of `swap`. The browser is allowed to hold
      text invisible for up to ~3s rather than painting a face it is about to
      throw away. On a warm cache (every reload after the first, and every
      subsequent page in the same session) the font is already in memory and
      this is instant. On a cold cache the gap is a very short block on the
      text, which reads as a slight delay - far less jarring than a reflow.

   2. `<link rel="preload">` in each page's <head> (see the pages themselves).
      This starts the woff2 download in parallel with the CSS instead of only
      after the stylesheet has been parsed and matched, so the block window in
      (1) is normally over before first paint even happens.

   Self-hosting also removes two third-party connections (fonts.googleapis.com
   and fonts.gstatic.com) from the critical path and from the CSP.

   Montserrat v31 is a VARIABLE font: one file covers the whole 100-900 weight
   axis, so a single `font-weight: 200 400` declaration serves the 200/300/400
   weights the design uses. Verified by hash - the per-weight downloads Google
   serves for 200, 300 and 400 are byte-identical.

   Subsets: latin + latin-ext only. The site is English/Spanish; the cyrillic
   and vietnamese cuts Google would also serve are dead weight here. Keep the
   unicode-range values as-is so a stray glyph falls through to the next
   subset (or to the local fallback) rather than rendering as tofu.
   ========================================================================== */

/* --- normal (upright) ---------------------------------------------------- */

@font-face{
  font-family:"Montserrat";
  font-style:normal;
  font-weight:200 400;
  font-display:block;
  src:url("/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face{
  font-family:"Montserrat";
  font-style:normal;
  font-weight:200 400;
  font-display:block;
  src:url("/fonts/montserrat-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;
}

/* --- italic -------------------------------------------------------------- */

@font-face{
  font-family:"Montserrat";
  font-style:italic;
  font-weight:200 400;
  font-display:block;
  src:url("/fonts/montserrat-italic-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face{
  font-family:"Montserrat";
  font-style:italic;
  font-weight:200 400;
  font-display:block;
  src:url("/fonts/montserrat-italic-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;
}
