/* ===== Токены (site-concept.md, раздел 2–3) ===== */
:root {
  --night: #16171A;
  --graphite: #212328; /* фон чередующихся блоков, на тон светлее «Ночи» */
  --card-dark: #2A2C32; /* карточки на «Графите» */
  --text-soft: #D5D8DD; /* длинные тексты на тёмном: мягче чистого белого */
  --asphalt: #24262B;
  --wet-asphalt: #3A3D44;
  --frost: #F3F5F7;
  --snow: #FFFFFF;
  --fog-dark: #A3A8B0;
  --signal: #D7261E;
  --signal-dark: #B01C15;
  --ice: #7CC4F2;
  --amber: #FF9A1F;

  --font-head: "Tektur", "Arial Narrow", sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-brand: "Days One", "Tektur", sans-serif; /* ближе всего к надписи на логотипе */

  --container: 1200px;
  --gutter: 24px;
  --radius: 8px;
  --header-h: 76px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 27px;
  color: var(--snow);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

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

.nowrap { white-space: nowrap; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 28px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .16s ease-out;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }

.btn--primary { background: var(--signal); color: var(--snow); }
.btn--outline { border-color: rgba(255, 255, 255, .55); color: var(--snow); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 15px; }
/* кнопка-номер: сверху мелко улица, под ней телефон */
.btn--phone { flex-direction: column; gap: 2px; padding: 0 22px; }
.btn__caption { font-size: 12px; font-weight: 500; line-height: 16px; color: var(--fog-dark); white-space: nowrap; }
.btn__number { font-family: var(--font-mono); font-size: 16px; line-height: 20px; white-space: nowrap; }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--signal-dark); }
  .btn--outline:hover { border-color: var(--snow); background: rgba(255, 255, 255, .06); }
}

/* Шевронная полоса — фирменный мотив */
.chevron {
  width: 132px;
  height: 8px;
  border-radius: 2px;
  background: repeating-linear-gradient(-45deg,
    var(--signal) 0 8px,
    var(--snow) 8px 14px);
}

/* ===== Шапка ===== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.header.is-scrolled,
.header.is-open {
  background: rgba(36, 38, 43, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--wet-asphalt);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}

/* Название в шапке шрифтом, близким к логотипу */
.header__wordmark {
  display: inline-block;
  font-family: var(--font-brand);
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--signal);
  transform: skewX(-12deg); /* наклон как у букв логотипа */
}

.nav {
  display: flex;
  gap: 28px;
  margin: 0 auto;
}
.nav a {
  position: relative;
  white-space: nowrap;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--fog-dark);
  transition: color .2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--snow); }
  .nav a:hover::after { transform: scaleX(1); }
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* два номера друг под другом, с подписью улицы */
.header__phones {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.header__phones li { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
.header__phones span { font-size: 12px; line-height: 18px; color: var(--fog-dark); white-space: nowrap; }
.header__phones a {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
  transition: color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .header__phones a:hover { color: var(--ice); }
}

/* почта — третьей строкой под номерами, мельче */
.header__phones .header__email a { font-family: var(--font-body); font-size: 12px; line-height: 16px; color: var(--fog-dark); }
@media (hover: hover) and (pointer: fine) {
  .header__phones .header__email a:hover { color: var(--snow); }
}

.nav__phones { display: none; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--snow);
  transition: transform .2s ease, opacity .2s ease;
}
.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); }

/* ===== Первый экран ===== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 20px) 0 56px;
  overflow: hidden;
  isolation: isolate;
}

/* Временный фон вместо фото: ночь, свечение габаритов, морозная дымка */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 45% at 88% 78%, rgba(215, 38, 30, .30), transparent 70%),
    radial-gradient(ellipse 30% 22% at 70% 92%, rgba(215, 38, 30, .18), transparent 70%),
    radial-gradient(ellipse 60% 50% at 12% 8%, rgba(124, 196, 242, .14), transparent 70%),
    linear-gradient(180deg, #121316 0%, var(--night) 55%, #1b1c20 100%);
}
.hero__bg::after {
  /* низ плавно переходит в фон следующего блока, без резкой границы */
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(0deg, var(--night), transparent);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 64px;
}

/* Фирменная надпись и стаж — одним блоком, как подпись бренда */
.hero__brand {
  display: inline-flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.hero__logo img {
  width: 440px;
}

.hero__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ice);
}

.hero__title {
  max-width: 15ch;
  margin: 0 0 24px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 64px;
  line-height: 68px;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero__lead {
  max-width: 560px;
  margin: 0 0 40px;
  font-size: 20px;
  line-height: 30px;
  color: #D5D8DD;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Бренды: две строки — сигнализации и подогреватели, подпись «сертифицированный сервис» одна на всех */
.brands { margin-top: 28px; }
.brands__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fog-dark);
}
/* на широком экране группы стоят рядом, подпись группы — над брендами */
.brands__rows { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 0; padding: 0; list-style: none; }
.brands__row { display: flex; flex-direction: column; gap: 8px; }
.brands__kind {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
}
.brands__kind svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brands__row--heat .brands__kind svg { stroke: var(--ice); }
.brands__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.brands__list li {
  min-width: 100px;
  padding: 8px 14px;
  border: 1px solid var(--wet-asphalt);
  border-radius: 6px;
  background: rgba(36, 38, 43, .6);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}

