/* ============================================================
   KASSIR.KG — info landing
   Чистый CSS, светлая тема, mobile-first.
   Оглавление:
     1. Шрифт (self-host Inter)
     2. Переменные (палитра / типографика / сетка)
     3. Reset & базовые элементы
     4. Утилиты (wrap, reveal, кнопки, chips)
     5. Хедер + off-canvas меню
     6. Hero (тёмный, сплошной фон #24262e)
     6b. Секция «Наши события»
     6c. Плавающие мессенджеры
     7. Секции: заголовки
     8. Карточки преимуществ
     9. Шаги
     10. Split (организаторам / приложение)
     11. Мокапы (дэшборд, телефон)
     12. Артисты / постеры / статистика
     13. FAQ аккордеон
     14. География
     15. Табы + формы
     16. Футер
     17. Медиа-запросы (360 / 400 / 480 / 560 / 768 / 1024 / 1280)
     18. prefers-reduced-motion
============================================================ */

/* ---------- 1. Шрифт ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/InterVariable.woff2") format("woff2");
}

/* ---------- 2. Переменные ---------- */
/* Тема переключается атрибутом data-theme на <html> (js/theme.js).
   Значения ниже — светлая тема и одновременно дефолт: если JS не отработал,
   сайт остаётся полностью рабочим в светлом виде.
   Тёмные значения — в блоке [data-theme="dark"] ниже.
   ВСЯ палитра живёт здесь. Литеральных цветов вне этого блока нет. */
:root {
  /* Системным контролам (скроллбары, инпуты, чекбоксы, автозаполнение)
     нельзя задать цвет из CSS — они красятся браузером по color-scheme.
     Без этой строки в тёмной теме останутся светлые полосы прокрутки. */
  color-scheme: light dark;

  /* --- Поверхности --- */
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-soft: #fafafb;
  --surface: #ffffff; /* карточки, шапка, формы, аккордеон */

  /* Плитки под ЧУЖИЕ логотипы. Значения фиксированы для ОБЕИХ тем — эти
     токены намеренно не переопределяются в [data-theme="dark"], иначе
     чужие логотипы поедут по контрасту при переключении темы.
     --logo-tile (партнёры) — тёмная: большинство логотипов цветные или
     светлые, на тёмной плите они держатся, а Syntlex (белый) наконец видно.
     --logo-tile-plain (платёжные системы) остаётся белой: там картинки
     почти чёрные и на тёмном исчезнут. */
  --logo-tile: #1b1e25;
  --logo-tile-border: #2c313b;
  --logo-tile-plain: #ffffff;

  /* Чёрный в mask-image означает «непрозрачно», а не цвет.
     Именованный токен — чтобы никто не «починил» его под тему. */
  --mask-opaque: #000;

  /* Инвертированная поверхность: hero, три .section-invert, футер.
     В светлой теме — тёмная плита на белом. В тёмной — наоборот,
     ПРИПОДНЯТАЯ плита светлее фона. Инверсия относительная: смысл
     «эта секция выделена» сохраняется, направление контраста меняется. */
  --surface-invert: #14151a;
  --surface-invert-grad: linear-gradient(150deg, #2a2f3a, #14151a);
  /* Кант по краю инверт-секции. В светлой не нужен — граница чёрного и белого
     и так режет глаз; в тёмной перепад тональный, и его надо подчеркнуть. */
  --section-invert-edge: transparent;

  /* --- Мокап телефона (секция «Приложение») ---
     Иерархия обязана читаться как настоящее устройство:
     секция → рамка (темнее секции) → экран (светлее рамки, он светится).
     В светлой теме это чёрная рамка и белый экран; в тёмной те же роли,
     но обе величины смещены вниз, иначе экран слепит. */
  --phone-bezel: #24262e;
  --phone-screen: linear-gradient(
    160deg,
    var(--surface),
    var(--bg-alt)
  );
  --phone-screen-glow: none;
  /* Бейджи маркетов — почти чёрные картинки, им нужен светлый кант */
  --badge-ring: var(--invert-line);
  --badge-ring-hover: var(--invert-line-strong);

  --card: var(--surface);
  --border: #ececf1;
  --border-strong: #dedee3;
  --border-header: #efeff2;

  /* --- Текст на обычной поверхности --- */
  --text: #14151a; /* заголовки */
  --text-body: #5a5d6b; /* основной (6.5:1 на белом) */
  --text-muted: #6c6f7d; /* вторичный (5.0:1 на белом) */
  /* Капс-лейблы hero по спеке. ВНИМАНИЕ: 3.3:1 на белом — ниже 4.5:1.
     Живёт только на надстрочнике и лейблах цифр в hero; на остальном
     вторичном тексте — --text-muted, иначе провал контраста по всему сайту. */
  --text-label: #8a8d9a;

  /* --- Текст и линии НА инвертированной поверхности ---
     Раньше это были ~35 разных rgba(255,255,255,α) вразнобой (0.04…0.86).
     Схлопнуты в шкалу: разница между 0.16 и 0.18 глазом не видна,
     а поддерживать 16 уровней прозрачности невозможно. */
  --on-invert: #ffffff;
  --on-invert-strong: rgba(255, 255, 255, 0.86);
  --on-invert-body: rgba(255, 255, 255, 0.72);
  --on-invert-muted: rgba(255, 255, 255, 0.62);
  --on-invert-label: #b7bac6;
  --on-invert-label-dim: #9ca0ae;

  --invert-line-strong: rgba(255, 255, 255, 0.45);
  --invert-line: rgba(255, 255, 255, 0.22);
  --invert-line-soft: rgba(255, 255, 255, 0.12);
  --invert-line-hair: rgba(255, 255, 255, 0.08);
  --invert-fill-strong: rgba(255, 255, 255, 0.14);
  --invert-fill: rgba(255, 255, 255, 0.06);
  --invert-fill-soft: rgba(255, 255, 255, 0.04);

  /* --- Акцент — только жёлтый. Красного и оранжевого в палитре нет --- */
  --c-accent: #ffc300;
  --c-accent-light: #ffd84d;
  --c-accent-dark: #e0a800;
  --c-accent-soft: #fff8e1;
  --c-accent-soft-2: #fffbeb;
  --grad-accent: linear-gradient(
    135deg,
    var(--c-accent-dark) 0%,
    var(--c-accent) 50%,
    var(--c-accent-light) 100%
  );
  /* Текст НА жёлтой заливке. Жёлтый в обеих темах один и тот же,
     поэтому эти токены не переопределяются в dark. */
  --on-accent: #14151a; /* 11.3:1 на #ffc300 */
  --on-accent-soft: #5c4700; /* 5.5:1 — вторичный текст на СПЛОШНОМ #ffc300 */
  /* Вторичный текст на жёлтом ГРАДИЕНТЕ (--grad-accent). Полупрозрачный,
     а не плоский #5c4700, потому что тёмный конец градиента (#e0a800)
     роняет плоский вариант до 4.15:1 — ниже AA. Здесь: 5.6:1 на #e0a800,
     6.8:1 на #ffc300, 7.5:1 на #ffd84d. */
  --on-accent-body: rgba(20, 21, 26, 0.78);
  /* Иконка на бледно-жёлтой подложке --c-accent-soft (17.2:1) */
  --c-accent-ink: #14151a;
  --accent-glow: rgba(224, 168, 0, 0.65);
  --accent-ring: rgba(224, 168, 0, 0.28);

  /* Выбранный язык повторяет графитовую поверхность hero. */
  --selection: var(--surface-invert);
  --selection-hover: #eceef2;
  --on-selection: #ffffff;
  --on-selection-muted: rgba(255, 255, 255, 0.72);

  /* Легаси-алиасы: --accent = тёмный жёлтый (заливки, бордеры, крупный декор) */
  --accent: var(--c-accent-dark);
  --accent-2: var(--c-accent);
  --accent-yellow: var(--c-accent);
  --accent-yellow-light: var(--c-accent-light);
  --accent-yellow-tint: var(--c-accent-soft);
  --grad: var(--grad-accent);
  /* Жёлтый текст на белом нечитаем → текстовый акцент всегда тёмный */
  --grad-text: none;

  /* --- Система заголовков: белый / жёлтый / чёрный ---
     Имена историчные и описывают РОЛЬ, не литерал: --h-black — цвет заголовка
     на обычном фоне (в тёмной теме он светлый), --h-white — заголовок на
     инвертированной секции. */
  --h-black: var(--text);
  --h-white: #ffffff;
  --h-yellow: #ffc300; /* только на тёмном фоне */
  /* Жёлтый ТЕКСТ на светлом. Замер: #ffc300 на белом = 1.66:1 — AA не проходит
     ни на каком размере. Используется только в .hl внутри h2 по прямому
     решению — как бренд-акцент, не как читаемый текст.
     Всё, что мельче, красить только --h-yellow-ink-sm (5.27:1). */
  --h-yellow-ink: #ffc300;
  --h-yellow-ink-sm: #8a6600;
  --grad-soft: linear-gradient(180deg, var(--bg) 0%, var(--c-accent-soft-2) 100%);

  /* --- Сплошная тёмная кнопка (CTA в шапке) ---
     Отдельные токены, потому что в тёмной теме она обязана инвертироваться:
     тёмная кнопка на тёмной шапке пропадает. */
  --btn-solid-bg: #14151a;
  --btn-solid-ink: #ffffff;
  --btn-solid-border: #14151a;

  /* --- Статусы --- */
  --success: #157a2b;
  --success-line: rgba(40, 200, 64, 0.35);
  --success-bg: rgba(40, 200, 64, 0.1);
  --success-dot: #28c840;
  --danger: #b02020;
  --danger-line: rgba(214, 40, 40, 0.35);
  --danger-bg: rgba(214, 40, 40, 0.1);

  /* Точки в реплике macOS-титлбара (мокап дэшборда).
     Это иллюстрация чужого интерфейса, а не палитра бренда — правило
     «оранжевого нет» на неё не распространяется, цвета одинаковы в обеих темах. */
  --mac-dot-red: #ff5f57;
  --mac-dot-amber: #febc2e;
  --mac-dot-green: #28c840;

  /* --- Затемнения и подложки --- */
  --scrim: rgba(16, 18, 27, 0.55); /* фон под off-canvas меню */
  --scrim-soft: rgba(16, 18, 27, 0.4);
  --photo-scrim: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.35) 35%,
    rgba(0, 0, 0, 0) 60%
  );
  --photo-text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  --hairline-inset: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);

  /* --- Тени ---
     В тёмной теме тень на тёмном фоне физически не видна, поэтому там
     эти же токены превращаются в кант (0 0 0 1px). Всё, что использует
     --shadow, переживает смену темы без правок. */
  --shadow: 0 4px 24px rgba(16, 18, 27, 0.06);
  --shadow-lg: 0 18px 48px rgba(16, 18, 27, 0.12);
  --shadow-accent: 0 12px 30px rgba(224, 168, 0, 0.35);
  --shadow-header: 0 2px 16px rgba(16, 18, 27, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-btn: 0 4px 12px rgba(0, 0, 0, 0.16);
  --shadow-btn-accent: 0 6px 16px rgba(255, 195, 0, 0.34);
  --shadow-ticket: 0 8px 22px rgba(0, 0, 0, 0.28);
  --shadow-ticket-hover: 0 14px 30px rgba(0, 0, 0, 0.36);
  --shadow-marquee:
    0 6px 18px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.18);
  --shadow-marquee-hover:
    0 10px 26px rgba(0, 0, 0, 0.34), 0 3px 8px rgba(0, 0, 0, 0.22);

  /* --- Логотипы и иконки-картинки ---
     assets/logo.svg — двухцветный «билет»: жёлтая половина + чёрная.
     Фон у него непрозрачный, поэтому фильтр НЕ нужен ни в одной теме:
     жёлтая половина держит марку на любом фоне, а инверсия превратила бы
     логотип в белое пятно.
     Иконки соцсетей и контактов (assets/icon/*.svg) — наоборот, чёрная
     заливка на прозрачном; они всегда лежат на инверт-поверхности футера,
     поэтому выбеливаются в обеих темах. */
  --icon-invert: brightness(0) invert(1); /* тёмная иконка → белая */
  --icon-darken: brightness(0); /* обратно в чёрную — на жёлтом ховере */

  /* Радиусы */
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Сетка / ритм */
  --wrap: 1200px;
  --wrap-narrow: 800px;
  --pad-x: clamp(20px, 5vw, 48px);
  --section-y: clamp(64px, 10vw, 120px);

  /* Моноширинный — поля билета в hero (системный, без лишней загрузки) */
  --mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;

  /* Анимация */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.45s;

  --header-h: 72px;
}

