/* ============================================================
   CAR-SERVICE68 — ОСНОВНЫЕ СТИЛИ
   Все значения берутся из css/tokens.css
   ============================================================ */

/* ---------- 1. Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  /* прокрутку по якорям ведёт js/main.js с собственным замедлением */
  scroll-padding-top: calc(var(--header-h-scrolled) + var(--space-5));
  -webkit-text-size-adjust: 100%;
  /* полоса прокрутки скрыта, сама прокрутка работает как обычно */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* старый Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; }   /* Chrome, Safari */

body {
  min-height: 100%;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
picture { display: contents; }  /* img наследует размеры родителя, а не picture */
img, video { height: auto; }
svg { fill: none; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--brand-500); color: #fff; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.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;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: calc(var(--z-toast) + 1);
  padding: var(--space-3) var(--space-5);
  background: var(--brand-500);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: var(--weight-semibold);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* ---------- 2. Заголовки секций ---------- */
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.section__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  color: var(--brand-400);
  font-size: var(--fs-label);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1;
}
.section__eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brand-500);
  border-radius: 2px;
}

.section__title {
  font-size: var(--fs-h2);
  text-transform: uppercase;
  letter-spacing: var(--tracking-display);
}

.section__note {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* Лёгкий градиент на крупных заголовках.
   Заливка обрезается по глифам, поэтому цвет текста делаем прозрачным —
   только там, где браузер это поддерживает. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .text-sheen,
  .section__title {
    background-image: var(--text-sheen);
    /* Градиент повторяется на каждой строке. Иначе у заголовка в три строки
       верхняя была бы белой, а нижняя — просто выцветшей. */
    background-size: 100% 1.15em;
    background-repeat: repeat;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
  }
}

/* Единица lh — это ровно высота строки, точнее em-приближения выше */
@supports (background-size: 1lh) {
  .text-sheen,
  .section__title { background-size: 100% 1lh; }
}

/* В режиме принудительных цветов заливка недоступна — возвращаем обычный текст */
@media (forced-colors: active) {
  .text-sheen,
  .section__title {
    background-image: none;
    color: CanvasText;
  }
}

/* ---------- 3. Кнопки и ссылки ---------- */
.btn {
  --btn-h: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: var(--btn-h);
  padding-inline: var(--space-6);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-text);
  font-size: var(--fs-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}
.btn:active { transition-duration: var(--dur-fast); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--lg { --btn-h: 58px; padding-inline: var(--space-7); font-size: var(--fs-sm); letter-spacing: 0.06em; }
.btn--block { width: 100%; }

.btn--primary {
  background: linear-gradient(180deg, #e05100 0%, #c94700 55%, #ae3d00 100%);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #f45c02 0%, #d94e00 55%, #bd4200 100%);
  box-shadow: var(--shadow-brand-hover);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0); box-shadow: var(--shadow-brand); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  color: var(--text-strong);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}


.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.btn__spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--brand-400);
  font-size: var(--fs-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--dur) var(--ease-out);
}
.link-arrow svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover { color: var(--brand-300); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.icon-btn:active { transition-duration: var(--dur-fast); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { color: var(--text-strong); border-color: var(--line-brand); background: var(--brand-tint-08); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn[disabled] { opacity: 0.35; pointer-events: none; }

.stars { display: inline-flex; gap: 2px; color: var(--brand-400); }

/* ---------- Блик на границе (градиентная обводка) ----------
   Ставится классом .gleam на блок с рамкой и скруглением.
   Псевдоэлемент рисует градиент и вырезает середину маской,
   поэтому остаётся только светящаяся кромка. */
.gleam { position: relative; }
.gleam::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  padding: 1px;                       /* толщина светящейся кромки */
  background: var(--gleam);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.gleam--soft::after { background: var(--gleam-soft); }

/* у карточек блик проявляется на наведении */
.gleam--hover::after {
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.gleam--hover:hover::after { opacity: 1; }
.stars svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- 4. Шапка ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  transition: background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.header::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  opacity: 1;
  transition: opacity var(--dur) var(--ease-out);
  pointer-events: none;
}
.header::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--bg-header);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  transform-origin: top;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  pointer-events: none;
  will-change: transform;
}
.header.is-stuck::before { opacity: 0; }
.header.is-stuck::after { opacity: 1; transform: scaleY(var(--header-scale)); }

.header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: var(--header-h);
  transition: transform var(--dur) var(--ease-out);
}
.header.is-stuck .header__inner {
  transform: translateY(calc((var(--header-h-scrolled) - var(--header-h)) / 2));
}

.logo { flex: none; transition: opacity var(--dur) var(--ease-out); }
.logo img {
  width: 190px;
  height: auto;
  transform-origin: left center;
  transition: transform var(--dur) var(--ease-out);
}
.logo:hover { opacity: 0.85; }
.header.is-stuck .logo img { transform: scale(0.84); }

