/* ============================================================
   TrailForce — style.css
   Единый файл стилей для всех страниц сайта
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Inter:wght@400;500;600&display=swap');

/* ── Переменные ─────────────────────────────────────────── */
:root {
  /* Фирменные цвета */
  --pine:        #1F3B2D;   /* хвойный зелёный: тёмные секции, футер */
  --pine-dark:   #162A20;   /* затемнённый хвойный для градиентов */
  --sand:        #E8DCC4;   /* песочный: основной фон */
  --sand-light:  #F5EFE3;   /* светлый песок: карточки */
  --orange:      #E8662A;   /* оранжевый: кнопки, акценты */
  --orange-hover:#F27C45;   /* оранжевый при наведении */
  --orange-text: #A6400F;   /* тёмно-оранжевый для текста на светлом фоне (контраст ≥ 4.5:1) */
  --graphite:    #22262A;   /* основной текст */
  --text-mid:    #4B5053;   /* второстепенный текст */
  --line:        rgba(34, 38, 42, 0.16);   /* тонкие линии на светлом */
  --line-light:  rgba(245, 239, 227, 0.18);/* тонкие линии на тёмном */
  --error:       #B3261E;
  --success:     #2E6B47;

  /* Шрифты */
  --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Размеры */
  --max-w:  1240px;
  --hh:     76px;          /* высота шапки */
  --radius: 4px;

  /* Анимация */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --t-fast:   0.2s;
}

/* ── Сброс ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--graphite);
  background: var(--sand);
  line-height: 1.6;
  overflow-x: hidden;
}

/* height: auto — чтобы атрибут height не мешал aspect-ratio */
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
fieldset { border: none; min-width: 0; }
[hidden] { display: none !important; }

/* Видимый фокус для клавиатуры */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

/* Ссылка «Перейти к содержанию» для клавиатуры и скринридеров */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--pine);
  color: var(--sand-light);
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* ── Утилиты ────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* Надпись над заголовком секции: «01 — Модели» */
.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-text);
}
.label::before {
  content: '';
  width: 32px; height: 2px;
  background: currentColor;
}
.label-light { color: var(--orange); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.section-title {
  font-size: clamp(34px, 4.4vw, 56px);
  margin: 14px 0 18px;
}

.section-lead {
  max-width: 640px;
  font-size: 18px;
  color: var(--text-mid);
}

.section-head { margin-bottom: 48px; }
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

/* Цены: одинаковая ширина цифр */
.price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--orange-text);
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
  transition: color var(--t-fast), gap var(--t-fast);
}
.text-link:hover { color: var(--graphite); gap: 12px; }

/* ── Кнопки ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

/* Оранжевая: графитовый текст даёт контраст 5:1 */
.btn-primary { background: var(--orange); color: var(--graphite); }
.btn-primary:hover { background: var(--orange-hover); }

.btn-dark { background: var(--pine); color: var(--sand-light); }
.btn-dark:hover { background: var(--graphite); }

.btn-outline { border-color: var(--graphite); color: var(--graphite); }
.btn-outline:hover { background: var(--graphite); color: var(--sand-light); }

.btn-outline-light { border-color: var(--sand-light); color: var(--sand-light); }
.btn-outline-light:hover { background: var(--sand-light); color: var(--pine); }

.btn-sm { min-height: 44px; padding: 8px 20px; font-size: 16px; }
.btn-block { width: 100%; }

/* ── Шапка ──────────────────────────────────────────────── */
/* Логотип тёмный, поэтому шапка всегда на светлом фоне */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hh);
  z-index: 1000;
  background: rgba(232, 220, 196, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34, 38, 42, 0.08);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* После прокрутки — плотный песочный с тенью */