/* ---------- 2b. Тёмная тема ---------- */
/* Ставится js/theme.js на <html>. Режим system разрешается в light/dark
   в самом JS, поэтому здесь нужен ровно один селектор, без @media —
   иначе системная тема начала бы перебивать явный выбор пользователя.

   Замеры контраста (WCAG AA = 4.5:1 для текста):
     --text       #e6e8eb на --bg  = 15.4:1
     --text-body  #b9bfc9 на --bg  = 10.2:1
     --text-muted #a4abb8 на --bg  =  8.2:1
     --text-label #8f97a5 на --bg  =  6.4:1  (в светлой теме этот токен
                                              даёт 3.3:1 — в тёмной лучше)
     --c-accent   #ffc300 на --bg  = 11.8:1
     --success    #4ade80 на --surface = 10.0:1
     --danger     #ff6b6b на --surface =  6.3:1
   Худшая пара — текст на самой светлой поверхности (--surface-invert),
   там --text-muted даёт 7.1:1. Запас есть везде. */
[data-theme="dark"] {
  color-scheme: dark;

  /* Фон не чистый чёрный: на #000 белый текст даёт ореол (halation),
     а тени и поверхности некуда опускать. */
  --bg: #0f1115;
  --bg-alt: #14171d;
  --bg-soft: #12141a;
  --surface: #171a20;
  /* --logo-tile* намеренно НЕ переопределяются: см. комментарий в :root */

  /* Инвертированные секции ПОДНИМАЮТСЯ над фоном, а не тонут в нём.
     Если оставить #14151a, они станут неотличимы от --bg (1.05:1) и
     ритм страницы «светлое → тёмное → светлое» исчезнет. */
  /* #22262e, а не #1c2027: отрыв от фона вырос с 1.16:1 до 1.25:1 — секция
     наконец читается как отдельная плита, а не как еле заметный оттенок.
     Текст остаётся с запасом: --text 12.4:1, --on-invert-muted 7.8:1. */
  --surface-invert: #22262e;
  --surface-invert-grad: linear-gradient(150deg, #333a46, #22262e);
  --section-invert-edge: var(--invert-line-hair);

  /* Рамка ТЕМНЕЕ секции (1.29:1) — телефон читается как предмет на плите,
     а не как пятно того же тона. */
  --phone-bezel: #0a0c10;
  /* Экран СВЕТЛЕЕ рамки (1.16:1), но остаётся нейтрально-графитовым:
     большая поверхность не конкурирует с жёлтыми акцентами интерфейса. */
  --phone-screen: linear-gradient(160deg, #191d24, #1c2027);
  --phone-screen-glow: none;
  /* Базовый кант поднят до -strong, поэтому ховеру нужен свой уровень выше,
     иначе наведение перестаёт читаться. */
  --badge-ring: var(--invert-line-strong);
  --badge-ring-hover: var(--on-invert);

  --border: #262b34;
  --border-strong: #333944;
  --border-header: #232830;

  /* Текст не чистый белый — #fff на тёмном «звенит» на длинных абзацах */
  --text: #e6e8eb;
  --text-body: #b9bfc9;
  --text-muted: #a4abb8;
  --text-label: #8f97a5;

  /* Инверт-поверхность в тёмной теме светлее фона, но всё ещё тёмная,
     поэтому белая шкала поверх неё продолжает работать как есть.
     Подняты только самые слабые уровни — на #1c2027 они были на грани. */
  --on-invert: #f2f4f7;
  --on-invert-strong: rgba(255, 255, 255, 0.9);
  --on-invert-body: rgba(255, 255, 255, 0.78);
  --on-invert-muted: rgba(255, 255, 255, 0.68);
  --on-invert-label: #c3c8d2;
  --on-invert-label-dim: #a4abb8;

  --invert-line-strong: rgba(255, 255, 255, 0.5);
  --invert-line: rgba(255, 255, 255, 0.26);
  --invert-line-soft: rgba(255, 255, 255, 0.16);
  --invert-line-hair: rgba(255, 255, 255, 0.1);
  --invert-fill-strong: rgba(255, 255, 255, 0.16);
  --invert-fill: rgba(255, 255, 255, 0.08);
  --invert-fill-soft: rgba(255, 255, 255, 0.05);

  /* Жёлтый не трогаем — это бренд, и на #0f1115 он даёт 11.8:1.
     Меняются только производные «под белый фон». */
  --c-accent-soft: #2a2312; /* был светло-жёлтый тинт */
  --c-accent-soft-2: #221d0f;
  --c-accent-ink: var(--c-accent-light); /* 11.3:1 на новом тинте */
  /* Тёмно-жёлтый для мелкого текста нужен был из-за белого фона.
     На тёмном он, наоборот, тусклый → берём светлый. */
  --h-yellow-ink-sm: var(--c-accent-light);
  --grad-soft: linear-gradient(180deg, var(--bg) 0%, #191712 100%);

  --selection-hover: #272c35;

  --h-white: #eef1f5;

  /* Сплошная кнопка инвертируется: светлая заливка на тёмной шапке */
  --btn-solid-bg: #e6e8eb;
  --btn-solid-ink: #0f1115;
  --btn-solid-border: #e6e8eb;

  /* Тёмные #157a2b (2.3:1) и #b02020 (2.1:1) на тёмном фоне нечитаемы */
  --success: #4ade80;
  --success-line: rgba(74, 222, 128, 0.32);
  --success-bg: rgba(74, 222, 128, 0.12);
  --success-dot: #4ade80;
  --danger: #ff6b6b;
  --danger-line: rgba(255, 107, 107, 0.32);
  --danger-bg: rgba(255, 107, 107, 0.12);

  --scrim: rgba(0, 0, 0, 0.7);
  --scrim-soft: rgba(0, 0, 0, 0.55);
  --hairline-inset: inset 0 0 0 0.5px rgba(255, 255, 255, 0.14);

  /* Тень на тёмном фоне не читается — её роль берёт на себя кант.
     Крупные тени остаются, но только как добавка к канту для глубины. */
  --shadow: 0 0 0 1px var(--border);
  --shadow-lg: 0 0 0 1px var(--border-strong), 0 24px 48px rgba(0, 0, 0, 0.55);
  --shadow-accent: 0 0 0 1px var(--c-accent-dark), 0 12px 30px rgba(0, 0, 0, 0.5);
  --shadow-header: 0 1px 0 0 var(--border-header), 0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 0 0 1px var(--border);
  --shadow-btn: 0 0 0 1px var(--border-strong);
  --shadow-btn-accent: 0 0 0 1px var(--c-accent-dark);
  --shadow-ticket: 0 0 0 1px var(--invert-line-soft);
  --shadow-ticket-hover: 0 0 0 1px var(--invert-line);
  --shadow-marquee: 0 0 0 1px rgba(0, 0, 0, 0.5);
  --shadow-marquee-hover: 0 0 0 1px rgba(0, 0, 0, 0.6);
}

/* ---------- 3. Reset & базовые ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
  /* clip, а не hidden: не создаёт scroll-контейнер и не ломает position: sticky */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Элементы grid/flex по умолчанию имеют min-width: auto и не сжимаются меньше
   своего min-content — из-за этого узкие экраны получали горизонтальный скролл. */
.split > *,
.card-grid > *,
.geo-grid > *,
.venue-grid > *,
.event-grid > *,
.poster-grid > *,
.steps > *,
.form-grid > *,
.footer-grid > * {
  min-width: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  max-width: 100%;
  display: block;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}

/* ---------- 4. Утилиты ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  /* max() — чтобы контент не уезжал под «уши» iPhone в ландшафте */
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
}
.wrap-narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: var(--section-y);
}
.section-alt {
  background: var(--bg-alt);
}
/* Компактная секция: вертикальные отступы ~на 30% меньше базовых */
.section-compact {
  padding-block: clamp(44px, 7vw, 84px);
}
.section-compact .section-head {
  margin-bottom: clamp(28px, 4vw, 40px);
}
.section-compact .section-title {
  font-size: clamp(22px, 3.4vw, 34px);
}

/* reveal-анимация появления */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease),
    color 0.25s var(--ease);
  white-space: nowrap;
}
/* Плоская заливка без тени: жёлтое свечение под кнопкой убрано */
.btn-primary {
  background: var(--c-accent);
  color: var(--on-accent); /* на жёлтой заливке текст только тёмный */
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--c-accent-dark);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: none;
}
.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}
.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}
.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
}
.btn-block {
  width: 100%;
}

/* chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.chip-row li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.chip-row li:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.chip-row-lg li {
  padding: 14px 26px;
  font-size: 17px;
}
.chip-row-sm li {
  padding: 6px 14px;
  font-size: 13px;
  box-shadow: none;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.chip-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* ---------- 5. Хедер ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border-header);
  /* Только визуальные свойства — никаких layout-свойств, чтобы не было CLS/рывка */
  transition: box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-header);
}
/* Высота хедера постоянна в обоих состояниях — раскладка не прыгает.
   Контейнер наследует .wrap (max-width + --pad-x), поэтому логотип и кнопки
   стоят ровно на тех же вертикалях, что и контент секций.
   Grid max-content | 1fr | max-content — меню всегда по центру страницы.
   max-content по краям, а не auto: auto даёт колонкам сжиматься, и при
   длинном меню логотип расплющивался. column-gap обязателен — без него
   крайние пункты меню упирались в логотип и в кнопки. */
.header-inner {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  column-gap: 20px;
  align-items: center;
  height: var(--header-h);
}

/* Состояния раскладки, которые ставит js/main.js, когда меню не влезло:
   tight — снимаем CTA (он дублируется в hero и в off-canvas),
   burger — меню целиком уезжает в off-canvas.
   Нужны потому, что длина меню зависит от языка, а медиа-запрос про язык
   ничего не знает: казахские подписи почти на треть длиннее русских. */
.site-header[data-nav="tight"] .header-cta,
.site-header[data-nav="burger"] .header-cta {
  display: none;
}
.site-header[data-nav="burger"] .main-nav {
  display: none;
}
.site-header[data-nav="burger"] .header-inner {
  grid-template-columns: max-content minmax(0, 1fr);
}
.site-header[data-nav="burger"] .header-actions {
  justify-self: end;
}
.site-header[data-nav="burger"] .burger {
  display: flex;
}
.site-header[data-nav="burger"] ~ .offcanvas .offcanvas-lang {
  display: none;
}

.brand {
  flex-shrink: 0;
}
.brand-logo {
  display: block;
  height: 36px;
  width: auto;
}

/* Ширина .wrap упирается в 1200px, то есть места у меню ровно столько же
   и на 1280, и на 4K. Шесть пунктов должны влезать в самом длинном языке
   (казахский — самые длинные подписи), поэтому 14px и умеренный gap. */
.main-nav {
  display: flex;
  gap: 20px;
  justify-self: center;
  line-height: 1;
}
.main-nav a {
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  color: var(--text-body);
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transition: width 0.25s var(--ease);
}
.main-nav a:hover {
  color: var(--text);
}
.main-nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.header-phone {
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
}
.header-phone:hover {
  color: var(--c-accent-dark);
}

/* ---------- Переключатель языка ----------
   Языков 13 — выпадающий список столько не вмещает, поэтому кнопка
   открывает модалку (разметка модалки собирается в js/i18n.js). */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
}
.lang-btn:focus-visible {
  outline: 2px solid var(--c-accent-dark);
  outline-offset: 2px;
}
.lang-btn-code {
  letter-spacing: 0.02em;
}
.lang-btn-caret {
  color: var(--text-muted);
  transition: transform 0.2s var(--ease);
}
.lang-btn[aria-expanded="true"] .lang-btn-caret {
  transform: rotate(180deg);
}

