/* ==========================================================================
   ЭкскаваторМСК — стиль «Индастриал»
   Тёмный графит + сигнальный жёлтый. Russo One / PT Sans.
   ========================================================================== */

:root {
  --bg: #161616;
  --bg-2: #1a1a1a;
  --bg-3: #1f1f1f;
  --line: #2e2e2e;
  --line-2: #3a3a3a;
  --text: #f2f2f0;
  --text-2: #c9c9c4;
  --muted: #9a9a95;
  --yellow: #ffc400;
  --yellow-2: #ffd84d;
  --ink: #161616;
  --red: #ff5a36;
  --green: #45d483;

  --display: 'Russo One', Impact, 'Arial Black', sans-serif;
  --body: 'PT Sans', Arial, sans-serif;

  --wrap: 1180px;
  --gutter: 20px;
  --cut: 10px;

  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 768px) { :root { --gutter: 32px; } }

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* scroll-padding: якорь или элемент в фокусе не уходит под липкую шапку и под нижнюю панель.
   scrollbar-gutter: место под полосу прокрутки остаётся и при открытом квизе или фото — страница не дёргается вбок */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 92px; scrollbar-gutter: stable; }
@media (max-width: 899px) { html { scroll-padding-bottom: 84px; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--body);
  overflow-x: hidden;
}
body.has-bar { padding-bottom: 72px; }
@media (min-width: 900px) { body.has-bar { padding-bottom: 0; } }

img, svg { display: block; max-width: 100%; }
a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--yellow-2); }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 12px 18px; background: var(--yellow); color: var(--ink); font-weight: 700; transition: top .2s; }
.skip:focus { top: 12px; color: var(--ink); }
ol, dl, dd, figure { margin: 0; padding: 0; }
ol { list-style: none; }
/* При выключенном JavaScript квиз не открыть — кнопки, которые его вызывают, не показываем */
@media (scripting: none) { [data-quiz-open] { display: none !important; } }

/* --------------------------------------------------------------------------
   Типографика
   -------------------------------------------------------------------------- */
.h1, .h2, .h3 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }
.h1 { font-size: clamp(30px, 5.4vw, 60px); overflow-wrap: break-word; }
/* Первый экран в две колонки, пока колонка текста узкая: заголовок мельче, чтобы длинное слово
   («строительного», «экскаватором-») не вылезало из колонки к фото */
@media (min-width: 980px) and (max-width: 1199px) { .hero__copy .h1 { font-size: 4.6vw; } }
/* 56 вместо 60: предлог не остаётся висеть в конце строки («Экскаватор с / машинистом») */
@media (min-width: 1200px) { .hero__copy .h1 { font-size: 56px; } }
.h2 { font-size: clamp(28px, 4vw, 42px); }
.h3 { font-size: clamp(19px, 2vw, 22px); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--yellow); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 28px; height: 3px; background: var(--yellow); }
.accent { color: var(--yellow); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  background: var(--yellow); color: var(--ink);
  font-family: var(--display); text-transform: uppercase; font-size: 15px; letter-spacing: .03em;
  border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--yellow-2); color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--sm { min-height: 46px; padding: 0 20px; font-size: 13px; }
.btn--lg { min-height: 64px; padding: 0 36px; font-size: 17px; }
.btn--block { width: 100%; }
.btn--ghost {
  background: transparent; color: var(--yellow);
  box-shadow: inset 0 0 0 2px var(--yellow); clip-path: none;
}
.btn--ghost:hover { background: rgba(255, 196, 0, .08); color: var(--yellow-2); }
.btn--dark { background: var(--ink); color: var(--text); }
.btn--dark:hover { background: #000; color: var(--text); }
.btn svg { width: 20px; height: 20px; flex: none; }
/* Фокус с клавиатуры: срезанные углы (clip-path) обрезают наружную обводку, поэтому рисуем её внутри кнопки */
.btn:not(.btn--ghost):focus-visible, .header__call:focus-visible, .lightbox__btn:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }
.btn.btn--dark:focus-visible { outline-color: var(--yellow); }

/* --------------------------------------------------------------------------
   Полоса-штриховка
   -------------------------------------------------------------------------- */
