/* ========================================
   Typography Design System
   ======================================== */

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

:root {
    /* Font Families */
    --font-primary: 'Cairo', 'Droid Arabic Kufi', sans-serif;
    --font-secondary: 'Droid Arabic Kufi', serif;

    /* Font Sizes - Using rem for accessibility */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px - Base */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */
    --text-6xl: 3.75rem;
    /* 60px */

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Letter Spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
}

/* Base Typography */
html {
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: #333;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    margin-bottom: 0.5em;
}

h1,
.h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
}

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

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

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

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

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

/* Paragraph */
p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: #074620;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Small Text */
small,
.text-sm {
    font-size: var(--text-sm);
}

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

/* Large Text */
.text-lg {
    font-size: var(--text-lg);
}

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

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

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

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

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

/* Font Weight Utilities */
.font-light {
    font-weight: var(--font-light);
}

.font-normal {
    font-weight: var(--font-normal);
}

.font-medium {
    font-weight: var(--font-medium);
}

.font-semibold {
    font-weight: var(--font-semibold);
}

.font-bold {
    font-weight: var(--font-bold);
}

/* Line Height Utilities */
.leading-none {
    line-height: var(--leading-none);
}

.leading-tight {
    line-height: var(--leading-tight);
}

.leading-normal {
    line-height: var(--leading-normal);
}

.leading-relaxed {
    line-height: var(--leading-relaxed);
}

/* Text Alignment */
.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

/* Text Colors */
.text-primary {
    color: #074620;
}

.text-secondary {
    color: #666;
}

.text-muted {
    color: #999;
}

.text-white {
    color: #fff;
}

/* Responsive Typography */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

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

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

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