/* ===== Термометр ===== */
.thermo {
  --p: 0; /* 0 → −40 °C, 1 → +20 °C */
  margin: 0;
  padding: 28px 28px 24px;
  border: 1px solid var(--wet-asphalt);
  border-radius: var(--radius);
  background: rgba(36, 38, 43, .55);
}

.thermo__readout {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}
.thermo__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--fog-dark);
}
.thermo__value {
  font-family: var(--font-mono);
  font-size: 44px;
  line-height: 52px;
  font-variant-numeric: tabular-nums;
  color: var(--ice);
  transition: color .3s ease;
}
.thermo.is-warm .thermo__value { color: var(--amber); }

.thermo__scale {
  display: flex;
  gap: 16px;
  height: 280px;
}

.thermo__track {
  position: relative;
  width: 14px;
  border-radius: 7px;
  background: var(--wet-asphalt);
  overflow: hidden;
}
.thermo__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(0deg, var(--ice) 0%, var(--ice) 45%, var(--amber) 100%);
  clip-path: inset(calc((1 - var(--p)) * 100%) 0 0 0);
}

.thermo__ticks {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: -9px 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 18px;
  color: var(--fog-dark);
}

.thermo__caption {
  margin-top: 24px;
  font-size: 14px;
  line-height: 20px;
  color: var(--fog-dark);
}

/* ===== Сцена из видео (кадры на canvas по прокрутке, js/main.js) ===== */
/* Сцена заходит под первый экран на высоту окна: первый экран гаснет, под ним уже нарисован контур машины */
.scene { display: none; }
.js .scene {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: -100vh;
  margin-top: -100svh;
  background: var(--night);
}
.js .hero { z-index: 2; will-change: opacity; }

.scene__sticky {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  height: 100vh;
  height: 100svh;
  padding: var(--header-h) 0 20px;
  overflow: hidden;
}
.scene__box {
  position: relative;
  flex: none;
  /* на узком экране кадр чуть шире окна: машина крупнее, края всё равно растворены */
  width: min(114%, calc((100svh - var(--header-h) - 200px) * 16 / 9));
  margin: 0 -7%;
  align-self: center;
  aspect-ratio: 16 / 9;
}
/* затемнение и растворение краёв в «Ночи» запечены в сами кадры (см. CLAUDE.md): фильтры и маски на canvas тормозят прокрутку */
.scene__canvas { display: block; width: 100%; height: 100%; }
.scene__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.scene__lines line {
  stroke: rgba(255, 255, 255, .7);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .45s ease-out;
}
.scene__lines line.is-on { stroke-dashoffset: 0; }

/* точка на машине, от которой идёт сноска */
.scene__dot {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--snow);
  box-shadow: 0 0 0 3px rgba(215, 38, 30, .85);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .25s ease-out, transform .25s ease-out;
}
.scene__dot.is-on { opacity: 1; transform: none; }
.scene__dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--signal);
  opacity: 0;
}
/* узкий экран: видны все точки, но крупная только у текущей сноски */
.scene__dot.is-on:not(.is-active) { transform: scale(.5); box-shadow: 0 0 0 3px rgba(215, 38, 30, .5); }
.scene__dot.is-active::after { animation: scene-pulse 1.8s ease-out infinite; }
@keyframes scene-pulse {
  0% { opacity: .9; transform: scale(1); }
  100% { opacity: 0; transform: scale(3.2); }
}

/* Сноски. Узкий экран: под машиной, по одной; точка активной сноски пульсирует */
.scene__notes {
  display: grid;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
}
.note {
  grid-area: 1 / 1;
  align-self: start;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(42, 44, 50, .94);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s ease-out, transform .3s ease-out;
}
.note.is-on { opacity: 1; transform: none; }
.note__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  line-height: 24px;
}
.note__icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.note--heat .note__icon { stroke: var(--ice); }
.note__text { margin: 0; font-size: 15px; line-height: 22px; color: var(--text-soft); }

/* Знак ALERT в пустом контуре: рамка обводится, как сам контур, потом знак мигает, как сработавшая сигнализация.
   Узкий экран: стоит на месте сносок под машиной и уступает его им */
.scene__alert {
  grid-area: 1 / 1;
  justify-self: center;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity .35s ease-out, transform .35s ease-out;
}
.scene__alert.is-on { opacity: 1; transform: none; }
.scene__alert-sign {
  width: 88px;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: var(--signal);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(215, 38, 30, .65));
}
.scene__alert-frame {
  fill: rgba(215, 38, 30, .1);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .6s ease-out;
}
.scene__alert-mark, .scene__alert-dot { opacity: 0; transition: opacity .2s ease-out .45s; }
.scene__alert-dot { fill: var(--signal); stroke: none; }
.scene__alert.is-on .scene__alert-frame { stroke-dashoffset: 0; }
.scene__alert.is-on .scene__alert-mark,
.scene__alert.is-on .scene__alert-dot { opacity: 1; }
.scene__alert-text {
  padding-left: .42em; /* разрядка и справа — иначе слово сдвинуто влево от знака */
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .42em;
  color: var(--signal);
  text-shadow: 0 0 14px rgba(215, 38, 30, .55);
}
.scene__alert.is-on .scene__alert-sign,
.scene__alert.is-on .scene__alert-text { animation: scene-alarm 1.6s ease-in-out .7s infinite; }
@keyframes scene-alarm {
  0%, 45%, 100% { opacity: 1; }
  60%, 85% { opacity: .45; }
}

