/* ============================================================
   BASE - Reset, typography, global styles
   ============================================================ */

/* --- RESET --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

/* --- TYPOGRAPHY --- */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    color: var(--color-heading);
    line-height: var(--leading-tight);
}

h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-6);
}

h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-5);
}

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

h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

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

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

/* --- UTILITY CLASSES --- */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

.container--wide {
    max-width: var(--max-width-wide);
}

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

.section--alt {
    background-color: var(--color-bg-alt);
}

.section--dark {
    background-color: var(--color-bg-dark);
    color: #FFFFFF;
}

.section--dark h2,
.section--dark h3 {
    color: #FFFFFF;
}

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

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

.text-muted { color: var(--color-text-light); }
.text-primary { color: var(--color-primary); }
.text-bold { font-weight: var(--font-bold); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

/* --- RESPONSIVE --- */

@media (max-width: 1024px) {
    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-3xl); }
    h3 { font-size: var(--text-xl); }
}

@media (max-width: 640px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-lg); }

    .container {
        padding: 0 var(--space-4);
    }

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