/* ═══════════════════════════════════════════════════════════════
   fonts.css — every @font-face on the site, in one file.

   Replaces the render-blocking request to fonts.googleapis.com.
   That request cost two extra origins before the first word could
   paint: a DNS lookup and a TLS handshake to fonts.googleapis.com
   for the stylesheet, then a SECOND DNS lookup and TLS handshake
   to fonts.gstatic.com for the files themselves, and the browser
   could not even start the second pair until the first had come
   back and been parsed. On a mid-range phone on 4G that is a few
   hundred milliseconds of blank page, and 88% of the traffic here
   is mobile.

   Self-hosted, all four families are same-origin: no new
   connections, and the <link rel="preload"> in the layout can
   start the download in the same breath as the HTML.

   ── WHERE THE FILES CAME FROM ────────────────────────────────
   Fontsource (npm), which repackages the Google Fonts originals
   without changing them:
     @fontsource-variable/inter            5.3.0
     @fontsource-variable/instrument-sans  5.3.0
     @fontsource-variable/jetbrains-mono   5.3.0
     @fontsource/instrument-serif          5.3.0
   All four are SIL Open Font License 1.1. The licences sit next
   to the files in public/fonts/ because the OFL requires the
   copyright notice to travel with them.

   ── VARIABLE FONTS ───────────────────────────────────────────
   Three of the four are variable: ONE file covers every weight
   from 100 to 900 instead of one file per weight. Inter alone
   used to pull four static files (400/500/600/700); it is now a
   single 48 KB request that also gives you 550 or 620 for free
   if you ever want them.

   font-family is declared as 'Inter' and not 'Inter Variable'
   (Fontsource's own name) because that is what the stylesheets
   already ask for in --font-ui, --font-sans and friends. Do not
   rename these without changing those variables too.

   format('woff2') and not format('woff2-variations'): the latter
   is a legacy string from the transition period, and a browser
   that does not recognise a format string throws the whole src
   line away. Everything that supports variable fonts at all
   reads the axes out of a plain woff2.

   ── SUBSETS ──────────────────────────────────────────────────
   Each family is split by unicode-range, exactly as Google Fonts
   serves it. The browser downloads a subset ONLY if the page
   actually contains a character from that range, so listing
   latin-ext costs nothing on an English page and quietly saves
   the day when a user's name has a ł or a ș in it.

   JetBrains Mono and Instrument Serif ship latin only: the mono
   renders the receipt block (digits and English labels) and the
   serif renders pull quotes on the blog.

   ── font-display: swap ───────────────────────────────────────
   Text paints immediately in the fallback and swaps when the real
   font lands. Paired with the preloads in the layout the swap
   window is short. 'optional' would remove the swap entirely but
   would also mean first-time visitors sometimes never see
   Instrument Sans at all, which on a page whose headlines carry
   the design is the wrong trade.
   ═══════════════════════════════════════════════════════════════ */


/* ─── Inter · site chrome (navbar, buttons, micro labels) ─── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/public/fonts/inter-latin-wght-normal.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;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/public/fonts/inter-latin-ext-wght-normal.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;
}


/* ─── Instrument Sans · everything that is content ───
   The LCP font on both the landing page and the blog. Preloaded
   in both layouts; see the note there before removing either. */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/public/fonts/instrument-sans-latin-wght-normal.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;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/public/fonts/instrument-sans-latin-ext-wght-normal.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;
}


/* ─── JetBrains Mono · the receipt block on the landing page ───
   Deliberately NOT preloaded: it sits far below the fold and
   preloading it would compete with the two fonts that are on
   screen at 0ms. */

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/public/fonts/jetbrains-mono-latin-wght-normal.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;
}


/* ─── Instrument Serif · pull quotes and italic asides on /blog ───
   Not variable, so it needs a file per style. Both are latin only
   and neither is preloaded: they appear mid-article, never in the
   first screen. */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/public/fonts/instrument-serif-latin-400-normal.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;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/public/fonts/instrument-serif-latin-400-italic.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;
}
