/* ===== Сброс и базовые стили ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #4f46e5;
    --color-primary-dark: #4338ca;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --transition: 0.3s ease;
}

body.dark {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-text: #e2e8f0;
    --color-text-light: #94a3b8;
    --color-border: #334155;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Шапка ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-light);
    transition: color var(--transition);
}

.nav__link:hover {
    color: var(--color-primary);
}

/* Бургер */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Герой-секция ===== */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.hero__title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero__subtitle {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: background var(--transition), transform var(--transition);
}

.btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ===== Секции ===== */
.section {
    padding: 80px 0;
}

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

.section__title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

/* ===== Шаги ===== */
.steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step__number {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.step__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.step__text {
    color: var(--color-text-light);
}

.step__list {
    list-style: none;
    padding: 0;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step__list-item {
    position: relative;
    padding-left: 20px;
    color: var(--color-text-light);
}

.step__list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
}

.step__list-item a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition);
}

.step__list-item a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.step__image {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 12px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

/* ===== Карточки ===== */
.cards {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cards .card {
    display: block;
    width: 280px;
    flex-shrink: 0;
}

.cards .card:hover {
    text-decoration: none;
}

.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
    border-color: var(--color-primary);
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: #eef2ff;
    color: var(--color-primary);
    border-radius: 50%;
    margin-bottom: 16px;
}

.card__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.card__text {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* ===== Переключатель темы ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-text);
    transition: background var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
    background: var(--color-bg-alt);
}

.theme-toggle__icon--sun {
    display: none;
}

.theme-toggle__icon--moon {
    display: block;
}

body.dark .theme-toggle__icon--sun {
    display: block;
}

body.dark .theme-toggle__icon--moon {
    display: none;
}

/* ===== Тёмная тема ===== */
body.dark {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-text: #e2e8f0;
    --color-text-light: #94a3b8;
    --color-border: #334155;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dark .header {
    background: rgba(15, 23, 42, 0.9);
}

body.dark .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.dark .card__icon {
    background: #1e293b;
}

/* ===== Адаптивность ===== */

/* Планшет */
@media (max-width: 900px) {
    .hero__title {
        font-size: 2.2rem;
    }

    .hero__subtitle {
        font-size: 1.05rem;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .section__title {
        font-size: 1.75rem;
    }
}

/* Мобильные */
@media (max-width: 640px) {
    .burger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--color-bg);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition), padding var(--transition);
        border-bottom: 1px solid var(--color-border);
    }

    .nav.open {
        max-height: 300px;
        padding: 16px 0;
    }

    .nav__link {
        padding: 12px 0;
        font-size: 1.05rem;
    }

    .hero {
        padding: 130px 0 70px;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .hero__subtitle {
        font-size: 0.95rem;
    }

    .btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    .section {
        padding: 60px 0;
    }

    .section__title {
        font-size: 1.5rem;
        margin-bottom: 36px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .step__number {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
}