/* Широкий экран: кадр во всё окно, сноски поверх него у своих мест, линии рисует js/main.js.
   Тот же запрос — SCENE_WIDE в js/main.js */
/* телефон боком: машина слева, сноска справа */
@media (max-width: 1199px) and (max-height: 560px) and (orientation: landscape) {
  .scene__sticky { flex-direction: row; align-items: center; gap: 0; padding: var(--header-h) var(--gutter) 0; }
  .scene__box { width: min(62%, calc((100svh - var(--header-h)) * 16 / 9)); margin: 0; }
  .scene__notes { flex: 1; min-width: 0; padding: 0 0 0 12px; }
}

@media (min-width: 1200px) and (min-height: 640px) {
  .scene__sticky { display: grid; place-items: center; gap: 0; padding-bottom: 0; }
  .scene__box,
  .scene__notes {
    grid-area: 1 / 1;
    width: min(100%, calc((100svh - var(--header-h)) * 16 / 9));
    max-width: none;
    margin: 0;
    aspect-ratio: 16 / 9;
  }
  .scene__notes { display: block; position: relative; padding: 0; }
  .note { position: absolute; padding: 12px 14px; }
  .note__title { font-size: clamp(15px, 1.25vw, 19px); line-height: 1.25; margin-bottom: 4px; }
  .note__text { font-size: clamp(13px, 1vw, 15px); line-height: 1.4; }
  /* места подобраны по свободным участкам кадра с открытым капотом */
  .note--heat { left: .5%; top: 24%; width: 17.5%; }
  .note--light { left: 1%; bottom: 2.5%; width: 20%; }
  .note--gear { left: 35.5%; bottom: 2.5%; width: 22%; }
  .note--alarm { right: 1.5%; top: 6%; width: 26%; }
  .note--sound { right: 1.5%; bottom: 2.5%; width: 26%; }
  /* середина пустого контура машины */
  .scene__alert { position: absolute; left: 50%; top: 57%; gap: 14px; translate: -50% -50%; }
  /* кадр внутри контура серый: тёмное пятно под знаком, чтобы красный не терялся */
  .scene__alert::before {
    content: "";
    position: absolute;
    inset: -45% -60%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(22, 23, 26, .6), rgba(22, 23, 26, 0));
  }
  .scene__alert-sign { width: clamp(120px, 10vw, 176px); }
  .scene__alert-text { font-size: clamp(26px, 2.3vw, 38px); }
}

/* ===== О компании (оттенок «Ночь») ===== */
.about {
  padding: 112px 0;
  background: var(--night);
  border-top: 1px solid var(--asphalt);
  scroll-margin-top: var(--header-h);
}
.about__intro { max-width: 760px; }
.about__lead { margin: 0; font-size: 20px; line-height: 30px; color: var(--text-soft); }

/* Цифры — как показания приборной панели */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--wet-asphalt);
  border-bottom: 1px solid var(--wet-asphalt);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 24px;
}
.stat + .stat { border-left: 1px solid var(--wet-asphalt); }
.stat:first-child { padding-left: 0; }
.stat__value {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 44px;
  text-transform: uppercase;
  white-space: nowrap;
}
.stat__value--brands { font-size: 28px; line-height: 44px; text-transform: none; color: var(--signal); } /* бренды пишем как у производителей */
.stat__label { font-size: 15px; line-height: 22px; color: var(--fog-dark); }
/* бренды — отдельной строкой под цифрами */
.stat--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: baseline;
  gap: 24px;
  padding-left: 0;
  border-top: 1px solid var(--wet-asphalt);
}
.stat + .stat--wide { border-left: 0; }
/* до 1200 px в четыре колонки «2 филиала» не помещается */
@media (max-width: 1199px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--wet-asphalt); }
}
@media (max-width: 560px) {
  .stat--wide { flex-direction: column; align-items: flex-start; gap: 4px; }
}

.about__subtitle {
  margin: 64px 0 24px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 22px;
  line-height: 28px;
  text-transform: uppercase;
}

/* заголовок «Что мы делаем» и справа — на какие машины ставим */
.works__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 64px 0 24px;
}
.works__head .about__subtitle { margin: 0; }
.works__for { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.works__for-label { margin-right: 4px; font-size: 15px; line-height: 22px; color: var(--fog-dark); }
.works__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  line-height: 22px;
  text-transform: uppercase;
}
.works__tag svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 560px) {
  .works__head { margin: 48px 0 16px; }
  .works__tag { font-size: 14px; padding: 5px 12px 5px 8px; }
}

