/* ============================================
   FONT CONFIGURATION - PRODUCTION OPTIMIZED
   Location: public/fonts/fonts.css
   Font files: public/fonts/vazirmatn/*.woff2
   ============================================ */

/* Vazirmatn Font - Persian/Farsi Support */
/* WOFF2 only - 97%+ browser support in 2026 */

/* CRITICAL WEIGHTS - Used above the fold */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/vazirmatn/vazirmatn-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

/* NON-CRITICAL WEIGHTS - Load only if fast network */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/vazirmatn/vazirmatn-light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/vazirmatn/vazirmatn-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: optional;
}

/* ============================================
   LANGUAGE-SPECIFIC FONT STRATEGY
   ============================================ */

/* Default: System fonts (instant, no download) */
html {
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Noto Sans', sans-serif;
}

/* Persian language - Use Vazirmatn with system fallback */
html[lang="fa"] {
  font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', system-ui, sans-serif;
}

/* English language - System fonts only (NO custom font download!) */
html[lang="en"] {
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
}

/* ============================================
   FUTURE LANGUAGES (Ready to add)
   ============================================ */

/* Turkish - will add Turkish font later */
html[lang="tr"] {
  font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', sans-serif;
  /* TODO: Add Turkish font when available */
}

/* Arabic - can reuse Vazirmatn or add specific Arabic font */
html[lang="ar"] {
  font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', system-ui, sans-serif;
}