/* ==========================================================================
   БАЗОВЫЕ СТИЛИ — Андерсон
   ========================================================================== */

/* ==========================================================================
   1. СБРОС
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* ==========================================================================
   2. ОСНОВА
   ========================================================================== */
body {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   3. PAGE WRAPPER
   ========================================================================== */
.page-wrapper {
    max-width: 100%;
    overflow-x: clip;
}

/* ==========================================================================
   4. ТИПОГРАФИКА
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

h1 { font-size: clamp(2rem, 10vw, 4rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
h3 { font-size: clamp(1.125rem, 3vw, 1.5rem); }
h4 { font-size: clamp(1rem, 2.5vw, 1.25rem); }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--color-accent-light);
}

/* ==========================================================================
   5. СПИСКИ
   ========================================================================== */
ul, ol {
    list-style: none;
}

/* ==========================================================================
   6. ИЗОБРАЖЕНИЯ
   ========================================================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   7. КНОПКИ
   ========================================================================== */
button {
    font-family: var(--font-primary);
    font-size: 1rem;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   8. АНИМАЦИИ ПРИ СКРОЛЛЕ (.reveal)
   ========================================================================== */
.reveal {
    opacity: 1;
    transform: none;
}

.reveal.active {
    opacity: 1;
    transform: none;
}

/* Задержки для каскадного появления */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }

/* ==========================================================================
   9. УТИЛИТАРНЫЕ КЛАССЫ
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* ==========================================================================
   10. АДАПТИВ
   ========================================================================== */
@media (min-width: 768px) {
    html { font-size: 16px; }
}

@media (min-width: 1200px) {
    html { font-size: 18px; }
}

/* Уменьшаем анимации для пользователей с чувствительностью к движению */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
