/* ==========================================================================
   ToolsVale — Fonts
   --------------------------------------------------------------------------
   Self-hosted variable fonts. Nothing is fetched from Google, so no
   third-party request appears in the network tab — the same standard the
   tools are held to.

   All three are variable, so one file covers every weight the system uses.
   Loaded first in the cascade; tokens.css names them.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Bricolage Grotesque — display
   Axes: opsz (optical size), wdth (width), wght (weight).

   wdth is pinned to 100 because the family also ships condensed widths and
   an unpinned axis would let the browser pick one. opsz is left to track
   font-size automatically, which is the point of an optical-size axis.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque-var.woff2') format('woff2-variations'),
       url('../fonts/bricolage-grotesque-var.woff2') format('woff2');
  font-weight: 500 700;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
  font-variation-settings: 'wdth' 100;
}

/* --------------------------------------------------------------------------
   Hanken Grotesk — body and UI
   Single wght axis, 400–600.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/hanken-grotesk-var.woff2') format('woff2-variations'),
       url('../fonts/hanken-grotesk-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   JetBrains Mono — data only
   Never used for prose: format flows, counts, table numerals, kbd hints.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-var.woff2') format('woff2-variations'),
       url('../fonts/jetbrains-mono-var.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Fallback metric matching.

   font-display: swap means system text paints first and is replaced when
   the webfont lands. Without adjustment that swap shifts layout, which
   Core Web Vitals counts against you. These size-adjust values bring the
   fallback close enough to the real face that the reflow is barely visible.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Bricolage Fallback';
  src: local('Arial');
  size-adjust: 97%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Hanken Fallback';
  src: local('Arial');
  size-adjust: 96%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}
