/*
  Стили сайта «Контур». Разделы:
   1. Цвета и основа
   2. Заголовки, кнопки, фокус
   3. Навигация и подвал
   4. Фон сайта и панели
   5. Первый экран
   6. Блок с цифрами
   7. Каталог
   8. Мастерская
   9. Как мы работаем
  10. Отзывы
  11. Калькулятор
  12. Контакты и формы
  13. Страница машины
  14. Появление при прокрутке и отключённая анимация
  15. Телефон (до 560 px)
*/


/* ---------- 1. Цвета и основа ---------- */

:root {
  --tx: #1D1D1F;       /* основной текст */
  --mu: #3E4046;       /* второстепенный текст */
  --ac: #1F5FCC;       /* синий акцент: ссылки, цены, кнопки */
  --cta: #F28A2A;      /* оранжевые главные кнопки */
  --cta-h: #F79C45;    /* они же при наведении */
  --on-cta: #10243F;   /* текст на оранжевых кнопках */
  --card: #EFF4FC;     /* светло-голубые блоки */
  --ln: #D8DEE8;       /* линии и рамки */
  --deep: #143578;     /* тёмно-синий: цены в каталоге */
  --gold: #F7B55C;     /* подсветка на синем */
  --blue-panel: linear-gradient(135deg, #2260C4, #1A4698); /* синие блоки */

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  background: #2F4FA3;
  scroll-behavior: auto; /* плавную прокрутку делает js/site.js */
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px);
}

