/* FS Aurelius® Local Fonts - Self-hosted, no external requests */

/* Cairo - Arabic/English body font */
@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+0020-007F;
}

/* Playfair Display - Headings */
@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007F, U+00A0-00FF, U+0100-017F, U+0180-024F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2150-218F, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+2460-24FF, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+27C0-27EF, U+27F0-27FF, U+2800-28FF, U+2900-297F, U+2980-29FF, U+2A00-2AFF, U+2B00-2BFF, U+2C00-2C5F, U+2C60-2C7F, U+2C80-2CFF, U+2D00-2D2F, U+2D30-2D7F, U+2D80-2DDF, U+2DE0-2DFF, U+2E00-2E7F;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0020-007F, U+00A0-00FF, U+0100-017F, U+0180-024F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2150-218F, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+2460-24FF, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+27C0-27EF, U+27F0-27FF, U+2800-28FF, U+2900-297F, U+2980-29FF, U+2A00-2AFF, U+2B00-2BFF, U+2C00-2C5F, U+2C60-2C7F, U+2C80-2CFF, U+2D00-2D2F, U+2D30-2D7F, U+2D80-2DDF, U+2DE0-2DFF, U+2E00-2E7F;
}

/* JetBrains Mono - Code/Monospace */
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007F, U+00A0-00FF, U+0100-017F, U+0180-024F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2150-218F, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+2460-24FF, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+27C0-27EF, U+27F0-27FF, U+2800-28FF, U+2900-297F, U+2980-29FF, U+2A00-2AFF, U+2B00-2BFF, U+2C00-2C5F, U+2C60-2C7F, U+2C80-2CFF, U+2D00-2D2F, U+2D30-2D7F, U+2D80-2DDF, U+2DE0-2DFF, U+2E00-2E7F;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/JetBrainsMono-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 800;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0020-007F, U+00A0-00FF, U+0100-017F, U+0180-024F, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2150-218F, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+2460-24FF, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+27C0-27EF, U+27F0-27FF, U+2800-28FF, U+2900-297F, U+2980-29FF, U+2A00-2AFF, U+2B00-2BFF, U+2C00-2C5F, U+2C60-2C7F, U+2C80-2CFF, U+2D00-2D2F, U+2D30-2D7F, U+2D80-2DDF, U+2DE0-2DFF, U+2E00-2E7F;
}

/* Amiri - Traditional Arabic (fallback for Quranic/traditional text) */
@font-face {
    font-family: 'Amiri';
    src: url('../fonts/Amiri-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
    font-family: 'Amiri';
    src: url('../fonts/Amiri-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* Font loading fallbacks - system fonts while custom fonts load */
.fs-font-loading .fs-font-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.fs-font-loading .fs-font-heading {
    font-family: Georgia, 'Times New Roman', serif;
}

.fs-font-loading .fs-font-mono {
    font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
}

/* RTL Support */
[dir="rtl"] .fs-font-body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[dir="rtl"] .fs-font-heading {
    font-family: 'Playfair Display', 'Amiri', Georgia, serif;
}

/* Print styles - use system fonts for better compatibility */
@media print {
    .fs-font-body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .fs-font-heading {
        font-family: Georgia, 'Times New Roman', serif;
    }

    .fs-font-mono {
        font-family: 'Monaco', 'Consolas', monospace;
    }
}

/* Preload hints for critical fonts (add to HTML head via plugin) */
/*
<link rel="preload" href="assets/fonts/Cairo-VariableFont_wght.ttf" as="font" type="font/ttf" crossorigin>
<link rel="preload" href="assets/fonts/PlayfairDisplay-VariableFont_wght.ttf" as="font" type="font/ttf" crossorigin>
<link rel="preload" href="assets/fonts/JetBrainsMono-VariableFont_wght.ttf" as="font" type="font/ttf" crossorigin>
*/