.nav { margin-inline: auto; }
.nav__list { display: flex; align-items: center; gap: clamp(0.75rem, 0.1rem + 1.6vw, 2.25rem); }

.nav__link {
  position: relative;
  display: inline-block;
  padding-block: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  transition: color var(--dur) var(--ease-out);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--brand-500);
  border-radius: 50%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.nav__link:hover, .nav__link.is-current { color: var(--text-strong); }
.nav__link:hover::after, .nav__link.is-current::after { transform: scaleX(1); }

.nav__mobile-extra { display: none; }

.header__phone {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header__phone-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-tint-14);
  border: 1px solid var(--line-brand);
  color: var(--brand-400);
  transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.header__phone-icon svg { width: 18px; height: 18px; }
.header__phone:hover .header__phone-icon { background: var(--brand-tint-24); transform: scale(1.06); }
.header__phone-text { display: flex; flex-direction: column; line-height: 1.25; }
.header__phone-num {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: var(--weight-bold);
  color: var(--text-strong);
  letter-spacing: var(--tracking-tight);
}
.header__phone-hint { font-size: var(--fs-xs); color: var(--text-faint); }

.burger {
  display: none;
  width: 46px; height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-strong);
}
.burger svg { width: 22px; height: 22px; }
.burger__close { display: none; }
.burger[aria-expanded="true"] .burger__open { display: none; }
.burger[aria-expanded="true"] .burger__close { display: block; }

/* ---------- 5. Главный экран ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(580px, 90vh, 900px);
  padding-top: calc(var(--header-h) + var(--space-6));
  padding-bottom: var(--space-9);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -2;
  width: 100%;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 58% 46%;
  -webkit-mask-image: linear-gradient(90deg, transparent 8%, rgba(0, 0, 0, 0.28) 30%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 8%, rgba(0, 0, 0, 0.28) 30%, #000 62%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    var(--bg-base) 0%,
    rgba(5, 5, 6, 0.94) 6%,
    rgba(5, 5, 6, 0.62) 12%,
    rgba(5, 5, 6, 0.18) 26%,
    transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--bg-base) 92%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  z-index: -3;
  right: 8%; top: 30%;
  width: min(620px, 60vw); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-tint-24), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

.hero__inner { position: relative; }
.hero__content { max-width: 640px; }

.hero__title {
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  text-wrap: nowrap;
  hyphens: manual;
}
.hero__title-line { display: block; }
.hero__title-line:not(.hero__title-line--xl) {
  font-size: 0.22em;
  font-weight: var(--weight-bold);
  letter-spacing: 0.03em;
  color: var(--brand-400);
  white-space: normal;   /* подпись может перенестись, заголовки — нет */
  margin-bottom: 0.4em;
}
.hero__title-line--accent {
  color: var(--brand-500);
  text-shadow: 0 0 42px rgba(227, 83, 0, 0.35);
}

.hero__lead {
  max-width: 34rem;
  margin-top: var(--space-5);
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-7);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6) var(--space-7);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-soft);
}
.hero__fact dt {
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.hero__fact dd {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: var(--weight-bold);
  color: var(--text-strong);
}

/* ---------- 6. Видео + преимущества ---------- */
.showcase { padding-block: clamp(2rem, 1rem + 3vw, 3.5rem) var(--section-y); }

.showcase__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.25rem, 0.6rem + 2.4vw, 2.5rem);
  align-items: stretch;
}

.player {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.player__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.player__video { width: 100%; height: 100%; object-fit: cover; }

/* Затемнение на паузе. Основная часть запечена в сам постер тоновой кривой:
   чёрная плёнка поверх фото сжимает контраст (57 -> 19) и делает кадр мутным,
   кривая же опускает яркость, сохраняя разницу света и тени. Здесь остаётся
   только лёгкий градиент — под панель управления снизу и под верхний край.
   Отдельным элементом, а не ::after у рамки, — иначе перекрыл бы кнопку и панель. */
.player__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Первым слоем виньетка — уводит взгляд от краёв к кнопке, центр не трогает.
     Нулевая прозрачность записана тем же цветом, а не transparent: тот равен
     rgba(0,0,0,0) и при интерполяции даёт серый ореол. */
  background:
    radial-gradient(
      108% 94% at 50% 45%,
      rgba(5, 5, 6, 0) 28%,
      rgba(5, 5, 6, 0.44) 66%,
      rgba(5, 5, 6, 0.90) 100%
    ),
    linear-gradient(
      180deg,
      rgba(5, 5, 6, 0.30) 0%,
      rgba(5, 5, 6, 0.06) 35%,
      rgba(5, 5, 6, 0.10) 70%,
      rgba(5, 5, 6, 0.62) 100%
    );
  transition: opacity var(--dur) var(--ease-out);
}
.player.is-playing .player__scrim { opacity: 0; }