.stripe { height: 12px; background: repeating-linear-gradient(135deg, var(--yellow) 0 22px, var(--bg) 22px 44px); }

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 22, 22, .97);
  border-bottom: 1px solid var(--line);
}
/* Размытие под шапкой — только для мыши: на телефоне оно почти не видно, а перерисовывается на каждом кадре прокрутки */
@media (hover: hover) and (pointer: fine) { .header { background: rgba(22, 22, 22, .92); backdrop-filter: blur(10px); } }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
@media (min-width: 900px) { .header__in { min-height: 80px; } }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 18px; text-transform: uppercase; white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo__mark { display: inline-block; width: 12px; height: 26px; background: var(--yellow); transform: skewX(-14deg); }
.logo b { color: var(--yellow); font-weight: 400; }
@media (min-width: 900px) { .logo { font-size: 22px; } }

.nav { display: none; gap: 26px; font-size: 16px; }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--text); }
.nav a { white-space: nowrap; }
@media (min-width: 1280px) { .nav { display: flex; } }

.header__right { display: flex; align-items: center; gap: 14px; }
.header__phone { display: none; font-family: var(--display); font-size: 19px; color: var(--text); white-space: nowrap; }
.header__phone:hover { color: var(--yellow); }
@media (min-width: 700px) { .header__phone { display: inline-flex; } }
.header__cta { display: none; }
@media (min-width: 900px) { .header__cta { display: inline-flex; } }
.header__call {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: var(--yellow); color: var(--ink);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.header__call svg { width: 22px; height: 22px; }
@media (min-width: 700px) { .header__call { display: none; } }

.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 10px; background: transparent; border: 1px solid var(--line-2); cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--text); transition: transform .25s var(--ease), opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1280px) { .burger { display: none; } }

/* Меню выпадает поверх страницы (шапка липкая и не растёт) и прокручивается само, если не помещается на экран:
   68/80px — строка шапки, 65px — нижняя панель на телефоне */
.mobile-menu {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100vh - 69px); max-height: calc(100dvh - 69px);
  overflow-y: auto; overscroll-behavior: contain;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); box-shadow: var(--shadow);
}
.has-bar .mobile-menu { max-height: calc(100vh - 134px); max-height: calc(100dvh - 134px - env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { .mobile-menu, .has-bar .mobile-menu { max-height: calc(100vh - 81px); max-height: calc(100dvh - 81px); } }
.mobile-menu.is-open { display: block; }
/* С 1280px работает обычное меню, бургера нет: открытое до расширения окна меню не остаётся висеть */
@media (min-width: 1280px) { .mobile-menu.is-open { display: none; } }
.mobile-menu ul { display: flex; flex-direction: column; padding: 8px 0; }
.mobile-menu a { display: block; padding: 14px var(--gutter); color: var(--text-2); font-size: 18px; border-bottom: 1px solid var(--line); }
.mobile-menu li:last-child a { border-bottom: 0; }
.mobile-menu .mobile-menu__phone { color: var(--yellow); font-family: var(--display); }

/* --------------------------------------------------------------------------
   Секции
   -------------------------------------------------------------------------- */
.section { position: relative; padding: clamp(56px, 8vw, 96px) 0; }
.section--alt { background: var(--bg-2); }
.section--yellow { background: var(--yellow); color: var(--ink); }
.section--yellow .h2 { color: var(--ink); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { max-width: 460px; color: var(--muted); }
.section--yellow .section-head p { color: #3a3a3a; }

/* --------------------------------------------------------------------------
   Первый экран
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 7vw, 96px); }
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255, 196, 0, .10), transparent 60%),
    radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: auto, 22px 22px;
}
.hero__watermark {
  position: absolute; right: -2vw; top: 8%; z-index: 0;
  font-family: var(--display); font-size: clamp(90px, 18vw, 260px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .06);
  text-transform: uppercase; white-space: nowrap; user-select: none; pointer-events: none;
}
.hero__in { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .hero__in { grid-template-columns: 1.05fr .95fr; gap: 48px; } }

.hero__in > * { min-width: 0; }
.hero__copy { display: flex; flex-direction: column; gap: 22px; }
.hero__copy .h1 span:not(.w) { color: var(--yellow); }
/* Подпись над заголовком составная (город + текст): обычный текстовый поток вместо flex,
   иначе на узком экране части встают двумя колонками. Чёрточка висит слева, строки переносятся под текст */
.hero__copy .eyebrow { display: block; padding-left: 38px; }
.hero__copy .eyebrow::before { display: inline-block; margin: 0 10px 0 -38px; vertical-align: .24em; }
.hero__bullets { display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: 17px; }
.hero__bullets li { display: flex; gap: 12px; align-items: flex-start; }
.hero__bullets svg { width: 22px; height: 22px; flex: none; color: var(--yellow); margin-top: 2px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__visual { position: relative; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 979px) { .hero__visual { gap: 16px; } }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.crumbs a:hover { color: var(--yellow); }

/* Быстрая форма в первом экране */
.quick {
  background: var(--bg-3); border: 1px solid var(--line); padding: 22px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow);
  position: relative;
}
.quick::before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--yellow); }
.quick__title { font-family: var(--display); font-size: 18px; text-transform: uppercase; }
/* align-items: кнопка не растягивается по высоте, когда под полем появляется текст ошибки */
.quick__row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.quick__row .field { flex: 1 1 200px; }
.quick__row .btn { flex: 1 1 200px; padding: 0 18px; }
.quick small { color: var(--muted); font-size: 13px; line-height: 1.45; }

/* Полоса доверия */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.trust__wrap { padding: 0; }
.trust__in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); }
@media (min-width: 900px) { .trust__in { grid-template-columns: repeat(4, 1fr); } }
.trust__item { display: flex; flex-direction: column; gap: 4px; padding: 22px var(--gutter); background: var(--bg-2); }
.trust__num { font-family: var(--display); font-size: clamp(24px, 3vw, 34px); color: var(--yellow); line-height: 1; }
.trust__label { color: var(--muted); font-size: 15px; }