.site-header.scrolled {
  background: var(--sand);
  box-shadow: 0 4px 24px rgba(22, 42, 32, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

/* Логотип: в PNG много прозрачных полей, поэтому кадрируем через object-fit */
.logo { display: block; flex-shrink: 0; }
.logo img {
  width: 206px;
  height: 52px;
  margin-left: -9px;
  object-fit: cover;
  object-position: 50% 49%;
}

/* Меню на десктопе */
.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a {
  position: relative;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-mid);
  transition: color var(--t-fast);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.site-nav a:hover { color: var(--graphite); }
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }
.site-nav a.active { color: var(--graphite); font-weight: 600; }

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

/* Кнопка-бургер */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--graphite);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Мобильное меню-оверлей */
.mobile-nav {
  position: fixed;
  top: var(--hh); left: 0; right: 0; bottom: 0;
  z-index: 999;
  background: var(--sand);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.mobile-nav.open { opacity: 1; visibility: visible; transform: none; }

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 20px 32px;
}
.mobile-nav-inner > a:not(.btn) {
  display: block;
  padding: 16px 0;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a.active { color: var(--orange-text); }
.mobile-nav .btn { margin-top: 28px; }
.mobile-nav-contacts { margin-top: auto; font-size: 15px; color: var(--text-mid); }
.mobile-nav-contacts a { font-weight: 600; color: var(--graphite); }

body.menu-open { overflow: hidden; }

/* ── Hero (главная) ─────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--hh) + 48px) 0 96px;
  overflow: hidden;
  color: var(--sand-light);
  background: var(--pine-dark);
}

/* Фото вынесено в отдельный слой — его двигает параллакс */
.hero-bg {
  position: absolute;
  inset: -8% 0 -8% 0;
  background: url('../images/hero.jpg') center 60% / cover no-repeat;
  will-change: transform;
}
/* Затемнение слева, чтобы текст читался на закатном небе */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(22, 42, 32, 0.88) 0%, rgba(22, 42, 32, 0.62) 38%, rgba(22, 42, 32, 0) 72%),
    linear-gradient(0deg, rgba(22, 42, 32, 0.55) 0%, rgba(22, 42, 32, 0) 30%);
}

.hero > .container { width: 100%; }
.hero-content { position: relative; z-index: 1; max-width: 620px; }

.hero h1 {
  font-size: clamp(46px, 7vw, 96px);
  line-height: 0.95;
  margin: 18px 0 24px;
}
.hero h1 em { font-style: normal; color: var(--orange); }

.hero-sub {
  max-width: 500px;
  font-size: 19px;
  color: rgba(245, 239, 227, 0.88);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* Плавное появление текста hero после загрузки */
.hero-content > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.hero.loaded .hero-content > * { opacity: 1; transform: none; }
.hero.loaded .hero-content > *:nth-child(2) { transition-delay: 0.1s; }
.hero.loaded .hero-content > *:nth-child(3) { transition-delay: 0.2s; }
.hero.loaded .hero-content > *:nth-child(4) { transition-delay: 0.3s; }

/* Строка с характеристиками внизу hero */
.hero-specs {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  border-top: 1px solid var(--line-light);
}
.hero-specs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  padding: 18px 0;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 239, 227, 0.8);
}

/* ── Page Hero (внутренние страницы) ────────────────────── */
.page-hero {
  position: relative;
  padding: calc(var(--hh) + 88px) 0 72px;
  color: var(--sand-light);
  background:
    linear-gradient(90deg, rgba(22, 42, 32, 0.9) 0%, rgba(22, 42, 32, 0.55) 60%, rgba(22, 42, 32, 0.35) 100%),
    url('../images/page-hero.jpg') center / cover no-repeat;
}
.page-hero h1 { font-size: clamp(44px, 6vw, 80px); margin: 16px 0 12px; }
.page-hero p { max-width: 620px; font-size: 18px; color: rgba(245, 239, 227, 0.85); }

/* Хлебные крошки */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: rgba(245, 239, 227, 0.75);
}
.breadcrumbs li + li::before { content: '/'; margin-right: 8px; opacity: 0.6; }
.breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs a:hover { color: var(--orange); }
.breadcrumbs [aria-current] { color: var(--sand-light); }

/* ── Секции ─────────────────────────────────────────────── */
section { padding: 104px 0; }
/* Якорные ссылки не прячутся под фиксированной шапкой */
section[id], article[id] { scroll-margin-top: calc(var(--hh) + 16px); }

.section-light { background: var(--sand-light); }
.section-dark  { background: var(--pine); color: var(--sand-light); }
.section-dark .section-lead { color: rgba(245, 239, 227, 0.8); }
.section-dark .label { color: var(--orange); }

