/* css/style.css — единственная таблица стилей сайта: токены тем, бенто-сетки,
   формы, модалки, микровзаимодействия. Инлайн-стили в HTML запрещены (CSP). */

/* ==========================================================================
   1. ТОКЕНЫ ДИЗАЙНА
   Перекраска сайта = правка трёх блоков ниже.
   Светлая тема — по умолчанию; тёмная — вручную или по системной настройке.
   Проверка контраста (WCAG 2.1 AA): текст >= 4.5:1, крупный >= 3:1,
   индикатор фокуса >= 3:1. Значения указаны в комментариях.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Палитра: светлая тема (крем + шалфейно-лаймовый акцент) */
  --bg: #f7f4ee;             /* фон страницы */
  --surface: #ffffff;        /* карточки */
  --surface-2: #efeae0;      /* приподнятые поверхности, ховеры */
  --text: #1b1e24;           /* основной текст, 19.6:1 к --bg */
  --muted: #565d6b;          /* второстепенный текст, 5.8:1 к --bg */
  --accent: #4f6b00;         /* ссылки, фокус-кольцо, текстовые акценты: 5.6:1 */
  --accent-bright: #c6f32e;  /* фирменный лайм — крупные элементы, орнаменты */
  --accent-tint: #f0f5d2;    /* подложки иконок */
  --btn-primary-bg: #15171e; /* главная кнопка: тёмная плашка… */
  --btn-primary-fg: #c6f32e; /* …с лаймовым текстом, 14.3:1 */
  --border: #e3ddcf;
  --border-strong: #c9c2b1;
  --input-bg: #ffffff;
  --input-border: #808798;  /* 3.6:1 к --input-bg */
  --danger: #c62a2f;         /* 5.2:1 к --bg */
  --success: #0e7a38;        /* 5.1:1 к --bg */
  --ring: #4f6b00;           /* фокус-индикатор, 5.6:1 */

  --header-bg: rgba(247, 244, 238, 0.88);
  --backdrop: rgba(21, 23, 30, 0.45);

  --shadow-sm: 0 1px 2px rgba(27, 30, 36, 0.06);
  --shadow-md: 0 6px 18px rgba(27, 30, 36, 0.10);
  --shadow-lg: 0 18px 48px rgba(27, 30, 36, 0.16);
  --glow: 0 10px 30px rgba(160, 190, 20, 0.35);

  /* Геометрия и ритм */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --gap: 20px;
  --gap-lg: 28px;
  --section-pad: clamp(56px, 8vw, 96px);
  --header-h: 72px;

  /* Типографика */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-body: 1rem;
  --fs-h1: clamp(2.25rem, 1.35rem + 4.1vw, 4.1rem);
  --fs-h2: clamp(1.55rem, 1.25rem + 1.6vw, 2.45rem);
  --fs-h3: clamp(1.12rem, 1rem + 0.5vw, 1.35rem);
  --lh: 1.65;

  --t-fast: 160ms cubic-bezier(0.3, 0.7, 0.4, 1);
  --t-mid: 260ms cubic-bezier(0.3, 0.7, 0.4, 1);

  --z-header: 50;
  --z-gotop: 60;
  --z-cookie: 70;
}

/* Тёмная тема, выбранная вручную. ПАЛИТРА 2/2 — зеркальная копия блока ниже
   в @media (prefers-color-scheme: dark). При перекраске правьте ОБА блока. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #12141a;
  --surface: #1a1d25;
  --surface-2: #232734;
  --text: #f2f3f5;           /* 15.2:1 к --surface */
  --muted: #a9aeb9;          /* 7.4:1 к --surface */
  --accent: #c6f32e;         /* 14.3:1 к --bg */
  --accent-bright: #c6f32e;
  --accent-tint: rgba(198, 243, 46, 0.14);
  --btn-primary-bg: #c6f32e; /* лаймовая плашка… */
  --btn-primary-fg: #15171e; /* …с графитовым текстом, 14.3:1 */
  --border: #2a2f3b;
  --border-strong: #49516a;
  --input-bg: #0f1116;
  --input-border: #646d85;  /* 3.5:1 к --input-bg */
  --danger: #ff8a8d;         /* 7.5:1 к --surface */
  --success: #8ce99a;        /* 11.4:1 к --surface */
  --ring: #c6f32e;

  --header-bg: rgba(18, 20, 26, 0.88);
  --backdrop: rgba(8, 9, 12, 0.66);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --glow: 0 10px 30px rgba(198, 243, 46, 0.28);
}