.works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.work {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--card-dark);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
  overflow: hidden;
}
/* при наведении снизу появляется шевронная полоса */
.work::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: repeating-linear-gradient(-45deg, var(--signal) 0 6px, var(--snow) 6px 10px);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .work:hover::after { transform: scaleX(1); }
}
.work__icon {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 20px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.work--heat .work__icon { stroke: var(--ice); }
/* «Подробнее» в карточке — ведёт на отдельную страницу (/signalizacii/) */
.work__details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  line-height: 20px;
  text-transform: uppercase;
  transition: box-shadow .2s ease;
}
.work--heat .work__details svg { stroke: var(--ice); }
.work__details svg { width: 18px; height: 18px; fill: none; stroke: var(--signal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .work__details:hover { box-shadow: inset 0 0 0 1px var(--signal); }
  .work--heat .work__details:hover { box-shadow: inset 0 0 0 1px var(--ice); }
  .work__details:hover svg { transform: translateX(3px); }
}
.work__title {
  display: block;
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 20px;
  line-height: 26px;
}
.work__text { display: block; margin: 0; font-size: 16px; line-height: 25px; color: var(--fog-dark); }

/* последняя карточка — ссылка на форму записи */
.work--more { padding: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--wet-asphalt); }
.work--more::after { display: none; }
.work__link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 28px;
  border-radius: inherit;
  transition: background-color .2s ease;
}
.work__link:focus-visible { outline: 2px solid var(--ice); outline-offset: -2px; }
.work__arrow {
  width: 28px;
  height: 28px;
  margin-top: 16px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease-out;
}
@media (hover: hover) and (pointer: fine) {
  .work__link:hover { background: rgba(215, 38, 30, .08); }
  .work__link:hover .work__arrow { transform: translateX(6px); }
}

/* ===== Отзывы из 2ГИС и Яндекса (тёмный блок, оттенок «Графит») ===== */
/* ===== Партнёры (оттенок «Ночь», как «О компании» — поэтому линия сверху) ===== */
.partners { padding: 88px 0; background: var(--night); border-top: 1px solid var(--asphalt); }
.partners__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-bottom: 40px; }
.partners__head .section-title { margin: 0; }
.partners__lead { max-width: 460px; margin: 0; font-size: 17px; line-height: 26px; color: var(--fog-dark); }
/* сетка как цифры в «О компании»: ячейки с тонкими линиями */
.partners__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--wet-asphalt);
  border-left: 1px solid var(--wet-asphalt);
}
.partner { border-right: 1px solid var(--wet-asphalt); border-bottom: 1px solid var(--wet-asphalt); }
.partner--empty { min-height: 112px; } /* 11 логотипов + пустая ячейка = ровные ряды по 6, 3 и 2 */
.partner__box {
  position: relative;
  display: grid;
  place-items: center;
  height: 112px;
  padding: 16px 20px;
}
/* серый логотип и цветной лежат друг на друге; при наведении проступает цветной */
.partner__logo {
  grid-area: 1 / 1;
  width: auto;
  max-width: 100%;
  height: var(--h);
  object-fit: contain;
  transition: opacity .25s ease;
}
.partner__logo--mono { opacity: .5; }
.partner__logo--color { opacity: 0; }
.partner__word {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--snow);
  opacity: .42;
  transition: opacity .25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .partner__box:hover .partner__logo--mono { opacity: 0; }
  .partner__box:hover .partner__logo--color { opacity: 1; }
  .partner__box:hover .partner__word { opacity: .95; }
}
a.partner__box:focus-visible { outline: 2px solid var(--ice); outline-offset: -2px; }
@media (max-width: 1040px) {
  .partners__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .partners { padding: 56px 0; }
  .partners__head { margin-bottom: 24px; }
  .partners__lead { font-size: 15px; line-height: 22px; }
  .partners__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner__box { height: 88px; padding: 12px 14px; }
  .partner__logo { height: calc(var(--h) * .72); }
  .partner__word { font-size: 18px; }
}

.reviews {
  padding: 112px 0;
  background: var(--graphite);
  color: var(--snow);
}

.section-title {
  margin: 0 0 40px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 46px;
  text-transform: uppercase;
}

.stars { position: relative; display: inline-flex; flex: none; line-height: 0; }
.stars svg { width: 16px; height: 16px; margin-right: 2px; }
.stars__base svg { fill: var(--wet-asphalt); }
.stars__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; }
.stars__fill svg { fill: var(--signal); }

/* Рейтинги площадок: 2ГИС и Яндекс, у каждой кнопка перехода */
.reviews__ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.rating-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 24px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--card-dark);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
}
.rating-card__source {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
}
.rating-card__row { display: flex; align-items: center; gap: 14px; grid-column: 1; }
.rating-card__score {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 44px;
  line-height: 52px;
}
.rating-card .stars svg { width: 22px; height: 22px; }
.rating-card__count { margin: 0; grid-column: 1; font-family: var(--font-mono); font-size: 14px; color: var(--fog-dark); }
.rating-card__link { grid-column: 2; grid-row: 1 / span 3; }

.reviews__empty { margin: 0; font-size: 17px; color: var(--fog-dark); }

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch; /* карточки в ряду одной высоты */
}

.review {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--card-dark);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
}
.review__head { display: flex; align-items: center; gap: 14px; }
.review__who { flex: 1; min-width: 0; }
.review__source {
  align-self: flex-start;
  flex: none;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--wet-asphalt);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--fog-dark);
}
.review__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--wet-asphalt);
  color: var(--snow);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
}
.review__name { margin: 0; font-weight: 600; line-height: 22px; overflow-wrap: anywhere; }
.review__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--fog-dark);
}

.review__text {
  margin: 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}