/* ---------- Модалка выбора языка ---------- */
.lang-modal {
  position: fixed;
  inset: 0;
  /* Выше off-canvas (150) и шапки (100): модалку можно открыть из меню */
  z-index: 250;
  display: none;
}
.lang-modal.is-open {
  display: block;
}
.lang-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(3px);
  animation: langFade 0.2s var(--ease);
}
.lang-modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px));
  max-height: min(78vh, 680px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: langPop 0.24s var(--ease);
}
.lang-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.lang-modal-title {
  margin: 0;
  font-size: clamp(19px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--h-black);
}
.lang-modal-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}
.lang-modal-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.lang-modal-close:hover {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
}
.lang-modal-close:focus-visible {
  outline: 2px solid var(--c-accent-dark);
  outline-offset: 2px;
}

.lang-modal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.lang-option:hover {
  background: var(--selection-hover);
  border-color: var(--selection);
}
.lang-option:focus-visible {
  outline: 2px solid var(--selection);
  outline-offset: 2px;
}
.lang-option.is-active {
  background: var(--selection);
  border-color: var(--selection);
}
.lang-option-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lang-option-native {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.lang-option-en {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}
/* Галочка занимает место всегда — иначе строки прыгают при выборе */
.lang-option-check {
  flex: none;
  margin-left: auto;
  color: var(--selection);
  opacity: 0;
}
.lang-option.is-active .lang-option-native {
  color: var(--on-selection);
}
.lang-option.is-active .lang-option-en {
  color: var(--on-selection-muted);
}
.lang-option.is-active .lang-option-check {
  color: var(--on-selection);
  opacity: 1;
}

@keyframes langFade {
  from {
    opacity: 0;
  }
}
@keyframes langPop {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
  }
}

@media (max-width: 560px) {
  /* На узких экранах — шторка снизу: до списка дотягивается большой палец */
  .lang-modal-panel {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-height: 88vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    animation: langSheet 0.26s var(--ease);
  }
  .lang-modal-head {
    padding: 20px 20px 14px;
  }
  .lang-modal-list {
    grid-template-columns: 1fr;
    padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
  }
}
@keyframes langSheet {
  from {
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang-modal-backdrop,
  .lang-modal-panel {
    animation: none;
  }
}

/* CTA: фиксированная высота, центрирование по обеим осям.
   Тёмная заливка, а не жёлтая: жёлтая кнопка на первом экране остаётся одна
   (hero), но контур сливался с шапкой. Жёлтый появляется только на ховере,
   то есть по намерению. Специфичность выше .btn-primary за счёт двух классов. */
.header-cta.btn-primary {
  background: var(--btn-solid-bg);
  color: var(--btn-solid-ink);
  border: 1px solid var(--btn-solid-border);
  box-shadow: var(--shadow-btn);
}
.header-cta.btn-primary:hover,
.header-cta.btn-primary:focus-visible {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn-accent);
}
/* Компактнее базовой .btn: в шапке кнопка соседствует с меню, и каждый
   лишний десяток пикселей — это пункт меню, который уже не поместится. */
.header-cta {
  height: 44px;
  padding-block: 0;
  padding-inline: 20px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0 10px;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.3s var(--ease),
    opacity 0.2s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Off-canvas */
.offcanvas {
  position: fixed;
  inset: 0;
  z-index: 150;
  visibility: hidden;
  pointer-events: none;
}
.offcanvas.is-open {
  visibility: visible;
  pointer-events: auto;
}
.offcanvas-backdrop {
  position: absolute;
  inset: 0;
  background: var(--scrim-soft);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.offcanvas.is-open .offcanvas-backdrop {
  opacity: 1;
}
.offcanvas-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh; /* учитываем сворачивающиеся панели браузера на iOS/Android */
  width: min(340px, 86vw);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  /* Снизу — запас под home indicator, справа — под «уши» в ландшафте */
  padding: 20px 24px calc(40px + env(safe-area-inset-bottom));
  padding-right: calc(24px + env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  overflow-y: auto;
}
.offcanvas.is-open .offcanvas-panel {
  transform: none;
}
.offcanvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.offcanvas-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; /* минимальный тап-таргет */
  height: 44px;
  margin-right: -10px; /* оптическое выравнивание по краю панели */
  background: none;
  border: none;
  color: var(--text);
  padding: 0;
}
.offcanvas-panel > a:not(.btn):not(.offcanvas-phone) {
  padding: 14px 4px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.offcanvas-phone {
  padding: 16px 4px 8px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}
/* В off-canvas кнопка языка стоит в колонке ссылок — тянем на всю ширину */
.offcanvas-lang {
  width: 100%;
  justify-content: flex-start;
  margin: 8px 0 4px;
  font-size: 16px;
}
.offcanvas-lang .lang-btn-caret {
  margin-left: auto;
}
.offcanvas-cta {
  margin-top: 12px;
}

/* ---------- 6. Hero ---------- */
/* Первый экран с фотографией концертной сцены. Тёмный градиент поверх
   изображения сохраняет контраст текста и акцентных кнопок. */
.hero {
  position: relative;
  background:
    linear-gradient(
      90deg,
      rgba(10, 11, 14, 0.94) 0%,
      rgba(10, 11, 14, 0.82) 52%,
      rgba(10, 11, 14, 0.58) 100%
    ),
    url("../assets/backgrounds/bg-hero3.jpg") center / cover no-repeat;
  color: var(--on-invert);
  /* +1px — border-bottom хедера, он всегда в потоке.
     Без него первый экран вылезает ровно на пиксель и появляется скролл. */
  min-height: calc(100svh - var(--header-h) - 1px);
  display: flex;
  align-items: center;
  /* Вертикальные отступы завязаны на высоту экрана: на низких экранах
     сжимаются, на больших не разрастаются. */
  padding-block: clamp(32px, 6svh, 80px);
}

/* Колонка 720px внутри стандартного .wrap — левая вертикаль совпадает
   с контентом всех секций ниже. */
.hero-inner {
  position: relative;
  text-align: left;
  max-width: 720px;
  width: 100%;
}

/* Надстрочник: города, капсом. Бейджа «Билетный оператор №1» больше нет. */
.hero-kicker {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  /* На тёмном --text-label (#8a8d9a) даёт 2.8:1 — не берём.
     Жёлтый на графите 9.4:1 и заодно связывает надстрочник с подчёркиванием. */
  color: var(--h-yellow);
  margin-bottom: clamp(14px, 2.6svh, 24px);
}

.hero-title {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--h-white);
  /* Заголовку (и только ему) даём выйти за колонку вправо, чтобы сохранить
     задуманное разбиение на строки и общую левую вертикаль с контентом. */
  width: min(900px, 100% + 180px, 100vw - 2 * var(--pad-x));
  max-width: none;
}

.hero-lead {
  margin-top: clamp(14px, 2.6svh, 24px);
  font-size: 17px;
  line-height: 1.5;
  /* Не чистый белый: подзаголовок должен уступать h1, но остаться выше AA.
     На графите — 11.5:1. */
  color: var(--on-invert-strong);
}

.hero-cta {
  margin-top: clamp(20px, 3.6svh, 36px);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Главный CTA первого экрана. Акцент даём объёмом и движением,
   а не жёлтым свечением — оно убрано осознанно (см. .btn-primary). */
.hero-cta-main {
  padding: 17px 32px;
  font-size: 17px;
  box-shadow: var(--shadow-ticket);
}
.hero-cta-main:hover,
.hero-cta-main:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-ticket-hover);
}
.hero-cta-main .btn-arrow {
  transition: transform 0.25s var(--ease);
}
.hero-cta-main:hover .btn-arrow,
.hero-cta-main:focus-visible .btn-arrow {
  transform: translateX(4px);
}
@media (prefers-reduced-motion: reduce) {
  .hero-cta-main:hover,
  .hero-cta-main:focus-visible {
    transform: none;
  }
  .hero-cta-main:hover .btn-arrow,
  .hero-cta-main:focus-visible .btn-arrow {
    transform: none;
  }
}

