/* ==========================================================================
   IRANSans — فونت محلی سایت
   --------------------------------------------------------------------------
   فایل‌ها در `assets/fonts/` همین افزونه قرار دارند و همراه افزونه منتقل
   می‌شوند؛ نیازی به آپلود جداگانه نیست.

   وزن‌های موجود در IRANSansWeb:
     UltraLight · Light · Regular · Medium · Bold · Black

   نکته مهم:
   این فونت وزن ۶۰۰ (SemiBold) و ۸۰۰ (ExtraBold) ندارد، ولی Design System
   از هر دو استفاده می‌کند. به‌جای اینکه مرورگر وزن مصنوعی (faux bold)
   بسازد — که در فارسی حروف را بدشکل می‌کند — از «بازه وزن» در @font-face
   استفاده شده است:

     ۱۰۰–۲۵۰  → UltraLight
     ۲۵۱–۳۵۰  → Light
     ۳۵۱–۴۵۰  → Regular
     ۴۵۱–۵۵۰  → Medium
     ۵۵۱–۸۰۰  → Bold      ← وزن ۶۰۰ و ۷۰۰ اینجا می‌افتند
     ۸۰۱–۱۰۰۰ → Black     ← وزن ۸۰۰ و ۹۰۰ اینجا می‌افتند

   با این کار هر وزنی که در CSS بنویسید به نزدیک‌ترین فایل واقعی می‌رسد.

   `font-display: swap` عمدی است تا متن فارسی بلافاصله دیده شود و LCP
   عقب نیفتد.
   ========================================================================== */

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSansWeb_UltraLight.woff2") format("woff2"),
       url("../fonts/IRANSansWeb_UltraLight.woff")  format("woff");
  font-weight: 100 250;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSansWeb_Light.woff2") format("woff2"),
       url("../fonts/IRANSansWeb_Light.woff")  format("woff");
  font-weight: 251 350;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSansWeb.woff2") format("woff2"),
       url("../fonts/IRANSansWeb.woff")  format("woff");
  font-weight: 351 450;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSansWeb_Medium.woff2") format("woff2"),
       url("../fonts/IRANSansWeb_Medium.woff")  format("woff");
  font-weight: 451 550;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSansWeb_Bold.woff2") format("woff2"),
       url("../fonts/IRANSansWeb_Bold.woff")  format("woff");
  font-weight: 551 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSansWeb_Black.woff2") format("woff2"),
       url("../fonts/IRANSansWeb_Black.woff")  format("woff");
  font-weight: 801 1000;
  font-style: normal;
  font-display: swap;
}

/* اعداد فارسی در IRANSans کمی بلندتر از لاتین هستند؛ برای جدول‌ها و
   قیمت‌ها که tabular-nums می‌خواهیم، این تنظیم کمک می‌کند. */
:root {
  font-variant-numeric: normal;
}
