/* ═══════════════════════════════════════════════
   ИМПУЛЬС v2 — Dark Premium Fitness
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #1a1a1e;
  --text: #f5f5f2;
  --text-dim: #9d9da6;
  --accent: #d4ff3f;
  --accent-2: #a8e000;
  --accent-dark: #0c1400;
  --error: #ff6b5e;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.03);
  --radius: 20px;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Ось насыщенности сужена до 700-800: заголовочным шрифтом на сайте набраны
   только эти два начертания, а полный диапазон 200-900 весил 71 КБ против 46.
   25 КБ с критического пути — шрифт грузится в preload до первой отрисовки. */
@font-face {
  font-family: 'Unbounded';
  src: url('../assets/fonts/Unbounded-sub.woff2') format('woff2');
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/Manrope-var.woff2') format('woff2-variations'),
       url('../assets/fonts/Manrope-var.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #000; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ═══════════ PRELOADER ═══════════ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__logo {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800; letter-spacing: 0.15em;
  background: linear-gradient(90deg, var(--text), var(--accent), var(--text));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.preloader__bar {
  width: 200px; height: 2px; background: var(--line);
  border-radius: 2px; overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%; width: 0;
  background: var(--accent); transition: width 0.3s;
}

/* ═══════════ BUTTONS ═══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 16px 32px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  border: none; border-radius: 100px; cursor: pointer;
  transition: all 0.35s var(--ease);
  position: relative; overflow: hidden;
}
.btn--primary {
  background: var(--accent); color: var(--accent-dark);
  box-shadow: 0 0 0 rgba(212, 255, 63, 0);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(212, 255, 63, 0.35);
}
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 10px 22px; font-size: 14px; }
.btn--lg { padding: 20px 40px; font-size: 16px; }
.btn--block { width: 100%; }

/* ═══════════ NAV ═══════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  transition: all 0.4s var(--ease);
}
.nav.scrolled {
  background: rgba(10, 10, 11, 0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 14px 40px;
}
.nav__logo { display: flex; align-items: center; gap: 20px; }
.nav__logo-img { height: 56px; width: auto; object-fit: contain; }
.nav__logo-text {
  font-family: var(--font-display); font-weight: 800;
  font-size: 22px; letter-spacing: 0.07em;
}
.nav__links { display: flex; gap: 34px; }
.nav__link {
  font-size: 15px; font-weight: 600; color: var(--text-dim);
  transition: color 0.3s; position: relative;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }
.nav__phone {
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: 0.02em; white-space: nowrap;
  transition: color 0.3s;
}
.nav__phone:hover { color: var(--accent); }
/* Трубка и номер внутри меню — только для узких экранов. На широком показан
   .nav__phone текстом, дублировать его иконкой и пунктом меню незачем. */
.nav__call { display: none; }
.nav__link--phone { display: none; }
.nav__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  /* Было padding: 8px и высота 32px — мало для пальца. Держим 44×44. */
  padding: 0; width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
.nav__burger span {
  width: 26px; height: 2px; background: var(--text);
  transition: all 0.3s var(--ease);
}

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 40px 80px;
}
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg-img {
  width: 100%; height: 120%; object-fit: cover;
  will-change: transform;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0.55) 0%,
    rgba(10, 10, 11, 0.75) 60%,
    var(--bg) 100%
  );
}
/* .hero — flex, поэтому ширину этой колонки задаёт САМА длинная строка
   заголовка, а max-width работает только как потолок. Управлять шириной
   заголовка отсюда нельзя — только кеглем, см. .hero__line--accent ниже. */
.hero__content { position: relative; z-index: 2; max-width: min(1240px, 100%); }
.hero__tag {
  font-size: 14px; font-weight: 700; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 24px;
}
/* Потолок 72px, а не 96px. На широком экране 96px давали строку в 20 знаков
   шириной больше колонки, и «ТРАНСФОРМИРУЕШЬСЯ» разрывалось дефисом пополам.
   Ниже 1280px потолок и так был 72px — теперь скачка на границе нет. */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 72px);
  font-weight: 800; line-height: 1.06;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero__line { display: block; }
/* «ТЫ ТРАНСФОРМИРУЕШЬСЯ» — 20 знаков, вдвое длиннее соседних строк. В общем
   кегле она перекрывала колонку и рвалась мягким переносом пополам: на экране
   читалось «ТРАНСФОР-МИРУЕШЬСЯ». Уменьшаем только её: 0.72em держит слово
   целым и уводит колонку под строку «ТРЕНИРУЕШЬСЯ.», давая запас по краю.
   Ниже 1280px действует свой коэффициент (0.78 / 0.72), см. медиазапросы. */
