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

:root {
    /* Type Scale Variables */
    --text-xs: 0.8rem;      /* 12.8px */
    --text-sm: 0.9rem;      /* 14.4px */
    --text-base: 1rem;      /* 16px */
    --text-md: 1.125rem;    /* 18px */
    --text-lg: 1.25rem;     /* 20px */
    --text-xl: 1.5rem;      /* 24px */
    --text-2xl: 1.75rem;    /* 28px */
    --text-3xl: 2rem;       /* 32px */
    --text-4xl: 2.5rem;     /* 40px */
    --text-5xl: 3rem;       /* 48px */
    --text-6xl: 3.5rem;     /* 56px */
    --text-7xl: 4rem;       /* 48px */
    --text-8xl: 4.5rem;     /* 56px */
}

/* Type Scale Utilities */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md { font-size: var(--text-md); }
.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); }
.text-6xl { font-size: var(--text-6xl); }
.text-7xl { font-size: var(--text-7xl); }
.text-8xl { font-size: var(--text-8xl); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--text-6xl); }  /* 56px - Main page title */
h2 { font-size: var(--text-3xl); }  /* 32px - Major sections */
h3 { font-size: var(--text-xl); }   /* 24px - Component titles */
h4 { font-size: var(--text-lg); }   /* 20px */
h5 { font-size: var(--text-md); }   /* 18px */
h6 { font-size: var(--text-base); } /* 16px */

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

/* Section Title */
.section-title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);     /* 32px - Same as h2 */
    font-weight: 800;
    margin-bottom: var(--spacing-xl);
    color: var(--color-text);
}

/* Body Text */
p {
    font-size: var(--text-md);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

/* Font Weight Utilities */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

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

/* Text Colors */
.text-primary { color: var(--color-primary); }
.text-body { color: var(--color-text); }
.text-light { color: var(--color-text-light); }

/* Links */
.link {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.link:hover {
    text-decoration: underline;
}

/* Responsive Typography */
@media (max-width: var(--breakpoint-md)) {
    :root {
        --text-6xl: 3em;
        --text-4xl: 2.25em;
        --text-3xl: 1.625em;
        --text-2xl: 1.5rem;
        --text-xl: 1.375em;
        --text-lg: 1.25em;
        --text-md: 1.0625rem;
    }
}

@media (max-width: var(--breakpoint-sm)) {
    :root {
        --text-6xl: 2.5em;
        --text-4xl: 1.875em;
        --text-3xl: 1.5em;
        --text-2xl: 1.375rem;
        --text-xl: 1.25em;
        --text-lg: 1.125em;
        --text-md: 1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-family: var(--font-heading);
        font-size: var(--text-2xl) !important;
        font-weight: 800;
        margin-bottom: var(--spacing-lg);
        color: var(--color-text);
    }
}