/* ==========================================================================
   42 Запчасти — автосервис, Раменское
   Тёмный индустриальный стиль, янтарный акцент. Без внешних зависимостей.
   ========================================================================== */

/* ---------- Токены ---------- */
/* Тёмная тема — по умолчанию. Светлая включается атрибутом
   data-theme="light" на <html> (переключатель в хедере, app.js). */
:root {
  color-scheme: dark;

  --bg:          #0b0d10;
  --bg-2:        #0f1318;
  --bg-3:        #131920;
  --surface:     #151b22;
  --surface-2:   #1a222b;
  --line:        #232d38;
  --line-soft:   #1b232c;

  --text:        #eef2f6;
  --text-2:      #a9b4c1;
  --text-3:      #8593a3;

  --accent:      #ffb020;
  --accent-bright: #ffb020;
  --icon-accent: #ffa500;
  --accent-2:    #ff7a18;
  --accent-soft: rgba(255, 176, 32, .12);
  --accent-line: rgba(255, 176, 32, .35);

  --ok:          #4ade80;

  /* Текст на янтарной заливке кнопок */
  --on-accent:      #12151a;
  --on-btn:         #12151a;
  --selection-text: #0b0d10;

  /* Заливка основных кнопок: два стопа градиента */
  --btn-from: #ffb020;
  --btn-to:   #ff7a18;

  /* Подложки, которые раньше были зашиты в компонентах */
  --header-bg:       rgba(11, 13, 16, .72);
  --header-bg-solid: rgba(11, 13, 16, .92);
  --nav-bg:          #0b0d10;
  --bar-bg:          rgba(11, 13, 16, .94);
  --badge-bg:        rgba(11, 13, 16, .9);
  --glass:           rgba(11, 13, 16, .6);
  --alt-bg:          rgba(15, 19, 24, .35);
  --ghost-bg:        rgba(255, 255, 255, .03);
  --grid-line:       rgba(255, 255, 255, .028);
  --watermark-line:  rgba(255, 176, 32, .22);
  --underline:       rgba(255, 176, 32, .2);
  --glow:            rgba(255, 150, 30, .16);
  --glow-soft:       rgba(255, 150, 30, .1);

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

  --shadow:       0 24px 60px -24px rgba(0, 0, 0, .85);
  --shadow-photo: 0 18px 40px -16px rgba(0, 0, 0, .65);
  /* Панели: цитата, карточки услуг, карточка контактов, вопросы FAQ.
     В тёмной теме тень на почти чёрном фоне почти не видна, поэтому
     она глубже и с более широким разлётом. */
  --shadow-panel: 0 22px 44px -22px rgba(0, 0, 0, .95), 0 4px 12px rgba(0, 0, 0, .55);
  /* Мелкие пилюли-подписи в первом экране */
  --shadow-chip: 0 6px 14px -6px rgba(0, 0, 0, .85), 0 1px 3px rgba(0, 0, 0, .45);
  /* Фотографии: чёрный кант 1px и мягкая тень — эффект приподнятой карточки. */
  --photo-border: #000;
  --shadow-lift:  0 10px 24px -12px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .45);
  --shadow-badge: 0 12px 28px rgba(0, 0, 0, .65), 0 3px 8px rgba(0, 0, 0, .45);
  --shadow-nav:   0 30px 60px -20px #000;
  --btn-glow:     0 14px 34px -14px rgba(255, 140, 20, .7);
  --btn-glow-hover: 0 20px 42px -14px rgba(255, 140, 20, .85);
  --btn-hover:    0 16px 34px -12px rgba(0, 0, 0, .9);
  --card-glow:    rgba(255, 176, 32, .12);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --wrap: 1180px;
  --pad: 24px;

  --font: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Светлая тема ----------
   Тёплый песочный фон, акцент — оранжевый (тон 30°), без красного оттенка.
   Акцент двухуровневый:
   --accent        #9d4f00 — мелкий текст, ссылки, номера шагов, подписи;
                   контраст 5.2:1 на фоне страницы, 4.8:1 на подложке секций
                   и 4.6:1 на янтарной подложке кнопки MAX;
   --accent-bright #d16900 — крупные заголовки и значки, где по WCAG
                   достаточно 3:1 (фактически 3.3:1).
   Кнопки — яркий оранжевый градиент с тёмным текстом. */
