/*
 * Soft Marketplace - единственный CSS-файл проекта.
 *
 * Принципы:
 * - никакого фреймворка и сборки: файл маленький, грузится одним запросом;
 * - mobile-first: базовые стили для телефона, @media (min-width) - доработки;
 * - все "магические числа" вынесены в дизайн-токены :root ниже;
 * - типографика через clamp() - плавно масштабируется без брейкпоинтов.
 *
 * Структура файла:
 *   1. Токены        6. Секции и карточки
 *   2. Reset         7. Шаги (how it works)
 *   3. База          8. Таблицы сравнения
 *   4. Кнопки        9. FAQ
 *   5. Шапка        10. Форма заявки
 *                   11. Футер
 */

/* ------------------------------------------------------------------ */
/* 1. Дизайн-токены                                                    */
/* ------------------------------------------------------------------ */

:root {
    /* Цвета: тёмный графит + фиолетовый акцент (в духе Wildberries,
       но не копия фирменного цвета маркетплейса) */
    --c-ink: #191722;          /* основной текст */
    --c-muted: #5d5a6b;        /* вторичный текст */
    --c-bg: #ffffff;           /* фон страницы */
    --c-bg-alt: #f4f1fa;       /* фон чередующихся секций (лёгкий фиолетовый тон) */
    --c-line: #e6e4ee;         /* границы, разделители */

    --c-accent: #7b2cbf;       /* CTA, ссылки, акценты */
    --c-accent-dark: #641fa3;  /* hover CTA */
    --c-accent-soft: #f1e8fa;  /* подложки под акцент */

    /* Тёмный градиент hero и футера */
    --c-dark-1: #1c1329;
    --c-dark-2: #2d1a4a;

    --c-success: #1d7a3e;
    --c-success-bg: #e8f6ed;
    --c-error: #c02942;

    /* Геометрия */
    --radius: 14px;
    --container: 1140px;
    --shadow: 0 8px 30px rgba(25, 23, 34, 0.08);

    /* Шрифты: Inter - текст, Golos Text - заголовки (оба self-hosted,
       см. @font-face ниже) + системный запас */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
            Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Golos Text", var(--font);
}

/* Inter variable font, два файла по unicode-range: браузер скачает
   только нужные алфавиты (обычно оба - сайт русский с латиницей в бренде) */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-var-latin.65850a373e25.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap; /* текст виден сразу системным шрифтом, Inter подменяется по загрузке */
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A,
                   U+201C-201E, U+2022, U+2026, U+20AC, U+2212;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-var-cyr.4e2553027f1d.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Golos Text - акцидентный шрифт заголовков. Российская гарнитура,
   спроектированная в первую очередь под кириллицу: даёт бренду характер,
   которого нет у вездесущего Inter. */