.hero__line--accent .reveal-word {
  color: var(--accent);
  font-size: 0.72em;
  text-shadow: 0 0 60px rgba(212, 255, 63, 0.4);
}
.reveal-word {
  display: block;
  max-width: 100%;
  transform: translateY(110%);
  opacity: 0;
  overflow-wrap: normal;
  hyphens: manual;
  transition: transform 1s var(--ease), opacity 0.8s var(--ease);
}
.loaded .reveal-word { transform: translateY(0); opacity: 1; }
.hero__line:nth-child(2) .reveal-word { transition-delay: 0.12s; }
.hero__line:nth-child(3) .reveal-word { transition-delay: 0.24s; }
/* 660, а не 560: перечисление услуг ломалось на две строки, оставляя
   «Спортивный массаж» одиноко висеть под широким заголовком. */
.hero__sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-dim); max-width: 660px;
  margin-bottom: 40px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 40px; right: 40px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-dim); writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px; height: 60px; background: var(--line);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ''; position: absolute; top: -50%; left: 0;
  width: 100%; height: 50%; background: var(--accent);
  animation: scrollHint 1.8s var(--ease) infinite;
}
@keyframes scrollHint { to { top: 110%; } }

/* ═══════════ REVEAL ANIMATIONS ═══════════ */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal { transform: translateY(40px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal.in, .reveal-left.in, .reveal-right.in {
  opacity: 1; transform: none;
}
/* Предотвращаем горизонтальный overflow от reveal-right */
.about, .contacts { overflow-x: clip; }

.marquee {
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--accent);
  color: #000;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 120s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; white-space: nowrap;
}
.marquee__track i {
  color: var(--accent); font-style: normal; font-size: 20px;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ═══════════ PROMO BANNER ═══════════ */
.promo-banner {
  background: linear-gradient(90deg, rgba(212,255,63,0.12), rgba(212,255,63,0.04));
  border-bottom: 1px solid rgba(212,255,63,0.25);
  padding: 24px 40px;
  position: relative;
  z-index: 5;
}
.promo-banner__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 30px;
}
.promo-banner__text { flex: 1; }
.promo-banner__text b {
  display: block; font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 24px); font-weight: 700;
  color: var(--accent); margin-bottom: 6px;
}
.promo-banner__text p { color: var(--text-dim); font-size: 15px; line-height: 1.5; }

/* ─── Акция с картинкой ───
   Картинка накрывает плашку целиком, текст идёт поверх. Без затемнения
   светлый снимок съедает буквы, поэтому поверх фото лежит тёмная пелена —
   текст читается на любой картинке, в том числе на белой стене зала. */
.promo-banner--photo { padding: 0; overflow: hidden; }
.promo-banner--photo .promo-banner__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.promo-banner--photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,10,12,0.88) 0%, rgba(10,10,12,0.72) 45%, rgba(10,10,12,0.35) 100%);
}
.promo-banner--photo .promo-banner__inner {
  position: relative; z-index: 1;
  min-height: 260px; padding: 40px;
  align-items: center;
}
.promo-banner--photo .promo-banner__text { max-width: 640px; }
.promo-banner--photo .promo-banner__text p { color: #e8e8ea; font-size: 16px; }

@media (max-width: 640px) {
  .promo-banner { padding: 18px 20px; }
  .promo-banner__inner { flex-direction: column; text-align: center; gap: 14px; }
  .promo-banner--photo { padding: 0; }
  /* На узком экране пелена идёт сверху вниз: текст стоит по центру, и боковое
     затемнение оставило бы правый край строки на светлом. */
  .promo-banner--photo::after {
    background: linear-gradient(180deg, rgba(10,10,12,0.7) 0%, rgba(10,10,12,0.85) 100%);
  }
  .promo-banner--photo .promo-banner__inner { min-height: 220px; padding: 28px 20px; }
}

/* ═══════════ STATS ═══════════ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  background: var(--bg); padding: 60px 30px; text-align: center;
  transition: background 0.4s;
}
.stat:hover { background: var(--bg-2); }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800; color: var(--accent);
  line-height: 1; margin-bottom: 10px;
}
.stat__num::after { content: '+'; font-size: 0.6em; margin-left: 2px; }
.stat__label {
  font-size: 14px; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ═══════════ SECTIONS COMMON ═══════════ */
section { padding: 110px 40px; }
.section-tag {
  font-size: 13px; font-weight: 800; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 18px;
}
.section-tag--center { text-align: center; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 56px);
  font-weight: 700; line-height: 1.15;
  margin-bottom: 26px;
}
.section-title--center { text-align: center; }
.section-desc {
  font-size: 17px; color: var(--text-dim);
  max-width: 520px; margin-bottom: 32px;
}