/* Тёмная тема по системной настройке, пока пользователь не сделал выбор
   вручную. ПАЛИТРА 2/2 — зеркальная копия блока :root[data-theme="dark"]. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #12141a;
    --surface: #1a1d25;
    --surface-2: #232734;
    --text: #f2f3f5;
    --muted: #a9aeb9;
    --accent: #c6f32e;
    --accent-bright: #c6f32e;
    --accent-tint: rgba(198, 243, 46, 0.14);
    --btn-primary-bg: #c6f32e;
    --btn-primary-fg: #15171e;
    --border: #2a2f3b;
    --border-strong: #49516a;
    --input-bg: #0f1116;
    --input-border: #646d85;
    --danger: #ff8a8d;
    --success: #8ce99a;
    --ring: #c6f32e;

    --header-bg: rgba(18, 20, 26, 0.88);
    --backdrop: rgba(8, 9, 12, 0.66);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
    --glow: 0 10px 30px rgba(198, 243, 46, 0.28);
  }
}

/* ==========================================================================
   2. СБРОС И БАЗА
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.lock {
  overflow: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

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

::selection {
  background: var(--accent-bright);
  color: #15171e;
}

/* ==========================================================================
   3. УТИЛИТЫ
   ========================================================================== */

.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Ссылка «Перейти к содержимому» — видна только при фокусе с клавиатуры */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-weight: 700;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--t-fast);
}

.skip-link:focus-visible {
  transform: none;
}

/* Спрайт inline-SVG с иконками (размещён в начале body) */
.sprite {
  display: none;
}

.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   4. КНОПКИ
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-mid),
    background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow), var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--secondary:hover {
  background: var(--surface-2);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 0.92rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Текстовая кнопка-стрелка внутри карточек услуг */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.link-more .icon {
  transition: transform var(--t-fast);
}

.link-more:hover .icon {
  transform: translateX(4px);
}

/* ==========================================================================
   5. ФОРМЫ
   ========================================================================== */

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--accent);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field-hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.field-error {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}

.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}

.field--check input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--accent-bright);
}

.field--check label {
  font-weight: 400;
  font-size: 0.92rem;
  color: var(--muted);
}

.field--check label a {
  color: var(--accent);
}

.field--check .field-error {
  grid-column: 2;
}

/* Honeypot-поле против спама: скрыто от людей, видно ботам */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Состояния отправки: «отправляется / успех / ошибка» */
.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0;
}

.form[data-state="sending"] .spinner {
  opacity: 1;
  animation: spin 0.7s linear infinite;
}

.form[data-state="sending"] .btn--submit {
  pointer-events: none;
  opacity: 0.7;
}

.form-status {
  font-size: 0.95rem;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form[data-state="success"] .form-status {
  color: var(--success);
}

.form[data-state="error"] .form-status {
  color: var(--danger);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form__note {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ==========================================================================
   6. ШАПКА И НАВИГАЦИЯ
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t-mid);
}

.site-header--scrolled {
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.logo__mark {
  flex: none;
}

.site-nav__list {
  display: grid;
  gap: 4px;
}

.site-nav__link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--t-fast), color var(--t-fast);
}

.site-nav__link:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.header__phone:hover {
  color: var(--accent);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--t-fast), transform var(--t-fast);
}

.theme-toggle:hover {
  background: var(--surface-2);
  transform: rotate(15deg);
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

/* Бургер (только до 1023px) */
.burger {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.burger__box {
  position: relative;
  width: 22px;
  height: 14px;
}

.burger__box span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t-mid), opacity var(--t-fast), top var(--t-mid);
}

.burger__box span:nth-child(1) { top: 0; }
.burger__box span:nth-child(2) { top: 6px; }
.burger__box span:nth-child(3) { top: 12px; }

.burger[aria-expanded="true"] .burger__box span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] .burger__box span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger__box span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* Мобильное меню — выпадающая панель под шапкой */
@media (max-width: 1023px) {
  .burger {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 14px clamp(16px, 4vw, 32px) 22px;
  }

  .site-nav.is-open {
    display: block;
    animation: nav-in var(--t-mid) both;
  }

  .site-nav__link {
    padding: 13px 14px;
    font-size: 1.05rem;
  }
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (max-width: 767px) {
  .header__phone span {
    display: none;
  }
}

@media (min-width: 1024px) {
  .site-nav__list {
    display: flex;
    gap: 2px;
  }
}

/* ==========================================================================
   7. HERO
   ========================================================================== */

.hero {
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 110px);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 44px;
  align-items: center;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__title .accent {
  display: block;
  color: var(--accent);
}

.hero__lead {
  max-width: 46ch;
  margin-top: 20px;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: clamp(18px, 4vw, 44px);
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.stat__num {
  display: block;
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.stat__label {
  font-size: 0.84rem;
  color: var(--muted);
  max-width: 20ch;
}

.hero__media {
  position: relative;
}

.hero__media::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -12%;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--accent-bright) 32%, transparent),
    transparent 72%
  );
  filter: blur(28px);
  z-index: -1;
}