:root[data-theme="light"] {
  color-scheme: light;

  --bg:          #f5f2ec;
  --bg-2:        #ece7de;
  --bg-3:        #e4ddd1;
  --surface:     #ffffff;
  --surface-2:   #f8f5ef;
  --line:        #d9d2c4;
  --line-soft:   #e7e1d5;

  --text:        #14181d;
  --text-2:      #414a55;
  --text-3:      #5c6672;

  --accent:        #9d4f00;
  --accent-bright: #d16900;
  --icon-accent:   #e07800;
  --accent-2:      #ea7c0a;
  --accent-soft:   rgba(209, 105, 0, .1);
  --accent-line:   rgba(209, 105, 0, .4);

  --ok:          #15803d;

  /* Белый — только на тёмной заливке (наведение кнопки MAX). */
  --on-accent:      #ffffff;
  --on-btn:         #14181d;
  --selection-text: #ffffff;

  /* Заливка основных кнопок: оранжевый градиент, текст тёмный */
  --btn-from: #f7a41a;
  --btn-to:   #dc6a00;

  --header-bg:       rgba(245, 242, 236, .78);
  --header-bg-solid: rgba(245, 242, 236, .94);
  --nav-bg:          #f5f2ec;
  --bar-bg:          rgba(245, 242, 236, .95);
  --badge-bg:        rgba(255, 255, 255, .94);
  --glass:           rgba(255, 255, 255, .72);
  --alt-bg:          rgba(228, 221, 209, .45);
  --ghost-bg:        rgba(20, 24, 29, .04);
  --grid-line:       rgba(20, 24, 29, .06);
  --watermark-line:  rgba(209, 105, 0, .22);
  --underline:       rgba(234, 124, 10, .24);
  --glow:            rgba(255, 150, 30, .18);
  --glow-soft:       rgba(255, 150, 30, .1);

  --shadow:       0 24px 60px -30px rgba(28, 22, 12, .35);
  --shadow-photo: 0 18px 40px -20px rgba(28, 22, 12, .35);
  /* Тот же чёрный кант и тень, но мягче — на светлом фоне они должны
     читаться как тень, а не как грязь. */
  --shadow-panel: 0 14px 30px -18px rgba(28, 22, 12, .3), 0 2px 6px rgba(28, 22, 12, .1);
  --shadow-chip:  0 6px 14px -8px rgba(28, 22, 12, .3), 0 1px 3px rgba(28, 22, 12, .12);
  --photo-border: #000;
  --shadow-lift:  0 12px 26px -12px rgba(28, 22, 12, .45), 0 2px 6px rgba(28, 22, 12, .18);
  --shadow-badge: 0 12px 28px rgba(28, 22, 12, .18), 0 3px 8px rgba(28, 22, 12, .12);
  --shadow-nav:   0 30px 60px -30px rgba(28, 22, 12, .3);
  --btn-glow:     0 14px 34px -16px rgba(220, 106, 0, .5);
  --btn-glow-hover: 0 20px 42px -16px rgba(220, 106, 0, .62);
  --btn-hover:    0 14px 30px -12px rgba(28, 22, 12, .34);
  --card-glow:    rgba(245, 158, 11, .2);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Workshop motion is explicitly exempted at the owner's request. */
  *:not(.workshop-bg__part):not(.workshop-bg__rotor):not(.workshop-bg__signal), *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
  *, *::before, *::after {
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
}

p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
svg { color: inherit; }

/* ---------- Чертёж мастерской: декор под содержимым ---------- */
/* The hidden attribute keeps decoration out of unstyled document flow. */
.workshop-bg[hidden] {
  display: block;
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  color: var(--accent);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .25) 35%, rgba(0, 0, 0, .25) 65%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .25) 35%, rgba(0, 0, 0, .25) 65%, #000 100%);
}

.workshop-bg__part {
  position: absolute;
  max-width: none;
  height: auto;
  opacity: .14;
}

.workshop-bg__gear--large {
  top: 10%;
  left: -170px;
  width: 440px;
  color: var(--accent);
  animation: workshop-drift 28s ease-in-out infinite alternate;
}

.workshop-bg__gear--small {
  right: -80px;
  top: 5%;
  width: 260px;
  color: var(--text-3);
  opacity: .12;
}