/* --------------------------------------------------------------------------
   Карточки
   -------------------------------------------------------------------------- */
/* 256px: в более узкой карточке слово заголовка («Выравнивание») шире её полей */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(256px, 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 26px; background: var(--bg-3); border: 1px solid var(--line);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.card:hover { border-color: var(--yellow); transform: translateY(-3px); }
.card__num { color: var(--yellow); font-weight: 700; font-size: 13px; letter-spacing: .12em; }
.card__icon { width: 44px; height: 44px; color: var(--yellow); }
.card p { color: var(--text-2); font-size: 16px; }
.card__price { margin-top: auto; padding-top: 8px; font-family: var(--display); font-size: 22px; color: var(--yellow); }

/* Шаги */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { display: flex; flex-direction: column; gap: 12px; border-top: 4px solid var(--ink); padding-top: 18px; }
.step__num { font-family: var(--display); font-size: 40px; line-height: 1; }
.step h3 { font-family: var(--body); font-weight: 700; font-size: 20px; text-transform: none; letter-spacing: 0; }
.step p { color: #3a3a3a; }

/* Двухколоночный блок */
.split { display: grid; gap: 40px; align-items: flex-start; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1.4fr; gap: 56px; } }
.split--even { grid-template-columns: 1fr; }
@media (min-width: 960px) { .split--even { grid-template-columns: 1fr 1fr; } }
.split > * { min-width: 0; }
.split__side { display: flex; flex-direction: column; gap: 18px; }
.split__side .btn { align-self: flex-start; }

/* Таблица цен */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--bg-3); -webkit-overflow-scrolling: touch; }
.price { width: 100%; border-collapse: collapse; }
.price th, .price td { padding: 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 16px; }
.price th { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; background: var(--bg-2); }
.price tbody tr:last-child th, .price tbody tr:last-child td { border-bottom: 0; }
.price tbody th { color: var(--text); font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; background: transparent; }
.price .hl { color: var(--yellow); font-weight: 700; white-space: nowrap; }   /* число и «₽» не разрываются */
/* На телефоне три колонки не помещаются: в строке название и цена, примечание — под ними во всю ширину */
@media (max-width: 599px) {
  .price, .price tbody { display: block; }
  .price thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .price tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .price tbody tr:last-child { border-bottom: 0; }
  .price tbody th, .price td { display: block; padding: 0; border: 0; }
  .price td.hl { text-align: right; }
  .price td.muted { grid-column: 1 / -1; font-size: 14px; }
}
.price-note { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; color: var(--muted); font-size: 15px; }
.price-note li { display: inline-flex; align-items: center; gap: 8px; }
.price-note li::before { content: ''; width: 8px; height: 8px; background: var(--yellow); transform: rotate(45deg); }