.hero__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.hero__badge {
  position: absolute;
  left: -14px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
  font-weight: 600;
}

.hero__badge .icon {
  color: var(--accent);
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1.08fr 0.92fr;
  }

  .hero__media {
    transform: rotate(1.4deg);
  }
}

@media (max-width: 639px) {
  .hero__stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
  }

  .hero__badge {
    left: 10px;
  }
}

/* ==========================================================================
   8. СЕКЦИИ (общее)
   ========================================================================== */

.section {
  padding-block: var(--section-pad);
}

.section__head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 52px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__title {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section__lead {
  margin-top: 14px;
  color: var(--muted);
  text-wrap: pretty;
}

/* ==========================================================================
   9. УТП — 3 бенто-карточки
   ========================================================================== */

.usp__grid {
  display: grid;
  gap: var(--gap);
}

.usp__item {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}

.usp__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.usp__item--hl {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent-bright) 14%, var(--surface)), var(--surface) 62%);
  border-color: color-mix(in srgb, var(--accent-bright) 45%, var(--border));
}

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  color: var(--accent);
}

.card__icon .icon {
  width: 24px;
  height: 24px;
}

.usp__item h3,
.svc h3,
.coach h3 {
  font-size: var(--fs-h3);
  font-weight: 750;
  letter-spacing: -0.01em;
}

.usp__item p {
  color: var(--muted);
}

@media (min-width: 768px) {
  .usp__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .usp__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Лёгкая композиционная асимметрия */
  .usp__item:nth-child(2) {
    transform: translateY(18px);
  }

  .usp__item:nth-child(2):hover {
    transform: translateY(14px);
  }
}

/* ==========================================================================
   10. УСЛУГИ — 6 бенто-карточек
   ========================================================================== */

.services__grid {
  display: grid;
  gap: var(--gap);
}

.svc {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}

.svc:hover,
.svc:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent-bright) 55%, var(--border));
  color: var(--text);
}

.svc__text {
  color: var(--muted);
  font-size: 0.96rem;
}

.svc .link-more {
  margin-top: 6px;
  font-size: 0.94rem;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .svc--l {
    grid-column: span 3;
  }

  .svc--m {
    grid-column: span 2;
  }
}

/* ==========================================================================
   11. БЛОК ЦЕН — одна строка в широкой бенто-карточке
   ========================================================================== */

.price-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(26px, 4vw, 44px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-bright) 16%, var(--surface)), var(--surface) 58%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent-bright) 42%, var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--t-mid), box-shadow var(--t-mid);
}

.price-card:hover,
.price-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--glow), var(--shadow-md);
  color: var(--text);
}

.price-card__line {
  font-size: clamp(1.25rem, 1rem + 1.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-wrap: balance;
}

.price-card__line strong {
  color: var(--accent);
  font-weight: 800;
}

.price-card__note {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ==========================================================================
   12. О СТУДИИ И ТРЕНЕРАХ
   ========================================================================== */

.coaches__grid {
  display: grid;
  gap: var(--gap-lg);
}

.coach {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.coach__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: transform var(--t-mid);
}

.coach:hover .coach__photo {
  transform: scale(1.025);
}

.coach__role {
  justify-self: start;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.coach__about {
  color: var(--muted);
  font-size: 0.96rem;
}

@media (min-width: 768px) {
  .coaches__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   13. КАК ПРОХОДИТ ПУТЬ — таймлайн
   ========================================================================== */

.path__list {
  display: grid;
  gap: 26px;
  counter-reset: step;
}

.path__item {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
}

.path__item::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-weight: 800;
  font-size: 1.15rem;
}

/* Вертикальная направляющая между шагами (мобильная и планшетная версии) */
.path__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 60px;
  bottom: -26px;
  left: 25px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--border-strong), transparent);
}

.path__item h3 {
  padding-top: 4px;
}

.path__item p {
  color: var(--muted);
}