.review__text + .review__more { margin-top: auto; }
.review.is-open .review__text,
.review.is-open .review__answer-text { display: block; -webkit-line-clamp: unset; }
.review__more {
  align-self: flex-start;
  margin-top: -4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: #FF6B5E; /* «Сигнал» на графите слишком тёмный для текста, берём светлее */
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .review__more:hover { text-decoration: underline; }
}

.review__answer {
  margin-top: auto; /* ответы в ряду стоят на одной линии, внизу карточки */
  padding: 14px 16px;
  border-left: 3px solid var(--signal);
  border-radius: 0 6px 6px 0;
  background: rgba(255, 255, 255, .05);
  font-size: 15px;
  line-height: 23px;
}
.review__answer-title { margin: 0 0 4px; font-weight: 600; font-size: 14px; }
.review__answer-text {
  margin: 0;
  color: var(--fog-dark);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.reviews__more { display: flex; margin: 24px auto 0; }

/* ===== Запись на установку (оттенок «Ночь») ===== */
.booking {
  padding: 112px 0;
  background: var(--night);
  scroll-margin-top: var(--header-h);
}

.booking__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px 64px;
  align-items: start;
}
.booking__lead { max-width: 420px; margin: 0; font-size: 20px; line-height: 30px; color: var(--text-soft); }

.booking-form,
.booking-done {
  grid-column: 2;
  grid-row: 1;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--card-dark);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
}

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

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { padding: 0; font-size: 14px; font-weight: 500; color: var(--fog-dark); }
.field__hint { margin-left: 6px; font-weight: 400; color: #7C818A; }
.field__input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--wet-asphalt);
  border-radius: 6px;
  background: var(--night);
  color: var(--snow);
  font: inherit;
  font-size: 17px; /* не меньше 16 px: иначе iPhone приближает страницу при вводе */
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field__input::placeholder { color: #5E636B; }
.field__input:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px rgba(124, 196, 242, .18); }
.field__input[aria-invalid="true"] { border-color: #FF6B5E; }
.field__error { margin: 0; font-size: 14px; line-height: 20px; color: #FF6B5E; }

.services { margin: 28px 0 0; padding: 0; border: 0; min-width: 0; }
.services legend { margin-bottom: 12px; }
.services__list { display: flex; flex-wrap: wrap; gap: 10px; }
.services__other { margin-top: 16px; }

/* Услуги — чекбоксы в виде «таблеток» */
.chip { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--wet-asphalt);
  border-radius: 21px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
  user-select: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .12s ease-out;
}
.chip:active span { transform: scale(.97); }
.chip input:checked + span { border-color: var(--signal); background: rgba(215, 38, 30, .16); color: var(--snow); }
.chip input:focus-visible + span { outline: 2px solid var(--ice); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .chip:hover span { border-color: var(--fog-dark); }
  .chip:hover input:checked + span { border-color: var(--signal); }
}

.consents { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--fog-dark);
  cursor: pointer;
}
.consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--signal); }
.consent + .field__error { margin-top: -6px; padding-left: 32px; }
.consent a, .doc a { color: var(--snow); text-decoration: underline; text-decoration-color: var(--wet-asphalt); text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .consent a:hover, .doc a:hover { text-decoration-color: var(--signal); }
}