.player__big {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88px; height: 88px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(10, 10, 11, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: var(--brand-400);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out),
              opacity var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.player__big svg { width: 30px; height: 30px; fill: currentColor; margin-left: 4px; }
.player__big:hover { transform: scale(1.06); background: rgba(227, 83, 0, 0.22); border-color: #fff; }
.player__big:active { transform: scale(0.98); }

.player.is-playing .player__big { opacity: 0; pointer-events: none; transform: scale(0.8); }

.player__bar {
  position: absolute;
  left: var(--space-4); right: var(--space-4); bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background: rgba(6, 6, 7, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-soft);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.player:hover .player__bar,
.player.is-playing .player__bar,
.player__bar:focus-within { opacity: 1; transform: translateY(0); }

.player__btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text);
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.player__btn:hover { color: var(--text-strong); background: rgba(255, 255, 255, 0.08); }
.player__btn svg { width: 17px; height: 17px; fill: currentColor; }
.player__icon-pause, .player__icon-mute { display: none; }
.player.is-playing .player__icon-play { display: none; }
.player.is-playing .player__icon-pause { display: block; }
.player.is-muted .player__icon-vol { display: none; }
.player.is-muted .player__icon-mute { display: block; }
.player__btn svg[href*="volume"], .player__btn svg { stroke: currentColor; }
.player__icon-play, .player__icon-pause { fill: currentColor; stroke: none; }

.player__time {
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  white-space: nowrap;
}

.player__seek {
  flex: 1;
  min-width: 40px;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(90deg, var(--brand-500) var(--progress, 0%), rgba(255, 255, 255, 0.18) var(--progress, 0%));
  border-radius: 4px;
  cursor: pointer;
}
.player__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(227, 83, 0, 0.5);
  cursor: grab;
}
.player__seek::-moz-range-thumb {
  width: 13px; height: 13px;
  border: 0; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(227, 83, 0, 0.5);
}

.player__error {
  position: absolute;
  left: 50%; bottom: 22%;
  transform: translateX(-50%);
  width: min(88%, 30rem);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: rgba(6, 6, 7, 0.85);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-align: center;
}


.advantages {
  align-self: center;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background:
    radial-gradient(105% 80% at 100% 100%, var(--glow-panel), transparent 58%),
    var(--bg-surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.advantage {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding: clamp(1.5rem, 0.9rem + 1.4vw, 2.25rem) clamp(0.75rem, 0.2rem + 1vw, 1.375rem);
  border-right: 1px solid var(--line-soft);
  transition: background-color var(--dur) var(--ease-out);
}
.advantage:last-child { border-right: 0; }
.advantage:hover { background: rgba(255, 255, 255, 0.02); }

.advantage__icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-sm);
  background: var(--brand-tint-08);
  border: 1px solid var(--brand-tint-24);
  color: var(--brand-400);
  transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.advantage__icon svg { width: 24px; height: 24px; }
.advantage:hover .advantage__icon { background: var(--brand-tint-14); transform: translateY(-2px); }

.advantage__title {
  font-size: var(--fs-xs);
  font-weight: var(--weight-black);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.advantage__text { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; }

/* ---------- 7. Услуги ---------- */
.services {
  background:
    radial-gradient(65% 50% at 88% 6%, var(--glow-section), transparent 62%),
    var(--bg-band);
  border-top: 1px solid var(--line-soft);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-5) var(--space-4);
}

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.service:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--line-brand);
  box-shadow: var(--shadow-md);
}

.service__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0a0a0b;
}
.service__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out), filter var(--dur) var(--ease-out);
}
.service:hover .service__media img { transform: scale(1.06); filter: brightness(1.12); }
.service__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(18, 20, 23, 0.92) 100%);
}

.service__icon {
  position: relative;      /* в потоке карточки, а не внутри обрезаемого фото */
  z-index: 2;
  align-self: flex-start;
  margin-left: var(--space-4);
  margin-top: -21px;       /* наезжает на фото ровно наполовину */
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: #1b1e22;
  border: 1px solid var(--brand-tint-40);
  box-shadow: var(--shadow-sm);
  color: var(--brand-400);
  transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.service__icon svg { width: 22px; height: 22px; }
.service:hover .service__icon {
  background: var(--brand-500);
  border-color: var(--brand-400);
  color: #fff;
  box-shadow: var(--shadow-brand);
  transform: translateY(-2px);
}

.service__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-4) var(--space-4) var(--space-5);
}

.service__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: var(--weight-bold);
  line-height: 1.25;
  letter-spacing: var(--tracking-tight);
  color: var(--text-strong);
  transition: color var(--dur) var(--ease-out);
}
.service:hover .service__title { color: var(--text-strong); }

.service__text {
  margin-top: var(--space-2);
  margin-bottom: 7px;        /* +3px полулидинга строки = 10px до разделителя */
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text-muted);
}

/* Разделитель прижат к цене: автополе только сверху, поэтому вся
   свободная высота карточки уходит над полосой, а снизу остаётся
   фиксированные 10px до цифр. */