@media (min-width: 1024px) {
  .path__list {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--gap);
  }

  .path__item {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 72px;
  }

  .path__item::before {
    position: absolute;
    top: 0;
    left: 0;
  }

  .path__item::after {
    top: 25px;
    left: 60px;
    bottom: auto;
    width: auto;
    right: -20px;
    height: 2px;
    background: linear-gradient(90deg, var(--border-strong), transparent);
  }

  .path__item:last-child::after {
    display: none;
  }
}

/* ==========================================================================
   14. FAQ (AEO) — details/summary
   ========================================================================== */

.faq__list {
  display: grid;
  gap: 14px;
  max-width: 820px;
  margin-inline: auto;
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast);
}

.faq__item[open] {
  border-color: color-mix(in srgb, var(--accent-bright) 45%, var(--border));
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.faq__q .icon {
  color: var(--accent);
  transition: transform var(--t-mid);
}

.faq__item[open] .faq__q .icon {
  transform: rotate(180deg);
}

.faq__a {
  padding: 0 24px 26px;
  color: var(--muted);
  max-width: 68ch;
}

/* ==========================================================================
   15. КОНТАКТЫ + ФОРМА «СВЯЗАТЬСЯ С НАМИ»
   ========================================================================== */

.contacts__grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
}

.c-list {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.c-list__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-wrap: break-word; /* длинные e-mail не вылезут за экран */
}

.c-list__row .icon {
  color: var(--accent);
  margin-top: 3px;
}

.c-list__row a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.c-list__row a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.c-list__label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.c-list__address {
  font-style: normal;
}

.map-fig {
  margin-top: 28px;
}

.map-fig svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

/* Схема проезда подстраивается под тему: цвета через токены, не хардкодом */
.map__bg { fill: var(--surface-2); }
.map__road { stroke: var(--border-strong); }
.map__dash { stroke: var(--border-strong); }
.map__metro { fill: var(--accent-bright); }
.map__metro-text { fill: var(--btn-primary-bg); }
.map__pin-halo { fill: var(--accent-bright); }
.map__pin { fill: var(--accent-bright); }
.map__pin-core { fill: var(--btn-primary-bg); }
.map__place { fill: var(--text); }
.map__sub { fill: var(--muted); }
.map__note { fill: var(--muted); }

/* Диапазоны «Пн–Пт: 07:00–22:00» не должны рваться переносом строк */
.nowrap {
  white-space: nowrap;
}

/* На мобильных мелкие подписи схемы нечитаемы (масштаб ~0.3×) —
   оставляем декоративную схему с пином, информацию несёт figcaption */
@media (max-width: 767px) {
  .map__note,
  .map__place,
  .map__sub,
  .map__metro-text {
    display: none;
  }
}

.map-fig figcaption {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--muted);
}

.form-card {
  padding: clamp(24px, 3.4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form-card h3 {
  font-size: var(--fs-h3);
  margin-bottom: 6px;
}

.form-card > p {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 22px;
}

@media (min-width: 1024px) {
  .contacts__grid {
    grid-template-columns: 1fr 1.05fr;
    align-items: start;
  }
}

/* ==========================================================================
   16. ФУТЕР
   ========================================================================== */

.site-footer {
  background: color-mix(in srgb, var(--text) 5%, var(--bg));
  border-top: 1px solid var(--border);
  padding-block: clamp(44px, 6vw, 72px) 28px;
}

.footer__grid {
  display: grid;
  gap: 32px;
}

.footer__brand p {
  margin-top: 14px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer h3 {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.footer__list {
  display: grid;
  gap: 10px;
}

.footer__list a {
  color: var(--text);
  text-decoration: none;
}

.footer__list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer address {
  font-style: normal;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.8;
}

.footer address a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.footer address a:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

/* ==========================================================================
   17. МОДАЛКИ (<dialog>)
   ========================================================================== */

.modal {
  width: min(94vw, 500px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.modal[open] {
  animation: modal-in 300ms cubic-bezier(0.3, 0.7, 0.4, 1) both;
}

.modal::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

.modal__body {
  position: relative;
  padding: clamp(26px, 5vw, 36px);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--t-fast), transform var(--t-fast);
}

.modal__close:hover {
  background: var(--surface-2);
  transform: rotate(90deg);
}

.modal h2 {
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  padding-right: 44px;
}

.modal__note {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ==========================================================================
   18. БАННЕР СОГЛАСИЯ НА COOKIE
   ========================================================================== */

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: var(--z-cookie);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100vw - 24px), 720px);
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 16px);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--t-mid), opacity var(--t-mid), visibility var(--t-mid);
}

.cookie-banner.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.cookie-banner__text {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 46ch;
}

.cookie-banner__text a {
  color: var(--accent);
  font-weight: 600;
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
}

/* Пока баннер открыт — прячем кнопку «наверх», чтобы не спорили за угол */
html.cookie-open .go-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================================================
   19. КНОПКА GO TOP
   ========================================================================== */

.go-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-gotop);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity var(--t-mid), visibility var(--t-mid),
    transform var(--t-mid), background-color var(--t-fast), color var(--t-fast);
}