@font-face {
    font-family: "Golos Text";
    src: url("../fonts/golos-var-latin.3ba0fde64bcf.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A,
                   U+201C-201E, U+2022, U+2026, U+20AC, U+2212;
}
@font-face {
    font-family: "Golos Text";
    src: url("../fonts/golos-var-cyr.024646dc00da.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ------------------------------------------------------------------ */
/* 2. Мини-reset                                                       */
/* ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
h1, h2, h3, h4 {
    line-height: 1.2;
    text-wrap: balance;
    font-family: var(--font-display);
}
p { overflow-wrap: break-word; }

/* Плавный скролл к якорям не должен прятать цель под sticky-шапкой */
section[id], [id="zayavka"] { scroll-margin-top: 80px; }

/* ------------------------------------------------------------------ */
/* 3. База                                                             */
/* ------------------------------------------------------------------ */

body {
    font-family: var(--font);
    color: var(--c-ink);
    background: var(--c-bg);
    font-size: 1.0625rem; /* 17px - крупнее дефолта: длинные тексты читаются легче */
    /* Страховка от горизонтального переполнения: даже если какой-то
       элемент окажется шире экрана, страница не должна «уезжать» вбок.
       clip лучше hidden (не создаёт лишний скролл-контейнер),
       hidden оставлен как fallback для старых браузеров. */
    overflow-x: hidden;
    overflow-x: clip;
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

.container--narrow { max-width: 780px; }

a { color: var(--c-accent); }

/* ------------------------------------------------------------------ */
/* 4. Кнопки                                                           */
/* ------------------------------------------------------------------ */

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 999px;
    border: 2px solid transparent;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    /* Текст кнопки никогда не переносится на вторую строку -
       в тесноте лучше ужать соседей (см. правила шапки ниже) */
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--c-accent);
    color: #fff;
}
.btn--primary:hover { background: var(--c-accent-dark); }

/* Свечение - только у больших CTA (на тёмных фонах hero и формы).
   У маленькой кнопки в белой шапке glow выглядел навязчиво. */
.btn--primary.btn--lg {
    box-shadow: 0 8px 24px rgba(123, 44, 191, 0.35);
}
.btn--primary.btn--lg:hover {
    box-shadow: 0 10px 28px rgba(123, 44, 191, 0.45);
}

/* «Призрачная» кнопка для тёмного hero */
.btn--ghost {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}
.btn--ghost:hover { border-color: #fff; }

.btn--lg { padding: 16px 34px; font-size: 1.0625rem; }
.btn--sm { padding: 9px 20px; font-size: 0.9375rem; }

/* Видимый фокус для навигации с клавиатуры */
.btn:focus-visible, a:focus-visible {
    outline: 3px solid var(--c-accent);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* 5. Шапка                                                            */
/* ------------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--c-line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.0625rem;
    margin-right: auto;
    white-space: nowrap;
}

.logo__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--c-accent), var(--c-dark-2));
    color: #fff;
    font-weight: 800;
}

.site-nav { display: none; gap: 24px; }
.site-nav a {
    color: var(--c-muted);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}
.site-nav a:hover { color: var(--c-ink); }

/* Навигация появляется только с 840px: на меньшей ширине логотип +
   4 ссылки + кнопка «Оставить заявку» физически не помещаются в строку
   и распирали страницу вбок. До 840px главное в шапке - кнопка заявки.
   На 840–959px промежутки ужаты, с 960px - просторнее. */
@media (min-width: 840px) {
    .site-nav { display: flex; gap: 14px; }
}
@media (min-width: 960px) {
    .site-nav { gap: 24px; }
}

/* На узких экранах (до ~420px) логотип с текстом + кнопка не помещаются
   в одну строку - оставляем только квадратик-знак, текст бренда скрываем */
@media (max-width: 419px) {
    .logo__text { display: none; }
}

/* ------------------------------------------------------------------ */
/* 6. Секции и карточки                                                */
/* ------------------------------------------------------------------ */

.section { padding: clamp(56px, 9vw, 96px) 0; }
.section--alt { background: var(--c-bg-alt); }

/* Надзаголовок-ярлык над заголовком секции: задаёт структуру страницы
   («Проблема → Процесс → Гарантии → …») и добавляет акцентный цвет
   в белые зоны */
.section__eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 12px;
}

.section__title {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

/* Тёмная секция-акцент в середине страницы (блок «Гарантии») -
   разбивает череду белых карточных сеток и выделяет ключевой блок доверия */
.section--dark {
    background:
        radial-gradient(800px 400px at 90% 0%, rgba(123, 44, 191, 0.35), transparent 65%),
        linear-gradient(160deg, var(--c-dark-1), var(--c-dark-2));
    color: #fff;
}
.section--dark .section__eyebrow { color: #c99df0; }
.section--dark .section__lead { color: rgba(255, 255, 255, 0.72); }
.section--dark .card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}
.section--dark .card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.08);
}
.section--dark .card p { color: rgba(255, 255, 255, 0.66); }
.section--dark .card__icon {
    background: rgba(123, 44, 191, 0.35);
    color: #d9c4f6;
}

.section__lead {
    color: var(--c-muted);
    max-width: 640px;
    margin-bottom: 40px;
    font-size: 1.125rem;
}

.section__cta { margin-top: 40px; }

/* Hero */
.hero {
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(123, 44, 191, 0.45), transparent 65%),
        linear-gradient(140deg, var(--c-dark-1), var(--c-dark-2));
    color: #fff;
    padding: clamp(64px, 11vw, 130px) 0;
}

/* Маленький бейдж над заголовком - задаёт контекст до чтения h1 */
.hero__badge {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 26px;
}

.hero__title {
    font-size: clamp(1.8rem, 4.6vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    max-width: 880px;
    margin-bottom: 24px;
}

/* Ключевая фраза h1 выделена градиентом - визуальный фокус без картинок */
.hero__accent {
    background: linear-gradient(90deg, #c99df0, #9a5ce0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.82);
    max-width: 700px;
    margin-bottom: 36px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 44px;
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    padding: 0;
    margin: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9375rem;
}
.hero__trust li::before {
    content: "✦";
    color: #b57ae6;
    margin-right: 8px;
}

/* Полоса ключевых цифр под hero */
.stats {
    background: var(--c-dark-1);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 36px 0;
    color: #fff;
}

.stats__grid {
    display: grid;
    gap: 28px 20px;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
}
@media (min-width: 960px) {
    .stats__grid { grid-template-columns: repeat(4, 1fr); }
}

/* В разметке - семантический <dl>: dt (что за цифра) идёт до dd (число),
   визуально число показывается первым через flex-order */
.stats__item { display: flex; flex-direction: column; }
.stats__item dd {
    order: -1;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    /* Один светло-лавандовый тон вместо градиента: у градиента тёмный
       край терял контраст на тёмном фоне */
    color: #d9c4f6;
}
.stats__item dt {
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0 2px;
}
.stats__item p {
    font-size: 0.845rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Сетки карточек: 1 колонка на телефоне, 2 с 640px, 3–4 с 960px */
.cards {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .cards--3 { grid-template-columns: repeat(3, 1fr); }
    .cards--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.card h3 { font-size: 1.125rem; margin-bottom: 10px; }
.card p { color: var(--c-muted); font-size: 0.96rem; }

/* SVG-иконка в тонированном квадрате. Иконки из спрайта
   templates/landing/_icons.html, красятся через currentColor */
.card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    margin-bottom: 16px;
}
.card__icon .icon { width: 24px; height: 24px; }

.card--segment {
    box-shadow: var(--shadow);
    border-top: 4px solid var(--c-accent);
    display: flex;
    flex-direction: column;
}
.card--segment p { flex-grow: 1; }

.card__link {
    margin-top: 18px;
    font-weight: 600;
    text-decoration: none;
}
.card__link:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* 7. Шаги «как работает»                                              */
/* ------------------------------------------------------------------ */

.steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.steps__item {
    counter-increment: step;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 28px 24px;
}

/* Номер шага рисуется css-счётчиком - в разметке чистый <ol> */
.steps__item::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--c-accent-soft);
    color: var(--c-accent);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.125rem;
    margin-bottom: 16px;
}

.steps__item h3 { font-size: 1.125rem; margin-bottom: 10px; }
.steps__item p { color: var(--c-muted); font-size: 0.96rem; }

/* ------------------------------------------------------------------ */
/* 8. Таблицы сравнения                                                */
/* ------------------------------------------------------------------ */

.compare-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
}
@media (min-width: 960px) {
    .compare-grid { grid-template-columns: repeat(2, 1fr); }
}

/* КРИТИЧНО для мобильных: у грид-элементов min-width по умолчанию auto -
   колонка не может стать уже таблицы (min-width: 480px) и распирает
   страницу на всю её ширину. min-width: 0 разрешает колонке сжаться,
   и таблица скроллится внутри .table-wrap, а не ломает страницу. */
.compare-grid > div { min-width: 0; }

.compare__subtitle { font-size: 1.25rem; margin-bottom: 16px; }

/* Когда таблицы стоят рядом, резервируем под подзаголовок две строки:
   если один из них перенесётся, а другой нет - таблицы всё равно
   начнутся на одной высоте и шапки останутся выровненными */
@media (min-width: 960px) {
    .compare__subtitle { min-height: 2.4em; }
}

/* На узких экранах таблица скроллится внутри обёртки,
   а не ломает страницу горизонтальной прокруткой */
.table-wrap { overflow-x: auto; }

/* Подсказка «таблица листается» - только на экранах, где она правда уже */
.table-scroll-hint {
    display: none;
    font-size: 0.8125rem;
    color: var(--c-muted);
    margin: -8px 0 10px;
}
@media (max-width: 639px) {
    .table-scroll-hint { display: block; }
}

table {
    width: 100%;
    min-width: 520px;
    /* fixed вместо auto: колонки обеих таблиц получают одинаковую ширину
       (32% / 34% / 34%, см. thead ниже), а не подгоняются под содержимое -
       иначе левая и правая таблицы выглядели по-разному */
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--c-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: 0.9375rem;
}

th, td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--c-line);
    vertical-align: top;
    overflow-wrap: break-word; /* при table-layout: fixed длинные слова должны переноситься */
}
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }

