/* ============================================================================
   Self-hosted webfonts: loaded so that text never changes size mid-load
   ----------------------------------------------------------------------------
   The old setup painted every face with font-display: swap over whatever the
   font stack fell back to - Impact for headings (Oswald is not installed on
   Windows, so the stack landed on Impact) and Segoe UI for body copy. Neither
   measures anything like the real face, so text appeared large and then
   snapped down to its proper size a moment later, reflowing as it went.

   Two separate problems, two fixes.

   1. Metric-matched fallback families ("... Fallback" below). These are not
      downloads - each is the locally installed Arial re-declared with the real
      face's metrics applied: size-adjust scales it to the same average advance
      width, ascent/descent-override give it the same line box. Text laid out
      in them occupies exactly the space the finished font will, so nothing
      moves when the woff2 lands. They belong immediately behind the brand
      family in every stack - see --jc-display / --jc-sans in extra.css.

   2. Different font-display per family, because the two faces are not alike:

      Inter and Arial have near-identical x-heights (0.546em vs 0.519em), so
      the width-matched Arial above is also a close visual match. Inter keeps
      font-display: swap - body copy is readable instantly and the swap is
      imperceptible.

      Barlow Condensed is the opposite: same letter height as Arial but about
      32% narrower, so an Arial stand-in can match its width or its size but
      never both. Headings therefore use font-display: block - during the block
      period the browser reserves space using the width-matched fallback but
      paints nothing, then draws straight in Barlow Condensed. No mis-sized
      flash and no reflow. That is only safe because these faces are
      same-origin, 22KB, and preloaded in includes/header.php; if that preload
      is ever dropped, headings will be briefly blank instead.

   The override values are measured, not guessed:
     size-adjust      = width of the real face / width of Arial over the same
                        text, aggregated in-browser over the live text of the
                        home, shop, about and contact pages (the display face
                        is used almost entirely uppercase here, which measures
                        very differently from a generic sample)
     ascent-override  = hhea ascender  / unitsPerEm / size-adjust
     descent-override = hhea descender / unitsPerEm / size-adjust
   Real metrics: Barlow Condensed upem 1000, asc 1000, desc -200, gap 0.
                 Inter           upem 2048, asc 1984, desc -494, gap 0.
   Re-measure if either font is re-subsetted, or if the site stops setting
   headings in uppercase.

   Inter ships as one variable file per subset (wght 100..900), so a single
   @font-face per subset covers every weight the site uses from one download.
   Barlow Condensed is subsetted as static instances, one file per weight.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   Barlow Condensed - display / headings
   ------------------------------------------------------------------------ */

/* Barlow Condensed 500 - latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('../fonts/barlow-condensed-500-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;
}
/* Barlow Condensed 500 - latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('../fonts/barlow-condensed-500-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;
}
/* Barlow Condensed 600 - latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('../fonts/barlow-condensed-600-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;
}
/* Barlow Condensed 600 - latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('../fonts/barlow-condensed-600-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;
}
/* Barlow Condensed 700 - latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('../fonts/barlow-condensed-700-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;
}
/* Barlow Condensed 700 - latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('../fonts/barlow-condensed-700-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;
}

/* ---------------------------------------------------------------------------
   Inter - body / UI. One variable file per subset, wght 100-900.
   ------------------------------------------------------------------------ */

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

/* ---------------------------------------------------------------------------
   Metric-matched fallbacks. Local fonts only: these never hit the network.
   Split at 550 so bold text borrows Arial Bold instead of a synthesised bold,
   which is what each pair of overrides was measured against.
   ------------------------------------------------------------------------ */

/* Barlow Condensed stand-in, regular weights. Only the metrics of these two
   are ever seen - the glyphs stay invisible through the block period - so they
   are tuned purely for width, to reserve the exact space the heading will take. */
@font-face {
  font-family: 'Barlow Condensed Fallback';
  font-style: normal;
  font-weight: 100 550;
  src: local('Arial'), local('Helvetica'), local('Liberation Sans'), local('Roboto');
  size-adjust: 68.90%;
  ascent-override: 145.14%;
  descent-override: 29.03%;
  line-gap-override: 0%;
}
/* Barlow Condensed stand-in, bold weights */
@font-face {
  font-family: 'Barlow Condensed Fallback';
  font-style: normal;
  font-weight: 551 900;
  src: local('Arial Bold'), local('Helvetica Bold'), local('Liberation Sans Bold'), local('Roboto Bold'), local('Arial');
  size-adjust: 68.01%;
  ascent-override: 147.04%;
  descent-override: 29.41%;
  line-gap-override: 0%;
}

/* Inter stand-in, regular weights */
@font-face {
  font-family: 'Inter Fallback';
  font-style: normal;
  font-weight: 100 550;
  src: local('Arial'), local('Helvetica'), local('Liberation Sans'), local('Roboto');
  size-adjust: 106.84%;
  ascent-override: 90.67%;
  descent-override: 22.58%;
  line-gap-override: 0%;
}
/* Inter stand-in, bold weights */
@font-face {
  font-family: 'Inter Fallback';
  font-style: normal;
  font-weight: 551 900;
  src: local('Arial Bold'), local('Helvetica Bold'), local('Liberation Sans Bold'), local('Roboto Bold'), local('Arial');
  size-adjust: 103.55%;
  ascent-override: 93.55%;
  descent-override: 23.29%;
  line-gap-override: 0%;
}