.go-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.go-top:hover {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  transform: translateY(-3px);
}

/* ==========================================================================
   20. СКРОЛЛ-СТОРИТЕЛЛИНГ (чистый CSS, animation-timeline)
   Браузеры без поддержки просто видят контент без анимации.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      opacity: 0;
      translate: 0 30px;
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 58%;
    }
  }
}

@keyframes reveal-in {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* Появление первого экрана при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    animation: fade-up 700ms cubic-bezier(0.25, 0.7, 0.35, 1) both;
  }

  .d1 { animation-delay: 60ms; }
  .d2 { animation-delay: 140ms; }
  .d3 { animation-delay: 220ms; }
  .d4 { animation-delay: 300ms; }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

/* ==========================================================================
   21. БЕЗ JAVASCRIPT (.no-js снимается первой строкой main.js)
   Меню разворачивается, JS-зависимые виджеты скрываются.
   ========================================================================== */

.no-js .burger,
.no-js .theme-toggle,
.no-js .go-top,
.no-js .cookie-banner {
  display: none;
}

.no-js .site-nav {
  position: static;
  display: block;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  flex: 1 0 100%; /* без JS меню занимает отдельную строку шапки */
  order: 3;
}

.no-js .header__inner {
  flex-wrap: wrap;
  padding-block: 12px;
}

.no-js .site-nav__list {
  display: grid;
  gap: 2px;
}

/* ==========================================================================
   22. PREFERS-REDUCED-MOTION — отключаем все движения
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   23. СЛУЖЕБНЫЕ И СТАТИЧЕСКИЕ СТРАНИЦЫ (политики, 403/404, ответы PHP)
   ========================================================================== */

.page-head {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
}

.page-head .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.page-static {
  padding-block: clamp(40px, 6vw, 80px);
}

.page-static article {
  max-width: 760px;
  margin-inline: auto;
}

.page-static h1 {
  font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.page-static .meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 34px;
}

.page-static h2 {
  font-size: 1.25rem;
  font-weight: 750;
  margin: 34px 0 12px;
}

.page-static p {
  margin-bottom: 14px;
  color: var(--text);
  text-wrap: pretty;
}

.page-static ul {
  margin: 0 0 16px;
  padding-left: 22px;
  list-style: disc;
  display: grid;
  gap: 8px;
}

.page-static table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 0.94rem;
}

.page-static th,
.page-static td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.page-static th {
  background: var(--surface-2);
  font-weight: 700;
}

.page-foot {
  border-top: 1px solid var(--border);
  padding-block: 26px;
  font-size: 0.88rem;
  color: var(--muted);
}

.page-foot .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.page-foot a {
  color: var(--muted);
}

.page-foot a:hover {
  color: var(--accent);
}

/* Страницы-сообщения: 403, 404 и HTML-ответы PHP-обработчиков */
.msg-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  text-align: center;
}

.msg-page__box {
  display: grid;
  gap: 18px;
  justify-items: center;
  max-width: 520px;
}

.msg-page__code {
  font-size: clamp(4rem, 16vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.msg-page__title {
  font-size: clamp(1.4rem, 1.2rem + 1.4vw, 2rem);
  font-weight: 800;
}

.msg-page p {
  color: var(--muted);
}

.msg {
  font-weight: 700;
  font-size: 1.05rem;
}

.msg--ok {
  color: var(--success);
}

.msg--err {
  color: var(--danger);
}

/* ==========================================================================
   24. ТОЧКИ ПЕРЕЛОМА 360 / 1440
   ========================================================================== */

@media (max-width: 639px) {
  .header__actions .btn {
    display: none; /* на узких экранах звонок — через иконку телефона и hero */
  }
}

@media (max-width: 374px) {
  .btn {
    padding: 13px 20px;
    font-size: 0.95rem;
  }

  .hero__cta .btn {
    width: 100%;
  }
}

@media (min-width: 1440px) {
  .container {
    max-width: 1280px;
  }
}

@media print {
  .site-header,
  .go-top,
  .cookie-banner,
  .hero__cta,
  .form-card form {
    display: none;
  }
}