/* ═══════════ ABOUT ═══════════ */
.about {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
  max-width: 1400px; margin: 0 auto;
}
/* Блок «О клубе» без фотографии: одна колонка, текст не растягивается на всю
   ширину экрана — читать строку в 1400 px невозможно. */
.about--solo { grid-template-columns: 1fr; max-width: 900px; }
.about--solo .about__features { max-width: 100%; }
.about__media { position: relative; }
.about__media img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 5; object-fit: cover; width: 100%;
}
.about__media-badge {
  position: absolute; bottom: 24px; left: 24px;
  padding: 10px 20px; border-radius: 100px;
  background: rgba(10, 10, 11, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent);
}
.about__features {
  list-style: none; margin-bottom: 40px;
  display: flex; flex-direction: column; gap: 14px;
}
.about__features li {
  padding-left: 28px; position: relative;
  color: var(--text-dim);
}
.about__features li b { color: var(--text); }
.about__features li::before {
  content: '✦'; position: absolute; left: 0;
  color: var(--accent); font-size: 14px;
  /* Звёздочка в шрифте нарисована высоко над базовой линией, поэтому в строке
     она вставала на уровень верха букв, а не по центру строки. Опускаем её на
     треть своего размера — тогда её середина совпадает с серединой букв. */
  transform: translateY(0.35em);
}

