/* YekanBakh webfont (YekanBakh4ProPlus variable font).
 *
 * This VF has TWO axes and non-obvious defaults:
 *   wght  100..950, default 100   (Thin)
 *   wdth  62.5..150, default 62.5 (ExtraCondensed)
 * Its default instance is therefore "ThinExtraCondensed". Declaring only a
 * font-weight range would leave wdth at 62.5 and render the entire UI thin and
 * narrow, so the width range is declared here and pinned to 100% below.
 *
 * font-weight spans the real axis maximum (950, not the usual 900) so that
 * font-weight:900 and the heaviest named instance remain reachable.
 *
 * woff2-variations is listed before plain woff2 for older engines that only honour
 * the variations form; both point at the same file, which is correct.
 */

@font-face {
  font-family: "YekanBakh";
  font-weight: 100 950;
  font-stretch: 62.5% 150%;
  font-style: normal;
  font-display: swap;
  src: url("/custom-assets/fonts/yekanbakh/YekanBakh-VF.woff2") format("woff2-variations"),
       url("/custom-assets/fonts/yekanbakh/YekanBakh-VF.woff2") format("woff2"),
       url("/custom-assets/fonts/yekanbakh/YekanBakh-VF.ttf")   format("truetype-variations");
}

/* The family is applied HERE rather than in rtl.css so that the typeface is
 * independent of text direction -- turning RTL off must not also turn the font off.
 *
 * font-stretch is pinned to 100% wherever the family is used: without it the font
 * falls back to its ExtraCondensed default (wdth 62.5). Applied broadly, and
 * inherited, so no element can silently miss it. */
:root {
  --fa-font: "YekanBakh", "Vazirmatn", "IRANSans", "Segoe UI", Tahoma,
             -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

body,
input, select, textarea, button,
.btn, .form-control, .panel, .panel-heading, .modal-content,
table, th, td, label, .nav, .dropdown-menu,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--fa-font);
  font-stretch: 100%;
  font-variation-settings: "wdth" 100;
}