.booking-form__submit { width: 100%; margin-top: 28px; }
.booking-form__submit:disabled { opacity: .7; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.booking-fail { margin-top: 16px; padding: 14px 16px; border-left: 3px solid #FF6B5E; border-radius: 0 6px 6px 0; background: rgba(215, 38, 30, .1); font-size: 15px; line-height: 22px; }
.booking-fail p { margin: 0; }
.booking-fail p + p { margin-top: 6px; }
.booking-fail a { font-family: var(--font-mono); white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

.booking-done { outline: none; }
.booking-done__title {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 28px;
  line-height: 32px;
  text-transform: uppercase;
  color: #2DB36F;
}
.booking-done__text { margin: 0; font-size: 17px; color: var(--text-soft); }

/* ===== Контакты (оттенок «Графит») ===== */
.contacts {
  padding: 112px 0;
  background: var(--graphite);
  scroll-margin-top: var(--header-h);
}
.hours {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: -12px 0 28px;
}
.hours__text { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; font-size: 17px; color: var(--text-soft); }
.hours__now {
  margin: 0;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  background: var(--asphalt);
  color: var(--fog-dark);
}
.hours__now::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--fog-dark); vertical-align: 1px; }
.hours__now.is-open { color: #4CC98A; background: rgba(45, 179, 111, .12); }
.hours__now.is-open::before { background: var(--green, #2DB36F); }
.contact__address { margin: -12px 0 18px 32px; font-size: 15px; color: var(--fog-dark); }
.contacts__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.contact {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--card-dark);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
}
.contact__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 20px;
  line-height: 26px;
}
.contact__icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact__phones { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.contact__phones li { display: flex; flex-direction: column; gap: 2px; }
.contact__label { font-size: 13px; line-height: 18px; color: var(--fog-dark); }
.contact__phone {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 19px;
  line-height: 26px;
  white-space: nowrap;
  color: var(--snow);
  text-decoration: underline;
  text-decoration-color: var(--wet-asphalt);
  text-underline-offset: 5px;
  transition: text-decoration-color .2s ease;
}
.contacts__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 28px 0 0; font-size: 17px; }
.contacts__mail span { color: var(--fog-dark); }
.contacts__mail a { color: var(--snow); text-decoration: underline; text-decoration-color: var(--wet-asphalt); text-underline-offset: 4px; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) {
  .contact__phone:hover, .contacts__mail a:hover { text-decoration-color: var(--signal); }
}

/* ===== Подвал (оттенок «Ночь», на тон темнее отзывов): название и реквизиты в одну строку ===== */
.footer {
  padding: 48px 0;
  background: var(--night);
  border-top: 1px solid var(--asphalt);
  color: var(--snow);
}

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

.footer__tagline {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ice);
}

.footer__social { margin-top: 24px; }
.footer__social-title {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 18px;
  color: var(--fog-dark);
}
.footer__vk {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
  font-size: 15px;
  line-height: 22px;
  color: var(--snow);
  transition: box-shadow .2s ease;
}
.footer__vk svg { flex: none; width: 30px; height: 30px; fill: #0077FF; } /* фирменный синий VK */
@media (hover: hover) and (pointer: fine) {
  .footer__vk:hover { box-shadow: inset 0 0 0 1px #0077FF; }
}

.footer__legal {
  max-width: 720px;
  font-size: 13px;
  line-height: 20px;
  color: var(--fog-dark);
}
.footer__requisites {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
}
.footer__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 22px;
  color: var(--text-soft);
}
.footer__points li { display: flex; flex-wrap: wrap; gap: 0 12px; }
.footer__points a {
  font-family: var(--font-mono);
  color: var(--snow);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--wet-asphalt);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer__points a:hover { text-decoration-color: var(--signal); }
}
.footer__points .footer__email { font-family: var(--font-body); }
.footer__docs { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 14px 0 0; }
.footer__docs a {
  color: var(--fog-dark);
  text-decoration: underline;
  text-decoration-color: var(--wet-asphalt);
  text-underline-offset: 3px;
  transition: color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer__docs a:hover { color: var(--snow); }
}
.footer__copy { margin: 14px 0 0; }

/* ===== Страницы документов (/privacy/, /consent/) ===== */
.doc-header { border-bottom: 1px solid var(--asphalt); }
.doc-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.doc-header__back { font-size: 15px; color: var(--fog-dark); transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .doc-header__back:hover { color: var(--snow); }
}
.doc { max-width: 760px; padding: 56px 0 96px; color: var(--text-soft); }
.doc h1 {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 46px;
  text-transform: uppercase;
  color: var(--snow);
}
.doc .doc__sub { margin: 0; font-size: 15px; line-height: 22px; color: var(--fog-dark); }
.doc h2 { margin: 40px 0 12px; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--snow); }
.doc p { margin: 0 0 12px; }
.doc .doc__sub + p:not(.doc__sub) { margin-top: 32px; }
.doc a[href^="tel:"] { white-space: nowrap; }
.doc ul { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }

/* ===== Страница /signalizacii/ — возможности сигнализаций (tools/build-alarm-page.py) ===== */
.alarm-hero { padding: 64px 0 48px; }
.alarm-hero__eyebrow {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--signal);
}
.alarm-hero__title {
  max-width: 900px;
  margin: 0 0 20px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.05;
  text-transform: uppercase;
}
.alarm-hero__lead { max-width: 760px; margin: 0 0 32px; font-size: 20px; line-height: 30px; color: var(--text-soft); }
.alarm-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.alarm-nav__link {
  padding: 8px 14px;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
  font-size: 15px;
  line-height: 22px;
  color: var(--text-soft);
  transition: box-shadow .2s ease, color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .alarm-nav__link:hover { box-shadow: inset 0 0 0 1px var(--fog-dark); color: var(--snow); }
}

/* разделы чередуются «Ночь» / «Графит» */
.feats { padding: 64px 0; border-top: 1px solid var(--asphalt); scroll-margin-top: 0; }
.feats:nth-of-type(odd) { background: var(--graphite); }
.feats__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.feats__icon {
  flex: none;
  width: 36px;
  height: 36px;
  margin-top: 2px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feats__icon--heat { stroke: var(--ice); }
.feats__title {
  margin: 0 0 6px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 32px;
  line-height: 36px;
  text-transform: uppercase;
}
.feats__sub { margin: 0; font-size: 17px; line-height: 26px; color: var(--fog-dark); }
.feats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feat {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--card-dark);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
}
/* последний пункт один в ряду — растягиваем на всю ширину */
.feat:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.feat__num { margin-bottom: 12px; font-family: var(--font-mono); font-size: 13px; line-height: 16px; color: var(--signal); }
.feat__title { margin: 0 0 6px; font-family: var(--font-head); font-weight: 600; font-size: 19px; line-height: 24px; }
.feat__text { margin: 0; font-size: 15px; line-height: 22px; color: var(--text-soft); }
.feat__tag {
  align-self: flex-start;
  margin-top: 14px;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  color: var(--fog-dark);
}

/* страница подогревателей — акцент «Лёд» вместо «Сигнала» */
.page--ice .alarm-hero__eyebrow,
.page--ice .feat__num { color: var(--ice); }
.page--ice .feats__icon { stroke: var(--ice); }
.alarm-cta { padding: 72px 0 96px; border-top: 1px solid var(--asphalt); }
.alarm-cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: 36px 40px;
  border-radius: var(--radius);
  background: var(--card-dark);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt);
}
.alarm-cta__title { margin: 0 0 8px; font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 32px; text-transform: uppercase; }
.alarm-cta__text { max-width: 620px; margin: 0; color: var(--text-soft); }
.alarm-cta__box .btn { flex: none; }