.workshop-bg__disc {
  right: -145px;
  bottom: 4%;
  width: 380px;
  color: var(--text-3);
  animation: workshop-drift 36s ease-in-out -12s infinite alternate-reverse;
}

.workshop-bg__rotor {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: workshop-rotate 64s linear infinite;
}

.workshop-bg__gear--small .workshop-bg__rotor { animation-duration: 38s; animation-direction: reverse; }
.workshop-bg__disc .workshop-bg__rotor { animation-duration: 80s; animation-direction: reverse; }

.workshop-bg__schematic {
  position: absolute;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: .12;
}

.workshop-bg__signal { animation: workshop-flow 18s ease-in-out infinite alternate; }
.workshop-bg__signal--reverse { animation-direction: alternate-reverse; animation-delay: -9s; }

@keyframes workshop-rotate {
  to { transform: rotate(360deg); }
}

@keyframes workshop-drift {
  to { transform: translate(10px, 18px); }
}

@keyframes workshop-flow {
  from { transform: translateX(-18px); opacity: .45; }
  to { transform: translateX(36px); opacity: 1; }
}

@media (max-width: 640px) {
  .workshop-bg__gear--large { width: 280px; left: -170px; top: 14%; opacity: .10; }
  .workshop-bg__disc { width: 250px; right: -155px; bottom: 12%; opacity: .10; }
  .workshop-bg__gear--small, .workshop-bg__schematic { display: none; }
}

::selection {
  background: var(--accent);
  color: var(--selection-text);
}

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

/* ---------- Утилиты ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.lead {
  color: var(--text-2);
  font-size: clamp(16px, 1.4vw, 19px);
  max-width: 52ch;
}

/* ---------- Прогресс скролла ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width .1s linear;
}

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--btn-bg);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, box-shadow .25s, color .25s;
}

.btn svg { width: 19px; height: 19px; flex: none; }

/* Подпись центрируется по высоте букв, а не по строке: у строчного бокса
   есть запас под выносные элементы, из-за которого текст уезжал вниз
   относительно иконки. text-box обрезает этот запас, padding возвращает
   прежнюю высоту. Без поддержки text-box вид не меняется. */
@supports (text-box: trim-both cap alphabetic) {
  .btn__label {
    text-box: trim-both cap alphabetic;
    padding-block: .45em;
  }
}

.btn--primary {
  background: linear-gradient(135deg, var(--btn-from) 0%, var(--btn-to) 100%);
  color: var(--on-btn);
  box-shadow: var(--btn-glow);
}

.btn--primary svg { transition: transform .3s var(--ease); }

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-glow-hover);
}

.btn--primary:hover svg { transform: translateX(4px); }

.btn--ghost {
  border-color: var(--line);
  background: var(--ghost-bg);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--max {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.btn--max:hover {
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn:active { transform: translateY(0) scale(.99); }

/* Тень при наведении: у залитой кнопки — янтарная, у остальных — нейтральная. */
.btn:hover { box-shadow: var(--btn-hover); }

.btn--primary:hover { box-shadow: var(--btn-glow-hover); }

/* ---------- Хедер ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color .3s, background-color .3s;
}

.header.is-scrolled {
  border-bottom-color: var(--line-soft);
  background: var(--header-bg-solid);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 14px var(--pad);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.logo__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--icon-accent);
}

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

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.logo__text strong {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.logo__text small {
  color: var(--text-3);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 100px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width .25s var(--ease);
}

.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 16px; }

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

.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: color .2s;
}

.header__phone svg { width: 17px; height: 17px; color: var(--icon-accent); }
.header__phone:hover { color: var(--accent); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}

.burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-3px) rotate(-45deg); }

/* ---------- Переключатель темы ---------- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ghost-bg);
  color: var(--icon-accent);
  cursor: pointer;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ease);
}

.theme-toggle svg { width: 18px; height: 18px; }

.theme-toggle:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* Значок показывает тему, в которую переключит кнопка. */
.theme-toggle__icon--moon { display: none; }

:root[data-theme="light"] .theme-toggle__icon--sun  { display: none; }
:root[data-theme="light"] .theme-toggle__icon--moon { display: block; }

/* Без JS переключать нечего — кнопку не показываем. */
.no-js .theme-toggle { display: none; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 104px);
  border-bottom: 1px solid var(--line-soft);
}

.hero__glow {
  position: absolute;
  top: -260px;
  right: -120px;
  width: 780px;
  height: 780px;
  background: radial-gradient(circle, var(--glow) 0%, rgba(255, 150, 30, 0) 62%);
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 20%, transparent 78%);
  pointer-events: none;
}

.hero__watermark {
  position: absolute;
  top: clamp(10px, 1.2vw, 24px);
  right: clamp(10px, 1.6vw, 32px);
  font-size: clamp(110px, 16vw, 230px);
  font-weight: 800;
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--watermark-line);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero h1 {
  font-size: clamp(29px, 3.4vw, 48px);
  max-width: 20ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-bright);
  white-space: nowrap;
  background-image: linear-gradient(var(--underline), var(--underline));
  background-repeat: no-repeat;
  background-position: 0 82%;
  background-size: 0 0.42em;
  animation: underline-grow 1s var(--ease) 900ms forwards;
}