/* Цифры под кнопками, по левому краю */
.hero-stats {
  margin: clamp(24px, 4.4svh, 48px) 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: clamp(18px, 4vw, 44px);
}
.hero-stat {
  position: relative;
  text-align: left;
  padding-inline: 0;
}
.hero-stat + .hero-stat {
  padding-left: clamp(18px, 4vw, 44px);
}
.hero-stat + .hero-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4%;
  bottom: 4%;
  border-left: 1px solid var(--invert-line);
}
.hero-stat dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  /* 11px — мелкий текст, порог AA тот же 4.5:1. На 0.72 альфы — 9.6:1 */
  color: var(--on-invert-body);
}
.hero-stat dd {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 700;
  /* tabular-nums: во время работы счётчика ширина не пляшет */
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--h-white);
}

/* Вторичная кнопка: на тёмном белая заливка .btn-ghost спорит с жёлтой
   primary и перетягивает внимание. Оставляем контур по белому. */
.hero .btn-ghost {
  background: transparent;
  color: var(--on-invert);
  border-color: var(--invert-line-strong);
}
.hero .btn-ghost:hover {
  background: var(--invert-fill);
  border-color: var(--on-invert);
  color: var(--on-invert);
}

/* Ландшафт телефона: высоту диктует контент, и лишний ряд выталкивает
   hero за первый экран — там цифры убираем. */
@media (max-height: 640px) {
  .hero-stats {
    display: none;
  }
}

/* ---------- 6b. Секция «Наши события» ---------- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}
.event-card:hover {
  border-color: var(--border-strong);
}
/* Фото в полную яркость — вуали и затемнения нет */
.event-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.event-meta {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-body);
}

/* ---------- 6d. Плавающие мессенджеры ---------- */
.fab-contacts {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fab {
  --fab-brand: var(--c-accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--fab-brand);
  border: 2px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-marquee);
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.fab:first-child {
  --fab-brand: #25d366;
}
.fab:last-child {
  --fab-brand: #229ed9;
}
/* Пульсирующее кольцо — привлекает внимание к кнопкам */
.fab::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--fab-brand);
  animation: fab-pulse 2.4s var(--ease) infinite;
  pointer-events: none;
}
.fab:last-child::before {
  animation-delay: 1.2s;
}
@keyframes fab-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fab::before {
    animation: none;
  }
}
.fab:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: var(--shadow-marquee-hover);
}
.fab img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

/* ---------- 7. Заголовки секций ---------- */
.section-head {
  max-width: 46rem;
  margin-bottom: clamp(36px, 6vw, 60px);
}
/* Надстрочник. На светлом взят --h-yellow-ink-sm, а не --h-yellow-ink:
   на 11px 4.6:1 уже мало, нужен запас. Точка-буллит — единственный
   декор строки; в тёмных секциях её заменяет номер 01/02/03. */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--h-yellow-ink-sm);
  margin-bottom: 14px;
}
.section-tag::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--h-yellow);
  flex: none;
}
/* Номер секции вместо точки — второго акцента в строке быть не должно */
.section-tag--num::before {
  display: none;
}
.section-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--h-yellow);
}

.section-title {
  font-size: clamp(24px, 4vw, 40px);
  color: var(--h-black);
}
/* Акцентное слово в заголовке — одно на заголовок */
.section-title .hl {
  color: var(--h-yellow-ink);
}
.section-sub {
  margin-top: 16px;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-body);
}

/* ---------- 7a. Премиальные сюжетные иллюстрации ----------
   Авторские CGI-сцены работают как крупные визуальные якоря и не
   конкурируют с существующими карточками, фото артистов и UI-мокапами. */
.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(36px, 6vw, 64px);
}
.story-row--media-left {
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.08fr);
}
.story-row--flush {
  margin-bottom: 0;
}
.story-content {
  min-width: 0;
}
.story-row .section-head {
  max-width: none;
  margin-bottom: 0;
}
.story-content .section-head {
  margin-bottom: clamp(28px, 4vw, 40px);
}
.story-visual {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 2;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.story-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.story-visual:hover img {
  transform: scale(1.018);
}
.split-text .section-sub + .section-sub {
  margin-top: 14px;
}

/* ---------- 7b. Инвертированные секции ---------- */
/* Тёмный фон, белый заголовок, одно слово жёлтым. Только 3 ключевые
   секции (how / app / geography) и никогда две подряд.
   Фон берём из --surface-invert, а НЕ из --h-black: --h-black — это цвет
   заголовка, и в тёмной теме он светлый. */
.section-invert {
  background: var(--surface-invert);
  /* Кант виден только в тёмной теме (см. --section-invert-edge).
     border-block, а не outline: он в потоке и не наезжает на соседей. */
  border-block: 1px solid var(--section-invert-edge);
}
.section-invert .section-title {
  color: var(--h-white);
}
.section-invert .section-title .hl {
  color: var(--h-yellow);
}
.section-invert .section-tag {
  color: var(--h-yellow);
}
.section-invert .section-sub {
  color: var(--on-invert-body);
}

/* Шаги */
.section-invert .steps-line {
  background: var(--invert-fill-strong);
}
.section-invert .steps-line-fill {
  background: var(--on-invert);
}
.section-invert .step-num {
  background: var(--invert-fill);
  border-color: var(--invert-line);
  color: var(--h-white);
}
.section-invert .step.is-visible .step-num {
  background: var(--on-invert);
  border-color: var(--on-invert);
  color: var(--surface-invert);
}
.section-invert .step-title {
  color: var(--h-white);
}
.section-invert .step-text {
  color: var(--on-invert-muted);
}

/* Приложение: мокап и бейджи. Корпус телефона #14151a сливается с фоном,
   бейджи маркетов — тоже почти чёрные, обоим нужен светлый кант. */
.section-invert .phone-mock {
  background: var(--phone-bezel);
  box-shadow: 0 0 0 1px var(--invert-line-soft), var(--shadow-lg);
}
.section-invert .phone-notch {
  background: var(--phone-bezel);
}
.section-invert .store-badge:hover {
  box-shadow: var(--shadow-lg);
}

/* Площадки */
.section-invert .venues-group-title {
  color: var(--h-white);
}
.section-invert .venue-card {
  background: var(--invert-fill-soft);
  border-color: var(--invert-line-soft);
  box-shadow: none;
}
.section-invert .venue-card:hover {
  border-color: var(--h-yellow);
  box-shadow: none;
}
.section-invert .venue-name {
  color: var(--h-white);
}
.section-invert .venue-city {
  color: var(--on-invert-muted);
}
.section-invert .venue-cap {
  color: var(--h-yellow);
}
.section-invert .venues-seo {
  color: var(--on-invert-body);
}

/* География */
.section-invert .geo-card {
  background: var(--invert-fill-soft);
  border-color: var(--invert-line-soft);
  box-shadow: none;
}
.section-invert .geo-card:hover {
  border-color: var(--h-yellow);
  box-shadow: none;
}
.section-invert .geo-name {
  color: var(--h-white);
}
.section-invert .geo-cap {
  color: var(--on-invert-muted);
}
.section-invert .geo-site {
  color: var(--h-yellow);
}
.section-invert .geo-num {
  color: var(--h-white);
}
.section-invert .geo-num-cap {
  color: var(--on-invert-muted);
}

/* ---------- 8. Карточки преимуществ ---------- */
/* Строгая сетка: 3 колонки на десктопе, карточки одной высоты */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
/* Жёсткий вертикальный ритм: иконка 48×48 → заголовок → текст */
.card-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--c-accent-soft);
  color: var(--c-accent-ink);
  margin-bottom: 14px;
}
.card-ic svg {
  width: 24px;
  height: 24px;
}
.card-title {
  font-size: 17px;
  margin-bottom: 6px;
}
.card-text {
  color: var(--text-body);
  font-size: 14px;
  text-align: left;
}
.card-accent {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
  border-top: 3px solid var(--c-accent);
  justify-content: center;
}
.card-accent .card-text {
  color: var(--text-body);
}
.stat-big {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 10px;
}

/* ---------- 9. Шаги ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.steps-line {
  position: absolute;
  top: 26px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}
.steps-line-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  border-radius: 2px;
  transition: width 1.2s var(--ease);
}
.step {
  position: relative;
  text-align: center;
  padding-top: 4px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    color 0.3s var(--ease);
}
/* Белая цифра на жёлтой заливке давала 1.9:1 — на жёлтом текст только тёмный.
   Свечение убрано: жёлтый работает заливкой, а не подсветкой. */