.service__rule {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
}

.service__price {
  padding-top: 5px;          /* +5px полулидинга = 10px от разделителя до цены */
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: var(--weight-black);
  color: var(--brand-400);
  letter-spacing: var(--tracking-tight);
}

.services__note {
  margin-top: var(--space-6);
  font-size: var(--fs-sm);
  color: var(--text-faint);
}
.services__note a {
  color: var(--brand-400);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--brand-tint-40);
  transition: text-decoration-color var(--dur) var(--ease-out);
}
.services__note a:hover { text-decoration-color: var(--brand-400); }

/* ---------- Особенности под услугами ---------- */
.extras { margin-top: var(--space-8); display: grid; gap: var(--space-5); }
.extras__group { display: grid; gap: var(--space-3); }
.extras__group + .extras__group {
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-5);
}
.extras__title {
  font-size: var(--fs-xs); font-weight: var(--weight-semibold);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); margin: 0;
}
.extras__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.extras__item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border: 1px solid var(--line-soft); border-radius: var(--radius-pill);
  background: var(--bg-card); font-size: var(--fs-xs); color: var(--text-muted);
}
.extras__item svg { width: 13px; height: 13px; flex: none; color: var(--brand-400); }

@media (min-width: 900px) {
  .extras__group {
    grid-template-columns: 190px 1fr;
    gap: var(--space-5);
    align-items: start;
  }
  .extras__title { padding-top: 9px; }
}

/* ---------- 7б. Гарантия + призыв ---------- */
/* Слои идут порядком в разметке: фото → подложки → текст.
   Отрицательный z-index не используем — он ненадёжен внутри
   изолированного контекста наложения. */
.guarantee {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(400px, 38vw, 560px);
  padding-block: var(--section-y);
  overflow: hidden;
}

/* Сцена из двух слоёв: фон и машина. При прокрутке JS пишет в секцию
   переменную --p от 0 до 1, всё остальное делает CSS. */
.guarantee__scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Постер виден сразу и остаётся на телефоне; canvas проявляется,
   когда кадры загрузились. Пустого места не бывает ни на каком этапе. */
.drive-poster,
.drive-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.drive-canvas {
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.drive-canvas.is-ready { opacity: 1; }

/* Две подложки в одном слое: горизонтальная под текст и вертикальная —
   чтобы стыки с соседними секциями не читались. Сверху полоса услуг,
   снизу фон страницы. */
.guarantee__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      var(--bg-band) 0%,
      rgba(10, 11, 13, 0) 11%,
      rgba(5, 5, 6, 0) 86%,
      var(--bg-base) 100%),
    linear-gradient(90deg,
      var(--bg-band) 0%,
      rgba(10, 11, 13, 0.90) 24%,
      rgba(10, 11, 13, 0.42) 42%,
      rgba(10, 11, 13, 0.06) 60%,
      transparent 72%);
}

.guarantee__inner { position: relative; z-index: 1; }
.guarantee__title {
  max-width: 16ch;
  margin-bottom: var(--space-5);
}
.guarantee__text {
  max-width: 42ch;
  margin-bottom: var(--space-7);
  font-size: var(--fs-lead);
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .guarantee { min-height: clamp(520px, 96vw, 660px); align-items: flex-end; }
  /* На телефоне идёт свой, вертикальный набор кадров. */
  /* Сверху плотный цвет секции, чтобы кадр не начинался резкой линией,
     затем чистая зона с машиной, и только под текстом (с 34% высоты)
     затемнение нарастает. */
  .guarantee__veil {
    background: linear-gradient(180deg,
      var(--bg-band) 0%,
      rgba(10, 11, 13, 0) 11%,
      rgba(10, 11, 13, 0) 28%,
      rgba(10, 11, 13, 0.46) 42%,
      rgba(10, 11, 13, 0.80) 64%,
      rgba(10, 11, 13, 0.94) 88%,
      var(--bg-band) 100%);
  }
  .guarantee__title,
  .guarantee__text { max-width: none; }
}

/* ---------- 8. Отзывы ---------- */
.reviews__controls { display: flex; align-items: center; gap: var(--space-5); }
.slider-nav { display: flex; gap: var(--space-2); }

.reviews__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - var(--space-4) * 2) / 3);
  gap: var(--space-4);
  overflow-x: auto;
  overflow-y: hidden;   /* иначе сдвиг при появлении делает трек прокручиваемым вверх-вниз */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: var(--space-2);
}
.reviews__track::-webkit-scrollbar { display: none; }
.reviews__track:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-lg); }

.review {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  scroll-snap-align: start;
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.review:hover { border-color: var(--line); background: var(--bg-card-hover); }

.review__text {
  font-size: var(--fs-sm);
  line-height: 1.65;
  color: var(--text);
  max-width: 42ch;
}

.review__foot {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-soft);
}

.review__avatar {
  flex: none;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-tint-24), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--brand-tint-24);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--weight-black);
  letter-spacing: 0.02em;
  color: var(--brand-300);
}

