/**
 * Persian Typography CSS
 * 
 * Persian font loading and typography utilities.
 * Extracted from Persian Elementor + Persian WooCommerce patterns.
 */

/* ===========================================
   Font Loading
   =========================================== */

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

/* IRANYekanX (Technical) */
@font-face {
    font-family: 'IRANYekanX';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/IRANYekanX-VF.woff2') format('woff2-variations');
}

/* Estedad (Elegant) */
@font-face {
    font-family: 'Estedad';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Estedad-VF.woff2') format('woff2-variations');
}

/* Mikhak (Bold) */
@font-face {
    font-family: 'Mikhak';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Mikhak-VF.woff2') format('woff2-variations');
}

/* Shabnam (Friendly) */
@font-face {
    font-family: 'Shabnam';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Shabnam-Regular.woff2') format('woff2');
}

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

/* Sahel (Minimalist) */
@font-face {
    font-family: 'Sahel';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Sahel-Regular.woff2') format('woff2');
}

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

/* Samim (Traditional) */
@font-face {
    font-family: 'Samim';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Samim-Regular.woff2') format('woff2');
}

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

/* ===========================================
   Font Stacks
   =========================================== */

:root {
    /* Primary Stack */
    --sc-font-persian: 'Vazirmatn', 'IRANYekanX', 'Estedad', 'Tahoma', 'Arial', sans-serif;
    
    /* Bold Stack */
    --sc-font-persian-bold: 'Vazirmatn', 'IRANYekanX', 'Estedad', 'Tahoma', 'Arial', sans-serif;
    
    /* Technical Stack */
    --sc-font-technical: 'IRANYekanX', 'Courier New', monospace;
    
    /* Friendly Stack */
    --sc-font-friendly: 'Shabnam', 'Vazirmatn', 'Tahoma', sans-serif;
    
    /* Minimalist Stack */
    --sc-font-minimalist: 'Sahel', 'Vazirmatn', 'Tahoma', sans-serif;
    
    /* Traditional Stack */
    --sc-font-traditional: 'Samim', 'Vazirmatn', 'Tahoma', sans-serif;
}

/* ===========================================
   Typography Scale
   =========================================== */

:root {
    --sc-text-xs: 0.75rem;    /* 12px */
    --sc-text-sm: 0.875rem;   /* 14px */
    --sc-text-base: 1rem;     /* 16px */
    --sc-text-lg: 1.125rem;   /* 18px */
    --sc-text-xl: 1.25rem;    /* 20px */
    --sc-text-2xl: 1.5rem;    /* 24px */
    --sc-text-3xl: 1.875rem;  /* 30px */
    --sc-text-4xl: 2.25rem;   /* 36px */
    --sc-text-5xl: 3rem;      /* 48px */
    
    --sc-line-height-tight: 1.25;
    --sc-line-height-normal: 1.5;
    --sc-line-height-relaxed: 1.75;
    --sc-line-height-loose: 2;
}

/* ===========================================
   Base Typography
   =========================================== */