thead th {
    background: var(--c-dark-1);
    color: #fff;
    font-weight: 600;
    /* Одинаковая высота шапки в обеих таблицах (для ячеек таблицы
       height работает как min-height) + вертикальное центрирование */
    height: 54px;
    vertical-align: middle;
}
/* При table-layout: fixed ширину колонок задаёт первая строка (thead).
   32% / 36% / 32%: средней колонке чуть больше, чтобы самый длинный
   заголовок («Штатный менеджер») помещался в одну строку и шапки
   обеих таблиц были одинаковой высоты */
thead th:first-child { width: 32%; }
thead th:nth-child(2) { width: 36%; }
/* Колонка нашего продукта подсвечена */
thead th:last-child { background: var(--c-accent); }
tbody td:last-child { background: var(--c-accent-soft); font-weight: 500; }

tbody th { font-weight: 600; color: var(--c-muted); }

/* ------------------------------------------------------------------ */
/* 9. FAQ (details/summary - работает без JS)                          */
/* ------------------------------------------------------------------ */

.faq { display: grid; gap: 12px; }

.faq__item {
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 0 22px;
}

.faq__item summary {
    padding: 18px 30px 18px 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }

/* Индикатор +/− рисуется псевдоэлементом */
.faq__item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--c-accent);
}
.faq__item[open] summary::after { content: "−"; }