.review__who { display: flex; flex-direction: column; margin-right: auto; line-height: 1.3; }
.review__name { font-weight: var(--weight-semibold); color: var(--text-strong); font-size: var(--fs-sm); }
.review__src { font-size: var(--fs-xs); color: var(--text-faint); }

.reviews__rating {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--space-4);
  font-size: var(--fs-sm); color: var(--text-muted); text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.reviews__rating svg { width: 16px; height: 16px; flex: none; fill: var(--brand-400); }
.reviews__rating b { color: var(--text-strong); font-weight: var(--weight-semibold); }
.reviews__rating:hover { color: var(--text); }
.reviews__rating:hover b { color: var(--brand-400); }


/* ---------- 9. Заявка ---------- */
.booking__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.booking__pitch {
  position: relative;
  padding: clamp(1.75rem, 1rem + 2.4vw, 3rem);
  background:
    radial-gradient(120% 90% at 0% 100%, var(--glow-panel), transparent 62%),
    linear-gradient(160deg, #17110d 0%, #0c0d0f 62%);
  overflow: hidden;
  isolation: isolate;
}
.booking__art {
  position: absolute;
  right: -1%;
  top: 60%;
  translate: 0 -50%;
  z-index: -1;
  width: auto;
  height: 90%;
  max-width: none;
  opacity: 0.72;
  filter: saturate(1.06) contrast(1.02);
  /* слева уходит в фон, чтобы текст оставался читаемым */
  mask-image: linear-gradient(90deg, transparent 4%, rgba(0, 0, 0, 0.16) 28%, rgba(0, 0, 0, 0.62) 50%, #000 70%);
  -webkit-mask-image: linear-gradient(90deg, transparent 4%, rgba(0, 0, 0, 0.16) 28%, rgba(0, 0, 0, 0.62) 50%, #000 70%);
  pointer-events: none;
}

.booking__title { margin-bottom: var(--space-4); }
.booking__text { color: var(--text-muted); max-width: 30rem; }

.booking__list { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.booking__list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text);
}
.booking__list svg { width: 20px; height: 20px; flex: none; color: var(--brand-400); }

.booking__call {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: var(--weight-bold);
  color: var(--text-strong);
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.booking__call svg { width: 20px; height: 20px; color: var(--brand-400); }
.booking__call span { display: flex; flex-direction: column; line-height: 1.25; }
.booking__call-label {
  font-family: var(--font-text);
  font-size: var(--fs-xs);
  font-weight: var(--weight-regular);
  color: var(--text-faint);
}
.booking__call:hover { border-color: var(--line-brand); background: var(--brand-tint-08); }

/* --- Форма --- */
.form {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  padding: clamp(1.75rem, 1rem + 2.4vw, 3rem);
  background: var(--bg-card);
  border-left: 1px solid var(--line-soft);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

.field { display: grid; gap: var(--space-2); min-width: 0; }
.field__label {
  font-size: var(--fs-xs);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.field__input {
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-field);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  font-size: var(--fs-sm);
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.field__input::placeholder { color: var(--text-faint); }
.field__input:hover { border-color: var(--line-strong); }
.field__input:focus {
  outline: none;
  background: var(--bg-field-focus);
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-tint-14);
}
.field__textarea { resize: vertical; min-height: 104px; line-height: 1.55; }

.field__select { position: relative; }
.field__select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--space-8);
  cursor: pointer;
}
.field__select select:invalid { color: var(--text-faint); }
.field__select option { background: var(--bg-field); color: var(--text-strong); }
.field__chevron {
  position: absolute;
  right: var(--space-4); top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  stroke: currentColor;
}

.field__input[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-tint);
}
.field__error {
  font-size: var(--fs-xs);
  color: var(--danger);
  line-height: 1.4;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox__box {
  flex: none;
  display: grid; place-items: center;
  width: 20px; height: 20px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  background: var(--bg-field);
  color: #fff;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.checkbox__box svg { width: 13px; height: 13px; opacity: 0; transform: scale(0.6); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-expo); }
.checkbox input:checked + .checkbox__box { background: var(--brand-500); border-color: var(--brand-500); }
.checkbox input:checked + .checkbox__box svg { opacity: 1; transform: scale(1); }
.checkbox input:focus-visible + .checkbox__box { box-shadow: var(--focus-ring); }
.checkbox input[aria-invalid="true"] + .checkbox__box { border-color: var(--danger); }
.checkbox__text a { color: var(--brand-400); text-decoration: underline; text-underline-offset: 3px; }

/* Ловушка для ботов: убрана из потока и от скринридеров, но не display:none —
   часть ботов игнорирует скрытые так поля */
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__fail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--danger-tint);
  border: 1px solid rgba(255, 92, 92, 0.35);
  color: #ffb4b4;
  font-size: var(--fs-sm);
}

.form__success {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--success-tint);
  border: 1px solid rgba(53, 192, 122, 0.35);
  color: #9ce9c2;
  font-size: var(--fs-sm);
}
.form__success svg { width: 22px; height: 22px; flex: none; color: var(--success); }