.step.is-visible .step-num {
  background: var(--c-accent);
  border-color: transparent;
  color: var(--on-accent);
  box-shadow: none;
}
.step-title {
  font-size: 18px;
  margin-bottom: 6px;
}
.step-text {
  color: var(--text-body);
  font-size: 14px;
}

/* ---------- 10. Split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.split-text .btn {
  margin-top: 26px;
}
.split-media {
  display: flex;
  justify-content: center;
}

/* Колонка-форма (секция «Организаторам»): карточка на всю ширину колонки.
   В отличие от мокапа её нельзя поднимать над текстом на планшете —
   заголовок секции должен читаться первым. */
.split-media--form {
  display: block;
  width: 100%;
}
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(22px, 3.4vw, 34px);
}
.form-card-title {
  font-size: 20px;
  margin-bottom: 20px;
}
.form-card .form-btn {
  margin-top: 20px;
}

/* Компактный список выгод: 2 колонки на десктопе, inline-SVG галочки */
.benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-top: 22px;
}
.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.4;
}
.benefits svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--c-accent-ink);
}
@media (max-width: 560px) {
  .benefits {
    grid-template-columns: 1fr;
  }
}

/* Официальные бейджи сторов */
.store-badges {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.store-badge {
  display: inline-flex;
  border-radius: 10px;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.store-badge img {
  height: 44px;
  width: auto;
  display: block;
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
@media (max-width: 400px) {
  .store-badges {
    flex-direction: column;
    align-items: stretch;
  }
  .store-badge img {
    height: auto;
    width: 100%;
    max-width: 220px;
  }
}

/* ---------- 11. Мокапы ---------- */
.mock-dashboard {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-topbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.mock-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-strong);
  box-shadow: var(--hairline-inset);
}
.mock-dot:nth-child(1) {
  background: var(--mac-dot-red);
}
.mock-dot:nth-child(2) {
  background: var(--mac-dot-amber);
}
.mock-dot:nth-child(3) {
  background: var(--mac-dot-green);
}
.mock-url {
  margin-left: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.mock-body {
  padding: 22px;
}
.mock-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.mock-kpi {
  background: var(--bg-alt);
  border-radius: var(--r);
  padding: 14px;
  text-align: center;
}
.mock-kpi-val {
  display: block;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.mock-kpi-lbl {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 130px;
  padding: 14px;
  background: var(--bg-alt);
  border-radius: var(--r);
}
.mock-chart span {
  flex: 1;
  background: var(--grad);
  border-radius: 6px 6px 0 0;
  min-height: 8px;
  opacity: 0.88;
}

/* Телефон */
.phone-mock {
  position: relative;
  width: 260px;
  aspect-ratio: 9 / 18.5;
  background: var(--surface-invert);
  border-radius: 40px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 22px;
  background: var(--surface-invert);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  height: 100%;
  border-radius: 28px;
  background: var(--phone-screen);
  box-shadow: var(--phone-screen-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}
.scan-frame {
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--accent);
}
.scan-corner.tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-radius: 6px 0 0 0;
}
.scan-corner.tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-radius: 0 6px 0 0;
}
.scan-corner.bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 6px;
}
.scan-corner.br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-radius: 0 0 6px 0;
}
.scan-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px 2px var(--accent-glow);
  border-radius: 2px;
  animation: scan 2.4s var(--ease) infinite;
}
@keyframes scan {
  0%,
  100% {
    top: 12px;
    opacity: 0.3;
  }
  50% {
    top: calc(100% - 14px);
    opacity: 1;
  }
}
.scan-status {
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}
.scan-ok {
  color: var(--success-dot);
}
.scan-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- 12. Артисты / статистика / постеры ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: clamp(32px, 5vw, 48px);
}
.stat-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num {
  display: block;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.stat-cap {
  display: block;
  margin-top: 10px;
  color: var(--text-body);
  font-size: 14px;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.poster {
  aspect-ratio: 3 / 4;
  border-radius: var(--r);
  background: var(--surface-invert-grad);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  color: var(--on-invert);
  box-shadow: var(--shadow);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  mix-blend-mode: overlay;
  transition: opacity 0.3s var(--ease);
  z-index: 1;
}
.poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 0;
  transition: transform 0.4s var(--ease);
}
/* градиентный скрим снизу — чтобы имя артиста читалось */
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo-scrim);
  z-index: 1;
  pointer-events: none;
}
.poster span {
  font-weight: 700;
  font-size: 14px;
  position: relative;
  z-index: 2;
  text-shadow: var(--photo-text-shadow);
}
.poster:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}
.poster:hover img {
  transform: scale(1.06);
}
.poster:hover::before {
  opacity: 0.35;
}