.faq__item p { padding: 0 0 20px; color: var(--c-muted); }

/* ------------------------------------------------------------------ */
/* 10. Форма заявки                                                    */
/* ------------------------------------------------------------------ */

.section--form {
    background:
        radial-gradient(700px 380px at 15% 110%, rgba(123, 44, 191, 0.35), transparent 65%),
        linear-gradient(140deg, var(--c-dark-2), var(--c-dark-1));
    color: #fff;
}
.section--form .section__title { color: #fff; }
.section--form .section__lead { color: rgba(255, 255, 255, 0.75); }

.container--form { max-width: 1000px; }

/* Двухколоночный блок: слева - зачем оставлять заявку, справа - форма.
   На мобильном складывается в одну колонку (текст сверху). */
.lead-block {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr;
    align-items: center;
}
@media (min-width: 960px) {
    .lead-block { grid-template-columns: 1fr 1fr; gap: 56px; }
}

.lead-block__points {
    list-style: none;
    padding: 0;
    margin-top: 28px;
    display: grid;
    gap: 12px;
    color: rgba(255, 255, 255, 0.82);
}
.lead-block__points li {
    padding-left: 32px;
    position: relative;
}
.lead-block__points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(123, 44, 191, 0.45);
    color: #e3cdf7;
    font-size: 0.8rem;
    font-weight: 700;
}