/* ---------- 10. Подвал ---------- */
.footer {
  background:
    radial-gradient(55% 45% at 18% 0%, var(--glow-section), transparent 68%),
    #030304;
  border-top: 1px solid var(--line-soft);
  padding-top: var(--section-y);
}

/* Панель: карточка контактов + карта справа */
.footer__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 25%, 340px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.footer__card {
  --notch: 46px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  margin-right: calc(var(--notch) * -1);   /* остриё заходит на карту */
  padding: clamp(1.5rem, 0.8rem + 1.6vw, 2.25rem)
           calc(var(--notch) + var(--space-5))
           clamp(1.5rem, 0.8rem + 1.6vw, 2.25rem)
           clamp(1.25rem, 0.6rem + 1.6vw, 2.25rem);
  background:
    radial-gradient(100% 120% at 0% 100%, var(--glow-panel), transparent 58%),
    var(--bg-card);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%);
}

.fcontact { display: flex; align-items: flex-start; gap: var(--space-4); min-width: 0; }
.fcontact__icon {
  flex: none;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint-08);
  border: 1px solid var(--brand-tint-24);
  color: var(--brand-400);
}
.fcontact__icon svg { width: 24px; height: 24px; }

.fcontact__label {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--weight-black);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-strong);
  margin-bottom: var(--space-3);
}
.fcontact__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--brand-400);
  transition: color var(--dur) var(--ease-out);
}
.fcontact__value:hover { color: var(--brand-300); }
.fcontact__mail {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: color var(--dur) var(--ease-out), text-decoration-color var(--dur) var(--ease-out);
}
.fcontact__mail:hover { color: var(--brand-400); text-decoration-color: var(--brand-400); }

.fcontact__text {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-muted);
}

/* Карта — ссылка на построение маршрута */
.footer__map {
  position: relative;
  display: block;
  min-height: 180px;
  overflow: hidden;
  background: #0b0c0e;
  isolation: isolate;
}
.footer__map-art {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transition: transform var(--dur-slow) var(--ease-out);
}
.footer__map:hover .footer__map-art { transform: scale(1.06); }

.footer__map-label {
  position: absolute;
  left: 50%; bottom: var(--space-4);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: rgba(6, 6, 7, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-size: var(--fs-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-strong);
  white-space: nowrap;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.footer__map-label svg { flex: none; width: 16px; height: 16px; color: var(--brand-400); }
.footer__map:hover .footer__map-label { border-color: var(--line-brand); background: rgba(6, 6, 7, 0.9); }

/* Нижняя строка */
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-7);
  margin-top: var(--space-8);
  padding-block: var(--space-5);
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
.footer__logo { flex: none; transition: opacity var(--dur) var(--ease-out); }
.footer__logo img { width: 180px; height: auto; }
.footer__logo:hover { opacity: 0.85; }
.footer__copy { margin-right: auto; }
/* Два правовых документа рядом: на узких экранах должны переноситься
   как отдельные ссылки, а не слипаться в одну строку. */
.footer__docs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--space-4);
}

.footer__policy { transition: color var(--dur) var(--ease-out); }
.footer__policy:hover { color: var(--brand-400); }

/* ---------- 10б. Страница документа (политика) ---------- */
.legal-header {
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-band);
}
.legal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}

.legal { padding-block: var(--section-y); }
.legal__inner { max-width: 78ch; }

.link-arrow--back { margin-bottom: var(--space-6); }
.link-arrow--back:hover svg { transform: translateX(-4px); }

.legal__title {
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.375rem);
  line-height: 1.2;
  margin-bottom: var(--space-3);
}
.legal__meta {
  font-size: var(--fs-sm);
  color: var(--text-faint);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line-soft);
}

.legal__toc {
  margin-block: var(--space-7);
  padding: var(--space-5) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.legal__toc-title {
  font-size: var(--fs-label);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand-400);
  margin-bottom: var(--space-4);
}
.legal__toc ol {
  list-style: decimal;
  padding-left: 1.4em;
  columns: 2;
  column-gap: var(--space-7);
}
.legal__toc li { margin-bottom: var(--space-2); color: var(--text-faint); }
.legal__toc a {
  color: var(--text-muted);
  transition: color var(--dur) var(--ease-out);
}
.legal__toc a:hover { color: var(--brand-400); }

.legal__section { margin-top: var(--space-8); scroll-margin-top: var(--space-6); }
.legal__section h2 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-4);
}
.legal__section p { margin-bottom: var(--space-4); color: var(--text-muted); }
.legal__section strong { color: var(--text); font-weight: var(--weight-semibold); }
.legal__section a {
  color: var(--brand-400);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--brand-tint-40);
  transition: text-decoration-color var(--dur) var(--ease-out);
}
.legal__section a:hover { text-decoration-color: var(--brand-400); }

