/* Typefaces.
 *
 * Hanken Grotesk is self-hosted as a single variable file: site.css sets
 * weights 450, 550, 650 and 750, which exist only on an axis, so static cuts
 * would snap each one to its nearest neighbour and change the typography.
 *
 * font-display:swap. A flash of fallback text beats an invisible page.
 */

@font-face{
  font-family:'Hanken Grotesk';
  font-style:normal;
  font-weight:100 900;          /* the axis, not a cut — see above */
  font-display:swap;
  src:url('../fonts/hanken-grotesk-var.woff2') format('woff2-variations'),
      url('../fonts/hanken-grotesk-var.woff2') format('woff2');
}

/* A metrics-matched stand-in, so a headline does not re-wrap when the real face
 * arrives. h1 and h2 carry text-wrap:balance and clamp() sizing, so a swap
 * without this re-balances the line breaks — and on interior pages the h1 is
 * the largest element on screen, which makes that shift a layout-shift score.
 *
 * The overrides compare Hanken Grotesk's metrics to Arial's. Remeasure if the
 * font file is ever replaced.
 */
@font-face{
  font-family:'Hanken Grotesk Fallback';
  src:local('Arial'), local('Helvetica Neue'), local('Liberation Sans');
  size-adjust:97%;
  ascent-override:94%;
  descent-override:26%;
  line-gap-override:0%;
}
