/* ==========================================================================
   FONTS - فونت فارسی Vazirmatn (میزبانی روی خود سایت)
   Barsad Ultimate 3.5
   - قبلاً فونت‌ها از Google Fonts و jsDelivr با @import لود می‌شدند (کند، گاهی فیلتر،
     چند درخواست 404 برای IRANSans/YekanBakh). حالا یک فایل woff2 متغیر (۱۱۱KB) از
     خود سایت لود و در <head> پیش‌بارگذاری (preload) می‌شود → سرعت و Core Web Vitals بهتر.
   - مجوز فونت: SIL Open Font License (assets/fonts/OFL-Vazirmatn.txt)
   ========================================================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn-variable.woff2') format('woff2-variations'),
         url('../fonts/vazirmatn-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- Base Font Setup - تنظیمات پایه فونت ---------- */
:root {
    --font-primary: 'Vazirmatn', Tahoma, Arial, sans-serif;
    --font-secondary: 'Vazirmatn', Tahoma, sans-serif;
    --font-display: 'Vazirmatn', Tahoma, sans-serif;
}

/* Apply to all */
html {
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "ss02";
}

body {
    font-family: var(--font-primary) !important;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: normal;
}

/* Headings - از فونت ضخیم‌تر */
h1, h2, h3, h4, h5, h6,
.hero-title,
.section-title,
.logo-title {
    font-family: var(--font-display) !important;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.4;
}

/* Specific weights */
.hero-title {
    font-weight: 900 !important;
    letter-spacing: normal;
}

.section-title {
    font-weight: 800 !important;
}

.logo-title {
    font-weight: 800 !important;
    letter-spacing: 0.05em;
}

/* Buttons and UI */
.btn,
.nav-link,
.section-tag,
.hero-badge {
    font-family: var(--font-primary) !important;
    font-weight: 600;
}

/* Persian numbers - اعداد فارسی */
.persian-numbers {
    font-feature-settings: "ss01";
}

/* Persian readability: keep natural word spacing (no negative spacing) */

/* Fix for small texts */
small, .text-small {
    font-size: 0.875em;
    line-height: 1.6;
}

/* Bold and strong */
strong, b {
    font-weight: 700;
}

/* Links */
a {
    font-weight: inherit;
}

/* Form elements */
input, textarea, select, button {
    font-family: var(--font-primary) !important;
    font-weight: 400;
}

/* Code should not use Persian font */
code, pre, kbd {
    font-family: Consolas, 'Courier New', monospace !important;
    direction: ltr;
}

/* English text inside Persian */
[lang="en"], .en-text {
    font-family: 'Segoe UI', Arial, sans-serif !important;
    direction: ltr;
    display: inline-block;
}

/* Gold text with better rendering */
.gold {
    font-weight: 700;
}