/* ═══════════ GALLERY ═══════════ */
.gallery { background: var(--bg-2); padding-bottom: 90px; }
.gallery__slider {
  max-width: 1400px; margin: 40px auto 0;
  overflow: hidden;
}
.gallery__track {
  display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__item {
  flex: 0 0 min(420px, 82vw);
  scroll-snap-align: center;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 3 / 4; position: relative;
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.8s var(--ease);
  filter: saturate(0.85);
}
.gallery__item:hover img {
  transform: scale(1.06);
  filter: saturate(1.1);
}
.gallery__dots {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 26px;
}
.gallery__dots button {
  /* Точка нарисована размером 8px, но нажимать в 8 пикселей пальцем нельзя.
     Поэтому саму точку рисуем псевдоэлементом, а кнопке даём честные 44×44
     прозрачной зоны: выглядит так же, попадать стало реально. */
  width: 44px; height: 44px; padding: 0;
  border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.gallery__dots button::before {
  content: ''; display: block;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line);
  transition: all 0.3s var(--ease);
}
.gallery__dots button.active::before {
  background: var(--accent); width: 26px; border-radius: 100px;
}
.gallery__nav {
  display: flex; justify-content: center; gap: 14px;
  margin-top: 22px;
}
/* Круглые кнопки-стрелки. Одно описание на галерею и на тренеров: раньше их
   было два одинаковых в разных местах файла, и правка в одном оставляла
   стрелки под фотографиями зала и под карточками тренеров разными. */
.gallery__btn, .trainers__btn {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
  transition: all 0.3s var(--ease);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.gallery__btn svg, .trainers__btn svg {
  width: 20px; height: 20px; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.gallery__btn:hover, .trainers__btn:hover {
  background: var(--accent); color: var(--accent-dark);
  border-color: var(--accent);
}

/* ═══════════ TRAINERS ═══════════ */
.trainers { overflow: hidden; }
.trainers__track {
  display: flex; gap: 24px;
  /* В растяжку, а не по верхнему краю. Раньше карточки были каждая своей
     высоты, полоса тянулась по самой длинной, и под короткими зиял пустой
     фон, а стрелки листания уезжали вниз и выглядели оторванными.
     Теперь карточки одной высоты: сама карточка — колонка, список
     специализаций сверху, кнопка «Информация» прижата к низу через
     margin-top: auto. Разброс длины при этом убран в JS — сразу видно
     не больше четырёх пунктов, остальное под спойлером. */
  align-items: stretch;
  max-width: 1400px; margin: 50px auto 0;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.trainers__track::-webkit-scrollbar { display: none; }
.trainer-card {
  flex: 0 0 320px; scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  transition: all 0.45s var(--ease);
  display: flex; flex-direction: column;
  /* Опора для раскрытой справки — она ложится поверх карточки, см. ниже. */
  position: relative;
}
/* Кнопка спойлера прижимается к низу карточки, чтобы у всех тренеров она
   оказалась на одной линии независимо от длины списка выше.
   z-index — чтобы она осталась НАД раскрытой справкой: ею же справка и
   закрывается, под пеленой кнопка была бы недоступна. */
.trainer-card__more {
  margin-top: auto; align-self: flex-start;
  position: relative; z-index: 3;
}
.trainer-card__info { flex: 0 0 auto; }
.trainer-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 255, 63, 0.35);
  background: rgba(255, 255, 255, 0.05);
}
.trainer-card__photo {
  border-radius: 14px; overflow: hidden;
  aspect-ratio: 3 / 4; margin-bottom: 20px;
}
.trainer-card__photo img {
  width: 100%; height: 100%; object-fit: cover;
  /* Снимки сделаны по пояс и головы у всех в верхней трети кадра. Обрезать
     кадр надо снизу: по центру у половины тренеров срезало бы макушку. */
  object-position: center 20%;
  transition: transform 0.7s var(--ease);
}
.trainer-card:hover .trainer-card__photo img { transform: scale(1.05); }
.trainer-card__name {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700; margin-bottom: 8px;
}
.trainer-card__label {
  font-size: 13px; font-weight: 700; color: var(--accent);
  margin-bottom: 8px;
}
.trainer-card__spec {
  list-style: none; margin: 0 0 16px; padding: 0;
  font-size: 14px; line-height: 1.5; color: var(--text-dim);
  /* Пунктов у всех поровну — три, — но длина строк разная: где-то каждый
     пункт в одну строку, где-то в две. Кнопка прижата к низу карточки, и под
     короткими списками зияла дыра до 79px. Резервируем высоту самого длинного
     списка (замерено: 144px), тогда пустота одинаковая у всех.
     Список внутри раскрытой справки это не касается — там высота по содержимому. */
  min-height: 144px;
}
.trainer-card__info .trainer-card__spec { min-height: 0; }
.trainer-card__spec li {
  position: relative; padding-left: 16px; margin-bottom: 6px;
}
/* Точка нарисована псевдоэлементом, а не маркером списка: у маркера нельзя
   задать свой цвет отдельно от текста пункта. */
.trainer-card__spec li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.trainer-card__more {
  /* Отступы сверху и снизу — чтобы кнопка была не 23px высотой, а 44:
     это основное действие карточки, в него надо попадать пальцем. */
  background: none; border: 0; padding: 11px 0; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--text);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.trainer-card__more:hover {
  color: var(--accent); border-bottom-color: var(--accent);
}
.trainer-card__info {
  margin-top: 14px; font-size: 13.5px; line-height: 1.6;
  color: var(--text-dim);
}
/* Раскрытая справка ложится ПОВЕРХ своей карточки, а не раздвигает её.
   Карточки в полосе выровнены по высоте (`align-items: stretch`), поэтому
   выросшая карточка тянула за собой всех соседей — под короткими зияла
   пустота. Оверлей не меняет размеров: ряд стоит на месте, а длинная справка
   листается внутри карточки. Фотография просвечивает сквозь пелену — видно,
   о ком читаешь. */
.trainer-card__info:not([hidden]) {
  position: absolute; inset: 0; z-index: 2;
  margin: 0;
  /* Отступ снизу больше остальных — под кнопкой «Скрыть» текст не прячется. */
  padding: 22px 22px 56px;
  /* overscroll-behavior НЕ ставить в contain: у коротких анкет содержимое
     помещается целиком, справка прокручиваться не может — и `contain` глушит
     передачу прокрутки странице. Колесо над карточкой не делает ничего, и сайт
     выглядит зависшим (замечание владельца 28.08, воспроизведено замером).
     При `auto` длинная анкета прокручивается сама, а дочитав её до конца,
     посетитель продолжает листать страницу — обычное поведение. */
  overflow-y: auto; overscroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  border-radius: var(--radius);
  background: rgba(14, 14, 17, 0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: cardInfoIn 0.35s var(--ease);
}
@keyframes cardInfoIn {
  from { opacity: 0; transform: translateY(10px); }
}
/* Имя тренера первой строкой раскрытой справки. Селектор из двух классов —
   иначе правило `.trainer-card__info p` перебило бы его по весу. */
.trainer-card__info .trainer-card__info-name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700; color: var(--text);
  margin: 0 0 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.trainer-card__info p { margin: 0 0 8px; }
.trainer-card__info p:last-child { margin-bottom: 0; }
.trainers__nav {
  display: flex; justify-content: center; gap: 14px;
  /* Было 34px под рваный низ карточек. Карточки выровнены — отступ уменьшен,
     иначе стрелки снова читаются как оторванные от карусели. */
  margin-top: 22px;
}
/* Вид кнопок .trainers__btn описан вместе с .gallery__btn в блоке галереи —
   они должны выглядеть одинаково, поэтому и описание у них одно. */

/* ═══════════ PRICING ═══════════ */
.pricing { background: var(--bg-2); }
.pricing__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; max-width: 1200px; margin: 50px auto 0;
}
.price-card {
  position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 38px 32px;
  display: flex; flex-direction: column;
  transition: all 0.45s var(--ease);
}
.price-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 255, 63, 0.3);
}
.price-card--hot {
  background: linear-gradient(160deg, rgba(212, 255, 63, 0.12), rgba(212, 255, 63, 0.03));
  border-color: rgba(212, 255, 63, 0.45);
}
.price-card__badge {
  position: absolute; top: -13px; left: 32px;
  padding: 6px 16px; border-radius: 100px;
  background: var(--accent); color: var(--accent-dark);
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.price-card__name {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700; margin-bottom: 10px;
}
.price-card__desc {
  font-size: 15px; color: var(--text-dim); margin-bottom: 26px;
}
.price-card__price {
  margin: 18px 0 4px;
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  color: var(--text);
}
.price-card__price span {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  color: var(--text-dim);
}
.price-card--hot .price-card__price { color: var(--accent); }
.price-card__list {
  list-style: none; margin-bottom: 34px; flex: 1;
  display: flex; flex-direction: column; gap: 12px;
}
.price-card__list li {
  padding-left: 26px; position: relative;
  font-size: 15px; color: var(--text-dim);
}
.price-card__list li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--accent); font-weight: 800;
}