/* Список «что входит» */
.checks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.checks svg { width: 22px; height: 22px; flex: none; color: var(--yellow); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Скролл-сцена «Одна смена»
   -------------------------------------------------------------------------- */
.story { position: relative; height: 320vh; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.story__stage {
  position: sticky; top: 68px; height: calc(100vh - 68px - 64px); overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  background:
    linear-gradient(to top, rgba(255, 196, 0, .06), transparent 30%),
    radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: auto, 22px 22px;
}
@media (min-width: 900px) { .story__stage { top: 80px; height: calc(100vh - 80px); } }
.story__svg { width: 100%; max-width: 1500px; height: 100%; display: block; color: var(--yellow); }
.story__svg .ground { stroke: var(--line-2); }
.story__svg .dirt { fill: #2b2620; stroke: #4a4036; }
.story__svg .hole { fill: #0b0b0b; }
.story__captions { position: absolute; left: var(--gutter); right: var(--gutter); top: 28px; max-width: 480px; pointer-events: none; }
@media (min-width: 900px) { .story__captions { top: 56px; } }
.story__cap { position: absolute; left: 0; top: 0; opacity: 0; display: flex; flex-direction: column; gap: 10px; will-change: opacity, transform; }
.story__cap .h2 { font-size: clamp(24px, 3.4vw, 40px); }
.story__cap p:not(.story__title) { color: var(--text-2); font-size: clamp(15px, 1.4vw, 18px); max-width: 420px; }
.story__title { color: var(--text); }
.story__hint { position: absolute; right: var(--gutter); bottom: 18px; color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.story__hint::after { content: ''; width: 10px; height: 10px; border-right: 2px solid var(--yellow); border-bottom: 2px solid var(--yellow); transform: rotate(45deg); animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(5px) rotate(45deg); } }
/* С 900px в правом нижнем углу окна стоит кнопка звонка (64px + отступ 28px): подсказка встаёт левее неё */
@media (min-width: 900px) { .story__hint { right: 112px; } }
.story__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.story__progress i { display: block; height: 100%; width: 0; background: var(--yellow); }
@media (prefers-reduced-motion: reduce) { .story { height: auto; } .story__stage { position: relative; height: 420px; } .story__hint { display: none; } }

/* Фото-режим сцены: кадры из img/dig */
.story--photo .story__stage { align-items: stretch; background: #000; }
.story__frames { position: absolute; inset: 0; background: #000; }
.story__frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; will-change: opacity; }
@media (max-width: 699px) { .story__frame { object-position: 68% 50%; } }
.story--photo .story__frames::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(0, 0, 0, .55), transparent 55%), linear-gradient(to top, rgba(0, 0, 0, .5), transparent 35%); pointer-events: none; }
.story--photo .story__cap { padding: 18px 22px; background: rgba(22, 22, 22, .72); border-left: 4px solid var(--yellow); backdrop-filter: blur(6px); max-width: 440px; }
.story--photo .story__hint { color: var(--text-2); }

/* Характеристики машины */
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 520px) { .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.spec { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; background: var(--bg-3); }
.specs__note { margin-top: 14px; font-size: 14px; }
/* overflow-wrap: длинная подпись («Грузоподъёмность») в узкой ячейке переносится (в разметке стоит мягкий перенос), а не обрезается */
.spec__label { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: break-word; }
.spec__val { font-family: var(--display); font-size: clamp(16px, 4.4vw, 20px); color: var(--yellow); line-height: 1.15; overflow-wrap: anywhere; }

/* Фото в первом экране и блоке техники */
.hero__photo, .machine__photo { position: relative; margin: 0; }
.hero__photo::before, .machine__photo::before {
  content: ''; position: absolute; left: -10px; top: 10px; right: 10px; bottom: -10px;
  border: 2px solid var(--yellow); pointer-events: none; z-index: 0;
}
.hero__photo img, .machine__photo img {
  position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow: var(--shadow);
}
.machine__photo { margin-bottom: 20px; }
@media (max-width: 979px) { .hero__photo { order: 2; } }

/* Галерея */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery__item {
  position: relative; margin: 0; aspect-ratio: 4 / 3; background: var(--bg-3); border: 1px solid var(--line); overflow: hidden;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.gallery__item:hover { border-color: var(--yellow); transform: translateY(-3px); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item a { display: block; height: 100%; }
/* Обводка фокуса внутри плитки: наружную обрезает overflow: hidden */
.gallery__item a:focus-visible { outline-offset: -3px; }
/* Под текстом подложка не светлее .62 (контраст подписи ≥ 4,5:1 даже на белом фото), затухает только в верхнем отступе */
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, .62) calc(100% - 28px), transparent);
  color: var(--text); font-size: 13px; line-height: 1.3;
}
/* Плитка уже ~230px (телефон, планшет): подпись поверх фото закрывала больше половины кадра,
   поэтому фото остаётся целым (4:3), а подпись стоит под ним */
@media (max-width: 999px) {
  .gallery__item { aspect-ratio: auto; }
  .gallery__item a { height: auto; }
  .gallery__item img { height: auto; aspect-ratio: 4 / 3; }
  .gallery__item figcaption { position: static; padding: 8px 10px 10px; background: none; }
}

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-size: 18px; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 14px; height: 14px;
  border-right: 2px solid var(--yellow); border-bottom: 2px solid var(--yellow);
  transform: rotate(45deg); transition: transform .25s var(--ease); margin-right: 6px;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq__body { padding: 0 0 22px; color: var(--text-2); max-width: 720px; }

/* --------------------------------------------------------------------------
   Формы
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); }
/* Рамка поля #7a7a75: контраст с фоном формы 3,8–4,2:1 (граница поля должна быть различима, не ниже 3:1) */
.field input, .field textarea {
  width: 100%; min-height: 54px; padding: 0 14px;
  background: var(--bg); border: 1px solid #7a7a75; color: var(--text);
  font: 16px var(--body); border-radius: 0; appearance: none; -webkit-appearance: none;
  transition: border-color .2s;
}
.field textarea { min-height: 110px; padding: 14px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--yellow); }
.field input::placeholder, .field textarea::placeholder { color: #8c8c87; opacity: 1; }
.field.is-error input { border-color: var(--red); }
.field__error { display: none; color: var(--red); font-size: 13px; }
.field.is-error .field__error { display: block; }

.form { display: flex; flex-direction: column; gap: 18px; padding: clamp(22px, 3vw, 36px); background: var(--bg); border: 1px solid var(--line); position: relative; }
.form__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form__grid { grid-template-columns: 1fr 1fr; } }
/* Согласие на обработку данных: <label class="consent"><input type="checkbox" name="agree"> <span>текст</span></label>.
   .is-invalid ставит main.js, если форму отправили без галочки */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--yellow); flex: none; cursor: pointer; }