/* Блок «картинка + текст» в две колонки */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.split-reverse .split-media { order: 2; }
.split-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}
.split-text p { margin-bottom: 16px; color: var(--text-mid); }
.section-dark .split-text p { color: rgba(245, 239, 227, 0.82); }
.split-text .text-link { margin-top: 12px; }

/* ── Преимущества (главная) ─────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
#features { padding: 72px 0; }
.feature {
  padding: 48px 40px 48px 0;
}
.feature + .feature { padding-left: 40px; border-left: 1px solid var(--line); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 24px;
  color: var(--pine);
  border: 2px solid var(--pine);
  border-radius: var(--radius);
}
.feature-icon svg { width: 32px; height: 32px; }
.feature h3 { font-size: 28px; margin-bottom: 12px; }
.feature p { color: var(--text-mid); }

/* ── Карточки моделей и аксессуаров ─────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cards-4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }

.card {
  display: flex;
  flex-direction: column;
  background: var(--sand-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow 0.3s var(--ease);
}
.card:hover {
  border-color: rgba(34, 38, 42, 0.32);
  box-shadow: 0 12px 32px rgba(22, 42, 32, 0.12);
}

.card-media { position: relative; overflow: hidden; }
.card-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  transition: transform 0.5s var(--ease);
}
.card:hover .card-media img { transform: scale(1.03); }

/* Плашка на фото: «Хит», «Выгодно» */
.card-tag {
  position: absolute;
  top: 16px; left: 16px;
  padding: 4px 10px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--orange);
  color: var(--graphite);
  border-radius: 2px;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 28px;
}
.card-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-text);
}
.card h3 { font-size: 34px; margin: 6px 0 10px; }
.cards-4 .card h3 { font-size: 26px; }
.card-text { color: var(--text-mid); margin-bottom: 20px; }

/* Список комплектации с галочками */
.spec-list { margin-bottom: 24px; font-size: 15px; }
.spec-list li {
  position: relative;
  padding: 7px 0 7px 26px;
  border-top: 1px solid var(--line);
}
.spec-list li::before {
  content: '';
  position: absolute;
  left: 2px; top: 13px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--orange-text);
  border-bottom: 2px solid var(--orange-text);
  transform: rotate(-45deg);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.cards-4 .card-footer { flex-direction: column; align-items: stretch; }
.cards-4 .price { font-size: 26px; }

/* ── Полоса цифр ────────────────────────────────────────── */
.stats { padding: 72px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat { padding: 8px 32px; }
.stat + .stat { border-left: 1px solid var(--line-light); }
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(48px, 5.5vw, 72px);
  font-weight: 700;
  line-height: 1;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.stat-text {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  color: rgba(245, 239, 227, 0.82);
}

/* ── Шоурум ─────────────────────────────────────────────── */
.info-list { margin: 28px 0 32px; }
.info-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.section-dark .info-list li { border-color: var(--line-light); }
.info-list svg { width: 22px; height: 22px; margin-top: 2px; color: var(--orange); }
.info-list strong { display: block; font-weight: 600; }
.info-list span { color: var(--text-mid); }
.section-dark .info-list span { color: rgba(245, 239, 227, 0.75); }

/* ── Каталог: фильтр ────────────────────────────────────── */
.filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin-bottom: 48px;
  background: var(--sand-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-btn {
  min-height: 44px;
  padding: 8px 24px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.filter-btn:hover { background: var(--sand); }
.filter-btn.active { background: var(--pine); color: var(--sand-light); }

.catalog-group + .catalog-group { margin-top: 80px; }
.catalog-group.hidden { display: none; }
.group-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  font-size: 32px;
  border-bottom: 2px solid var(--graphite);
}
.group-title small {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  text-transform: none;
  color: var(--text-mid);
}

/* Появление карточек при смене фильтра */
.catalog-group.fade-in { animation: fadeIn 0.35s var(--ease-out); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ── Таблица сравнения ──────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sand-light);
}
.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 15px;
}
.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.compare-table thead th {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--pine);
  color: var(--sand-light);
  border-bottom: none;
}
.compare-table tbody th {
  width: 22%;
  font-weight: 600;
  color: var(--text-mid);
}
.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .price { font-size: 24px; }
.yes { color: var(--success); font-weight: 600; }
.no  { color: var(--text-mid); }
.table-hint { display: none; margin-top: 10px; font-size: 14px; color: var(--text-mid); }