.legal__section ul {
  list-style: none;
  margin-bottom: var(--space-5);
  display: grid;
  gap: var(--space-2);
}
.legal__section ul li {
  position: relative;
  padding-left: var(--space-5);
  color: var(--text-muted);
}
.legal__section ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
}

.legal__facts {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.legal__facts > div {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
}
.legal__facts dt { color: var(--text-faint); font-size: var(--fs-sm); }
.legal__facts dd { color: var(--text); }

.legal__contact { line-height: 1.9; }

.legal-footer {
  border-top: 1px solid var(--line-soft);
  background: #030304;
}
.legal-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-7);
  padding-block: var(--space-6);
  font-size: var(--fs-xs);
  color: var(--text-faint);
}

@media (max-width: 640px) {
  .legal__toc ol { columns: 1; }
  .legal__facts { padding: var(--space-4); }
  .legal__facts > div { grid-template-columns: 1fr; gap: 2px; }
  .legal-header__inner .header__phone-text { display: none; }
}

/* ---------- 11. Мобильная панель ---------- */
.dock {
  position: fixed;
  z-index: var(--z-sticky);
  left: 0; right: 0; bottom: 0;
  display: none;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: rgba(5, 5, 6, 0.86);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft);
  transform: translateY(120%);
  transition: transform var(--dur) var(--ease-out);
}
.dock.is-visible { transform: translateY(0); }
.dock__call {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  min-height: var(--control-h-sm);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
}
.dock__call svg { width: 18px; height: 18px; color: var(--brand-400); }
.dock__cta { flex: 1; }

/* ---------- 12. Движение ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes settle-in {
  from { opacity: 0; transform: scale(1.08) translateX(2.5%); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}

.hero__media { animation: settle-in 2s var(--ease-expo) both 1.3s; }
.hero__glow  { animation: rise-in 1.9s var(--ease-expo) both 0.25s; }
.hero__title-line { animation: rise-in var(--dur-enter) var(--ease-expo) both; }
.hero__title-line:nth-child(1) { animation-delay: 0.08s; }
.hero__title-line:nth-child(2) { animation-delay: 0.2s; }
.hero__title-line:nth-child(3) { animation-delay: 0.32s; }
.hero__title-line:nth-child(4) { animation-delay: 0.44s; }
.hero__lead    { animation: rise-in var(--dur-enter) var(--ease-expo) both 0.58s; }
.hero__actions { animation: rise-in var(--dur-enter) var(--ease-expo) both 0.7s; }
.hero__facts   { animation: rise-in var(--dur-enter) var(--ease-expo) both 0.81s; }

/* Появление при скролле: наблюдается каждый элемент отдельно,
   поэтому карточки ниже экрана ждут, пока до них долистают. */
.js [data-reveal],
.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity var(--dur-reveal) var(--ease-expo), transform var(--dur-reveal) var(--ease-expo);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
/* внутри горизонтального трека сдвиг не используем — его нечем показать без обрезки */
.js .reviews__track > * { transform: none; }