/* ---------- 12b. Карусель платёжных логотипов ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  /* fade-маски по краям под цвет фона секции */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    var(--mask-opaque) 7%,
    var(--mask-opaque) 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    var(--mask-opaque) 7%,
    var(--mask-opaque) 93%,
    transparent 100%
  );
}
.marquee-track {
  display: flex;
  width: max-content;
  align-items: center; /* оптический центр по вертикали */
  animation: marquee-scroll 11s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
.marquee-track img {
  height: 36px; /* единый чёткий размер для всех лого */
  max-height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  margin-right: 48px; /* равный шаг на каждом лого → бесшовный цикл */
}
/* Optima — намного крупнее остального ряда */
.marquee-track img.pay-lg {
  height: 160px;
  max-height: 160px;
}
/* Элкарт — крупнее ряда, но чуть меньше Optima */
.marquee-track img.pay-el {
  height: 120px;
  max-height: 120px;
}
@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 13. FAQ ---------- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.acc-item + .acc-item {
  border-top: 1px solid var(--border);
}
.acc-item h3 {
  margin: 0;
}
.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  background: none;
  border: none;
  padding: 22px 26px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.acc-icon {
  flex-shrink: 0;
  color: var(--c-accent);
  transition: transform 0.3s var(--ease);
}
.acc-trigger[aria-expanded="true"] .acc-icon {
  transform: rotate(45deg);
}
.acc-panel {
  padding: 0 26px 22px;
  color: var(--text-body);
  font-size: 15px;
}
.acc-panel p {
  max-width: 62ch;
}

/* ---------- 13a. Площадки ---------- */
/* Сетка 4 → 2 → 1, ступени живут в §17 */
.venue-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 18px;
}
.venues-group-title {
  font-size: clamp(18px, 2.4vw, 22px);
  margin-bottom: 16px;
}
/* Вторая группа («Регионы») отбивается от сетки первой */
.venue-grid + .venues-group-title {
  margin-top: 44px;
}
/* Карточка не ссылка — площадка не имеет своей страницы */
.venue-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.venue-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.venue-name {
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
}
.venue-city {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
/* Улица — отдельной строкой над городом, цвет наследует приглушённый
   от .venue-city (в инверт-секции — --on-invert-muted) */
.venue-street {
  display: block;
}
/* margin-top: auto прижимает вместимость к низу — карточки без цифры
   не ломают ритм строки */
.venue-cap {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.venues-seo {
  margin-top: 32px;
  max-width: 78ch;
  font-size: 14px;
  color: var(--text-body);
}

/* ---------- 14. География ---------- */
.geo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
/* Карточка — целиком ссылка на сайт площадки в этой стране */
.geo-card {
  display: block;
  height: 100%;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.geo-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.geo-flag {
  font-size: 40px;
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}
.geo-name {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: 17px;
}
.geo-cap {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.geo-site {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.3s var(--ease);
}
.geo-card:hover .geo-site,
.geo-card:focus-visible .geo-site {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.geo-counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.geo-counter {
  text-align: center;
}
.geo-num {
  display: block;
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.geo-num-cap {
  display: block;
  margin-top: 8px;
  color: var(--text-body);
  font-weight: 600;
}

/* ---------- 14b. Партнёры (сетка логотипов) ---------- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(
    4,
    minmax(0, 1fr)
  ); /* minmax(0,1fr) — чтобы колонки сжимались и не было горизонтального скролла */
  grid-auto-rows: 1fr; /* одинаковая высота рядов */
  gap: 20px;
}
.partner-grid li {
  display: flex;
  align-items: center; /* центрирование логотипа по вертикали */
  justify-content: center; /* и по горизонтали */
  min-height: 140px;
  padding: 18px;
  /* Тёмная в обеих темах — см. --logo-tile в :root */
  background: var(--logo-tile);
  border: 1px solid var(--logo-tile-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.partner-grid img {
  max-height: 44px;
  max-width: 65%; /* единая оптическая высота, не шире 65% плитки */
  width: auto;
  object-fit: contain;
}
/* Логотипы с более компактным начертанием (Pillars, KudaGO) — крупнее */
.partner-grid img.partner-logo--tall {
  max-height: 78px;
  max-width: 90%;
}
/* Знак без wordmark (Syntlex): 44px ему мало — станет точкой, 78px много —
   перевесит соседние надписи. Промежуточная ступень между базой и --tall. */
.partner-grid img.partner-logo--mark {
  max-height: 48px;
  max-width: 60%;
}
/* Ссылка на сайт партнёра: тянется на всю плитку, чтобы кликалась вся площадь */
.partner-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
.partner-link img {
  transition: transform 0.3s var(--ease);
}
.partner-link:hover img,
.partner-link:focus-visible img {
  transform: scale(1.06);
}
/* Подсветку рамки даём только плиткам со ссылкой */
.partner-grid li:has(.partner-link) {
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.partner-grid li:has(.partner-link:hover),
.partner-grid li:has(.partner-link:focus-visible) {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

/* ---------- 15. Табы + формы ---------- */
.tabs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tablist {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1;
  padding: 13px 18px;
  border: none;
  border-radius: var(--r);
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.tabpanel {
  padding: clamp(24px, 4vw, 40px);
}
.tabpanel[hidden] {
  display: none;
}
.form-intro {
  color: var(--text-body);
  margin-bottom: 26px;
  max-width: 60ch;
}

/* Все формы — в один столбик: поля читаются сверху вниз одним потоком. */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field-full {
  grid-column: 1 / -1;
}
.field label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 12px 14px;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
  width: 100%;
}
.field textarea {
  resize: vertical;
  min-height: 96px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--on-invert-label-dim);
}
/* Select (формат рекламы): нативную стрелку убираем, рисуем свою —
   серый chevron читается и в светлой, и в тёмной теме. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888f99' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
}
/* Пункт-заглушка («Выберите формат») подсвечивается как placeholder */
.field select:required:invalid {
  color: var(--on-invert-label-dim);
}
.field select option {
  color: var(--text);
  background: var(--surface);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  background-color: var(--danger-bg);
}
.err {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  min-height: 0;
  margin: 0;
}
.err:empty {
  display: none;
}
.field-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.counter-chars {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* honeypot — off-screen */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-btn {
  margin-top: 24px;
  position: relative;
}

/* Форма волонтёров чуть плотнее остальных форм, без смены композиции. */
#forms .wrap-narrow {
  max-width: 680px;
}
#forms .section-head {
  margin-bottom: clamp(24px, 3vw, 36px);
}
#forms .tabpanel {
  padding: clamp(18px, 2.8vw, 26px);
}
#forms .form-intro {
  margin-bottom: 16px;
}
#forms .form-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}
#forms .field {
  gap: 5px;
}
#forms .field input,
#forms .field textarea {
  padding-block: 11px;
}
#forms .field textarea {
  min-height: 76px;
}
#forms .form-btn {
  margin-top: 14px;
}

.form-btn[disabled] {
  opacity: 0.75;
  cursor: not-allowed;
}
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--on-accent-soft);
  border-top-color: var(--on-accent);
  border-radius: 50%;
  display: none;
}
.form-btn.is-loading .btn-spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-success {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  border-radius: var(--r);
  color: var(--success);
  font-weight: 600;
  font-size: 15px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s var(--ease),
    transform 0.4s var(--ease);
}
.form-success:not([hidden]) {
  opacity: 1;
  transform: none;
}
.form-success.is-error {
  background: var(--danger-bg);
  border-color: var(--danger-line);
  color: var(--danger);
}

/* ---------- 16. Футер ---------- */
.site-footer {
  background: var(--surface-invert);
  color: var(--on-invert-label);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-block: clamp(48px, 7vw, 72px) 40px;
}
.footer-logo {
  height: 44px;
  width: auto;
}
.footer-tagline {
  margin-top: 18px;
  max-width: 34ch;
  color: var(--on-invert-label-dim);
  font-size: 15px;
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.soc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: var(--invert-fill);
  border: 1px solid var(--invert-line-soft);
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.soc img {
  width: 20px;
  height: 20px;
  /* иконки в исходниках тёмные — выбеливаем под тёмный футер */
  filter: var(--icon-invert);
  opacity: 0.85;
  transition:
    filter 0.25s var(--ease),
    opacity 0.25s var(--ease);
}
.soc:hover,
.soc:focus-visible {
  background: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: var(--shadow-btn-accent);
  transform: translateY(-3px);
}
.soc:hover img,
.soc:focus-visible img {
  /* на жёлтом фоне — чёрная иконка */
  filter: var(--icon-darken);
  opacity: 1;
}
.footer-col h3 {
  color: var(--on-invert);
  font-size: 16px;
  margin-bottom: 18px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  color: var(--on-invert-label);
  font-size: 15px;
  transition: color 0.2s var(--ease);
}
.footer-col a:hover {
  color: var(--on-invert);
}
.footer-contacts ul {
  gap: 14px;
}
.footer-contacts li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}
.footer-contacts img {
  filter: var(--icon-invert);
  opacity: 0.7;
}

.footer-pay {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 24px;
  border-top: 1px solid var(--invert-line-hair);
}
.footer-pay-label {
  font-size: 14px;
  color: var(--on-invert-label-dim);
}
.footer-pay-logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-pay-logos li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  background: var(--logo-tile-plain);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease);
}
.footer-pay-logos li:hover {
  transform: translateY(-3px);
}
.footer-pay-logos img {
  height: 24px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  display: block;
}
/* Элкарт и Optima — сами логотипы крупнее (в них много воздуха) */
.footer-pay-logos img.pay-big {
  height: 38px;
  max-width: 120px;
}
/* Optima — ещё крупнее остального ряда */
.footer-pay-logos img.pay-optima {
  height: 88px;
  max-width: 270px;
}
/* Элкарт — крупнее ряда */
.footer-pay-logos img.pay-elcart {
  height: 60px;
  max-width: 180px;
}
.footer-bottom {
  border-top: 1px solid var(--invert-line-hair);
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  /* снизу — запас под home indicator на iPhone */
  padding-block: 20px calc(20px + env(safe-area-inset-bottom));
  font-size: 14px;
  color: var(--on-invert-label-dim);
}
.footer-bottom-inner a:hover {
  color: var(--on-invert);
}
/* Правая группа нижней строки: почта + переключатель темы */
.footer-bottom-side {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ---------- Переключатель темы ----------
   Живёт в подвале, на инвертированной поверхности. Габариты и обводка — как
   у соц-иконок .soc, чтобы нижняя строка читалась одним набором.
   Квадратная: подписи нет, только иконка. */
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--invert-line-soft);
  border-radius: var(--r-pill);
  background: var(--invert-fill);
  color: var(--on-invert-label);
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    color 0.2s var(--ease);
}
.theme-btn:hover {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: var(--on-accent);
}
.theme-btn:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}
/* fill="currentColor" на всех трёх иконках — цвет наследуется от кнопки */
.theme-btn .theme-icon {
  display: none;
  width: 20px;
  height: 20px;
}
.theme-btn[data-theme-mode="system"] .theme-icon--system,
.theme-btn[data-theme-mode="light"] .theme-icon--light,
.theme-btn[data-theme-mode="dark"] .theme-icon--dark {
  display: block;
}
/* Если JS не отработал и атрибут не проставлен — показываем системную */
.theme-btn:not([data-theme-mode]) .theme-icon--system {
  display: block;
}