/* Плашка выгоды Trail+ */
.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding: 32px 40px;
  background: var(--orange);
  color: var(--graphite);
  border-radius: var(--radius);
}
.promo-title {
  font-family: var(--font-head);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}
.promo p { margin-top: 6px; font-size: 16px; }

/* ── Услуги (order.html) ────────────────────────────────── */
.service-card .card-body p { color: var(--text-mid); margin-bottom: 16px; }
.service-price {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--success);
}

/* ── Шаги заказа ────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 0 28px 0 0;
}
.step-num {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 24px;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  background: var(--orange);
  color: var(--graphite);
  border-radius: var(--radius);
}
/* Пунктирная линия-«тропа» между шагами */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px; left: 72px; right: 16px;
  border-top: 2px dashed rgba(245, 239, 227, 0.35);
}
.step h3 { font-size: 24px; margin-bottom: 8px; }
.step p { font-size: 15px; color: rgba(245, 239, 227, 0.78); }

/* ── Форма заказа ───────────────────────────────────────── */
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}

.form-card {
  padding: 40px;
  background: var(--sand-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Переключатель режима «Заказ / Тест-райд» */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 36px;
  background: var(--sand);
  border-radius: var(--radius);
}
.mode-btn {
  min-height: 48px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.mode-btn:hover { background: rgba(245, 239, 227, 0.6); }
.mode-btn.active { background: var(--pine); color: var(--sand-light); }

/* Поля, видимые только в одном режиме */
[data-mode="order"]    [data-only="testride"],
[data-mode="testride"] [data-only="order"] { display: none !important; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

.form-group > label,
.field-label {
  font-size: 14px;
  font-weight: 600;
}
.req { color: var(--orange-text); }

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  font-size: 16px;               /* 16px — iOS не увеличивает страницу при фокусе */
  background: #fff;
  border: 1px solid rgba(34, 38, 42, 0.28);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(31, 59, 45, 0.18);
}

/* Состояния валидации */
.field-error,
.form-group input.field-error { border-color: var(--error); }
.form-group input.field-ok { border-color: var(--success); }
/* Ошибка остаётся видна и в фокусе */
.form-group input.field-error:focus { border-color: var(--error); box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15); }

.form-hint { font-size: 13px; color: var(--text-mid); }
.form-error {
  display: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--error);
}
.form-error.show { display: block; }
/* Когда видна ошибка, подсказку прячем */
.form-error.show + .form-hint,
.form-group:has(.form-error.show) .form-hint { display: none; }

.form-section-title {
  grid-column: 1 / -1;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 16px;
  padding-top: 24px;
  font-size: 22px;
  border-top: 1px solid var(--line);
  width: 100%;
  margin-bottom: 14px;
}
.form-group > legend.field-label { margin-bottom: 8px; }

/* ── Кастомный выпадающий список ────────────────────────── */
.custom-dropdown { position: relative; }

.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  font-size: 16px;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(34, 38, 42, 0.28);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.custom-dropdown-trigger .placeholder { color: var(--text-mid); }
.custom-dropdown-trigger svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
}
.custom-dropdown.open .custom-dropdown-trigger {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(31, 59, 45, 0.18);
}
.custom-dropdown.open .custom-dropdown-trigger svg { transform: rotate(180deg); }
.custom-dropdown.field-error .custom-dropdown-trigger { border-color: var(--error); }
.custom-dropdown.field-ok .custom-dropdown-trigger { border-color: var(--success); }