.js [data-reveal].is-revealed,
.js [data-reveal-group] > .is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .hero__media, .hero__glow, .hero__title-line,
  .hero__lead, .hero__actions, .hero__facts { animation: none; }
  .js [data-reveal],
  .js [data-reveal-group] > * { opacity: 1; transform: none; transition: none; }
  .drive-canvas { display: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- 13. Адаптив ---------- */

/* Услуги: 5 → 4 → 3 → 2 → 1, без резких скачков ширины карточки */
@media (max-width: 1280px) {
  .services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__content { max-width: 560px; }
}

@media (max-width: 1100px) {
  .showcase__inner { grid-template-columns: 1fr; }
  .advantages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .booking__panel { grid-template-columns: 1fr; }
  .form { border-left: 0; border-top: 1px solid var(--line-soft); }
}

/* Планшет: бургер-меню */
@media (max-width: 1024px) {
  .burger { display: grid; }
  .header__inner { gap: var(--space-4); }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    z-index: var(--z-menu);
    margin: 0;
    padding: var(--space-5) var(--gutter) var(--space-7);
    background: rgba(8, 9, 10, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility var(--dur);
  }
  .header.is-stuck .nav { top: var(--header-h-scrolled); }
  .nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    display: block;
    padding: var(--space-4) 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__link::after { display: none; }
  .nav__mobile-extra { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
  .nav__phone-mobile {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: var(--weight-bold);
    color: var(--text-strong);
  }
  .header__phone-text { display: none; }
  .header__phone { margin-left: auto; }
  .header__phone-icon { width: 46px; height: 46px; }
  .header__phone-icon svg { width: 20px; height: 20px; }
  .reviews__track { grid-auto-columns: calc((100% - var(--space-4)) / 2); }
  .hero__media { width: 100%; }
  .hero::after { height: 22%; }
  .hero::before {
    background:
      linear-gradient(90deg, rgba(5, 5, 6, 0.45) 0%, rgba(5, 5, 6, 0.12) 52%, transparent 78%),
      linear-gradient(180deg,
        rgba(5, 5, 6, 0.68) 0%,
        rgba(5, 5, 6, 0.60) 46%,
        rgba(5, 5, 6, 0.42) 78%,
        rgba(5, 5, 6, 0.10) 100%);
  }
  .logo img { width: 150px; }
  .header.is-stuck .logo img { transform: scale(0.88); }
  .hero__media img {
    object-position: 62% 58%;
    -webkit-mask-image: linear-gradient(180deg, #000 62%, rgba(0, 0, 0, 0.7) 100%);
    mask-image: linear-gradient(180deg, #000 62%, rgba(0, 0, 0, 0.7) 100%);
  }
  .hero { min-height: clamp(560px, 84vh, 860px); }
  .hero__content { max-width: none; }
  .hero__title { text-wrap: balance; }
}

/* Планшет мельче: преимущества 5 → 3 */
@media (max-width: 900px) {
  .advantages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advantage { border-bottom: 1px solid var(--line-soft); }
  .advantage:nth-child(3n) { border-right: 0; }
  .advantage:nth-last-child(-n + 2) { border-bottom: 0; }
  .footer__card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section__head { flex-direction: column; align-items: flex-start; }
}

/* Телефон */
@media (max-width: 900px) {
  /* карта уходит вниз, остриё-вырез выключаем */
  .footer__panel { grid-template-columns: 1fr; }
  .footer__card {
    --notch: 0px;
    margin-right: 0;
    clip-path: none;
    padding: clamp(1.5rem, 0.8rem + 1.6vw, 2.25rem);
    border-bottom: 1px solid var(--line-soft);
  }
  .footer__map { min-height: 200px; }
}

@media (max-width: 767px) {
  .footer__card { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .footer__copy { margin-right: 0; }
  /* геометрия та же, но на узкой панели текст идёт поверх ключа — приглушаем */
  .booking__art { opacity: 0.28; }
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); }
  .service__body { padding: var(--space-3) var(--space-4) var(--space-4); }
  .service__title { font-size: 0.9375rem; }
  /* мелкие карточки: тёмные фото нужно подсветить, иначе читаются как пустые */
  .service__media img { filter: brightness(1.32) saturate(1.06); }
  .service__media::after { background: linear-gradient(180deg, transparent 58%, rgba(18, 20, 23, 0.9) 100%); }
  .service:hover .service__media img { filter: brightness(1.4) saturate(1.06); }
  .service__text { font-size: 0.78125rem; }
  .service__price { font-size: 1rem; }
  .reviews__track { grid-auto-columns: 86%; }
  .form__row { grid-template-columns: 1fr; }
  .dock { display: flex; }
  body { padding-bottom: 76px; }
  .hero { min-height: 92vh; padding-bottom: var(--space-8); }
  .hero__facts { gap: var(--space-4) var(--space-6); }
  .hero__actions .btn { flex: 1 1 auto; }
  .player__big { width: 68px; height: 68px; }
  .player__big svg { width: 24px; height: 24px; }
  .player__bar { opacity: 1; transform: none; left: var(--space-2); right: var(--space-2); bottom: var(--space-2); }
  .player__time { display: none; }
  .reviews__controls { width: 100%; justify-content: space-between; }
  .booking__call { width: 100%; }
  .footer__bottom { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .logo img { width: 132px; }
  /* на узком экране текст занимает всю ширину — боковая подложка не нужна */
  .hero::before {
    background: linear-gradient(180deg,
      rgba(5, 5, 6, 0.80) 0%,
      rgba(5, 5, 6, 0.62) 44%,
      rgba(5, 5, 6, 0.30) 76%,
      rgba(5, 5, 6, 0.28) 100%);
  }
  .hero__media img { object-position: 46% 54%; }
  .advantages { grid-template-columns: 1fr; }
  .advantage {
    display: grid;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    column-gap: var(--space-4);
    align-items: center;
    padding: var(--space-4);
    border-right: 0 !important;
    border-bottom: 1px solid var(--line-soft);
  }
  .advantage:last-child { border-bottom: 0; }
  .advantage__icon { grid-row: 1 / 3; margin-bottom: 0; }
  .advantage__title { align-self: end; margin-bottom: 2px; }
  .advantage__text { align-self: start; }
  .hero__title-line:not(.hero__title-line--xl) { font-size: 0.4em; }
}

@media (max-width: 340px) {
  .services__grid { grid-template-columns: 1fr; }
}

/* ---------- 14. Печать ---------- */
@media print {
  .header, .dock, .player__bar, .player__big, .reviews__controls { display: none !important; }
  body { background: #fff; color: #000; }
  .service, .review, .booking__panel, .advantages { break-inside: avoid; border-color: #ccc; }
}