.consent.is-invalid { color: var(--red); }
.consent.is-invalid input { box-shadow: 0 0 0 2px var(--red); }
/* Ссылки внутри текста отличаются не только цветом */
.consent a, .form__status a { text-decoration: underline; text-underline-offset: 3px; }
.form__status { display: none; padding: 12px 14px; font-size: 15px; }
.form__status.is-err { display: block; background: rgba(255, 90, 54, .12); color: var(--red); }
.form__status a { color: inherit; white-space: nowrap; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* Блок заявки */
.order { display: grid; gap: 40px; align-items: stretch; }
@media (min-width: 960px) { .order { grid-template-columns: 1fr 1.2fr; gap: 56px; } }
.order__side { display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.order__phone { font-family: var(--display); font-size: clamp(28px, 3.4vw, 36px); color: var(--yellow); line-height: 1; }
.order__phone:hover { color: var(--yellow-2); }
.messengers { display: flex; flex-wrap: wrap; gap: 10px; }
.messengers .btn { min-height: 48px; font-size: 13px; }

/* --------------------------------------------------------------------------
   Полоса призыва
   -------------------------------------------------------------------------- */
.cta-band { background: var(--yellow); color: var(--ink); padding: clamp(36px, 5vw, 56px) 0; }
.cta-band__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 40px; }
.cta-band .h2 { color: var(--ink); max-width: 640px; }
.cta-band p { color: #3a3a3a; }

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */
.footer { background: #111; border-top: 1px solid var(--line); padding: 40px 0 32px; color: var(--muted); font-size: 14px; }
.footer__in { display: grid; gap: 28px; }
@media (min-width: 900px) { .footer__in { grid-template-columns: 1.2fr 1fr 1fr 1fr; } }
.footer__title { margin: 0 0 12px; font: 700 13px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.footer__about { margin-top: 12px; max-width: 300px; }
.footer ul { display: flex; flex-direction: column; gap: 8px; }
.footer a { color: var(--muted); }
.footer li a { display: inline-block; padding: 5px 0; }
.footer a:hover { color: var(--yellow); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.footer__phone { font-family: var(--display); font-size: 20px; color: var(--text); white-space: nowrap; }
/* В узкой четвёртой колонке номер не помещался в строку и рвался на «…41-» / «48» */
@media (min-width: 900px) and (max-width: 979px) { .footer__phone { font-size: 17px; } }

/* --------------------------------------------------------------------------
   Мобильная панель
   -------------------------------------------------------------------------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px;
  background: var(--line); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 64px; background: var(--bg-2); color: var(--text); font-size: 12px;
}
.bar svg { width: 22px; height: 22px; }
.bar .bar--main { background: var(--yellow); color: var(--ink); font-family: var(--display); font-size: 12px; text-transform: uppercase; }
/* Панель прижата к краю экрана: обводку фокуса рисуем внутри кнопки, на жёлтой — тёмную */
.bar a:focus-visible { outline-offset: -5px; }
.bar .bar--main:focus-visible { outline-color: var(--ink); }
@media (min-width: 900px) { .bar { display: none; } }

/* --------------------------------------------------------------------------
   Модалка и квиз
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.modal__box {
  position: relative; width: 100%; max-width: 560px; overflow: auto;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);   /* dvh: видимая высота при показанной панели браузера */
  background: var(--bg-3); border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: pop .25s var(--ease);
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;   /* на низком экране окно прокручивается: полоса тёмная, в тон окну */
}
.modal__box::before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--yellow); }
@keyframes pop { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__close {
  position: absolute; right: 8px; top: 10px; width: 44px; height: 44px;
  background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 28px; line-height: 1;
}
.modal__close:hover { color: var(--text); }

.quiz { padding: clamp(24px, 4vw, 36px); display: flex; flex-direction: column; gap: 20px; }
/* margin-right: полоса заканчивается до крестика, а не под ним */
.quiz__progress { height: 4px; margin-right: 44px; background: var(--line); }
.quiz__progress i { display: block; height: 100%; background: var(--yellow); transition: width .3s var(--ease); }
.quiz__step { display: none; flex-direction: column; gap: 16px; }
.quiz__step.is-active { display: flex; }
.quiz__q { font-family: var(--display); font-size: 20px; text-transform: uppercase; }
.quiz__opts { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .quiz__opts { grid-template-columns: 1fr 1fr; } }
.quiz__opt {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; text-align: left;
  background: var(--bg); border: 1px solid var(--line-2); cursor: pointer; transition: border-color .2s, background .2s;
}
.quiz__opt:hover { border-color: var(--yellow); }
.quiz__opt.is-on { border-color: var(--yellow); background: rgba(255, 196, 0, .08); }
.quiz__opt b { font-weight: 700; }
.quiz__opt small { display: block; color: var(--muted); font-size: 13px; }
.quiz__nav { display: flex; justify-content: space-between; gap: 12px; }
.quiz__back { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 10px 0; }
.quiz__back:hover { color: var(--text); }
.quiz__result { padding: 16px; background: var(--bg); border: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.quiz__result b { font-family: var(--display); font-size: 26px; color: var(--yellow); }
/* Форма последнего шага стоит внутри окна со своими полями: её собственные поля меньше, чтобы шаг помещался в окно по высоте */
.quiz .quiz__form { padding: clamp(18px, 2.4vw, 28px); }

/* --------------------------------------------------------------------------
   Анимации появления
   -------------------------------------------------------------------------- */
/* Появление — анимацией, а не transition: после неё у блока не остаётся ни transform, ни задержки,
   поэтому подъём при наведении и наклон карточек работают по своим правилам.
   Откуда выезжает блок, задаёт --reveal-from (см. effects.css) */
.js .reveal:not(.is-in) { opacity: 0; }
.js .reveal.is-in { animation: reveal .6s var(--ease) backwards; }
.js .reveal[data-delay="1"] { animation-delay: .08s; }
.js .reveal[data-delay="2"] { animation-delay: .16s; }
.js .reveal[data-delay="3"] { animation-delay: .24s; }
.js .reveal[data-delay="4"] { animation-delay: .32s; }
@keyframes reveal { from { opacity: 0; transform: var(--reveal-from, translateY(18px)); } }

/* backwards, а не both: после появления анимация снимается и блок не остаётся отдельным слоем на всё время жизни страницы */
.hero .hero__copy > * { animation: rise .7s var(--ease) backwards; }
.hero .hero__copy > *:nth-child(1) { animation-delay: .05s; }
.hero .hero__copy > *:nth-child(2) { animation-delay: .15s; }
.hero .hero__copy > *:nth-child(3) { animation-delay: .25s; }
.hero .hero__copy > *:nth-child(4) { animation-delay: .35s; }
.hero .hero__copy > *:nth-child(5) { animation-delay: .45s; }
.hero .hero__copy > *:nth-child(6) { animation-delay: .55s; }
.hero__visual { animation: rise .9s var(--ease) .3s backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Меньше движения: без анимаций, переходов и плавной прокрутки по якорям (бегущие строки тоже стоят) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal:not(.is-in) { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Страница «Спасибо» и текстовые
   -------------------------------------------------------------------------- */
.thanks { min-height: 60vh; display: flex; align-items: center; text-align: center; }
.thanks__in { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 640px; margin: 0 auto; }
.thanks__icon { width: 80px; height: 80px; color: var(--yellow); }
.thanks__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.thanks__links a { text-decoration: underline; text-underline-offset: 3px; }
.prose { max-width: 820px; color: var(--text-2); display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-family: var(--body); text-transform: none; font-weight: 700; font-size: 22px; color: var(--text); margin-top: 12px; }
.prose ul { padding-left: 20px; list-style: disc; display: flex; flex-direction: column; gap: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* Сетка услуг для главной (ссылки на посадочные) */
.services { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.service {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--bg-3); border: 1px solid var(--line); color: inherit;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.service:hover { color: inherit; border-color: var(--yellow); transform: translateY(-3px); }
.service__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.service__icon { width: 40px; height: 40px; color: var(--yellow); }
.service__price { font-family: var(--display); color: var(--yellow); font-size: 16px; white-space: nowrap; }
.service h3 { font-family: var(--body); text-transform: none; font-weight: 700; font-size: 19px; letter-spacing: 0; }
.service p { color: var(--muted); font-size: 15px; }
.service__more { margin-top: auto; padding-top: 6px; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
.service__more svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Узкие телефоны
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .btn { padding: 0 20px; white-space: normal; text-align: center; line-height: 1.15; }
  .btn--lg { min-height: 58px; padding: 0 20px; font-size: 15px; }
  .btn--sm { padding: 0 16px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .header__in { gap: 10px; }
  .header__right { gap: 8px; }
  .logo { font-size: 16px; gap: 8px; }
  .quick, .form { padding: 18px; }
  .card, .service { padding: 20px; }
  .order__phone { font-size: 26px; }
  .cta-band .btn { width: 100%; }
}
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .logo { font-size: 14px; }
  .logo__mark { width: 10px; height: 22px; }
  .trust__item { padding: 18px 14px; }
}

/* --------------------------------------------------------------------------
   Печать и «Сохранить как PDF»: всё содержимое видно, без липких и плавающих элементов
   -------------------------------------------------------------------------- */
@media print {
  /* Тёмный фон печатается как на экране: без него светлый текст оказался бы на белой бумаге */
  html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.has-bar { padding-bottom: 0; }
  /* Блоки, до которых не долистали, не остаются прозрачными */
  .js .reveal { opacity: 1 !important; animation: none !important; }
  .header { position: static; }
  .skip, .burger, .mobile-menu, .header__cta, .header__call, .bar, .call-fab, .noise, .progress-top, .cursor,
  .marquee, .modal, .lightbox, .story { display: none !important; }
  /* Ответы на вопросы печатаются раскрытыми */
  .faq details > .faq__body { display: block; }
  .faq details::details-content { display: block; content-visibility: visible; }
  .faq summary::after { display: none; }
  .card, .service, .step, .spec, .gallery__item, .price tr, .faq details { break-inside: avoid; }
}
