/**
 * Typography Styles
 * Base typography rules and utility classes
 */

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

/* ===========================================
   Headings
   =========================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
}

h1 {
    font-size: var(--text-5xl);
    letter-spacing: var(--tracking-tight);
}

h2 {
    font-size: var(--text-4xl);
    letter-spacing: var(--tracking-tight);
}

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

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

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

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

/* Responsive headings */
@media (max-width: 1024px) {
    h1 {
        font-size: var(--text-4xl);
    }

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

@media (max-width: 768px) {
    h1 {
        font-size: var(--text-4xl);
    }

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

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

@media (max-width: 480px) {
    h1 {
        font-size: var(--text-3xl);
    }

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

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


/* ===========================================
   Paragraphs & Body Text
   =========================================== */

p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

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

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

/* ===========================================
   Links
   =========================================== */

a {
    transition: color var(--transition-fast);
}

.link {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.link:hover {
    color: var(--color-accent-hover);
}

/* ===========================================
   Text Utilities
   =========================================== */

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

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

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

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.text-capitalize {
    text-transform: capitalize;
}

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

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

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

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

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

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

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

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

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

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