@media (max-width: 1040px) {
  .feats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat:last-child:nth-child(3n+1) { grid-column: auto; }
  .feat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .alarm-cta__box { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .alarm-hero { padding: 36px 0 32px; }
  .alarm-hero__lead { font-size: 17px; line-height: 26px; }
  .alarm-nav { margin-top: 28px; }
  .alarm-nav__link { padding: 6px 12px; font-size: 14px; }
  .feats { padding: 44px 0; }
  .feats__head { gap: 12px; margin-bottom: 20px; }
  .feats__icon { width: 28px; height: 28px; }
  .feats__title { font-size: 24px; line-height: 28px; }
  .feats__sub { font-size: 15px; line-height: 22px; }
  .feats__grid { grid-template-columns: 1fr; gap: 10px; }
  .feat:last-child:nth-child(odd) { grid-column: auto; }
  .feat { padding: 18px 20px; }
  .feat__title { font-size: 17px; line-height: 22px; }
  .alarm-cta { padding: 48px 0 64px; }
  .alarm-cta__box { padding: 24px 20px; }
  .alarm-cta__title { font-size: 22px; line-height: 26px; }
  .alarm-cta__box .btn { width: 100%; }
}

/* ===== Планшет ===== */
@media (max-width: 1480px) {
  .header__phones span { display: none; } /* подписи улиц — только на широких экранах, иначе тесно меню */
}
@media (max-width: 1240px) {
  .nav { gap: 22px; }
  .header__actions .btn { display: none; } /* тесно: номера важнее, записаться можно с первого экрана */
}

@media (max-width: 1080px) {
  .nav { gap: 20px; }
}
@media (max-width: 1040px) {
  .header__phones { display: none; } /* до бургера меню и номера вместе не помещаются */
}

@media (max-width: 900px) {
  :root { --header-h: 64px; --gutter: 20px; }

  .header__wordmark { font-size: 19px; }
  .header__actions { display: none; }
  .burger { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--asphalt);
    box-shadow: 0 1px 0 var(--wet-asphalt);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav a {
    padding: 14px 0;
    font-size: 18px;
    color: var(--snow);
    border-bottom: 1px solid var(--wet-asphalt);
  }
  .nav a::after { display: none; }
  .nav__phones {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
  }
  .nav__phones li { display: flex; flex-direction: column; gap: 2px; }
  .nav__phones span { font-size: 14px; color: var(--fog-dark); }
  .nav .nav__phones a { padding: 2px 0; border-bottom: 0; font-family: var(--font-mono); font-size: 18px; }
  .nav .nav__phones .nav__email { font-family: var(--font-body); font-size: 17px; }

  .reviews { padding: 80px 0; }
  .reviews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews__ratings { grid-template-columns: 1fr; }

  .about { padding: 80px 0; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .contacts { padding: 80px 0; }
  .contacts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact--starline { grid-column: 1 / -1; } /* третья карточка не остаётся одна на пол-ряда */

  .booking { padding: 80px 0; }
  .booking__inner { grid-template-columns: 1fr; }
  .booking-form, .booking-done { grid-column: 1; grid-row: 2; }

  .footer__inner { flex-direction: column; }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* термометр становится горизонтальным */
  .thermo { padding: 20px; }
  .thermo__readout {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
  }
  .thermo__value { font-size: 32px; line-height: 40px; }
  .thermo__scale {
    flex-direction: column;
    gap: 8px;
    height: auto;
  }
  .thermo__track { width: 100%; height: 12px; }
  .thermo__fill {
    background: linear-gradient(90deg, var(--ice) 0%, var(--ice) 45%, var(--amber) 100%);
    clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0);
  }
  .thermo__ticks {
    flex-direction: row-reverse;
    margin: 0 -6px;
  }
  .thermo__caption { margin-top: 12px; }
}

/* ===== Телефон ===== */
@media (max-width: 560px) {
  body { font-size: 16px; line-height: 25px; }

  .hero { padding: calc(var(--header-h) + 32px) 0 40px; }
  .hero__brand { gap: 8px; margin-bottom: 20px; }
  .hero__logo img { width: 280px; }
  .hero__eyebrow { font-size: 13px; }
  .hero__title { font-size: 36px; line-height: 40px; margin-bottom: 20px; }
  .hero__lead { font-size: 17px; line-height: 26px; margin: 0 0 28px; }

  .hero__buttons { flex-direction: column; }

  .reviews { padding: 64px 0; }
  .section-title { font-size: 28px; line-height: 32px; margin-bottom: 28px; }
  .reviews__ratings { gap: 12px; margin-bottom: 28px; }
  .rating-card { grid-template-columns: 1fr; padding: 20px; }
  .rating-card__link { grid-column: 1; grid-row: auto; margin-top: 12px; width: 100%; }
  .reviews__grid { grid-template-columns: 1fr; gap: 16px; }
  .review { padding: 20px; }
  /* на телефоне сначала 3 отзыва, остальные по кнопке «Ещё» */
  .reviews__grid.is-collapsed .review:nth-child(n+4) { display: none; }

  .about { padding: 64px 0; }
  .about__lead { font-size: 17px; line-height: 26px; }
  .stats { grid-template-columns: 1fr; margin-top: 36px; }
  .stat { padding: 20px 0; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--wet-asphalt); }
  .stat__value { font-size: 32px; line-height: 36px; }
  .stat__value--brands { font-size: 24px; line-height: 36px; }
  .about__subtitle { margin-top: 48px; }
  .works { grid-template-columns: 1fr; gap: 12px; }
  .work, .work__link { padding: 20px; }
  .work--more { padding: 0; }
  .work__icon { margin-bottom: 14px; }

  .doc { padding: 36px 0 64px; }
  .doc h1 { font-size: 28px; line-height: 32px; }

  .contacts { padding: 64px 0; }
  .contacts__grid { grid-template-columns: 1fr; gap: 12px; }
  .contact--starline { grid-column: auto; }
  .contact { padding: 20px; }
  .contact__title { font-size: 18px; margin-bottom: 14px; }
  .hours { margin: -8px 0 20px; }
  .hours > .contact__icon { display: none; } /* на узком экране иконка оставалась одна на строке */
  .hours__text { font-size: 16px; gap: 2px 16px; }
  .contact__address { margin: -8px 0 14px 32px; }
  .contacts__mail { font-size: 16px; }

  .booking { padding: 64px 0; }
  .booking__lead { font-size: 17px; line-height: 26px; }
  .booking-form, .booking-done { padding: 20px; }
  .booking-form__fields { grid-template-columns: 1fr; gap: 16px; }

  .footer { padding: 40px 0 calc(32px + env(safe-area-inset-bottom)); }
  .footer__requisites { flex-direction: column; }
  .footer__points { flex-direction: column; gap: 12px; }
  .footer__points li { flex-direction: column; gap: 2px; }
  .footer__points a { align-self: flex-start; padding: 4px 0; }
  .hero__buttons .btn { width: 100%; }

  .brands { margin-top: 32px; }
  .brands__title { font-size: 12px; margin-bottom: 12px; }
  .brands__rows { flex-direction: column; gap: 14px; }
  .brands__row { align-items: stretch; }
  .brands__list { flex-wrap: nowrap; }
  .brands__list li { flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: 15px; }
}

