/* Base Styles and Reset */

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

html {
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    /* Improve text rendering on mobile */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Improve touch scrolling */
    touch-action: pan-y;
}

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

/* Ensure buttons don't zoom on tap */
button {
    font-size: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Section Styles */

section {
    padding: var(--spacing-xl) 0;
    scroll-margin-top: 70px;
}

/* Scroll-triggered fade-in */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.section-header p a {
    color: var(--color-secondary);
    text-decoration: underline;
    transition: color 0.2s;
}

.section-header p a:hover {
    color: var(--color-secondary-light);
}