.custom-dropdown-options {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  z-index: 50;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(22, 42, 32, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.custom-dropdown.open .custom-dropdown-options { opacity: 1; visibility: visible; transform: none; }

.custom-dropdown-option {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s;
}
.custom-dropdown-option small { color: var(--text-mid); font-variant-numeric: tabular-nums; white-space: nowrap; }
.custom-dropdown-option:hover,
.custom-dropdown-option.focused { background: var(--sand); }
.custom-dropdown-option.selected { font-weight: 600; color: var(--pine); }
.custom-dropdown-option.selected::after { content: '✓'; margin-left: auto; color: var(--orange-text); }
.custom-dropdown-option.selected small { display: none; }

/* ── Чекбоксы и радио-плитки ────────────────────────────── */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice-grid-3 { grid-template-columns: repeat(3, 1fr); }

.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(34, 38, 42, 0.22);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.choice:hover { border-color: var(--pine); }
.choice input {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 1px;
  accent-color: var(--pine);
  cursor: pointer;
}
.choice-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.choice-text strong { font-weight: 600; }
.choice-text small { font-size: 13px; color: var(--text-mid); font-variant-numeric: tabular-nums; }
.choice:has(input:checked) { border-color: var(--pine); background: rgba(31, 59, 45, 0.06); }
.choice:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Аксессуар уже входит в выбранную модель */
.choice.included { cursor: default; background: var(--sand); border-style: dashed; }
.choice.included small { color: var(--success); font-weight: 600; }

/* Слоты времени тест-райда */
.slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span {
  display: grid;
  place-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: 1px solid rgba(34, 38, 42, 0.22);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.slot span:hover { border-color: var(--pine); }
.slot input:checked + span { background: var(--pine); border-color: var(--pine); color: var(--sand-light); }
.slot input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.slots.field-error .slot span { border-color: var(--error); }

/* Согласие на обработку данных */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-mid);
  cursor: pointer;
}
.consent input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; accent-color: var(--pine); }
.consent.field-error { color: var(--error); }

.form-submit {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.form-submit .btn { min-width: 240px; }
.form-submit p { font-size: 13px; color: var(--text-mid); }

/* Спиннер на кнопке во время «отправки» */
.btn.loading { pointer-events: none; opacity: 0.8; }
.btn.loading::before {
  content: '';
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Сообщение об успешной отправке */
.form-success {
  display: none;
  padding: 24px 0 8px;
  text-align: center;
}
.form-success.show { display: block; animation: fadeIn 0.4s var(--ease-out); }
.success-icon {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  color: var(--sand-light);
  background: var(--success);
  border-radius: 50%;
}
.success-icon svg { width: 36px; height: 36px; }
.form-success h3 { font-size: 36px; margin-bottom: 12px; }
.form-success p { max-width: 460px; margin: 0 auto 28px; color: var(--text-mid); }

/* ── Блок «Итого» ───────────────────────────────────────── */
.summary {
  position: sticky;
  top: calc(var(--hh) + 24px);
  padding: 32px;
  background: var(--pine);
  color: var(--sand-light);
  border-radius: var(--radius);
}
.summary h3 { font-size: 30px; margin-bottom: 20px; }
.summary-lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--line-light);
}
.summary-lines li span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.summary-lines .muted { color: rgba(245, 239, 227, 0.6); }
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 20px;
}
.summary-total span { font-size: 15px; color: rgba(245, 239, 227, 0.8); }
.summary-total .price { font-size: 40px; color: var(--orange); }
.summary-note {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(245, 239, 227, 0.7);
}
.summary-note + .summary-note { margin-top: 8px; }

/* Мягкая подсветка суммы при пересчёте */
.summary-total .price.bump { animation: bump 0.3s var(--ease-out); }
@keyframes bump { 50% { transform: scale(1.06); } }

/* ── О компании ─────────────────────────────────────────── */
.founder {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 72px;
  align-items: center;
}
/* Вертикальное фото 3:4 — не растягиваем */
.founder-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}
.founder blockquote {
  position: relative;
  margin: 24px 0 28px;
  padding-left: 32px;
  font-size: 22px;
  line-height: 1.5;
  border-left: 3px solid var(--orange);
}
.founder-name { font-family: var(--font-head); font-size: 28px; font-weight: 700; text-transform: uppercase; }
.founder-role { color: var(--text-mid); }

/* Хронология в истории */
.timeline { margin-top: 28px; }
.timeline li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.timeline b {
  font-family: var(--font-head);
  font-size: 24px;
  color: var(--orange-text);
}
.timeline span { color: var(--text-mid); }

