/*  Self-hosted faces. Hand-written — not generated.
 *
 *  Google Fonts and several CDNs are unreliable or blocked from inside Iran,
 *  which is the entire audience, so nothing here is remote.
 *
 *  One @font-face per family/weight covering both scripts, rather than split
 *  latin/arabic faces. The first viewport mixes both (brand names, "APK",
 *  "GitHub"), so a split would download both anyway — and on a high-latency
 *  mobile link an extra request costs more than the few KB it saves.
 */

@font-face {
  font-family: 'Jomhuria';
  src: url('../fonts/Jomhuria-Regular.subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lalezar';
  src: url('../fonts/Lalezar-Regular.subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.subset.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/*  Metrics-matched fallback so the swap does not shift the layout.
 *  Tahoma is the de-facto Persian face on Windows and has real Arabic coverage.
 *  These overrides are eyeballed against Vazirmatn at 1rem; if the hero ever
 *  visibly jumps on a cold load, measure them properly rather than nudging. */
@font-face {
  font-family: 'Vazirmatn Fallback';
  src: local('Tahoma');
  size-adjust: 96%;
  ascent-override: 92%;
  descent-override: 26%;
  line-gap-override: 0%;
}
