:root {
    --bg: #f5f7fb;
    --bg-hero: #eef2f7;
    --text: #0f172a;
    --muted: #475569;
    --primary: #1f4fbf;
    --primary-ink: #ffffff;
    --card: #ffffff;
    --line: #e2e8f0;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* Общий контейнер */
.popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/* Фон */
.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
}

/* Окно */
.popup-content {
    position: relative;
    z-index: 10;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 90%;
    max-width: 420px;
    overflow: hidden;
}

/* Текст */
#popup-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

#popup-message {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Кнопка */
#popup-close {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.1);
    color: #000000;
    cursor: pointer;
    transition: 0.2s;
}
#popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Декор круг */
.popup-bg-decor {
    position: absolute;
    top: -60%;
    left: 50%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    transform: translateX(-50%);
    z-index: -1;
}

/* Цвета состояний */
.popup.success .popup-bg-decor {
    background: rgba(255, 217, 0, 0.6);
}
.popup.error .popup-bg-decor {
    background: rgba(220, 20, 60, 0.6);
}

/* Скрытие */
.hidden {
    display: none;
}

/* Адаптив */
@media (max-width: 480px) {
    #popup-title {
        font-size: 1.4rem;
    }
    #popup-message {
        font-size: 0.9rem;
    }
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 72px 0;
}
.section-title {
    margin: 0 0 24px;
    font-size: 32px;
    line-height: 1.2;
}
.subsection-title {
    font-size: 24px;
    margin-top: 48px;
    margin-bottom: 16px;
    text-align: center;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(1.1) blur(6px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 600;
}
.brand-mark {
    color: var(--primary);
}
.brand-text {
    white-space: nowrap;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}
.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}
.main-nav a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.06s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-lg {
    padding: 16px 24px;
    font-size: 18px;
}
.btn-primary {
    background: var(--primary);
    color: var(--primary-ink);
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(31, 79, 191, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(31, 79, 191, 0.28);
}
.btn-hero-cta {
    padding: 16px 20px;
    font-size: 17px;
}

/* Hero */
.hero {
    background: linear-gradient(180deg, var(--bg-hero), var(--bg));
}

/* Меняем пропорции колонок и структуру сетки */
.hero-inner {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr; /* Текст уже, видео шире */
    gap: 32px 48px; /* Вертикальный и горизонтальный отступы */
    align-items: center;
    min-height: 72vh;
}

.hero-title {
    font-size: 44px;
    line-height: 1.15;
    margin: 0 0 16px;
    /* === НОВОЕ: Заголовок растягивается на всю ширину и центрируется === */
    grid-column: 1 / -1; /* Растянуть на все колонки */
    text-align: center;
    margin-bottom: 40px; /* Добавляем отступ снизу */
}

/* === НОВОЕ: Заставляем .hero-copy "раствориться", чтобы его дочерние элементы стали частью основной сетки === */
.hero .hero-copy {
    display: contents;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--muted);
    margin: 0 0 24px;
}
.hero-partners {
    margin-top: 24px;
    font-size: 14px;
    color: var(--muted);
}
.hero-partners p {
    margin: 4px 0;
}
.hero-cta {
    margin-top: 32px;
}

/* Challenges */
.challenges {
    position: relative;
    z-index: 1;
}
.challenges .cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}
.card .icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #edf2ff;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
}
.card .icon svg {
    width: 22px;
    height: 22px;
    fill: var(--primary);
}
.card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    letter-spacing: 0.3px;
}
.card p {
    margin: 0;
    color: var(--muted);
}
.lead {
    margin-top: 20px;
    color: var(--muted);
    font-weight: 500;
}

/* Roadmap */
.roadmap-header {
    text-align: center;
    margin-bottom: 48px;
}
.roadmap-header .section-title {
    margin-bottom: 8px;
}
.roadmap-subtitle {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}
.roadmap-visual {
    position: relative;
    width: 100%;
    margin: 0 auto;
}
.roadmap-line {
    position: absolute;
    top: 25px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary) 50%, #28a745 50%);
    z-index: 1;
}
.roadmap-stages {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    gap: 16px;
}
.roadmap-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
.roadmap-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.roadmap-icon svg {
    width: 24px;
    height: 24px;
}
.roadmap-card {
    width: 100%;
    text-align: center;
    flex-grow: 1;
}
.roadmap-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 8px;
    letter-spacing: 0.3px;
}
.roadmap-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
}

