/* ============================================================================
   Trengh Technologies — Typeface
   ----------------------------------------------------------------------------
   ONE family. Inter, self-hosted, subsetted, variable. No CDN call — required
   by the CSP in docs/03-security-policy.md as much as by privacy.

   File:  web/public/assets/fonts/inter-latin-var.woff2   (73 KB)
   Axes:  opsz 14–32, wght 100–900.  Licence: OFL 1.1.

   One file covers what most systems need two for. Inter's optical-size axis
   is the difference between "Inter Display" and "Inter Text" — at opsz 32 the
   spacing tightens and the joins thin out for headline use; at opsz 14 it
   opens up and thickens for body. `font-optical-sizing: auto` (the default in
   modern browsers) interpolates by rendered size automatically.

   Paths are absolute from the web root, so this file works wherever it is
   concatenated or served from.
   ========================================================================== */

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

/* Let the browser pick the optical size by rendered size. This is the default,
   but state it — a reset or a third-party stylesheet turning it off silently
   costs the display cut on every heading. */
html {
  font-optical-sizing: auto;
}

/* Force the display cut where a heading is rendered small but should still
   read as display — card titles, slide furniture, the wordmark's neighbours. */
.u-optical-display { font-variation-settings: "opsz" 32; }
.u-optical-text    { font-variation-settings: "opsz" 14; }

/* ----------------------------------------------------------------------------
   Preload hint. Belongs in the document <head>, before the stylesheet link —
   reproduced here so the pairing is documented in one place:

     <link rel="preload" href="/assets/fonts/inter-latin-var.woff2"
           as="font" type="font/woff2" crossorigin>

   One font, one preload. There is no second face to weigh up.

   The OFL 1.1 licence text belongs next to the binary in
   web/public/assets/fonts/ before launch.
   -------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------------
   ALFA SLAB ONE — the logotype face. THE WORDMARK ONLY.

   File:    /assets/fonts/alfaslabone-latin.woff2   (4.7 KB)
   Licence: OFL 1.1 — text kept beside the binary as AlfaSlabOne-OFL.txt.
   Source:  the family Suresh supplied; subset from a 92 KB TTF to basic Latin,
            which is a 95% saving and still enough to set the mark in any casing.

   TWO THINGS THAT WILL BITE IF THIS IS EDITED
   -------------------------------------------
   1. It has ONE weight, 400. Ask for bold and the browser SYNTHESISES it by
      smearing the outlines — which on a slab serif thickens the slabs
      unevenly and reads as a blurry logo. `font-synthesis: none` below makes
      that fail visibly instead of silently.
   2. font-display is BLOCK, not swap. This face is only ever used for the
      logotype; swapping Inter in for a moment and then reflowing to a heavy
      slab is a very visible identity flicker. 4.7 KB is small enough that a
      short block is the better trade. Inter keeps `swap` — different job.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Alfa Slab One";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/assets/fonts/alfaslabone-latin.woff2") format("woff2");
}
