/* ============================================
   Refined Typography System
   Editorial & Structural
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Alegreya:wght@400;600;700&family=Alegreya+Sans:wght@300;400;500;600;700&family=Amiri:wght@400;700&family=Cairo:wght@300;400;500;600;700&display=swap');

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.65;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.005em;
}

/* Headings - Editorial Style */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(3.5rem, 8vw, var(--font-size-6xl));
    margin-bottom: var(--space-lg);
}

h2 {
    font-size: clamp(2rem, 5vw, var(--font-size-4xl));
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
}

h4 {
    font-family: var(--font-family-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
}

/* Paragraphs */
p {
    margin-bottom: var(--space-sm);
    max-width: 58ch;
    /* Optimal reading width */
}

.lead {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-regular);
    line-height: 1.4;
    color: var(--text-primary);
    max-width: 50ch;
}

/* Links (Minimal) */
a {
    color: inherit;
    text-decoration-color: rgba(0, 0, 0, 0.2);
    text-underline-offset: 4px;
    transition: text-decoration-color var(--transition-base), color var(--transition-base);
}

a:hover {
    color: var(--color-accent-400);
}

/* Utility Classes */
.text-gold {
    color: var(--color-accent-400);
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.font-serif {
    font-family: var(--font-family-heading);
}

.font-sans {
    font-family: var(--font-family-primary);
}

/* Text Size Utilities */
.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-2xl {
    font-size: var(--font-size-2xl);
}

/* Text Color Utilities */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-tertiary {
    color: var(--text-tertiary);
}

/* Blockquote (Editorial) */
blockquote {
    font-family: var(--font-family-heading);
    font-style: italic;
    font-size: var(--font-size-2xl);
    line-height: 1.4;
    border-left: none;
    /* Removed border */
    padding: 0;
    margin: var(--space-xl) 0;
    text-align: center;
    color: var(--text-primary);
}

blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--color-accent-400);
    display: block;
    line-height: 0.5;
    margin-bottom: var(--space-sm);
}

/* RTL Support for Typography */
[dir="rtl"] {
    letter-spacing: 0;
}

[dir="rtl"] h4,
[dir="rtl"] .text-uppercase {
    letter-spacing: 0;
}