/* ═══════════ LEAD FORM ═══════════ */
.lead {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(212, 255, 63, 0.08), transparent),
    var(--bg);
}
.lead__inner { max-width: 640px; margin: 0 auto; }
.lead .section-title { max-width: 720px; margin-inline: auto; }
.lead__form { margin-top: 44px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.lead__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lead__field { position: relative; }
/* 16px — не вкусовщина, а порог: Safari на iOS зумит страницу при фокусе
   на поле с меньшим кеглем и обратно её НЕ отдаляет. Форма заявки после
   этого уезжает за край экрана. Экономить место надо отступами, не кеглем.
   Найдено проверкой mobile_devices.py 28.08: в узких экранах стояло 14px,
   а Safari — 44% нашего мобильного трафика. */
.lead__field input, .lead__field select {
  width: 100%; padding: 20px 22px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; color: var(--text);
  font-family: var(--font-body); font-size: 16px;
  transition: border-color 0.3s;
  outline: none;
}
.lead__field input:focus, .lead__field select:focus { border-color: var(--accent); }
.lead__field input.error, .lead__field select.error { border-color: var(--error); }
.lead__field-error {
  margin: 6px 4px 0; font-size: 13px; color: var(--error);
}
.lead__field-error--consent { margin-top: 8px; }
.lead__form-error {
  margin: 0 0 16px; padding: 14px 18px;
  border: 1px solid var(--error); border-radius: 14px;
  color: var(--error); font-size: 14px; text-align: center;
}
.lead__field label {
  position: absolute; left: 22px; top: 20px;
  font-size: 16px; color: var(--text-dim);
  pointer-events: none;
  transition: all 0.25s var(--ease);
  background: transparent; padding: 0 4px;
}
.lead__field input:focus + label,
.lead__field input:not(:placeholder-shown) + label {
  top: -9px; font-size: 12px; color: var(--accent);
  background: var(--bg);
}
.lead__consent {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px; color: var(--text-dim); cursor: pointer;
  /* Две строки по 13px давали ровно 42 — на 2px ниже нормы для пальца.
     Отступы доводят зону нажатия до 48, ширину не трогают. */
  padding: 3px 0;
}
.lead__consent input {
  position: absolute; opacity: 0;
  width: 24px; height: 24px; margin: 0; cursor: pointer;
}
.lead__consent input:focus-visible + .lead__check {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.lead__check {
  /* Было 20×20. Квадратик — то, во что целится палец: центр подписи занят
     ссылкой на политику и открывает её, а не ставит галочку. 24 — минимум
     WCAG 2.2 (2.5.8) для цели нажатия. */
  flex: 0 0 24px; height: 24px; margin-top: 0;
  border: 1px solid var(--line); border-radius: 6px;
  position: relative; transition: all 0.25s;
}
.lead__consent input:checked + .lead__check {
  background: var(--accent); border-color: var(--accent);
}
.lead__consent input:checked + .lead__check::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark); font-size: 15px; font-weight: 800;
}
.lead__consent a { color: var(--accent); text-decoration: underline; }
.lead__form .btn--lg { margin-top: 8px; }
.lead__form.sent .lead__row,
.lead__form.sent .lead__field,
.lead__form.sent .lead__consent,
.lead__form.sent .btn { display: none; }
.lead__success {
  display: none; text-align: center; padding: 50px 20px;
}
.lead__form.sent .lead__success { display: block; animation: fadeUp 0.6s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } }
.lead__success-icon {
  width: 70px; height: 70px; margin: 0 auto 22px;
  border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: var(--accent-dark); font-weight: 800;
}
.lead__success h3 {
  font-family: var(--font-display); font-size: 24px; margin-bottom: 10px;
}
.lead__success p { color: var(--text-dim); }
.btn.loading { pointer-events: none; opacity: 0.7; }
.btn.loading span::after {
  content: '…'; animation: dots 1s steps(3) infinite;
}
@keyframes dots { 50% { content: ''; } }