@keyframes underline-grow {
  to { background-size: 100% 0.42em; }
}

.hero__kicker {
  margin-top: 10px;
  color: var(--text-3);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: -.01em;
}

.hero__kicker::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: 16px;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: kicker-line 1.1s var(--ease) 1.1s forwards;
}

@keyframes kicker-line {
  to { width: 120px; }
}

.hero .lead { margin-top: 22px; }
.hero__lead-short { display: none; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

/* Подписи держим в один ряд: шрифт плавно уменьшается вместе с шириной
   экрана. 13.5px на широких экранах, 10.5px на узких; ниже 1000px строка
   всё равно переносится, иначе текст стал бы нечитаемым. */
.hero__chips li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--ghost-bg);
  box-shadow: var(--shadow-chip);
  color: var(--text-2);
  font-size: clamp(10.5px, 1.06vw, 13.5px);
  font-weight: 600;
  white-space: nowrap;
}

/* В этом диапазоне первый экран в одну колонку: места хватает на полный
   кегль, уменьшать его незачем. */
@media (min-width: 641px) and (max-width: 900px) {
  .hero__chips li { font-size: 13.5px; }
}

.hero__chips li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.hero__art {
  position: relative;
}

.hero__photo {
  width: 100%;
  height: auto;
  transform: translateY(-30px);
  border: 1px solid var(--photo-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
}

.art {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero__badge {
  position: absolute;
  left: -6px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  background: var(--badge-bg);
  box-shadow: var(--shadow-badge);
  animation: float 6s ease-in-out infinite;
}

.hero__badge strong {
  color: var(--accent);
  font-size: 17px;
  font-weight: 800;
}

.hero__badge span {
  color: var(--text-3);
  font-size: 12.5px;
  letter-spacing: .04em;
}

/* ---------- Анимации SVG ---------- */
.wheel-rim {
  animation: spin 3.2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spin-slow { animation: spin 22s linear infinite; }

.lift-car {
  animation: lift 5s ease-in-out infinite;
}

@keyframes lift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.pulse-dot {
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

.headlight {
  animation: flicker 4s ease-in-out infinite;
}

@keyframes flicker {
  0%, 92%, 100% { opacity: .25; }
  95%           { opacity: 1; }
}

.float-slow {
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.wrench {
  animation: wrench-turn 5.5s ease-in-out infinite;
}

@keyframes wrench-turn {
  0%, 70%, 100% { transform: rotate(0deg); }
  80%           { transform: rotate(-13deg); }
  90%           { transform: rotate(4deg); }
}

/* ---------- Секции ---------- */
.section {
  position: relative;
  padding: clamp(64px, 8vw, 116px) 0;
  scroll-margin-top: 84px;
}

.section--alt {
  background: var(--alt-bg);
  border-block: 1px solid var(--line-soft);
}

.section__head { max-width: 760px; }

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head--center .eyebrow { justify-content: center; }

.section h2 {
  font-size: clamp(26px, 3.1vw, 42px);
}

.section__sub {
  margin-top: 20px;
  color: var(--text-2);
  max-width: 58ch;
}

/* ---------- Лента работ ---------- */
/* Тень рисует обёртка: mask-image у самой ленты обрезает её box-shadow. */
.marquee-band {
  position: relative;
  box-shadow: var(--shadow-panel);
}

.marquee {
  position: relative;
  overflow: hidden;
  padding: 18px 0;
  border-block: 1px solid var(--line-soft);
  background: var(--bg-2);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 52s linear infinite;
}

.marquee__group {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  flex: none;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee span {
  color: var(--text-3);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 0;
  flex: none;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Карточки услуг ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(36px, 5vw, 56px);
  perspective: 1200px;
}

.card {
  position: relative;
  padding: 30px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .35s;
}

.card::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -40%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, var(--card-glow), transparent 68%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

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

.card:hover::before,
.card:hover::after { opacity: 1; }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--icon-accent);
  transition: background-color .35s, border-color .35s, transform .35s var(--ease);
}

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

.card:hover .card__icon {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  transform: rotate(-6deg) scale(1.05);
}

.card h3 {
  font-size: 19.5px;
  margin-bottom: 12px;
}

.card p {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.62;
}

.cards__note {
  margin-top: 28px;
  color: var(--text-3);
  font-size: 14.5px;
}

.cards__note a { color: var(--accent); }

/* ---------- Шаги ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(36px, 5vw, 56px);
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .6s var(--ease);
}

.step.is-visible::before { width: 56px; }

.step__num {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
}

.step h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.step p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Split ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.split--reverse .split__art { order: 2; }
.split--reverse .split__copy { order: 1; }

.parts__photo {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-photo);
}

/* Фото запчастей чуть крупнее текста: колонка выходит в промежуток сетки */
@media (min-width: 901px) {
  .split__art--parts-photo { width: calc(100% + 24px); }
}

.masters__photo {
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--photo-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
}

.split__copy h2 {
  font-size: clamp(26px, 2.9vw, 40px);
  margin-bottom: 20px;
}

.split__copy > p {
  color: var(--text-2);
  max-width: 50ch;
}

.ticks {
  display: grid;
  gap: 14px;
  margin: 28px 0 34px;
}

.ticks li {
  position: relative;
  padding-left: 34px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.55;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.ticks li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.quote {
  padding: 22px 24px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.quote p {
  color: var(--text-2);
  font-size: 15.5px;
  font-style: italic;
}

/* ---------- Столпы ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(36px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--line);
  overflow: hidden;
}

.pillar {
  padding: 30px 24px;
  background: var(--bg);
  transition: background-color .35s;
}

.pillar:hover { background: var(--surface); }

.pillar h3 {
  font-size: 17.5px;
  margin-bottom: 10px;
  color: var(--accent);
}

.pillar p {
  color: var(--text-2);
  font-size: 14.8px;
  line-height: 1.6;
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.faq__head h2 {
  font-size: clamp(24px, 2.7vw, 36px);
}

.faq__list {
  display: grid;
  gap: 10px;
}

.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
  transition: border-color .3s, background-color .3s;
}

.faq__item[open] {
  border-color: var(--accent-line);
  background: var(--surface-2);
}

.faq__item summary {
  position: relative;
  padding: 20px 56px 20px 22px;
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: color .25s;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary:hover { color: var(--accent); }

.faq__item summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 24px;
  width: 11px;
  height: 11px;
  margin-top: -7px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .35s var(--ease);
}

.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }

.faq__item p {
  padding: 0 56px 22px 22px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.65;
  animation: faq-open .35s var(--ease);
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Контакты ---------- */
.section--contacts {
  position: relative;
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 60% 80% at 15% 0%, var(--glow-soft), transparent 65%),
    var(--alt-bg);
  overflow: hidden;
}

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.contacts h2 {
  font-size: clamp(27px, 3.2vw, 43px);
  margin-bottom: 18px;
}

.contacts__lead {
  color: var(--text-2);
  max-width: 44ch;
  margin-bottom: 30px;
}

.contacts__phone {
  display: inline-block;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  transition: color .25s;
}

.contacts__phone:hover { color: var(--accent); }

.contacts__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.contacts__card {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--glass);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(8px);
}

.info { display: grid; gap: 20px; }

.info__row dt {
  margin-bottom: 5px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.info__row dd {
  font-size: 16.5px;
  line-height: 1.65;
}

.info__row a {
  display: inline-block;
  padding-block: 4px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.info__row a:hover { border-bottom-color: var(--accent); }

.contacts__route {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  width: 100%;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.contacts__route svg {
  width: 18px;
  height: 18px;
  color: var(--icon-accent);
  transition: transform .3s var(--ease);
}

.contacts__route:hover svg { transform: translateX(5px); }

/* ---------- Футер ---------- */
.footer {
  padding: 44px 0 40px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.footer__brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 46ch;
}

.footer__brand strong { font-size: 16.5px; }

.footer__brand p {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.55;
}

.footer__meta {
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.7;
  text-align: right;
}

.footer__disclaimer {
  display: inline-block;
  margin-top: 8px;
  max-width: 42ch;
  opacity: .8;
}

.version {
  color: var(--text-3);
  opacity: .7;
  font-variant-numeric: tabular-nums;
}

/* ---------- Мобильная панель ---------- */
.mobile-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 110;
  display: none;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--bar-bg);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  visibility: hidden;
  transform: translateY(110%);
  transition: transform .4s var(--ease);
}

.mobile-bar.is-visible { visibility: visible; transform: translateY(0); }

.mobile-bar__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  background: var(--surface);
  transition: box-shadow .25s, border-color .25s, transform .25s var(--ease);
}

.mobile-bar__btn:hover {
  border-color: var(--accent-line);
  box-shadow: var(--btn-hover);
  transform: translateY(-1px);
}

.mobile-bar__btn svg { width: 16px; height: 16px; color: var(--icon-accent); }

.mobile-bar__btn--primary {
  background: linear-gradient(135deg, var(--btn-from), var(--btn-to));
  border-color: transparent;
  color: var(--on-btn);
}

.mobile-bar__btn--primary svg { color: var(--on-btn); }

/* ---------- Появление при скролле ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js .reveal { will-change: opacity, transform; }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Кнопка, которая сама помечена .reveal, после появления должна вести себя
   как обычная. Иначе transform: none и задержка из .reveal перебивают
   подъём и тень при наведении: специфичность у правил одинаковая, а .reveal
   объявлен ниже. */
.btn.reveal.is-visible,
.no-js .btn.reveal {
  transition: transform .25s var(--ease), background-color .25s, border-color .25s, box-shadow .25s, color .25s;
  transition-delay: 0s;
}

.btn.reveal.is-visible:hover,
.no-js .btn.reveal:hover { transform: translateY(-2px); }

.btn.reveal.is-visible:active,
.no-js .btn.reveal:active { transform: translateY(0) scale(.99); }

.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1200px) {
  .nav { display: none; }

  .nav.is-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px 16px 22px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-nav);
  }

  .nav.is-open a {
    padding: 14px 12px;
    border-radius: 10px;
    font-size: 16.5px;
  }

  .nav.is-open a::after { display: none; }

  .header__phone { display: none; }
  .burger { display: block; }
  .header__inner { justify-content: space-between; }

  .header .btn--max { display: none; }
}

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

  .hero h1 { max-width: none; }
  .hero h1 em { white-space: normal; }
  .hero__watermark {
    top: 10px;
    right: 10px;
    font-size: 23vw;
    opacity: .45;
  }
  .hero__kicker { font-size: 17px; }
  .hero__art { width: 100%; max-width: 560px; margin-inline: auto; }
  .hero__badge { left: 12px; bottom: 12px; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .split { grid-template-columns: 1fr; }
  .split--reverse .split__art { order: 0; }
  .split--reverse .split__copy { order: 0; }
  .split__art { max-width: 520px; margin-inline: auto; }

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

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

  .footer__meta { text-align: left; }
  .footer__disclaimer { max-width: 100%; }
}

@media (max-width: 640px) {
  :root { --pad: 18px; }

  body { font-size: 16px; }

  .header__inner { padding-block: 10px; gap: 12px; }
  .header__actions { margin-left: 0; gap: 8px; }
  .theme-toggle { width: 44px; height: 44px; }
  .theme-toggle svg { width: 18px; height: 18px; }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 11px;
    letter-spacing: .06em;
  }

  .hero { padding: 24px 0; }
  .hero__inner { gap: 16px; }
  .hero h1 { font-size: 32px; }
  .hero__kicker::after { display: none; }
  .hero .lead { margin-top: 14px; font-size: 16px; line-height: 1.55; }
  .hero__lead-detail { display: none; }
  .hero__lead-short { display: inline; }

  .hero__cta { gap: 10px; margin-top: 20px; }
  .hero__cta .btn { padding: 14px 10px; font-size: 14px; }
  .hero__cta .btn--primary { flex: 1.24; }
  .hero__cta .btn--ghost { flex: 1; }

  .hero__chips { gap: 8px 16px; margin-top: 20px; padding-top: 16px; }
  .hero__chips li { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font-size: 12.5px; }
  .hero__art { width: 100%; max-width: 400px; }
  .hero__badge { padding: 10px 14px; }
  .hero__badge strong { font-size: 14px; }
  .hero__badge span { font-size: 12px; }
  .marquee-band { display: none; }

  .section { padding-block: 40px; scroll-margin-top: 72px; }
  .section__sub { margin-top: 14px; }
  .section__head--center { text-align: left; }
  .section__head--center .eyebrow { justify-content: flex-start; }

  .cards { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; perspective: none; }
  .card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px 14px;
    padding: 20px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .card:first-child { padding-top: 0; }
  .card::before, .card::after { display: none; }
  .card:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .card__icon { grid-row: 1 / 3; width: 36px; height: 36px; margin: 0; border-radius: 10px; }
  .card__icon svg { width: 22px; height: 22px; }
  .card h3 { margin: 0; font-size: 18px; line-height: 1.25; }
  .card p { grid-column: 2; font-size: 15px; line-height: 1.55; }
  .cards__note { margin-top: 20px; }

  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; }
  .step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px 12px; padding: 18px 0; }
  .step::before { display: none; }
  .step__num { grid-row: 1 / 3; margin: 0; }
  .step h3 { margin: 0; line-height: 1.3; }
  .step p { grid-column: 2; line-height: 1.55; }

  .split { gap: 20px; }
  .split__copy { min-width: 0; }
  .split .split__copy { order: 0; }
  .split .split__art { order: 1; width: 100%; max-width: 250px; }
  .split .split__art--photo { max-width: 320px; }
  .split .split__art--parts-photo { max-width: 440px; }
  .masters__photo { max-width: 280px; }
  .split__art .art { width: auto; height: 220px; max-width: 100%; margin-inline: auto; }
  .split__copy h2 { margin-bottom: 14px; }
  .ticks { gap: 10px; margin: 20px 0 24px; }
  .ticks li { padding-left: 30px; font-size: 15px; }
  .split__copy .btn {
    max-width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    white-space: normal;
    text-align: center;
  }
  .quote { padding: 16px; }

  .pillars { grid-template-columns: minmax(0, 1fr); margin-top: 24px; border-radius: var(--r); }
  .pillar { padding: 18px; }

  .faq { gap: 24px; }
  .faq__list { gap: 8px; }
  .faq__item summary { min-height: 44px; padding: 16px 42px 16px 16px; font-size: 15px; }
  .faq__item summary::after { right: 18px; }
  .faq__item p { padding: 0 16px 16px; font-size: 15px; }

  .contacts { gap: 24px; }
  .contacts__lead { margin-bottom: 20px; }
  .contacts__phone { min-height: 44px; }
  .contacts__buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
  .contacts__buttons .btn { padding-inline: 12px; }
  .contacts__buttons .btn--primary { grid-column: 1 / -1; }
  .contacts__card { min-width: 0; padding: 20px 18px; }
  .info { gap: 16px; }
  .info__row a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }
  .contacts__route { min-height: 44px; margin-top: 18px; padding-block: 16px 0; }

  .mobile-bar { display: grid; grid-template-columns: 1.15fr .75fr 1.1fr; gap: 6px; padding-inline: 8px; }
  .mobile-bar__btn { min-width: 0; min-height: 44px; gap: 6px; padding: 12px 6px; font-size: 12px; }
  .mobile-bar__btn svg { flex: none; }
  .footer { padding-top: 28px; padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

  .reveal, .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0s;
    will-change: auto;
  }
}

@media (max-width: 420px) {
  .logo__text small { display: none; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 29px; }
  .hero__cta .btn { flex: auto; width: 100%; }
}