/* Этапы производства */
.process {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  counter-reset: proc;
}
.process li {
  counter-increment: proc;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line-light);
}
.process li::before {
  content: counter(proc, decimal-leading-zero);
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--orange);
}
.process strong { display: block; font-weight: 600; margin-bottom: 2px; }
.process span { font-size: 14px; color: rgba(245, 239, 227, 0.75); }

/* ── Контакты и карта-заглушка ──────────────────────────── */
.contacts-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: stretch;
}

.map {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* Сетка «кварталов» из CSS-градиентов */
  background-color: #DCD0B6;
  background-image:
    linear-gradient(rgba(34, 38, 42, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 38, 42, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
}
.map svg.map-roads { position: absolute; inset: 0; width: 100%; height: 100%; }

.map-pin {
  position: absolute;
  left: 56%; top: 46%;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.map-pin svg { width: 44px; height: 56px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25)); }
.map-pin-label {
  margin-bottom: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--pine);
  color: var(--sand-light);
  border-radius: var(--radius);
}
.map-caption {
  position: absolute;
  left: 16px; bottom: 16px;
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(245, 239, 227, 0.9);
  border-radius: 2px;
  color: var(--text-mid);
}

.contact-card {
  padding: 40px;
  background: var(--sand-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-card h3 { font-size: 32px; margin-bottom: 8px; }
.contact-card .info-list { margin-bottom: 28px; }
.contact-card a:not(.btn) { font-weight: 600; }
.contact-card a:not(.btn):hover { color: var(--orange-text); }

/* ── Подвал ─────────────────────────────────────────────── */
.site-footer {
  padding: 80px 0 32px;
  background: var(--pine-dark);
  color: rgba(245, 239, 227, 0.78);
  font-size: 15px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 2fr 1.2fr;
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-light);
}

/* На тёмном фоне логотип стоит на светлой плашке */
.footer-logo {
  display: inline-block;
  padding: 12px 18px;
  background: var(--sand-light);
  border-radius: var(--radius);
}
.footer-logo img {
  width: 190px;
  height: 48px;
  object-fit: cover;
  object-position: 50% 49%;
}
.footer-slogan {
  margin: 20px 0 0;
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--sand-light);
}

.footer-title {
  margin-bottom: 18px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
}

/* Карта сайта: 4 страницы и их разделы */
.sitemap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.sitemap > li > a {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--sand-light);
}
.sitemap ul li { margin-bottom: 6px; font-size: 14px; }
.site-footer a { transition: color var(--t-fast); }
.site-footer a:hover { color: var(--orange); }

.footer-contacts li { margin-bottom: 10px; }
.footer-contacts a { color: var(--sand-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  font-size: 13px;
  color: rgba(245, 239, 227, 0.55);
}

/* ── Кнопка «Наверх» ────────────────────────────────────── */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  background: var(--orange);
  color: var(--graphite);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(22, 42, 32, 0.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s, background var(--t-fast);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--orange-hover); }
.to-top svg { width: 24px; height: 24px; }

/* ── Анимации при прокрутке ─────────────────────────────── */
[data-animate] {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-animate="fade-up"] { transform: translateY(32px); }
[data-animate].visible { opacity: 1; transform: none; }

[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }

/* Пользователь попросил меньше движения — выключаем анимации */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-animate], .hero-content > * { opacity: 1; transform: none; }
}

/* ── Адаптивность: планшет ──────────────────────────────── */
@media (max-width: 1100px) {
  .container, .header-inner { padding: 0 28px; }
  .header-inner { gap: 24px; }
  .site-nav { gap: 22px; }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .order-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .founder { grid-template-columns: 320px 1fr; gap: 48px; }
}

