/* ============================================================================
   МОТОР — лендинг автотехцентра
   Файл стилей. Структура:
     1. Дизайн-токены (цвета, отступы, радиусы, тени) — тут меняется вся палитра
     2. База и типографика
     3. Компоненты (кнопки, карточки, формы, аккордеон и т.д.)
     4. Секции страницы
     5. Адаптив
   Быстрая смена палитры: правится блок «1. ТОКЕНЫ». Значения из config.js
   (theme.overrides) применяются поверх и имеют приоритет.
   ========================================================================== */

/* ==========================================================================
   1. ТОКЕНЫ
   ========================================================================== */

:root {
  /* Геометрия и типографика */
  --container: 1200px;
  --gutter: 20px;
  --header-h: 76px;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Акцент бренда: --brand для заливок, --brand-text для текста на фоне */
  --brand: #ff6a00;
  --brand-2: #ffb020;
  --brand-text: #ff8534;
  --brand-soft: rgba(255, 106, 0, 0.14);
  --brand-ring: rgba(255, 106, 0, 0.3);
  --brand-shadow: rgba(255, 106, 0, 0.35);
  --on-brand: #17100a;

  --ok: #35c46a;
  --star: #ffb020;
}

/* Тёмная тема (по умолчанию) */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-alt: #0e141c;
  --surface: #131a24;
  --surface-2: #182130;
  --surface-3: #1e2938;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e9eef6;
  --text-muted: #9aa7b8;
  --hero-glow-1: rgba(255, 106, 0, 0.28);
  --hero-glow-2: rgba(60, 140, 255, 0.18);
  --shadow-1: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(11, 15, 20, 0.72);
  --stripes: rgba(255, 255, 255, 0.03);
  --map-bg: #10161f;
  --map-line: rgba(255, 255, 255, 0.05);
}

/* Светлая тема */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --surface-3: #e7ecf3;
  --border: rgba(12, 18, 26, 0.1);
  --border-strong: rgba(12, 18, 26, 0.2);
  --text: #101720;
  --text-muted: #59667a;
  --brand: #e85d04;
  --brand-text: #a83f00;
  --brand-soft: rgba(232, 93, 4, 0.1);
  --brand-ring: rgba(232, 93, 4, 0.32);
  --brand-shadow: rgba(232, 93, 4, 0.3);
  /* Тёмный текст на оранжевой заливке: контраст 6.5:1 вместо 3.5:1 у белого */
  --on-brand: #17100a;
  --hero-glow-1: rgba(255, 138, 43, 0.3);
  --hero-glow-2: rgba(60, 140, 255, 0.14);
  --shadow-1: 0 12px 32px rgba(16, 24, 40, 0.08);
  --shadow-2: 0 24px 60px rgba(16, 24, 40, 0.12);
  --header-bg: rgba(245, 246, 248, 0.78);
  --stripes: rgba(12, 18, 26, 0.03);
  --map-bg: #e9eef4;
  --map-line: rgba(12, 18, 26, 0.06);
}

/* ==========================================================================
   2. БАЗА
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* clip не ломает position: sticky (в отличие от hidden) — используем, где поддерживается */
@supports (overflow: clip) {
  body {
    overflow-x: clip;
  }
}

body.nav-open {
  overflow: hidden;
}

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--brand-text);
}

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

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Спрайт иконок: не занимает места, но остаётся доступен для <use> */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Атрибут hidden должен побеждать авторские display-правила */
[hidden] {
  display: none !important;
}

.visually-hidden {
  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: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
  color: var(--on-brand);
}

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

.accent {
  color: var(--brand-text);
}

/* Заголовки секций */
.section {
  padding: clamp(56px, 8vw, 104px) 0;
  position: relative;
}

.section--alt {
  background: var(--bg-alt);
}

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

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

.section__title {
  font-size: clamp(1.65rem, 1.05rem + 2.2vw, 2.6rem);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section__lead {
  margin-top: 16px;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  color: var(--text-muted);
}

.section__note {
  margin-top: 32px;
  color: var(--text-muted);
}

.section__note a {
  color: var(--brand-text);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}

/* Появление блоков при скролле (включается только при работающем JS) */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.cards > *:nth-child(2),
.advantages > *:nth-child(2),
.reviews > *:nth-child(2),
.steps > *:nth-child(2) {
  transition-delay: 0.08s;
}

.cards > *:nth-child(3),
.advantages > *:nth-child(3),
.reviews > *:nth-child(3),
.steps > *:nth-child(3) {
  transition-delay: 0.16s;
}

.cards > *:nth-child(4),
.advantages > *:nth-child(4),
.reviews > *:nth-child(4),
.steps > *:nth-child(4) {
  transition-delay: 0.24s;
}

.cards > *:nth-child(5),
.reviews > *:nth-child(5) {
  transition-delay: 0.32s;
}

.cards > *:nth-child(6) {
  transition-delay: 0.4s;
}

.cards > *:nth-child(7) {
  transition-delay: 0.48s;
}

.cards > *:nth-child(8) {
  transition-delay: 0.56s;
}

/* ==========================================================================
   3. КОМПОНЕНТЫ
   ========================================================================== */

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition),
    border-color var(--transition), box-shadow var(--transition), color var(--transition);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: var(--on-brand);
  box-shadow: 0 10px 26px -12px var(--brand);
}