body,
.sc-text {
    font-family: var(--sc-font-persian);
    font-weight: 400;
    line-height: var(--sc-line-height-relaxed);
    color: var(--sc-text-color, #333333);
}

/* Headings */
h1, .sc-h1 {
    font-family: var(--sc-font-persian-bold);
    font-size: var(--sc-text-4xl);
    font-weight: 700;
    line-height: var(--sc-line-height-tight);
    color: var(--sc-heading-color, #1a1a1a);
    margin-bottom: 1rem;
}

h2, .sc-h2 {
    font-family: var(--sc-font-persian-bold);
    font-size: var(--sc-text-3xl);
    font-weight: 700;
    line-height: var(--sc-line-height-tight);
    color: var(--sc-heading-color, #1a1a1a);
    margin-bottom: 0.75rem;
}

h3, .sc-h3 {
    font-family: var(--sc-font-persian-bold);
    font-size: var(--sc-text-2xl);
    font-weight: 600;
    line-height: var(--sc-line-height-tight);
    color: var(--sc-heading-color, #1a1a1a);
    margin-bottom: 0.75rem;
}

h4, .sc-h4 {
    font-family: var(--sc-font-persian-bold);
    font-size: var(--sc-text-xl);
    font-weight: 600;
    line-height: var(--sc-line-height-normal);
    color: var(--sc-heading-color, #1a1a1a);
    margin-bottom: 0.5rem;
}

h5, .sc-h5 {
    font-family: var(--sc-font-persian-bold);
    font-size: var(--sc-text-lg);
    font-weight: 600;
    line-height: var(--sc-line-height-normal);
    color: var(--sc-heading-color, #1a1a1a);
    margin-bottom: 0.5rem;
}

h6, .sc-h6 {
    font-family: var(--sc-font-persian-bold);
    font-size: var(--sc-text-base);
    font-weight: 600;
    line-height: var(--sc-line-height-normal);
    color: var(--sc-heading-color, #1a1a1a);
    margin-bottom: 0.5rem;
}

/* Paragraph */
p, .sc-paragraph {
    font-family: var(--sc-font-persian);
    font-size: var(--sc-text-base);
    line-height: var(--sc-line-height-relaxed);
    color: var(--sc-text-color, #333333);
    margin-bottom: 1rem;
}

/* Small Text */
small, .sc-small {
    font-size: var(--sc-text-sm);
    line-height: var(--sc-line-height-normal);
    color: var(--sc-text-muted, #666666);
}

/* Lead Text */
.sc-lead {
    font-size: var(--sc-text-lg);
    line-height: var(--sc-line-height-relaxed);
    color: var(--sc-text-color, #333333);
}

/* ===========================================
   Technical Text
   =========================================== */

.sc-text-technical {
    font-family: var(--sc-font-technical);
    font-weight: 500;
    line-height: var(--sc-line-height-normal);
}

.sc-code {
    font-family: var(--sc-font-technical);
    font-size: var(--sc-text-sm);
    background-color: var(--sc-code-bg, #f5f5f5);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.sc-pre {
    font-family: var(--sc-font-technical);
    font-size: var(--sc-text-sm);
    background-color: var(--sc-code-bg, #f5f5f5);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
}

/* ===========================================
   Persian Number Typography
   =========================================== */

.sc-persian-number {
    font-feature-settings: "numr";
    font-variant-numeric: tabular-nums;
}

.sc-price {
    font-family: var(--sc-font-persian-bold);
    font-weight: 700;
    font-feature-settings: "numr";
    color: var(--sc-price-color, #1a73e8);
}

.sc-price-currency {
    font-size: 0.75em;
    font-weight: 400;
    margin-inline-start: 0.25rem;
    color: var(--sc-text-muted, #666666);
}

/* ===========================================
   Utility Classes
   =========================================== */

.sc-font-vazirmatn { font-family: 'Vazirmatn', sans-serif; }
.sc-font-iranyekanx { font-family: 'IRANYekanX', sans-serif; }
.sc-font-estedad { font-family: 'Estedad', sans-serif; }
.sc-font-mikhak { font-family: 'Mikhak', sans-serif; }
.sc-font-shabnam { font-family: 'Shabnam', sans-serif; }
.sc-font-sahel { font-family: 'Sahel', sans-serif; }
.sc-font-samim { font-family: 'Samim', sans-serif; }

.sc-font-thin { font-weight: 100; }
.sc-font-light { font-weight: 300; }
.sc-font-normal { font-weight: 400; }
.sc-font-medium { font-weight: 500; }
.sc-font-semibold { font-weight: 600; }
.sc-font-bold { font-weight: 700; }
.sc-font-extrabold { font-weight: 800; }
.sc-font-black { font-weight: 900; }

.sc-text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-text-wrap {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.sc-text-nowrap {
    white-space: nowrap;
}