/* ═══════════ CONTACTS ═══════════ */
.contacts { background: var(--bg-2); }
.contacts__grid {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 50px; max-width: 1300px; margin: 50px auto 0;
  align-items: stretch;
}
.contacts__info { display: flex; flex-direction: column; gap: 26px; justify-content: center; }
.contacts__item { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.contacts__label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim); margin-bottom: 6px; display: block;
}
.contacts__item b { display: none; }
.contacts__item p { color: var(--text); font-size: 16px; font-weight: 500; }
.contacts__item a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.25s; }
.contacts__item a:hover { border-bottom-color: var(--accent); }
.contacts__map {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); min-height: 380px;
}
.contacts__map iframe {
  width: 100%; height: 100%; min-height: 380px; border: 0;
  filter: grayscale(1) invert(0.92) contrast(0.9);
}

/* ═══════════ FOOTER ═══════════ */
.footer { border-top: 1px solid var(--line); padding: 50px 40px 30px; }
.footer__top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; margin: 0 auto 40px; flex-wrap: wrap; gap: 20px;
}
.footer__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.1em;
}
.footer__brand img { width: 260px; height: auto; }
/* flex-wrap обязателен: без него семь ссылок выстраивались в строку 533px
   при экране 390, а `body { overflow-x: hidden }` это молча обрезал —
   «Похудение» и «О клубе» уезжали за край и не нажимались вообще.
   Переполнение при этом не ловилось ни одной проверкой: scrollWidth
   оставался равен ширине окна именно из-за overflow-x: hidden. */
.footer__nav { display: flex; flex-wrap: wrap; gap: 26px; }
.footer__nav a { font-size: 14px; color: var(--text-dim); transition: color 0.3s; }
.footer__nav a:hover { color: var(--accent); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; margin: 0 auto; flex-wrap: wrap; gap: 12px;
  padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-dim);
}
.footer__bottom a { color: var(--text-dim); text-decoration: underline; }
.footer__bottom a:hover { color: var(--accent); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1280px) {
  .hero__title { font-size: clamp(34px, 6.2vw, 72px); }
  .hero__line--accent .reveal-word { font-size: 0.78em; }
}