/* ── Адаптивность: мобильные (брейкпоинт 768px) ─────────── */
@media (max-width: 768px) {
  :root { --hh: 64px; }

  .container, .header-inner { padding: 0 20px; }
  section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .section-lead { font-size: 16px; }

  /* Шапка: меню прячется в оверлей */
  .site-nav { display: none; }
  .hamburger { display: flex; }
  .logo img { width: 170px; height: 44px; margin-left: -7px; }

  /* Hero */
  .hero { align-items: flex-end; padding-bottom: 120px; }
  .hero-bg { background-position: 72% 60%; }
  .hero::after {
    background: linear-gradient(0deg, rgba(22, 42, 32, 0.92) 0%, rgba(22, 42, 32, 0.8) 60%, rgba(22, 42, 32, 0.35) 100%);
  }
  .hero-sub { font-size: 17px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-specs ul { gap: 4px 20px; font-size: 14px; padding: 14px 0; }

  .page-hero { padding: calc(var(--hh) + 56px) 0 48px; }
  .page-hero p { font-size: 16px; }

  /* Все сетки — в одну колонку */
  .split, .cards, .cards-4, .founder, .contacts-layout,
  .form-grid, .choice-grid, .choice-grid-3, .process, .footer-top, .sitemap {
    grid-template-columns: 1fr;
  }
  .split { gap: 32px; }
  .split-reverse .split-media { order: 0; }

  .features { grid-template-columns: 1fr; border-bottom: none; }
  .feature { padding: 32px 0; }
  .feature + .feature { padding-left: 0; border-left: none; border-top: 1px solid var(--line); }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 32px 0; }
  .stat { padding: 0 16px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: none; }

  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step { display: grid; grid-template-columns: 56px 1fr; gap: 0 20px; padding: 0; }
  .step-num { grid-row: span 2; margin-bottom: 0; }
  .step:not(:last-child)::after {
    top: 64px; bottom: -28px; left: 27px; right: auto;
    border-top: none; border-left: 2px dashed rgba(245, 239, 227, 0.35);
  }

  .filter { display: flex; width: 100%; }
  .filter-btn { flex: 1; padding: 8px 10px; font-size: 16px; }

  .table-hint { display: block; }
  .group-title { flex-direction: column; gap: 6px; font-size: 28px; }
  /* Первая колонка таблицы остаётся на месте при прокрутке вбок */
  .compare-table tbody th,
  .compare-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 130px;
    min-width: 130px;
  }
  .compare-table tbody th { background: var(--sand-light); box-shadow: 1px 0 0 var(--line); }
  .compare-table thead th:first-child { background: var(--pine); }
  .promo { padding: 28px 24px; }
  .promo .btn { width: 100%; }

  .form-card { padding: 24px 20px; }
  .mode-btn { font-size: 14px; letter-spacing: 0.02em; padding: 0 4px; white-space: nowrap; }
  .slots { grid-template-columns: repeat(3, 1fr); }
  .form-submit .btn { width: 100%; min-width: 0; }
  .summary { padding: 28px 24px; }

  .founder-photo { max-width: 340px; }
  .founder blockquote { font-size: 19px; padding-left: 20px; }

  .map { min-height: 320px; }
  .contact-card { padding: 28px 24px; }

  .sitemap { grid-template-columns: 1fr 1fr; }
  .footer-top { gap: 40px; }

  .to-top { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}

/* Узкие телефоны: кнопка «Заказать» уходит в мобильное меню */
@media (max-width: 480px) {
  .header-actions .btn { display: none; }
  .map-pin-label { white-space: normal; text-align: center; max-width: 200px; }
}

/* Текст только для скринридеров (визуально скрыт) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Контакты: убегающие значки ─────────────────────────── */
.contacts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.contacts-head { margin-bottom: 0; }
.contacts-hint { margin-top: 16px; font-size: 15px; color: var(--text-mid); }
.socials { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 64px; min-height: 260px; overflow: hidden; touch-action: manipulation; }
.socials.is-live .social { position: absolute; left: 0; top: 0; margin: 0; will-change: transform; }
.social { display: block; padding: 0; line-height: 0; background: none; border: 0; border-radius: 25%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.social svg { width: 60px; height: 60px; display: block; border-radius: 25%; }
.social:focus-visible { outline: 2px solid var(--graphite); outline-offset: 4px; }
.social .tile { fill: var(--pine); transition: fill .2s var(--ease); }
.social .glyph { fill: var(--sand-light); }
#social-max:hover .tile, #social-max:focus-visible .tile { fill: var(--orange); }
@media (max-width: 768px) {
  .contacts { grid-template-columns: 1fr; gap: 8px; }
  .socials { min-height: 220px; gap: 40px; }
  .social svg { width: 54px; height: 54px; }
}
.demo-note { display: block; margin-top: 8px; font-size: 13px; opacity: .75; }
