/* Base Styles */
html {
    font-size: 16px;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-semibold);
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

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

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

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

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

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

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

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

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

em {
    font-style: italic;
}

/* Links */
a {
    color: var(--link-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--link-hover);
}

a:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Selection */
::selection {
    background-color: var(--primary-200);
    color: var(--primary-900);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Section */
.section {
    padding: var(--section-padding-desktop) 0;
}

.section__title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    text-align: center;
    margin-bottom: var(--space-md);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-3xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section__cta {
    text-align: center;
    margin-top: var(--space-3xl);
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
    padding: var(--space-5xl) 0 var(--space-4xl);
    text-align: center;
}

[data-theme="dark"] .page-hero {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
}

.page-hero__title {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-md);
}

.page-hero__subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1, .page-hero__title {
        font-size: var(--text-4xl);
    }

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

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

    .section {
        padding: var(--section-padding-tablet) 0;
    }

    .page-hero {
        padding: var(--section-padding-desktop) 0 var(--section-padding-tablet);
    }
}

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

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

    .section {
        padding: var(--section-padding-mobile) 0;
    }
}