/* ============================================================
   17. МЕДИА-ЗАПРОСЫ
============================================================ */

/* ≤1200 — десктоп-меню уже не помещается рядом с логотипом и кнопками
   (ширина .wrap упирается в 1200px), уходим в бургер.
   То же состояние ставит js/main.js через [data-nav="burger"] — когда меню
   не влезло на языке с длинными подписями. Селекторы держим общими. */
@media (max-width: 1200px) {
  .main-nav {
    display: none;
  }
  /* Скрытая навигация не создаёт grid-ячейку, поэтому колонки задаём заново:
     логотип слева, бургер прижат к правому краю */
  .header-inner {
    grid-template-columns: max-content minmax(0, 1fr);
  }
  .header-actions {
    justify-self: end;
  }
  .header-phone {
    display: none;
  }
  .header-cta {
    display: none;
  }
  .burger {
    display: flex;
  }
  /* Язык остаётся в шапке рядом с бургером; в off-canvas дублировать не нужно */
  .header-actions > .lang-btn {
    height: 40px;
    padding-inline: 10px;
    gap: 5px;
  }
  .offcanvas-lang {
    display: none;
  }
}

/* ≤1024 — планшет */
@media (max-width: 1024px) {
  .venue-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .event-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .partner-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .poster-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .geo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .split {
    grid-template-columns: 1fr;
  }
  .split-reverse .split-text {
    order: 2;
  }
  .split-media {
    order: -1;
  }
  .split-reverse .split-media {
    order: -1;
  }
  /* форма остаётся под текстом секции */
  .split-media--form,
  .split-reverse .split-media--form {
    order: 0;
    margin-top: 4px;
  }
}

/* ≤1024 — сюжетные блоки складываются в естественный вертикальный рассказ.
   Текст всегда идёт первым, даже если на десктопе иллюстрация была слева. */
@media (max-width: 1024px) {
  .story-row,
  .story-row--media-left {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-bottom: 40px;
  }
  .story-row--media-left .section-head {
    order: -1;
  }
  .story-row--flush {
    margin-bottom: 0;
  }
  .story-row--faq .story-content {
    display: contents;
  }
  .story-row--faq .section-head {
    order: 1;
    margin-bottom: 0;
  }
  .story-row--faq .story-visual {
    order: 2;
  }
  .story-row--faq .accordion {
    order: 3;
  }
  .story-visual {
    width: min(100%, 680px);
    justify-self: center;
  }
}

/* ≤768 — мобильный */
@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  } /* высота шапки 64px, синхронно со scroll-padding */

  .card-grid {
    grid-template-columns: 1fr;
  }
  .event-grid {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 20px;
  }
  .steps-line {
    display: none;
  }
  .stat-row {
    grid-template-columns: 1fr;
  }
  .geo-counters {
    gap: 12px;
  }
  .geo-num {
    font-size: clamp(28px, 9vw, 40px);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .poster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* 2 колонки: 9 постеров дали бы «сироту» в последнем ряду —
     скрываем 9-й, остаётся 8 = ровно 4 ряда без пустых ячеек */
  .poster:nth-child(9) {
    display: none;
  }
  .partner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .geo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≤768 — мобильные доработки: тач-цели, ввод, крупные лого */
@media (max-width: 768px) {
  /* iOS зумит страницу при фокусе на поле с font-size < 16px */
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }

  /* Минимальная тап-зона 44px там, где ссылки идут текстом */
  .footer-col a,
  .footer-contacts li,
  .footer-bottom-inner a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .footer-col ul {
    gap: 0;
  }
  .footer-contacts ul {
    gap: 4px;
  }

  /* Карусель оплаты: на телефоне крупные лого занимали пол-экрана */
  .marquee-track img {
    height: 28px;
    max-height: 28px;
    margin-right: 32px;
  }
  .marquee-track img.pay-lg {
    height: 96px;
    max-height: 96px;
  }
  .marquee-track img.pay-el {
    height: 72px;
    max-height: 72px;
  }

  /* Мокап дэшборда: три KPI в ряд ломали цифры на две строки */
  .mock-body {
    padding: 16px;
  }
  .mock-kpis {
    gap: 8px;
    margin-bottom: 16px;
  }
  .mock-kpi {
    padding: 12px 6px;
  }
  .mock-kpi-val {
    font-size: 17px;
    white-space: nowrap;
  }
  .mock-kpi-lbl {
    font-size: 11px;
  }
  .mock-chart {
    height: 110px;
    gap: 7px;
    padding: 12px;
  }

  .footer-pay-logos img.pay-optima {
    height: 64px;
    max-width: 200px;
  }
  .footer-pay-logos img.pay-elcart {
    height: 48px;
    max-width: 140px;
  }
}

/* ≤560 — названия площадок длинные, в две колонки рвутся по слогам */
@media (max-width: 560px) {
  .venue-grid {
    grid-template-columns: 1fr;
  }

  /* ---------- География: мобильный макет ----------
     5 карточек в 2 колонки давали «сироту» в последнем ряду.
     На телефоне — одна колонка, карточка горизонтальная:
     флаг слева, название/подпись/сайт стопкой справа. */
  .geo-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .geo-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 16px;
    text-align: left;
    padding: 16px 18px;
  }
  .geo-flag {
    grid-row: 1 / -1;
    align-self: center;
    margin-bottom: 0;
    font-size: 34px;
  }
  .geo-name,
  .geo-cap,
  .geo-site {
    grid-column: 2;
  }
  .geo-site {
    margin-top: 4px;
  }

  /* Счётчики остаются в ряд (три числа), а не тянутся столбиком */
  .geo-counters {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 32px;
  }
  .geo-num {
    font-size: clamp(24px, 8vw, 34px);
  }
  .geo-num-cap {
    font-size: 12px;
    margin-top: 4px;
  }
}

/* ≤480 — узкий мобильный */
@media (max-width: 480px) {
  /* Кнопки в столбик добавляют высоту — поджимаем, чтобы первый экран
     по-прежнему помещался целиком. */
  /* На низких мобильных (640px) высоту диктует контент, а не min-height —
     поджимаем вертикальные поля, иначе первый экран вылезает. */
  .hero {
    padding-block: clamp(24px, 5svh, 64px) clamp(64px, 10svh, 96px);
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }
  .hero-cta .btn {
    width: 100%;
  }
  .hero-title {
    font-size: min(clamp(32px, 8.6vw, 76px), 9svh);
  }
  /* Цифры: без вертикальных разделителей — на 360px они дробят строку */
  .hero-stats {
    gap: 14px 20px;
  }
  .hero-stat + .hero-stat {
    padding-left: 0;
  }
  .hero-stat + .hero-stat::before {
    display: none;
  }
  .hero-stat dd {
    font-size: 22px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .poster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* .geo-grid / .geo-counters — единый мобильный макет в блоке ≤560 ниже */
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .acc-trigger {
    padding: 18px 18px;
    font-size: 15px;
  }
  .tabpanel {
    padding: 20px;
  }
  .tablist {
    padding: 6px;
  }
  .tab {
    padding: 12px 10px;
    font-size: 14px;
  }

  .chip-row-lg li {
    padding: 11px 18px;
    font-size: 15px;
  }
  .footer-logo {
    height: 36px;
  }
  .phone-mock {
    width: min(260px, 78vw);
  }
}

/* ≤360 — совсем узкие экраны (iPhone SE, Galaxy A0x) */
@media (max-width: 360px) {
  :root {
    --pad-x: 16px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .steps-line {
    display: none;
  }
  /* Постеры и гео остаются в 2 колонки: в одну они вытягиваются в полосу
     на пол-экрана каждая и секция превращается в бесконечный скролл. */
  .mock-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .mock-kpis > :last-child {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   18. prefers-reduced-motion — отключаем анимации
============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .story-visual:hover img {
    transform: none;
  }
  .scan-line {
    display: none;
  }
  .steps-line-fill {
    width: 100% !important;
  }
  /* Карусель: останавливаем и показываем статичный ряд с переносом */
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee-track {
    animation: none !important;
    transform: none !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 48px;
    width: 100%;
  }
  .marquee-track img {
    margin-right: 0;
  }
  .marquee-track img[data-dup] {
    display: none;
  }

}