@media (max-width: 1024px) {
  .about { gap: 50px; }
  .pricing__grid { grid-template-columns: 1fr; max-width: 520px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  section { padding: 70px 20px; }
  .nav { padding: 16px 22px; }
  .nav.scrolled { padding: 12px 22px; }
  .nav__logo-img { height: 44px; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1;
    background: rgba(10, 10, 11, 1);
    flex-direction: column; align-items: center; justify-content: center;
    /* Промежуток был 30px при высоте пункта 38. Пункты выросли до 48 ради
       пальца, и на iPhone SE (667px) семь штук со старым промежутком уже
       не помещались бы: 7×48 + 6×30 = 516 против 7×48 + 6×22 = 468. */
    gap: 22px; opacity: 0; visibility: hidden;
    transition: all 0.4s var(--ease);
  }
  .nav__links.open { opacity: 1; visibility: visible; z-index: 99; }
  /* Плашка про cookies висит на z-index 9999 и на телефоне накрывала нижний
     пункт раскрытого меню — «Контакты» читались наполовину. Пока меню открыто,
     плашку убираем: согласие никуда не денется, оно вернётся при закрытии. */
  body:has(.nav__links.open) .cookie-banner { display: none; }
  .nav__link {
    font-size: 24px;
    /* В шапке пункты намеренно приглушены — там они второстепенны. В раскрытом
       на весь экран меню это единственный контент, и тусклый серый на чёрном
       владелец прочитал как «заголовки прозрачные». Делаем обычный текст. */
    color: var(--text);
    /* Строка в 24px даёт высоту 38 — палец мимо такой цели промахивается.
       Отступы доводят до 48 при норме 44 (Apple HIG, WCAG 2.2 AAA). */
    padding: 5px 14px;
  }
  .nav__link--phone {
    display: block;
    color: var(--accent); font-weight: 700; white-space: nowrap;
  }
  .nav__cta { display: none; }
  .nav__phone { display: none; }
  .nav__call {
    /* z-index как у бургера: меню раскрывается на весь экран поверх шапки,
       и без этого трубка уходила бы под него вместе с остальной шапкой. */
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; z-index: 100;
    color: var(--accent); transition: opacity 0.3s;
    /* Шапка растягивает детей по краям (space-between), а на телефоне их
       остаётся всего трое: логотип, трубка, бургер — трубка вставала ровно
       посередине и читалась как случайная. Автоотступ съедает пустоту слева,
       трубка и бургер собираются в одну группу справа. */
    margin-left: auto; margin-right: 4px;
  }
  .nav__call svg { width: 23px; height: 23px; }
  .nav__call:active { opacity: 0.6; }
  .nav__burger { display: flex; z-index: 100; }
  .nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger.open span:nth-child(2) { opacity: 0; }
  .nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { padding: 110px 20px 70px; min-height: auto; }
  .hero__title { font-size: clamp(24px, 7.4vw, 36px); line-height: 1.15; }
  .hero__line--accent .reveal-word { font-size: 0.72em; }
  .hero__sub { font-size: 15px; }
  .hero__scroll { display: none; }
  .hero__content { text-align: left; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__media { order: -1; }
  .contacts__grid { grid-template-columns: 1fr; gap: 34px; }
  .lead__row { grid-template-columns: 1fr; }
  .lead__form { margin-top: 34px; }
  .footer__top { flex-direction: column; align-items: flex-start; }
  /* Короткие подписи давали цель 23×45 — ниже минимума WCAG 2.2 (24×24).
     Промежуток по вертикали меньше горизонтального: строки не должны
     разъезжаться после переноса. */
  .footer__nav { gap: 6px 22px; }
  .footer__nav a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px;
  }
  .trainer-card { flex: 0 0 280px; }
  .pricing__grid { max-width: 100%; padding: 0 4px; }
  .price-card { padding: 28px 22px; }
  .price-card__name { font-size: 20px; }
  .price-card__price { font-size: 24px; }
  .price-card__list li { font-size: 14px; }
  .lead__field input, .lead__field select { font-size: 16px; padding: 18px 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lead__field label { font-size: 15px; left: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 44px); }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 36px 12px; }
  .stat__num { font-size: 34px; }
  .stat__label { font-size: 12px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .section-title { font-size: 26px; }
  .price-card { padding: 24px 18px; border-radius: 16px; }
  .price-card__badge { left: 18px; top: -11px; font-size: 11px; padding: 5px 12px; }
  .footer { padding: 40px 20px 26px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .btn { padding: 15px 26px; font-size: 14px; }
  .gallery__btn, .trainers__btn { width: 46px; height: 46px; }
  .lead__field input, .lead__field select { font-size: 16px; padding: 14px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lead__field label { font-size: 14px; left: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 40px); }
  .lead__form { gap: 14px; }
}

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right, .reveal-word {
    opacity: 1; transform: none;
  }
}

/* ═══════════ SEO / NEW SECTIONS ═══════════ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.lead__sub {
  text-align: center; color: var(--text-dim);
  max-width: 520px; margin: 14px auto 34px; font-size: 16px;
}
.lead__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Reviews */
.reviews { background: var(--bg-2); }
.reviews__summary {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 26px 0 40px; flex-wrap: wrap;
}
.reviews__score { font-family: var(--font-display); font-size: 44px; font-weight: 800; color: var(--accent); }
.reviews__stars { color: var(--accent); font-size: 22px; letter-spacing: 2px; }
.reviews__count { color: var(--text-dim); font-size: 15px; }
.reviews__count a { color: var(--text); text-decoration: underline; }
.reviews__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  max-width: 1100px; margin: 0 auto;
}
.review-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px 24px; margin: 0;
  display: flex; flex-direction: column; gap: 16px;
}
.review-card__text { font-size: 15px; line-height: 1.6; color: var(--text); }
.review-card__meta { color: var(--text-dim); font-size: 13px; }
.review-card__meta b { color: var(--accent); }