/* ===== Телефон: типографика компактнее (≤560px) ===== */
@media (max-width: 560px) {
  /* заголовки тянутся по ширине экрана: на 360px мельче, на 430px крупнее */
  .hero__title { font-size: clamp(27px, 7.8vw, 33px); line-height: 1.12; }
  .section-title { font-size: clamp(22px, 6.2vw, 26px); line-height: 1.15; }
  .doc h1 { font-size: clamp(22px, 6.2vw, 26px); line-height: 1.15; }

  .hero__lead,
  .about__lead,
  .booking__lead { font-size: 16px; line-height: 24px; }

  .btn { font-size: 16px; min-height: 52px; }
  .btn__number { font-size: 15px; }

  .thermo__value { font-size: 26px; line-height: 32px; }

  .stat { gap: 4px; padding: 16px 0; }
  .stat__value { font-size: 26px; line-height: 30px; }
  .stat__value--brands { font-size: 20px; line-height: 30px; }
  .stat__label { font-size: 14px; line-height: 20px; }

  .about__subtitle { font-size: 18px; line-height: 24px; margin-bottom: 16px; }
  .work__title { font-size: 18px; line-height: 24px; }
  .work__text { font-size: 15px; line-height: 23px; }

  .rating-card__source { font-size: 16px; }
  .rating-card__score { font-size: 34px; line-height: 40px; }
  .rating-card .stars svg { width: 18px; height: 18px; }
  .review__text { font-size: 15px; line-height: 23px; }
  .review__answer { font-size: 14px; line-height: 21px; }
  .review__avatar { width: 38px; height: 38px; font-size: 16px; }

  .booking-done__title { font-size: 22px; line-height: 26px; }
}

/* ===== Уведомление о сборе данных ===== */
.notice {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 560px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--card-dark);
  box-shadow: inset 0 0 0 1px var(--wet-asphalt), 0 12px 32px rgba(0, 0, 0, .45);
  transform: translateY(0);
  opacity: 1;
  transition: transform .3s ease-out, opacity .3s ease-out;
}
.notice.is-hiding { transform: translateY(16px); opacity: 0; }
@starting-style { .notice { transform: translateY(16px); opacity: 0; } }
.notice__text { margin: 0; font-size: 14px; line-height: 21px; color: var(--text-soft); }
.notice__text a { color: var(--snow); text-decoration: underline; text-decoration-color: var(--wet-asphalt); text-underline-offset: 3px; }
/* светлая кнопка: красная на экране уже есть — «Записаться на установку» */
.notice__btn { flex: none; background: var(--snow); color: var(--night); }
@media (hover: hover) and (pointer: fine) {
  .notice__btn:hover { background: var(--text-soft); }
  .notice__text a:hover { text-decoration-color: var(--signal); }
}
@media (max-width: 560px) {
  .notice {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }
  .notice__text { font-size: 13px; line-height: 19px; }
  .notice__btn { width: 100%; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