.btn--primary:hover {
  color: var(--on-brand);
  box-shadow: 0 16px 34px -12px var(--brand);
  filter: brightness(1.05);
}

.btn--ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.btn--lg {
  padding: 16px 28px;
  font-size: 1.03rem;
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.icon-btn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  color: var(--brand-text);
}

/* --- Логотип --- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  overflow: hidden;
  flex: none;
  box-shadow: 0 8px 20px -10px var(--brand);
}

.logo__mark img,
.logo__mark svg {
  width: 100%;
  height: 100%;
}

.logo__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo__name {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.logo__tagline {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* --- Шапка --- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition),
    border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

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

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

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

.header__phone .icon {
  color: var(--brand-text);
}

.theme-toggle__sun,
.theme-toggle__moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__sun,
[data-theme="light"] .theme-toggle__moon {
  display: block;
}

.burger {
  display: none;
}

.burger__close {
  display: none;
}

body.nav-open .burger__open {
  display: none;
}

body.nav-open .burger__close {
  display: block;
}

/* --- Навигация --- */
.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
  background: var(--surface-2);
}

.nav__footer {
  display: none;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(4, 7, 11, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--transition);
}

.nav-backdrop.is-visible {
  opacity: 1;
}

/* --- Бейдж --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-ring);
  color: var(--brand-text);
  font-size: 0.87rem;
  font-weight: 700;
}

.badge .icon {
  width: 16px;
  height: 16px;
}

/* --- Поля формы --- */
.select {
  width: 100%;
  padding: 13px 44px 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.96rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa7b8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}

/* В светлой теме шеврон темнее — иначе контраст 2.2:1 */
[data-theme="light"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2359667a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
}

.select:focus-visible {
  border-color: var(--brand);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-text);
}

/* --- Аватар отзыва --- */
.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: var(--on-brand);
  font-weight: 800;
  flex: none;
}

/* ==========================================================================
   4. СЕКЦИИ
   ========================================================================== */

/* --- 4.1 Баннер --- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--brand);
}

/* Фото на фоне баннера. Лежит в разметке статически (index.html),
   поэтому видно даже если скрипты ещё не обновились в кэше браузера.
   Убрать фото: config.js → hero.photo = '' */
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
  opacity: 0.45;
}

/* Затемнение слева: текст должен читаться поверх любой фотографии */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--bg) 0%,
    var(--bg) 26%,
    rgba(11, 15, 20, 0.45) 68%,
    rgba(11, 15, 20, 0.12) 100%
  );
}

/* Когда есть фото, силуэт машины убираем — иначе в баннере две машины */
.hero__bg:has(.hero__photo) .hero__car,
body.has-hero-photo .hero__car {
  display: none;
}

/* В светлой теме тёмное фото не подходит — показываем графику с силуэтом */
[data-theme="light"] .hero__photo,
[data-theme="light"] .hero__scrim {
  display: none;
}

[data-theme="light"] .hero__bg:has(.hero__photo) .hero__car {
  display: block;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.hero__glow--1 {
  width: 620px;
  height: 620px;
  top: -260px;
  right: -140px;
  background: var(--hero-glow-1);
}

.hero__glow--2 {
  width: 520px;
  height: 520px;
  bottom: -300px;
  left: -160px;
  background: var(--hero-glow-2);
}

.hero__stripes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    var(--stripes) 0 2px,
    transparent 2px 22px
  );
  mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
}

.hero__car {
  position: absolute;
  right: 1%;
  bottom: -3%;
  width: min(56%, 700px);
  height: auto;
  opacity: 0.75;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding: calc(var(--header-h) + clamp(44px, 6vw, 76px)) 0 clamp(56px, 7vw, 96px);
}

.hero__content {
  max-width: 660px;
}

