/* Fraunces */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/fraunces-v38-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/fraunces-v38-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/fraunces-v38-latin-600.woff2') format('woff2');
}

/* Public Sans */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/public-sans-v21-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/public-sans-v21-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/public-sans-v21-latin-600.woff2') format('woff2');
}

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

/* ===== Metric-matched fallback fonts (CLS fix) =====
   These use a local system font but resize/reposition it via
   size-adjust / ascent-override / descent-override so it takes up
   almost exactly the same space as the real webfont. When the browser
   swaps from this fallback to the real font once it loads, nothing
   reflows, which eliminates the layout shift caused by font-swap.
   Values computed from each font's actual published metrics (not
   estimated) using the same method Next.js and Nuxt use internally.

   Multiple local() names are listed per rule because "Georgia",
   "Arial", and "Courier New" only exist by those exact names on
   Windows/Mac. Linux and Android (including Google's own Lighthouse
   test servers) use different default fonts, so without these
   alternates the whole rule can silently fail to match on those
   platforms and the override never takes effect. */

@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia"), local("Liberation Serif"), local("Noto Serif"), local("Droid Serif"), local("Times New Roman");
  size-adjust: 105.2039%;
  ascent-override: 92.9623%;
  descent-override: 24.2386%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Public Sans Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Roboto"), local("Noto Sans"), local("Helvetica");
  size-adjust: 104.8675%;
  ascent-override: 90.5905%;
  descent-override: 21.4557%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "JetBrains Mono Fallback";
  src: local("Courier New"), local("Liberation Mono"), local("Noto Sans Mono"), local("Droid Sans Mono"), local("DejaVu Sans Mono");
  size-adjust: 99.9837%;
  ascent-override: 102.0166%;
  descent-override: 30.0049%;
  line-gap-override: 0%;
}