/* General Slider Styles (for all sliders) */
.slider {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    overflow: hidden;
}
.slides {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
}
.slide {
    display: none;
    gap: 24px;
    align-items: center;
}
.slide.is-active {
    display: grid;
}
.slide-caption {
    font-size: 16px;
}
.slide-caption h3 {
    margin-top: 0;
    font-size: 20px;
}
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: 1px solid var(--line);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: grid;
    place-items: center;
    color: var(--text);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.slider-control:hover {
    background: #f8fafc;
}
.slider-control.prev {
    left: 16px;
}
.slider-control.next {
    right: 16px;
}

/* Video Player Styles */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

/* Specific Slider Layouts */
.proof .slide.is-active {
    grid-template-columns: 1.5fr 1fr;
} /* Layout for "Proof" section */

.testimonials {
    margin-top: 48px;
}
.testimonials .slide.is-active {
    grid-template-columns: 180px 1fr;
} /* Layout for testimonials */
.testimonials .avatar {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.testimonials blockquote {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 16px;
    border-left: 3px solid var(--primary);
    padding-left: 16px;
}
.testimonials .person {
    color: var(--muted);
    font-weight: 600;
    padding-left: 19px;
}

/* Register Section */
.register-inner {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    text-align: center;
}
.register-subtitle {
    color: var(--muted);
    margin: 8px 0 20px;
}
.registration-form {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}
.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    font-family: "Inter", sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31, 79, 191, 0.2);
}
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-wrapper input {
    width: 100%;
    padding-right: 40px;
}
.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    user-select: none;
    font-size: 1.2rem;
    color: #6c757d;
}
.registration-form .register-cta {
    margin-top: 16px;
    text-align: center;
}
.registration-form .register-cta button {
    width: 100%;
    border: none;
}
.registration-form .smallprint {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    background: #fff;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}
.to-top {
    color: var(--primary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 960px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
    .hero-title {
        grid-column: 1 / -1;
    } /* Сохраняем заголовок наверху и на мобильных */
    .hero-partners {
        text-align: center;
    }
    .challenges .cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .proof .slide.is-active,
    .testimonials .slide.is-active {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .testimonials blockquote {
        border-left: none;
        padding-left: 0;
    }
    .testimonials .person {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .roadmap-stages {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }
    .roadmap-stage {
        width: 100%;
        max-width: 400px;
    }
    .roadmap-line {
        display: none;
    }
}

@media (max-width: 560px) {
    .section {
        padding: 56px 0;
    }
    .hero-title {
        font-size: 34px;
    }
    .section-title {
        font-size: 26px;
    }
    .challenges .cards {
        grid-template-columns: 1fr;
    }
    .btn-lg {
        width: 100%;
    }
    .footer-inner {
        flex-direction: column;
        gap: 12px;
    }
}

/* ======================================================= */
/* === СТИЛИ ДЛЯ СЛАЙДЕРА В ПЕРВОЙ СЕКЦИИ (HERO) === */
/* ======================================================= */

/* 1. Убираем фон "карточки" у слайдера, делаем его невидимой оберткой */
.hero .slider {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    overflow: visible; /* ДОБАВЛЕНО: Позволяет кнопкам выходить за границы */
}

/* 2. Применяем скругление и тень непосредственно к контейнеру видео */
.hero .video-container {
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    overflow: hidden; /* Обязательно, чтобы скругление работало */
}

/* 3. Отображаем и стилизуем подпись под видео */
.hero .slide-caption {
    display: block; /* ИЗМЕНЕНО: Показываем блок */
    margin-top: 16px;
    text-align: center;
}
.hero .slide-caption h3 {
    font-size: 16px;
    color: var(--text);
    margin: 0 0 4px;
}
.hero .slide-caption p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

/* 4. Уточняем, что активный слайд должен быть просто блоком */
.hero .slide.is-active {
    display: block;
}

/* ======================================================= */
/* === НОВЫЕ СТИЛИ ДЛЯ КНОПОК HERO-СЛАЙДЕРА === */
/* ======================================================= */

/* Отодвигаем кнопки за пределы видео на больших экранах */
@media (min-width: 1160px) {
    .hero .slider-control.prev {
        left: -10px; /* Двигаем левее */
    }
    .hero .slider-control.next {
        right: -10px; /* Двигаем правее */
    }
}
.toggle-password svg {
    width: 20px;
    height: 20px;
    color: var(--muted);
    transition: color 0.2s;
}
.toggle-password:hover svg {
    color: var(--text);
}

/* Логика показа/скрытия иконок */
.toggle-password .icon-eye-slash {
    display: none; /* По умолчанию перечеркнутый глаз скрыт */
}
.toggle-password.is-visible .icon-eye-open {
    display: none; /* Когда пароль виден, скрываем открытый глаз */
}
.toggle-password.is-visible .icon-eye-slash {
    display: block; /* И показываем перечеркнутый */
}
