/*
 * MonstaWash brand fonts - self-hosted.
 *
 * The design's fonts used to come from Google Fonts, which meant two extra
 * third-party round trips (fonts.googleapis.com for the CSS, then
 * fonts.gstatic.com for the files) before the browser could even start
 * downloading them. With `display=swap` the fallback font painted first and the
 * brand font swapped in about a second later - a visible flash plus a layout
 * shift (measured CLS 0.13).
 *
 * Serving the same files from this theme removes both round trips, and
 * wp_head preloads the two files the first screen needs, so the brand font is
 * already active at the first paint.
 *
 * Files: assets/fonts/*.woff2 (variable woff2, latin + latin-ext subsets only -
 * the browser fetches only the subset a page actually needs).
 */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fredoka-normal-latin.woff2') format('woff2');
  ascent-override: 97%;
  descent-override: 24%;
  line-gap-override: 0%;
  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: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fredoka-normal-latin-ext.woff2') format('woff2');
  ascent-override: 97%;
  descent-override: 24%;
  line-gap-override: 0%;
  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;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/nunito-normal-latin.woff2') format('woff2');
  ascent-override: 101%;
  descent-override: 35%;
  line-gap-override: 0%;
  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: 'Nunito';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../fonts/nunito-normal-latin-ext.woff2') format('woff2');
  ascent-override: 101%;
  descent-override: 35%;
  line-gap-override: 0%;
  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;
}
@font-face {
  font-family: 'Nunito';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/nunito-italic-latin.woff2') format('woff2');
  ascent-override: 101%;
  descent-override: 35%;
  line-gap-override: 0%;
  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: 'Nunito';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/nunito-italic-latin-ext.woff2') format('woff2');
  ascent-override: 101%;
  descent-override: 35%;
  line-gap-override: 0%;
  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.
 *
 * While a font is downloading (or if it is blocked) the browser uses the next
 * family in the stack. The design's stacks ask for 'Plus Jakarta Sans' after
 * Nunito and 'Space Grotesk' after Fredoka, so defining those two names here - as
 * the local system font, scaled to the brand fonts' measured metrics - means the
 * fallback text occupies the same space and nothing shifts when the real font
 * arrives. No design CSS is touched.
 *
 * Metrics measured in Chrome (canvas fontBoundingBox vs Arial at 100px):
 *   Nunito  -> size-adjust 102.67%, ascent 101%, descent 35%
 *   Fredoka -> size-adjust  99.98%, ascent  97%, descent 24%
 * --------------------------------------------------------------------------- */

@font-face {
  font-family: 'Plus Jakarta Sans'; /* Nunito's fallback slot */
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica'),
       local('Liberation Sans'), local('Roboto'), local('Noto Sans');
  size-adjust: 102.67%;
  ascent-override: 101%;
  descent-override: 35%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Space Grotesk'; /* Fredoka's fallback slot */
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica'),
       local('Liberation Sans'), local('Roboto'), local('Noto Sans');
  size-adjust: 99.98%;
  ascent-override: 97%;
  descent-override: 24%;
  line-gap-override: 0%;
}