.hero__title {
  margin: 22px 0 0;
  font-size: clamp(1.95rem, 1.15rem + 2.7vw, 3.35rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero__subtitle {
  margin-top: 20px;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.18rem);
  color: var(--text-muted);
  max-width: 56ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero__features {
  display: grid;
  gap: 14px;
  margin-top: 36px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.hero__features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.96rem;
  color: var(--text-muted);
}

.hero__features .icon {
  color: var(--brand-text);
  margin-top: 3px;
}

.hero__features strong {
  color: var(--text);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.stat dd {
  margin: 0;
  font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--brand-text);
}

.stat dt {
  margin-bottom: 6px;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* --- 4.2 О нас --- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.about__text p + p {
  margin-top: 16px;
}

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

.checklist {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.97rem;
}

.checklist .icon {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--ok);
  stroke-width: 2.4;
}

.about__visual {
  position: relative;
}

.about__photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 20%, var(--brand-soft), transparent 60%),
    repeating-linear-gradient(135deg, var(--map-line) 0 14px, transparent 14px 28px),
    var(--surface-2);
}

.about__photo-hint {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 80%;
}

.about__badge {
  position: absolute;
  left: -14px;
  bottom: -18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}

.about__badge .icon {
  width: 26px;
  height: 26px;
  color: var(--brand-text);
}

.about__badge strong {
  display: block;
  font-size: 0.98rem;
}

.about__badge span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.advantages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(44px, 5vw, 72px);
}

.advantage {
  padding: 26px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition), transform var(--transition);
}

.advantage:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.advantage__icon {
  width: 26px;
  height: 26px;
  color: var(--brand-text);
  margin-bottom: 16px;
}

.advantage h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.advantage p {
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* --- 4.3 Услуги --- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 26px 22px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

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

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-text);
  margin-bottom: 18px;
}

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