/* FAQ */
.faq__list { max-width: 780px; margin: 34px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 0; overflow: hidden;
}
.faq__q {
  cursor: pointer; list-style: none; padding: 20px 22px;
  font-weight: 600; font-size: 16px; position: relative;
  transition: color 0.3s;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: '+'; position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%); font-size: 22px; color: var(--accent);
  transition: transform 0.3s;
}
.faq__item[open] .faq__q { color: var(--accent); }
.faq__item[open] .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a { padding: 0 22px 20px; color: var(--text-dim); line-height: 1.6; font-size: 15px; }

/* Cookie banner */
[hidden] { display: none !important; }

.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 9999;
  max-width: 380px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.cookie-banner__text { font-size: 13px; line-height: 1.55; color: var(--text-dim); margin: 0; }
.cookie-banner__text a { color: var(--text); text-decoration: underline; }
.cookie-banner__btn { align-self: flex-start; cursor: pointer; }

@media (max-width: 860px) {
  .reviews__grid { grid-template-columns: 1fr; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* ═══════════ Современный слой (2026) ═══════════ */

/* <picture> — обёртка ради AVIF, в раскладке её быть не должно: все правила
   писались на сам <img>, и лишний строчный контейнер ломал бы их. */
picture { display: contents; }

/* Появление блоков привязано к прокрутке средствами браузера, а не JS.
   Раньше это делал IntersectionObserver: он будит главный поток на каждом
   пересечении, а это прямой вклад в задержку отклика. Здесь всё считает
   компоновщик. Через @supports — где не поддерживается, работает старый путь. */
@supports (animation-timeline: view()) {
  /* Диапазон держим внутри фазы entry. Было «entry 10% cover 30%», а cover
     отсчитывается до момента, когда блок уйдёт вверх за экран. Последние блоки
     страницы уйти не могут — прокрутка упирается в конец документа. Из-за
     этого контакты и подвал навсегда замирали на opacity ≈ 0.28: снаружи
     это выглядело как «низ сайта затемнён». Проверять такое надо на самом
     нижнем блоке — на середине страницы дефект не виден. */
  .reveal, .reveal-left, .reveal-right {
    animation: appearUp linear both;
    animation-timeline: view();
    animation-range: entry 10% entry 90%;
  }
  .reveal-left  { animation-name: appearLeft; }
  .reveal-right { animation-name: appearRight; }
  @keyframes appearUp    { from { opacity: 0; transform: translateY(40px);  } to { opacity: 1; transform: none; } }
  @keyframes appearLeft  { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
  @keyframes appearRight { from { opacity: 0; transform: translateX(60px);  } to { opacity: 1; transform: none; } }
}

/* У анимаций по прокрутке длительность не используется — их ведёт положение
   страницы. Поэтому общее правило «сократить длительность» их не выключит,
   и timeline приходится снимать отдельно. */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right {
    animation-timeline: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Переход на страницу политики и обратно — плавный, без единой строки JS. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: 0.22s; }
::view-transition-new(root) { animation-duration: 0.22s; }

/* Заголовки не оставляют одинокое слово на последней строке. */
h1, h2, .hero__title, .section__title { text-wrap: balance; }
/* В абзацах балансировать нельзя (дорого на длинном тексте), но висячую
   строку из одного слова убрать стоит. */
p, .trainer-card__info p { text-wrap: pretty; }

/* Карточка тренера подстраивается под ширину своей колонки, а не экрана —
   в карусели это разные вещи. */
.trainers__track { container-type: inline-size; }

/* Раскрывающаяся справка появляется плавно, а не рывком. */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
}

/* Уважение к системной настройке «меньше движения» уже было ниже по файлу —
   новые анимации оно накрывает автоматически, так как правило со звёздочкой. */