body {
  margin: 0;
  background: transparent;
  color: var(--tx);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.mu { color: var(--mu); }


/* ---------- 2. Заголовки, кнопки, фокус ---------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.08;
  text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 4.4vw, 2.75rem); }

.btn {
  display: inline-block;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ac);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: #1A52B2; transform: translateY(-2px); }

/* Прозрачная кнопка с рамкой */
.ghost { background: transparent; color: var(--ac); box-shadow: inset 0 0 0 1.5px var(--ac); }
.ghost:hover { background: rgba(31, 95, 204, .1); }
.ghostw { background: transparent; box-shadow: inset 0 0 0 1.5px #fff; }
.ghostw:hover { background: rgba(255, 255, 255, .18); }

/* Главные действия сайта: оранжевые кнопки */
#cta, #fgo, .pd .btn, .hero .btn:not(.ghost) {
  background: var(--cta);
  color: var(--on-cta);
  font-weight: 700;
}
#cta:hover, #fgo:hover, .pd .btn:hover, .hero .btn:not(.ghost):hover { background: var(--cta-h); }

/* Обводка при переходе клавишей Tab */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--ac);
  outline-offset: 3px;
}
.hero a:focus-visible, .dark a:focus-visible { outline-color: #fff; }
.dark .fm a:focus-visible, .dark .fm button:focus-visible,
.dark .fm input:focus-visible, .dark .fm select:focus-visible { outline-color: var(--ac); }
.pv section:last-child a:focus-visible { outline-color: #fff; }
[tabindex="-1"]:focus { outline: none; }


/* ---------- 3. Навигация и подвал ---------- */

.nav, body::before {
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
/* Полоса под вырезом экрана на телефонах */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: env(safe-area-inset-top, 0px);
}
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.nav .wrap { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.nav a { color: var(--tx); font-size: .95rem; text-decoration: none; }
.nav a.lk:hover { color: var(--ac); }
.logo { padding-bottom: 1px; border-bottom: 2px dashed var(--cta); font-weight: 700; }
.lks { display: flex; gap: 24px; align-items: center; }
.lks > a:last-child { color: var(--ac); font-weight: 700; }

footer {
  padding: 28px 0 44px;
  background: rgba(10, 26, 74, .6);
  color: #fff;
  font-size: .9rem;
}


/* ---------- 4. Фон сайта и панели ---------- */

/* Запасной фон: поверх него js/mesh-bg.js рисует живой градиент */
.bgfx {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(45deg, #2F4FA3, #4F7BE0, #7FB5FA);
  will-change: transform;
}

section.s { padding: 28px 0; }

.panel {
  padding: 40px;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(30, 50, 90, .08);
}
.panel.sand { background: #FDF4E4; }
.panel.mint { background: #E8F7F0; }
.panel.dark { background: linear-gradient(135deg, #1B4596, #143578); color: #fff; }
.panel.ocean { background: var(--blue-panel); }
.dark h2 { color: #fff; }


/* ---------- 5. Первый экран ---------- */

.hero {
  position: relative;
  display: flex;
  min-height: min(86vh, 800px);
  overflow: hidden;
  background: #CFCFD6;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 140px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 140px), transparent);
}

/* Сменяющиеся фото */
.bgs, .bg { position: absolute; inset: 0; }
.bg {
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: saturate(1.05);
  animation: hero-fade 12s infinite backwards;
  animation-delay: -1s;
}
.bg:nth-child(2) { animation-delay: 5s; }
@keyframes hero-fade {
  0% { opacity: 0; }
  8% { opacity: 1; }
  50% { opacity: 1; }
  58%, 100% { opacity: 0; }
}

/* Затемнение слева, чтобы читался текст */
.bgs::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 44, 110, .92) 0, rgba(16, 44, 110, .84) 48%, rgba(16, 44, 110, .42) 68%, rgba(16, 44, 110, 0) 88%);
}
@media (max-width: 1099px) {
  .bgs::after { background: linear-gradient(90deg, rgba(16, 44, 110, .92) 0, rgba(16, 44, 110, .86) 56%, rgba(16, 44, 110, .4) 72%, rgba(16, 44, 110, 0) 94%); }
}
@media (max-width: 760px) {
  .bgs::after { background: rgba(16, 44, 110, .8); }
}

.hin {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 28px;
  width: 100%;
  padding: 40px 22px 140px;
}
.hc { max-width: 680px; color: #fff; }
.hc h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hc .sub { max-width: 580px; margin: 14px 0 24px; color: #E6EEFF; font-size: 1.15rem; }
.acts { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .ghost { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.hero .ghost:hover { background: rgba(255, 255, 255, .22); }

/* Четыре карточки услуг */
.g4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.g4 > div {
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 50, 90, .12);
}
.g4 b { display: block; margin-bottom: 2px; color: var(--ac); }
.g4 span { color: var(--mu); font-size: .93rem; }

/* Основное содержимое наезжает на низ первого экрана */
#home > main { position: relative; z-index: 2; margin-top: -70px; }


/* ---------- 6. Блок с цифрами ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 26px; }
.stats b {
  display: block;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
}
.stats i { color: var(--gold); font-style: normal; }
.stats span { color: #CFE3F6; font-size: .95rem; }
.stats b span { color: #fff; font-size: inherit; }
@media (min-width: 900px) {
  .stats > div + div { padding-left: 26px; border-left: 1px solid rgba(255, 255, 255, .2); }
}


/* ---------- 7. Каталог ---------- */

.hd2 { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 12px; }

/* Кнопки карусели */
.arr { display: flex; gap: 10px; }
.ar {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--ac);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}
.ar:hover { background: #E1E8F3; }

/* Лента карточек: на узком экране карусель, от 900 px сетка в три колонки */
.shelf {
  display: flex;
  gap: 20px;
  margin: 0 -40px;
  padding: 14px 40px 34px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }

/* Карточка машины. --s задаёт масштаб в карусели из js/site.js */
.pc {
  display: flex;
  flex-direction: column;
  flex: 0 0 min(360px, 82%);
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(30, 50, 90, .08);
  color: inherit;
  text-decoration: none;
  scroll-snap-align: center;
  transform: scale(var(--s, 1));
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s, opacity .4s;
}
.pc:hover { transform: translateY(-8px) scale(var(--s, 1)); box-shadow: 0 16px 34px rgba(30, 50, 90, .14); }
.pc h3 { margin: 20px 22px 8px; font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.sp2 { margin: 0 22px 16px; color: var(--mu); font-size: .93rem; }
.pp { margin: auto 22px 8px; color: var(--deep); font-size: 1.5rem; font-weight: 700; }
.more { margin: 0 22px 22px; color: var(--ac); font-weight: 600; }

/* Квадратное фото машины: в каталоге и на странице машины */
.ph { overflow: hidden; aspect-ratio: 1 / 1; background: #fff; }
.ph img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }

/* Плитка «Не нашли нужное?»: занимает пустую ячейку сетки */
.pc-cta { display: none; }

@media (min-width: 900px) {
  .arr { display: none; }
  .shelf {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 18px 0 30px;
    overflow: visible;
    scroll-snap-type: none;
  }
  .pc h3 { font-size: 1.05rem; }

  .pc.pc-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 28px;
    background: var(--blue-panel);
    color: #fff;
  }
  .pc-cta h3 { margin: 0; font-size: 1.4rem; line-height: 1.25; }
  .pc-cta p { margin: 0; color: #E6EEFF; }
  .pc-cta span { color: var(--gold); font-weight: 700; }
}

/* Строка с брендами */
.brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 30px;
  padding-top: 22px;
  border-top: 1px solid var(--ln);
  color: var(--mu);
  font-weight: 700;
  letter-spacing: .06em;
}
.brands small { margin-right: 6px; font-size: .95rem; font-weight: 500; letter-spacing: 0; }


/* ---------- 8. Мастерская ---------- */

.wk { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.wph img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; }
.wtx h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.wtx .mu { margin: 14px 0 0; }

/* Список с галочками */
.ck { display: grid; gap: 10px; margin: 22px 0 28px; padding: 0; list-style: none; }
.ck li { position: relative; padding-left: 30px; font-weight: 600; }
.ck li::before { content: "✓"; position: absolute; left: 0; color: var(--ac); font-weight: 700; }

@media (max-width: 820px) {
  .wk { grid-template-columns: minmax(0, 1fr); }
}


/* ---------- 9. Как мы работаем ---------- */

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: st;
}
@media (min-width: 560px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Цвет каждого шага */
.steps li:nth-child(1) { --c: #1F5FCC; }
.steps li:nth-child(2) { --c: #17806A; }
.steps li:nth-child(3) { --c: #A5560F; }
.steps li:nth-child(4) { --c: #BC3450; }

.steps li {
  position: relative;
  padding-top: 18px;
  border-top: 3px solid var(--c, var(--ln));
  counter-increment: st;
}
/* Номер шага: 01, 02, 03, 04 */
.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute;
  top: 18px;
  right: 0;
  color: var(--c, var(--ac));
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}
.ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--c, var(--ac));
  color: #fff;
}
.steps h3 { margin-bottom: 6px; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--mu); }
/* В этой ширине заголовки бывают в две строки: выравниваем их по высоте */
@media (min-width: 900px) and (max-width: 1099px) {
  .steps h3 { min-height: 2.3em; }
}


/* ---------- 10. Отзывы ---------- */

.rvw { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 28px; }
.rvw > * { min-width: 0; }
.rvw blockquote { margin: 0; padding: 26px; border-radius: 24px; background: #fff; }
.rvw p { margin: 0 0 18px; }

/* Большой отзыв слева */
.rvw .big {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  grid-row: span 2;
  padding: 34px;
  background: linear-gradient(160deg, #fff, #D5F0E5);
}
.rvw .big p { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.rvw .big cite { margin-top: auto; padding-top: 18px; }

.stars { margin-bottom: 12px; color: #EB9F1E; font-size: 1.1rem; letter-spacing: 3px; }
.rvw cite { display: flex; align-items: center; gap: 12px; color: var(--mu); font-size: .93rem; font-style: normal; }
.rvw cite b { display: block; color: var(--tx); }

/* Кружок с инициалами */
.av {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ac);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
}
.rvw blockquote:nth-child(1) .av { background: #1F5FCC; }
.rvw blockquote:nth-child(2) .av { background: #17806A; }
.rvw blockquote:nth-child(3) .av { background: #BC3450; }

@media (max-width: 760px) {
  .rvw { grid-template-columns: minmax(0, 1fr); }
  .rvw .big { grid-row: auto; }
}


/* ---------- 11. Калькулятор ---------- */

.calc {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 36px;
  margin-top: 28px;
  padding: 32px;
  border-radius: 26px;
  background: var(--card);
}
.calc > *, .cc, .cr { min-width: 0; }
.cc, .cr { display: grid; gap: 20px; align-content: start; }
.calc .mu { margin: 0; font-size: .92rem; }
.n { color: var(--ac); font-size: 3rem; font-weight: 700; line-height: 1; }

.tw { overflow-x: auto; }
table { width: 100%; min-width: 420px; border-collapse: collapse; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--ln); text-align: left; }
td:last-child, th:last-child { text-align: right; }
.unit { display: block; color: var(--mu); font-size: .85rem; font-weight: 400; } /* цена за штуку под названием */

/* Итоговая сумма */
.tot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.tot b { font-size: 1.9rem; }
.cr .tot { padding: 18px 22px; border-radius: 18px; background: var(--blue-panel); color: #fff; }

@media (max-width: 820px) {
  .calc { grid-template-columns: minmax(0, 1fr); padding: 24px; }
}


/* ---------- 12. Контакты и формы ---------- */

.ct { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 28px; }
.ct > * { min-width: 0; }

/* Левая колонка: телефон, адрес, часы */
.ci p { margin: 0 0 16px; }
.ci b { display: block; color: #fff; font-size: .9rem; font-weight: 500; }
.ci a { color: #fff; font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.ci .ph2 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; }
.acts2 { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 26px; }
.ci .btn { color: #fff; font-size: 1rem; }
.ci .btn:not(.ghostw) { background: #fff; color: var(--deep); }
.ci .btn:not(.ghostw):hover { background: #EAF3FD; }

/* Форма заявки */
.fm {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 26px;
  border-radius: 24px;
  background: var(--card);
  color: var(--tx);
}

/* Подписи и поля: общие для формы и калькулятора */
label { display: grid; gap: 8px; font-weight: 600; }
input, select { min-width: 0; max-width: 100%; }
input[type=text], input[type=tel], select {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #8A93A6;
  border-radius: 12px;
  background: #fff;
  color: var(--tx);
  font: inherit;
}
input[type=range] { width: 100%; height: 28px; accent-color: var(--ac); cursor: pointer; }

/* Ошибки в полях */
.err { color: #C62828; font-size: .88rem; font-weight: 500; }
input[aria-invalid=true] { border-color: #C62828; box-shadow: 0 0 0 1px #C62828; }

@media (max-width: 760px) {
  .ct { grid-template-columns: minmax(0, 1fr); }
}


/* ---------- 13. Страница машины ---------- */

.vw { padding-top: 28px; padding-bottom: 28px; }
.back { display: inline-block; margin: 0 0 18px; color: var(--ac); font-weight: 500; text-decoration: none; }
.pv h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); overflow-wrap: anywhere; }
.pc h3 { overflow-wrap: anywhere; }

/* Разделы с пунктирной линией под заголовком */
.pv section { padding: 44px 0 8px; }
.pv h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 18px; }
.pv section h2 { display: inline-block; padding-bottom: 6px; border-bottom: 2px dashed var(--cta); }
.lead { max-width: 72ch; margin: 0; color: var(--mu); }

/* Верх страницы: фото и краткие данные */
.pd {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 36px;
  align-items: center;
}
.pv .ph { border-radius: 26px; }
.pv .pp { margin: 14px 0; color: var(--ac); font-size: 1.8rem; }

/* Галерея под главным фото */
.media { min-width: 0; }
.thumb-main, .thumb { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.thumb {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--ln);
  transition: box-shadow .2s;
}
.thumb:hover { box-shadow: inset 0 0 0 2px var(--ac); }
.thumb img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }

/* Просмотр фото на весь экран */
.viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(10, 20, 45, .94);
  color: #fff;
}
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer::backdrop { background: rgba(10, 20, 45, .94); }
.viewer figure { display: grid; justify-items: center; gap: 12px; min-width: 0; margin: 0; padding: 16px 72px; }
.viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 110px); border-radius: 12px; background: #fff; }
.viewer figcaption { font-size: .95rem; text-align: center; }
.viewer button {
  position: absolute;
  z-index: 1;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.viewer button:hover { background: rgba(255, 255, 255, .3); }
.viewer button:focus-visible { outline-color: #fff; }
.viewer-close { top: 14px; right: 14px; }
.viewer-prev { top: 50%; left: 12px; transform: translateY(-50%); }
.viewer-next { top: 50%; right: 12px; transform: translateY(-50%); }

/* Краткие характеристики с точками */
.ss { margin: 0 0 10px; font-size: .95rem; }
.ss > div { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; }
.ss dt { display: flex; flex: 1 1 auto; gap: 8px; min-width: 0; }
.ss dt::after {
  content: "";
  flex: 1 1 16px;
  min-width: 16px;
  border-bottom: 1px dotted #8A93A6;
  transform: translateY(-4px);
}
.ss dd { flex: 0 1 auto; max-width: 58%; text-align: right; }
.allspec { display: inline-block; margin: 0 0 22px; color: var(--ac); font-weight: 600; text-decoration: none; }
.allspec:hover { text-decoration: underline; }

/* Полная таблица характеристик */
dl { margin: 0; }
dt { flex: 0 0 40%; color: var(--mu); }
dd { flex: 1; margin: 0; font-weight: 600; }
.spec { padding: 6px 22px; border-radius: 20px; background: #EBF1FC; }
.r { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--ln); }
.r:last-child { border-bottom: 0; }
@media (max-width: 520px) {
  .r { flex-direction: column; gap: 2px; }
}

/* Цветные карточки особенностей: четыре цвета по кругу */
.pv .g { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.pv .g2 { grid-template-columns: repeat(2, 1fr); }
.pv .g3 { grid-template-columns: repeat(3, 1fr); }
.pv .g > div { padding: 22px; border-radius: 20px; background: var(--t); }
.pv .g > div:nth-child(4n+1) { --t: #E5EDFC; --c: #1F5FCC; }
.pv .g > div:nth-child(4n+2) { --t: #E4F6EF; --c: #127560; }
.pv .g > div:nth-child(4n+3) { --t: #FDF1DE; --c: #A5560F; }
.pv .g > div:nth-child(4n+4) { --t: #FCE8EC; --c: #BC3450; }
.pv .g h3 { margin-bottom: 6px; color: var(--c); font-size: 1.1rem; }
.pv .g p { margin: 0; color: var(--mu); }
@media (max-width: 760px) {
  .pv .g2, .pv .g3 { grid-template-columns: minmax(0, 1fr); }
}

/* Синий блок «Другие машины» в конце страницы */
.pv section:last-child { margin-top: 44px; padding: 28px; border-radius: 26px; background: var(--blue-panel); }
.pv section:last-child h2 { color: #fff; border-bottom-color: var(--gold); }
.oth { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.oth a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform .3s, box-shadow .3s;
}
.oth a:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }
.oth img { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 14px; background: #fff; object-fit: contain; }
.oth b {
  display: -webkit-box;
  overflow: hidden;
  font-size: .95rem;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.oth span { color: var(--ac); font-weight: 600; }
@media (min-width: 700px) {
  .oth { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- 14. Появление при прокрутке и отключённая анимация ---------- */

.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s, transform .7s; }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .bg { animation: none; }
  .bg:first-child { opacity: 1; }
  .rv { opacity: 1; transform: none; transition: none; }
  .pc { transition: none; }
}


/* ---------- 15. Телефон (до 560 px) ---------- */

@media (max-width: 560px) {
  /* Навигация и панели */
  .lk { display: none; }
  .panel { padding: 24px; border-radius: 26px; }

  /* Короткий первый экран */
  .hero {
    min-height: 0;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 70px), transparent);
    mask-image: linear-gradient(#000 calc(100% - 70px), transparent);
  }
  .hin { gap: 20px; padding: 24px 22px 84px; }
  #home > main { margin-top: -36px; }
  .hc h1 { font-size: 1.85rem; }
  .hc .sub { margin: 10px 0 18px; font-size: 1rem; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g4 > div { padding: 12px 14px; }
  .g4 b { margin: 0; font-size: .95rem; }
  .g4 span { display: none; }

  /* Карусель каталога */
  .shelf { margin: 0 -24px; padding: 14px 24px 34px; }

  /* Таблица расчёта: каждая машина в две строки */
  .calc, .fm { padding: 20px; }
  table { min-width: 0; }
  thead { display: none; }
  tbody tr {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ln);
  }
  th, td { padding: 0; border: 0; font-size: .95rem; }
  td:first-child { grid-column: 1 / -1; font-weight: 600; }
  td:nth-child(2)::after { content: " шт."; }
  td:last-child { white-space: nowrap; }
  .tot b { font-size: 1.5rem; white-space: nowrap; }

  /* Страница машины */
  .viewer figure { padding: 70px 10px 76px; }
  .viewer img { max-height: calc(100dvh - 190px); }
  .viewer-prev, .viewer-next { top: auto; bottom: 14px; transform: none; }
  .viewer-prev { left: calc(50% - 60px); }
  .viewer-next { right: calc(50% - 60px); }
  .spec { padding: 4px 16px; }
  .pv section:last-child { margin-top: 32px; padding: 20px 16px; }
}