.lead-form {
    background: var(--c-bg);
    color: var(--c-ink);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 40px);
    box-shadow: 0 20px 60px rgba(10, 5, 20, 0.45);
    display: grid;
    gap: 18px;
}

/* Пометка необязательных полей снимает страх «долгой анкеты» */
.field__optional {
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--c-muted);
    margin-left: 6px;
}

.field label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--c-line);
    border-radius: 10px;
    background: #fff;
    color: var(--c-ink);
    transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-accent-soft);
}

/* Ошибки валидации */
.field--error input, .field--error textarea { border-color: var(--c-error); }
.errorlist {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    color: var(--c-error);
    font-size: 0.875rem;
}
.lead-form__errors {
    background: #fdecef;
    border: 1px solid var(--c-error);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    color: var(--c-error);
}

.lead-form__submit {
    width: 100%;
    margin-top: 6px;
    border: none;
}

.lead-form__note {
    font-size: 0.875rem;
    color: var(--c-muted);
    text-align: center;
}

/*
 * Honeypot: поле смещено за экран, а не display:none.
 * Продвинутые боты проверяют display/visibility и пропускают такие поля;
 * смещённое за экран поле для них выглядит обычным, и они его заполняют -
 * чем и выдают себя (см. landing/forms.py).
 */
.hp-field {
    position: absolute;
    left: -9999px;
    top: 0;
    height: 1px;
    overflow: hidden;
}

/* Блок успешной отправки (?sent=1) */
.form-success {
    background: var(--c-bg);
    color: var(--c-ink);
    border-radius: var(--radius);
    padding: clamp(36px, 6vw, 60px);
    text-align: center;
    box-shadow: var(--shadow);
}
.form-success__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--c-success-bg);
    color: var(--c-success);
    font-size: 2rem;
    font-weight: 800;
}
.form-success h2 { margin-bottom: 12px; }
.form-success p { color: var(--c-muted); max-width: 460px; margin-inline: auto; }

/* «Что дальше» в блоке успеха - снимает неопределённость после отправки */
.form-success__steps {
    max-width: 380px;
    margin: 24px auto 0;
    padding-left: 22px;
    text-align: left;
    color: var(--c-muted);
    display: grid;
    gap: 8px;
}

/* ------------------------------------------------------------------ */
/* 11. Футер                                                           */
/* ------------------------------------------------------------------ */

.site-footer {
    background: var(--c-dark-1);
    color: rgba(255, 255, 255, 0.72);
    padding: 56px 0 32px;
    font-size: 0.9375rem;
}

.site-footer__grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
    margin-bottom: 36px;
}
@media (min-width: 640px) {
    .site-footer__grid { grid-template-columns: 1.2fr 1fr; }
}

.logo--footer { color: #fff; margin-bottom: 14px; }

.site-footer__tagline { max-width: 420px; }

.site-footer a { color: #cfa9ef; }

/* Якорная навигация в футере - и удобство, и внутренняя перелинковка */
.site-footer__nav {
    display: grid;
    gap: 10px;
    align-content: start;
}
.site-footer__nav a {
    text-decoration: none;
    width: fit-content;
}
.site-footer__nav a:hover { text-decoration: underline; }

.site-footer__disclaimer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 24px;
    font-size: 0.8125rem;
    /* 0.78, а не меньше: на тёмном фоне текст должен оставаться читаемым */
    opacity: 0.78;
}

/* ------------------------------------------------------------------ */
/* 12. Мелкая полировка и анимации                                     */
/* ------------------------------------------------------------------ */

::selection { background: var(--c-accent-soft); color: var(--c-accent-dark); }
.hero ::selection,
.stats ::selection,
.section--form ::selection { background: var(--c-accent); color: #fff; }

/*
 * Плавное появление секций при скролле. Класс .reveal вешает JS
 * (static/js/main.js) - без JavaScript элементы просто видимы сразу,
 * ничего не прячется. Для людей с настройкой «меньше движения»
 * анимация отключается целиком.
 */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .card, .btn { transition: none; }
}