.card__title {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card__text {
  font-size: 0.93rem;
  color: var(--text-muted);
  flex: 1;
}

.card__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.card__price {
  font-weight: 800;
  color: var(--text);
}

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

/* --- 4.4 Процесс --- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.step {
  position: relative;
  padding: 28px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.step__num {
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--brand-text);
  opacity: 0.85;
  margin-bottom: 14px;
}

.step__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* --- 4.5 Цены и калькулятор --- */
.prices {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 24px;
  align-items: start;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  /* На узких экранах таблица прокручивается, а не обрезается */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.price-table caption {
  text-align: left;
}

.price-table th,
.price-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.price-table thead th {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
}

.price-table tbody th {
  font-weight: 600;
}

.price-table tbody td {
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.price-table tbody td:last-child {
  color: var(--text);
  font-weight: 700;
}

.price-table tr:last-child th,
.price-table tr:last-child td {
  border-bottom: 0;
}

.price-table__group th {
  padding: 12px 18px;
  background: var(--surface-2);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-text);
}

.calc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding: 26px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.calc__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
}

.calc__title .icon {
  color: var(--brand-text);
}

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

.calc__field {
  margin-top: 18px;
}

.calc__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.calc__result {
  display: grid;
  gap: 6px;
  margin: 22px 0 20px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px solid var(--brand-ring);
}

.calc__result-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.calc__result-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.calc__result-note {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- 4.6 Отзывы --- */
.reviews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.review {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.review__stars {
  display: flex;
  gap: 4px;
  color: var(--star);
}

.review__stars .icon {
  width: 18px;
  height: 18px;
}

.review__text {
  font-size: 1rem;
  color: var(--text);
  flex: 1;
}

.review__author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.review__author strong {
  display: block;
  font-size: 0.97rem;
}

.review__author span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- 4.7 FAQ --- */
.faq {
  display: grid;
  gap: 12px;
  max-width: 880px;
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq__item[open] {
  border-color: var(--border-strong);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 700;
  list-style: none;
}

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

.faq__chevron {
  color: var(--brand-text);
  transition: transform var(--transition);
}

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

.faq__a {
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-size: 0.96rem;
  max-width: 72ch;
}

/* --- 4.8 Контакты --- */
.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.contacts__info {
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.contacts__list {
  display: grid;
  gap: 22px;
}

.contacts__list > li {
  display: flex;
  gap: 14px;
}

.contacts__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-text);
  flex: none;
}

.contacts__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contacts__value {
  display: block;
  font-weight: 600;
}

.contacts__value--lg {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.contacts__hint {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hours {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 320px;
}

.hours li span:last-child {
  font-weight: 600;
}

.hours--compact {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contacts__cta {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contacts__cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.contacts__map {
  height: 100%;
}

.map {
  position: relative;
  height: 100%;
  min-height: 460px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--map-bg);
}

.map iframe {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: 0;
  display: block;
}

.map__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  background-image: linear-gradient(var(--map-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--map-line) 1px, transparent 1px);
  background-size: 56px 56px;
}

.map__pin {
  width: 54px;
  height: 54px;
  color: var(--brand);
  filter: drop-shadow(0 10px 18px var(--brand-shadow));
}

.map__label {
  font-weight: 700;
  font-size: 1.05rem;
  max-width: 30ch;
}

.map__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 40ch;
}

/* --- 4.9 Финальный призыв --- */
.cta-band {
  padding: clamp(40px, 5vw, 64px) 0;
  background: linear-gradient(120deg, var(--brand-2), var(--brand));
  color: var(--on-brand);
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.cta-band__title {
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
}

.cta-band__text {
  margin-top: 10px;
  max-width: 46ch;
}

.cta-band .btn--primary {
  background: var(--on-brand);
  color: var(--brand);
  box-shadow: none;
}

.cta-band .btn--primary:hover {
  color: var(--brand);
  filter: none;
  transform: translateY(-2px);
}

/* На оранжевой полосе акцентное кольцо фокуса не видно — берём контрастный цвет */
.cta-band :focus-visible {
  outline-color: var(--on-brand);
}

/* --- 4.10 Подвал --- */
.footer {
  padding: clamp(48px, 5vw, 76px) 0 32px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
  gap: 32px;
}

.footer__about {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 34ch;
}

.footer__title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer__nav ul,
.footer__contacts ul {
  display: grid;
  gap: 10px;
  font-size: 0.94rem;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(36px, 4vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer__legal a {
  border-bottom: 1px solid currentColor;
}

.footer__disclaimer {
  flex-basis: 100%;
  font-size: 0.82rem;
}

/* --- 4.11 Мобильная панель --- */
.mobile-bar {
  display: none;
  position: fixed;
  z-index: 80;
  inset: auto 0 0;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}

.mobile-bar .btn {
  flex: 1;
}

/* --- 4.12 Кнопка «Наверх» --- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition),
    visibility var(--transition), background var(--transition), color var(--transition);
}

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

.to-top:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  color: var(--brand-text);
}

.to-top .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

/* ==========================================================================
   5. АДАПТИВ
   ========================================================================== */

@media (max-width: 1180px) {
  .cards,
  .advantages,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__inner {
    grid-template-columns: 1.4fr 1fr 1.2fr;
  }

  .footer__contacts {
    grid-column: 1 / -1;
  }
}

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

  .hero__car {
    width: 78%;
    opacity: 0.5;
    bottom: -6%;
  }

  .about,
  .prices,
  .contacts {
    grid-template-columns: 1fr;
  }

  .calc {
    position: static;
  }

  .contacts__map,
  .map,
  .map iframe {
    min-height: 380px;
  }

  .about__badge {
    left: 12px;
  }

  /* Мобильное меню */
  .header__phone,
  .header__cta {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 95;
    display: flex;
    flex-direction: column;
    width: min(89vw, 380px);
    height: 100%;
    padding: 96px 24px 32px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    transform: translateX(102%);
    /* visibility убирает закрытую панель из tab-порядка */
    visibility: hidden;
    transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.34s;
    overflow-y: auto;
  }

  body.nav-open .nav {
    transform: none;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav__link {
    padding: 14px 16px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
  }

  .nav__footer {
    display: grid;
    gap: 12px;
    margin-top: auto;
    padding-top: 24px;
  }

  .nav__phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
  }

  .nav__phone .icon {
    color: var(--brand-text);
  }

  /* Постоянная кнопка звонка нужна на всём диапазоне, где скрыт телефон в шапке */
  .mobile-bar {
    display: flex;
  }

  body.has-mobile-bar {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  /* Кнопка «Наверх» поднимается над панелью «Позвонить / WhatsApp» */
  .to-top {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 68px;
  }

  .reviews {
    grid-template-columns: 1fr;
  }

  .stat {
    padding: 18px;
  }

  .hero__features {
    margin-top: 28px;
    padding-top: 24px;
  }

  .map,
  .map iframe,
  .contacts__map {
    min-height: 320px;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .cards,
  .advantages,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero__stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero__car {
    width: 120%;
    right: -20%;
    opacity: 0.32;
  }

  .btn {
    padding: 12px 18px;
    font-size: 0.94rem;
  }

  .btn--lg {
    padding: 14px 20px;
    font-size: 0.98rem;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .price-table th,
  .price-table td {
    padding: 10px 12px;
    font-size: 0.88rem;
  }

  .contacts__cta-row {
    grid-template-columns: 1fr;
  }
}

/* Уважаем настройку «меньше анимации» */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0s !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
