/* ==========================================================================
   BWD Company — вязка арматуры
   Макет: Figma «десктоп-Главная» (1:30), 1920 × 5228
   Контентная сетка: 1284px по центру (боковые поля 318px при 1920px)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Токены
   -------------------------------------------------------------------------- */
:root {
  /* Цвета из Figma-переменных */
  --blue: #1f459f;
  /* main-blue          */
  --blue-deep: #20315b;
  /* фон карточек сравнения */
  --blue-circle: #465987;
  /* круг под пистолетами   */
  --dark: #1d1d17;
  /* color-dark         */
  --grey: #343434;
  /* color-grey-text    */
  --light: #f3f2f2;
  /* color-back         */
  --beige: #efeee9;
  /* color-backgraund   */
  --red: #ff3838;
  --green: #84c45b;
  --white: #fff;

  /* Типографика */
  --f-inter: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-archivo: "Archivo", "Inter", Arial, sans-serif;

  /* Сетка и форма */
  --container: 1284px;
  --gutter: 20px;
  --r-sm: 10px;
  --r-chip: 14px;
  --r-lg: 24px;

  /* Вертикальные отступы секций */
  --section-y: 100px;

  /* Высота зафиксированной шапки — на неё смещается контент */
  --header-h: 164px;
}

/* --------------------------------------------------------------------------
   2. Сброс и база
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--light);
  color: var(--grey);
  font-family: var(--f-inter);
  font-size: 18px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure,
address {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Якоря не должны уезжать под шапку */
[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* --------------------------------------------------------------------------
   3. Утилиты
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - var(--gutter) * 2, var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Надзаголовок секции — Archivo 16/30, трекинг 3.2px */
.eyebrow {
  font-family: var(--f-archivo);
  font-weight: 400;
  font-size: 16px;
  line-height: 30px;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  color: var(--light);
}

.eyebrow--blue {
  color: var(--blue);
}

.eyebrow--dark {
  color: var(--grey);
}

/* --------------------------------------------------------------------------
   4. Кнопки
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  height: 70px;
  padding: 0 48px;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  font-size: 18px;
  line-height: 24px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}

.btn--light {
  background: var(--light);
  color: var(--blue);
}

/* Наведение — кнопка «опустошается» до контура, нажатие — тёмно-синяя заливка.
   Прозрачная рамка есть и в покое, поэтому размер при наведении не скачет. */
.btn--primary:hover {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}

.btn--primary:active {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  color: var(--white);
}

.btn--light:hover {
  background: transparent;
  border-color: var(--light);
  color: var(--light);
}

.btn--light:active {
  background: var(--white);
  border-color: var(--white);
  color: var(--blue);
}

/* Компактная кнопка в шапке — 190 × 50, 15px */
.btn--compact {
  gap: 0;
  height: 50px;
  width: 190px;
  padding: 0 38px;
  font-size: 15px;
}

.btn__arrow {
  flex: 0 0 auto;
  width: 20px;
  height: 19px;
  /* Стрелка повёрнута на 45°, поэтому её диагональный бокс в макете уже
     самой картинки (14,25px). Отрицательные поля возвращают эту ширину. */
  margin-inline: -2.875px;
  fill: currentColor;
  transform: rotate(-45deg);
}

/* Фоновые картинки подгружаются при появлении в зоне видимости:
   в разметке стоит data-lazy-bg, скрипт переносит адрес в background-image. */
.service__media[data-lazy-bg],
.page-hero__media[data-lazy-bg],
.specs__media[data-lazy-bg],
.howto__media[data-lazy-bg],
.pledge__media[data-lazy-bg] {
  /* Только свойства фоновой картинки: сокращённая запись `background`
     сбросила бы и цвет, а он задан блоку отдельно — у карточки услуги
     под картинкой в макете лежит белая подложка. */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* В макете (Figma 58:862) картинка первой услуги не заполняет карточку,
   а вписана в неё с отступами 7,95% по горизонтали и 4,59% по вертикали.
   Проценты в padding считаются от ширины блока, поэтому вертикальный
   отступ записан как 4,59% × 360 / 518 = 3,19%. */
.service__media--contain[data-lazy-bg] {
  padding: 3.19% 7.95%;
  background-size: contain;
  background-origin: content-box;
}
.howto__deco [data-lazy-bg] { background: center / contain no-repeat; }

/* ==========================================================================
   5. ШАПКА  ·  Figma 19:1148
   ========================================================================== */
/* Шапка зафиксирована вверху. Заливка — ровно из макета (19:1148):
   чёрный с прозрачностью 80 %, без каких-либо эффектов. */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .8);
}

.header__inner {
  display: flex;
  align-items: flex-start;
  gap: 86px;
  min-height: 164px;
}

.header__logo {
  flex: 0 0 auto;
  width: 189px;
  padding-top: 20px;
}

.header__logo img {
  width: 100%;
  height: auto;
  aspect-ratio: 189 / 119;
}

.header__panel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
}

/* --- верхняя строка: языки + контакты --- */
.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 50px;
}

.lang {
  display: flex;
  gap: 8px;
}

.lang__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 4px;
  font-size: 15px;
  line-height: 1;
  color: rgba(255, 255, 255, .5);
}

.lang__item.is-active,
.lang__item:hover {
  color: var(--white);
}

.header__contacts {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header__mail {
  font-size: 18px;
  line-height: 24px;
  color: var(--white);
}

.header__phone {
  font-size: 24px;
  line-height: 34px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--white);
}

.header__mail:hover,
.header__phone:hover {
  color: #b9c6e6;
}

.socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.socials__link img {
  width: 30px;
  height: 30px;
}

.socials__link:hover {
  opacity: .75;
}

/* --- нижняя строка: меню, отделено линией --- */
.nav {
  /* линия в макете стоит на y = 89, строка меню — на y = 113 */
  margin-top: 19px;
  padding-top: 23px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

.nav__list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav__link {
  font-size: 18px;
  line-height: 24px;
  color: var(--white);
  white-space: nowrap;
}

.nav__link.is-active {
  color: var(--blue);
}

.nav__link:hover {
  color: #b9c6e6;
}

/* --- бургер (только мобильная версия) --- */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-top: 20px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.burger__line {
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: transform .25s ease, opacity .25s ease;
}

.burger.is-open .burger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open .burger__line:nth-child(2) {
  opacity: 0;
}

.burger.is-open .burger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   6. ПЕРВЫЙ ЭКРАН  ·  Figma 1:31
   ========================================================================== */
/* Шапка вынута из потока, поэтому первый экран отступает на её высоту.
   Фон при этом остаётся под шапкой — как в макете. */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
  min-height: 900px;
  background: var(--dark);
}

/* Кадр фотографии повторяет макет: она крупнее секции и смещена вверх.
   Проценты берутся от размеров секции, поэтому кадр не «плывёт». */
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__bg img,
.hero__bg-img {
  position: absolute;
  left: -0.01%;
  top: -56.21%;
  width: 123.23%;
  height: 175.37%;
  max-width: none;
  object-fit: cover;
}
.hero__bg-img { background: center / cover no-repeat; }

/* затемнение поверх фото */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .3);
}

.hero__body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  padding: 129px 0 80px;
}

.hero__list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 729px;
}

.hero__item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

/* третий пункт в макете уже остальных — из-за этого перенос строки другой */
.hero__item--narrow {
  max-width: 670px;
}

.hero__icon {
  flex: 0 0 auto;
  /* размер иконки взят из макета как есть (44,231 × 50,231) */
  width: 44.231px;
  height: 50.231px;
}

.hero__text {
  font-size: 36px;
  line-height: 48px;
  font-weight: 500;
  color: var(--white);
}

/* ==========================================================================
   7. ЦИФРЫ  ·  Figma 11:1355
   ========================================================================== */
.stats {
  background: var(--light);
  padding: var(--section-y) 0;
}

.stats__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.stat {
  flex: 0 1 299px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat__value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  height: 70px;
  font-family: var(--f-archivo);
  color: var(--blue);
}

.stat__num {
  font-weight: 700;
  font-size: 100px;
  line-height: 70px;
}

.stat__unit {
  font-weight: 500;
  font-size: 40px;
  line-height: 34px;
}

.stat__label {
  font-size: 24px;
  line-height: 34px;
  font-weight: 500;
  color: var(--grey);
}

/* ==========================================================================
   8. СРАВНЕНИЕ  ·  Figma 57:725 «bwd_banner»
   ========================================================================== */
.compare {
  position: relative;
  overflow: hidden;
  padding: var(--section-y) 0;
  background: #000;
}

/* фото-подложка (прозрачность 20%) + синий фильтр */
/* Подложка в макете — прямоугольник 2000×1121 по центру секции,
   он намеренно больше её и обрезается по краям. Картинка подставляется
   скриптом из data-lazy-bg, когда секция появляется на экране. */
.compare__bg {
  position: absolute;
  left: 50%;
  top: calc(50% - 14px);
  width: 2000px;
  height: 1121px;
  transform: translate(-50%, -50%);
  background: center / cover no-repeat;
  opacity: .2;
}

.compare::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(32, 69, 158, .4);
}

.compare__list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Группы внутри карточки стоят на своих местах из макета: расстояния между
   ними неодинаковые, поэтому заданы явными отступами, а не space-between.
   Фото пистолетов имеет прозрачные поля, поэтому блок патента заходит
   на его бокс — так и в макете. */
.compare__card {
  display: flex;
  align-items: flex-start;
  /* высота из макета, но как минимальная: если из админки пришёл текст
     длиннее макетного, карточка тянется, а не выпускает плашку наружу */
  min-height: 327px;
  padding: 0;
  background: var(--blue-deep);
  border-radius: var(--r-lg);
}

/* По вертикали группы в макете не выровнены по центру — у каждой своя
   отметка. Значения ниже это отметки из Figma относительно верха карточки. */
.compare__card--good .compare__photo {
  margin: 36.15px 0 0 51.7px;
}

.compare__card--good .compare__patent {
  margin: 133px 0 0 -70.7px;
}

.compare__card--good .compare__chip {
  margin-left: 27.3px;
}

.compare__card--good .compare__col {
  margin-top: 29px;
}

.compare__card--good .compare__percent {
  margin-top: 30px;
}

.compare__card--bad .compare__photo {
  margin: 14.59px 0 0 69.9px;
}

.compare__card--bad .compare__patent {
  margin: 167px 0 0 -26.9px;
}

.compare__card--bad .compare__chip {
  margin-left: 9.1px;
}

.compare__card--bad .compare__col {
  margin-top: 28px;
}

.compare__card--bad .compare__percent {
  margin-top: 29px;
}

.compare__col {
  margin-left: 26px;
}

.compare__col+.compare__col {
  margin-left: 35px;
}

.compare__percent {
  margin-left: 57px;
}

/* --- 8.1 Группа с пистолетами --- */
.compare__photo {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Фиксированная декоративная композиция: круг + перекрывающиеся фото.
   Текста внутри нет, поэтому абсолютное позиционирование безопасно. */
.compare__guns {
  position: relative;
  width: 337px;
  max-width: 100%;
  aspect-ratio: 337 / 203;
}

/* Круг-подложка. Он намеренно выходит за нижнюю границу блока
   и уходит под плашку с названием — так задумано в макете. */
.compare__guns::before {
  content: "";
  position: absolute;
  left: 13.75%;
  top: 6.82%;
  width: 70.03%;
  aspect-ratio: 1;
  background: var(--blue-circle);
  border-radius: 50%;
}

.compare__gun {
  position: absolute;
  height: auto;
  object-fit: contain;
  /* в макете это трёхслойная мягкая тень; максимальная непрозрачность 10 % */
  filter:
    drop-shadow(0 5px 11px rgba(0, 0, 0, .1)) drop-shadow(0 20px 20px rgba(0, 0, 0, .09)) drop-shadow(0 46px 27px rgba(0, 0, 0, .05));
}

.compare__gun--1 {
  left: 0;
  top: 0;
  width: 51.34%;
}

.compare__gun--2 {
  left: 26.28%;
  top: 23.85%;
  width: 43.32%;
}

.compare__gun--3 {
  left: 53.43%;
  top: .63%;
  width: 46.67%;
}

.compare__guns--single {
  width: 275px;
  aspect-ratio: 275 / 214;
}

.compare__guns--single::before {
  left: 10.18%;
  top: 13.55%;
  width: 85.82%;
}

.compare__gun--solo {
  filter:
    drop-shadow(0 6px 14px rgba(0, 0, 0, .1)) drop-shadow(0 26px 26px rgba(0, 0, 0, .09)) drop-shadow(0 58px 35px rgba(0, 0, 0, .05));
  left: 50%;
  top: 69.63%;
  width: 77.09%;
  transform: translate(-50%, -50%) rotate(16.75deg);
}

.compare__chip {
  position: relative;
  z-index: 1;
  width: 184px;
  padding: 10px 16px;
  background: var(--blue);
  border-radius: var(--r-chip);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.72px;
  color: var(--white);
}

/* --- 8.2 Патент --- */
.compare__patent {
  flex: 0 0 151px;
  /* заметка шире колонки и выходит за неё — без min-width:0 колонка
     растянулась бы и сдвинула все группы правее */
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.compare__note {
  /* в макете заметка смещена правее карточки патента и шире колонки,
     поэтому ширина задана явно — отступ не должен её сжимать */
  width: 151px;
  margin-left: 38px;
  margin-bottom: 23.4px;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .8);
}

.compare__patent-card {
  position: relative;
  width: 101px;
  padding: 3.16px;
  background: var(--white);
  border-radius: 4.42px;
}

.compare__patent-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 300 / 145;
  object-fit: cover;
}

.compare__patent-badge {
  position: absolute;
  right: -14px;
  top: -13px;
  width: 44px;
  height: 44px;
}

.compare__patent-title {
  width: 151px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.72px;
  color: var(--white);
}

/* --- 8.3 Колонка «катушка» / «узел» --- */
.compare__col {
  flex: 0 0 178px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.compare__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 151px;
  text-align: center;
}

.compare__media-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -.64px;
  color: var(--white);
}

.compare__media-sub {
  margin-top: 5px;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, .8);
}

/* по макету текст невидим, но держит высоту */
.compare__media-sub--ghost {
  visibility: hidden;
}

.compare__ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
}

.compare__ring--faint {
  border-color: rgba(255, 255, 255, .1);
}

.compare__ring--white {
  background-clip: padding-box;
}

.compare__ring img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

/* красная карточка: белый диск-подложка под катушкой 1,0 мм */
.compare__ring--white img {
  width: 120px;
  height: 120px;
  padding: 10px;
  background: var(--white);
  object-fit: contain;
}

/* блок цен заходит на круг — как в макете (перекрытие 36px) */
.compare__tags {
  position: relative;
  z-index: 1;
  width: 178px;
  margin-top: -36px;
  display: flex;
  flex-direction: column;
}

.compare__price {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px 10px 12px;
  background: var(--white);
  border-radius: var(--r-chip);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.72px;
  color: var(--blue);
}

.compare__arrow {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.compare__verdict {
  padding: 10px 16px;
  border-radius: var(--r-chip);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.72px;
  text-align: center;
  color: var(--white);
}

/* --- 8.4 Круг с процентом --- */
.compare__percent {
  flex: 0 0 269px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 269px;
  height: 269px;
  /* в макете блок с текстом стоит на 7px ниже центра круга */
  padding-top: 14px;
  border-radius: 50%;
  color: var(--white);
}

/* В макете у этих строк высота обрезана по заглавным буквам
   (text-box-trim). Тот же результат даёт межстрочный интервал,
   равный высоте капители: 73px для 100px, 29px для 40px, 22px для 30px. */
.compare__percent-value {
  display: flex;
  align-items: flex-start;
  width: 221px;
  font-weight: 600;
  font-size: 100px;
  line-height: 73px;
  letter-spacing: -8px;
}

.compare__percent-value span {
  font-weight: 900;
  font-size: 40px;
  line-height: 29px;
  letter-spacing: -3.2px;
}

.compare__percent-label {
  width: 221px;
  font-weight: 600;
  font-size: 30px;
  /* 22px — высота капители: в макете у подписи обрезаны поля строки.
     Но при переносе такой интервал склеивает строки, поэтому интервал
     обычный, а поля срезаны отрицательным полем: однострочная подпись
     занимает те же 22px и стоит там же, где в макете. */
  line-height: 34px;
  margin-block: -6px;
  letter-spacing: -1.2px;
  text-align: center;
}

/* --- 8.5 Цветовые темы карточек --- */
.compare__card--good .compare__verdict {
  background: var(--green);
}

.compare__card--good .compare__percent {
  background: var(--green);
}

.compare__card--good .compare__arrow {
  fill: var(--green);
  transform: rotate(180deg);
}

.compare__card--bad .compare__verdict {
  background: var(--red);
}

.compare__card--bad .compare__percent {
  background: var(--red);
}

.compare__card--bad .compare__arrow {
  fill: var(--red);
}

/* ==========================================================================
   9. УСЛУГИ  ·  Figma 1:70 «2 блок»
   ========================================================================== */
.services {
  background: var(--beige);
  padding: var(--section-y) 0 80px;
}

.services__list {
  display: flex;
  flex-direction: column;
  gap: 100px;
  margin-top: 30px;
}

.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 518px;
  gap: 30px;
  align-items: start;
}

.service__body {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
}

.service__index {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--blue);
}

.service__marker {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background: var(--blue);
}

.service__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
}

.service__title {
  font-weight: 700;
  font-size: 40px;
  line-height: 50px;
  color: var(--blue);
}

.service__text {
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--grey);
}

.service__content .btn {
  margin-top: 10px;
}

/* Размеры блока услуг заданы макетом (Figma 1:70) по координатам внутри
   карточки, а не по высоте набранного текста.

   Заголовок переносится по границе 722px — как в макете, где под него
   отведено поле такой ширины. Ограничение по max-width, а не по width:
   сама строка занимает ровно столько, сколько нужно тексту, и короткие
   названия не тянут за собой пустую коробку под картинку.

   Под описание отведено фиксированное место, поэтому кнопка стоит
   в 290px от верха первой карточки и в 270px у остальных независимо
   от того, на сколько строк лёг перевод. */
.services__list .service__title {
  max-width: 722px;
}

.services__list .service__text {
  min-height: 150px;
}

.services__list .service--lead .service__text {
  min-height: 170px;
}

.service__media {
  overflow: hidden;
  background: var(--white);
  border-radius: var(--r-lg);
  aspect-ratio: 518 / 340;
}

.service--lead .service__media {
  aspect-ratio: 518 / 360;
}

.service__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service__media--contain img {
  object-fit: contain;
  padding: 5% 8%;
}

/* ==========================================================================
   10. КАК ЭТО РАБОТАЕТ  ·  Figma 1:93 «3 блок»
   ========================================================================== */
.howto {
  position: relative;
  overflow: hidden;
  padding: var(--section-y) 0;
  background: var(--grey);
}

/* декоративные дуги — доли от размеров секции, поэтому масштабируются */
.howto__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.howto__deco img {
  position: absolute;
  max-width: none;
}

.howto__deco img:nth-child(1) {
  left: 40.01%;
  top: 6.83%;
  width: 60.14%;
  height: 93.38%;
}

.howto__deco img:nth-child(2) {
  left: 66.2%;
  top: 17.75%;
  width: 33.98%;
  height: 82.27%;
}

.howto__deco img:nth-child(3) {
  left: 0;
  top: -1.16%;
  width: 43.91%;
  height: 121.01%;
}

.howto__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 627px;
  gap: 30px;
  align-items: start;
}

.howto__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 628px;
}

.howto__title {
  margin-top: 20px;
  font-family: var(--f-archivo);
  font-weight: 700;
  font-size: 40px;
  line-height: 55px;
  color: var(--light);
}

.howto__text {
  margin-top: 40px;
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--light);
}

.howto__content .btn {
  margin-top: 50px;
}

.howto__media {
  margin-top: 26px;
  overflow: hidden;
  background: #f5f4f7;
  border-radius: var(--r-lg);
  aspect-ratio: 627 / 347;
}

.howto__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   11. ФОРМА ОБРАТНОЙ СВЯЗИ  ·  Figma 28:1389
   ========================================================================== */
.cta {
  background: var(--blue);
  padding: 84px 0;
}

.cta__head {
  display: flex;
  flex-direction: column;
  gap: 27px;
  text-align: center;
  color: var(--light);
}

.cta__title {
  font-family: var(--f-archivo);
  font-weight: 700;
  font-size: 40px;
  line-height: 55px;
}

.cta__subtitle {
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
}

.cta__form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.field__input {
  width: 100%;
  height: 60px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid var(--light);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 18px;
  line-height: 24px;
  color: var(--light);
}

.field__input::placeholder {
  color: var(--light);
  opacity: 1;
}

.field__input:focus {
  outline: none;
  border-color: var(--white);
}

.field__input.is-invalid {
  border-color: var(--red);
}

.cta .btn {
  height: 60px;
  width: 100%;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: fit-content;
  margin-top: 40px;
  cursor: pointer;
}

.consent__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.consent__box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  /* в макете квадрат сразу залит светлым; галочка появляется при отметке */
  background: var(--light);
}

/* сама галочка — две стороны рамки, повёрнутые на 45° */
.consent__box::after {
  content: "";
  width: 4px;
  height: 8px;
  margin-top: -2px;
  border: solid var(--blue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity .15s ease;
}

.consent__input:checked+.consent__box::after {
  opacity: 1;
}

.consent__input:focus-visible+.consent__box {
  outline: 2px solid var(--light);
  outline-offset: 3px;
}

.consent__text {
  font-size: 15px;
  /* ровно по высоте чекбокса — строка согласия в макете 18px */
  line-height: 18px;
  color: var(--light);
  opacity: .6;
}

/* ==========================================================================
   12. ФУТЕР  ·  Figma 1:284
   ========================================================================== */
.footer {
  min-height: 440px;
  padding: 100px 0 67px;
  background: var(--grey);
}

.footer__inner {
  display: grid;
  /* пропорции колонок из макета: они начинаются на 318, 757 и 1194 px */
  grid-template-columns: minmax(0, 409fr) minmax(0, 407fr) minmax(0, 408fr);
  gap: 30px;
  /* высота содержимого из макета: 100 → 373 px. Кнопка «наверх»
     прижата к низу этой области, как в 1:315 */
  min-height: 273px;
}

/* заголовки колонок в макете подняты на 4 px относительно логотипа */
.footer__col {
  margin-top: -4px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer__logo {
  width: 133px;
  height: auto;
  aspect-ratio: 133 / 84;
}

.footer__tagline {
  margin-top: 30px;
  max-width: 191px;
  font-size: 18px;
  line-height: 24px;
  color: var(--white);
}

.to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: auto;
  border: 1px solid var(--light);
  border-radius: var(--r-sm);
  color: var(--light);
}

.to-top svg {
  width: 40px;
  height: 40px;
}

.to-top:hover {
  background: rgba(243, 242, 242, .12);
}

.footer__title {
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--white);
}

.footer__list {
  margin-top: 46px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer__link,
.footer__address {
  font-size: 18px;
  line-height: 24px;
  color: var(--light);
}

.footer__link:hover {
  color: var(--white);
}

/* ==========================================================================
   12б. ДИСКЛЕЙМЕР  ·  строка под футером
   ========================================================================== */
.disclaimer {
  padding: 24px 0;
  background: var(--dark);
}

.disclaimer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.disclaimer__text {
  max-width: 900px;
  font-size: 14px;
  line-height: 20px;
  color: var(--light);
  opacity: .6;
}

.disclaimer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 24px;
}

.disclaimer__link {
  font-size: 14px;
  line-height: 20px;
  color: var(--light);
  opacity: .6;
}

.disclaimer__link:hover {
  opacity: 1;
}

/* ==========================================================================
   13. ВНУТРЕННЯЯ СТРАНИЦА  ·  Figma «десктоп-Предоставляем пистолеты» 19:1151
   ========================================================================== */

/* --- 13.1 Первый экран внутренней страницы (19:1152) --- */
.page-hero {
  margin-top: var(--header-h);
  padding: 63px 0 59px;
}

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

.page-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-hero__title {
  margin-top: 10px;
  font-weight: 700;
  font-size: 48px;
  line-height: 56px;
  color: var(--blue);
}

.page-hero__text {
  margin-top: 40px;
  max-width: 626px;
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--grey);
}

.page-hero__media {
  overflow: hidden;
  background: var(--white);
  border-radius: var(--r-lg);
  aspect-ratio: 627 / 340;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 13.2 Таблица условий (26:1341) --- */
.terms {
  padding-top: 60px;
}

.terms__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  /* схлопнутые рамки добавляют таблице по половине пикселя сверху и снизу —
     убираем их, чтобы сетка строк совпала с макетом (730 → 1064) */
  margin-block: -.5px;
}

.terms__col {
  width: 31.78%;
}

.terms__col--label {
  width: 34.11%;
}

.terms__table th,
.terms__table td {
  /* высота строк из макета: шапка 64 px, остальные — по 54 px */
  height: 54px;
  padding: 14px 20px;
  border: 1px solid rgba(104, 104, 104, .3);
  text-align: left;
  vertical-align: middle;
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: var(--grey);
}

.terms__table thead th {
  height: 64px;
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
}

.terms__table thead th.is-accent {
  color: var(--blue);
}

/* --- 13.3 Условия передачи (19:1166 + 28:1377) --- */
.pledge {
  padding: 100px 0;
}

.pledge .service {
  margin-top: 10px;
}

/* Блок без номера: левая колонка занимает всю ширину */
.service--plain .service__body {
  grid-template-columns: minmax(0, 1fr);
}

.service--plain .service__content {
  gap: 50px;
}

/* ==========================================================================
   14. МОДАЛЬНЫЕ ОКНА  ·  Figma «Frame 126575» 19:1150
   Крестик по макету стоит СПРАВА от карточки, а не внутри неё.
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
}

.modal__dialog {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 100%;
}

.modal__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 480px;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 40px 30px;
  background: var(--white);
  border-radius: 12px;
}

.modal__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--light);
  cursor: pointer;
  transition: opacity .2s ease;
}

.modal__close:hover {
  opacity: .7;
}

.modal__close svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* --- 14.1 Заказать звонок (102:413) --- */
.modal__title {
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  text-align: center;
  color: var(--blue);
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.modal__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal__input {
  width: 100%;
  height: 56px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid rgba(52, 52, 52, .5);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.2;
  color: var(--grey);
}

.modal__input::placeholder {
  color: rgba(52, 52, 52, .5);
  opacity: 1;
}

.modal__input:focus {
  outline: none;
  border-color: var(--grey);
}

.modal__input.is-invalid {
  border-color: var(--red);
}

.modal__submit {
  width: 100%;
  height: 56px;
  padding: 0 48px;
  background: var(--blue);
  border: 2px solid var(--blue);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 18px;
  line-height: 24px;
  color: var(--white);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.modal__submit:hover {
  background: transparent;
  color: var(--blue);
}

.modal__submit:active {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  color: var(--white);
}

.modal__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.modal__consent input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.modal__check {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 1.5px;
  transition: background-color .15s ease, border-color .15s ease;
}

.modal__check::after {
  content: "";
  width: 4px;
  height: 8px;
  margin-top: -2px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity .15s ease;
}

.modal__consent input:checked+.modal__check {
  background: var(--blue);
  border-color: var(--blue);
}

.modal__consent input:checked+.modal__check::after {
  opacity: 1;
}

.modal__consent input:focus-visible+.modal__check {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.modal__check.is-invalid {
  border-color: var(--red);
}

.modal__consent-text {
  font-size: 15px;
  line-height: 1.2;
  color: rgba(52, 52, 52, .5);
}

/* --- 14.2 Спасибо за обращение (103:401) --- */
.modal__card--thanks {
  gap: 40px;
  width: 588px;
  padding: 60px 30px;
  border-radius: 16px;
}

.modal__thanks-title {
  font-weight: 700;
  font-size: 48px;
  line-height: 56px;
  text-align: center;
  color: var(--blue);
}

.modal__thanks-text {
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  text-align: center;
  color: var(--blue-deep);
}

/* Блокировка прокрутки страницы, пока открыто окно.
   Полоса прокрутки при этом исчезает и страница стала бы шире — из-за этого
   контент «прыгал». Ширину полосы скрипт кладёт в --sbw и мы её компенсируем:
   в потоке — на body, а зафиксированной шапке — отдельно. */
body.is-modal-open {
  overflow: hidden;
  padding-right: var(--sbw, 0px);
}

body.is-modal-open .header {
  padding-right: var(--sbw, 0px);
}

/* ==========================================================================
   15. СТРАНИЦА «КАТУШКИ»  ·  Figma «десктоп-Катушки» 76:1362
   ========================================================================== */

/* Здесь картинка первого экрана выше (444px) и задаёт высоту секции */
.page-hero--tall {
  padding-bottom: 0;
}

/* кадр первого экрана в макете обрезает фото по нижней границе секции,
   поэтому видимая высота — 443 px, а не 444 (76:1363 против 76:1370) */
.page-hero--tall .page-hero__media {
  aspect-ratio: 627 / 443;
}

/* на «Ремонте» секция выше, там фото помещается целиком */
.page-hero--top .page-hero__media {
  aspect-ratio: 627 / 444;
}

/* --- 15.1 Преимущества (76:1497) --- */
.features {
  padding-top: 90px;
}

.features__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 30px;
}

.feature {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px 30px;
  background: var(--white);
  border-radius: var(--r-lg);
}

.feature__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.feature__icon {
  width: 60px;
  height: 60px;
}

.feature__title {
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--blue);
}

.feature__text {
  /* В макете высота жёстко 89px с обрезкой. Берём её как минимум,
     чтобы карточки совпадали с макетом, но длинный текст не обрезался. */
  min-height: 89px;
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: var(--grey);
}

/* --- 15.2 Характеристики (76:1374) --- */
.specs {
  padding: 140px 0 135px;
}

.specs__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 626px;
  gap: 30px;
  align-items: start;
}

.specs__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.specs__title {
  margin-top: 10px;
  font-weight: 700;
  font-size: 40px;
  line-height: 50px;
  color: var(--blue);
}

.specs__text {
  margin-top: 30px;
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--grey);
}

.specs__media {
  overflow: hidden;
  background: var(--white);
  border-radius: var(--r-lg);
  aspect-ratio: 626 / 340;
}

.specs__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   16. СТРАНИЦА «КОНТАКТЫ»  ·  Figma «Контакты» 86:641
   ========================================================================== */
.contacts {
  margin-top: var(--header-h);
  padding: 70px 0 90px;
}

.contacts__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contacts__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contacts__title {
  font-weight: 700;
  font-size: 48px;
  line-height: 56px;
  color: var(--blue);
}

.contacts__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 30px;
}

.contact-card {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-height: 270px;
  padding: 40px 30px 20px;
  background: var(--white);
  border-radius: 30px;
}

.contact-card__head {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* Круг под иконкой — обычный фон, отдельная картинка не нужна */
.contact-card__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 67px;
  height: 67px;
  background: var(--blue);
  border-radius: 50%;
}

.contact-card__icon img {
  width: 33px;
  height: 35px;
}

.contact-card__title {
  font-weight: 500;
  font-size: 36px;
  line-height: 48px;
  color: var(--blue);
}

.contact-card__text {
  /* В макете блок текста всегда 102px, чтобы карточки были одинаковыми.
     Берём как минимум — длинный адрес не обрежется. */
  min-height: 102px;
  font-style: normal;
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--grey);
}

.contact-card__text a:hover {
  color: var(--blue);
}

/* ==========================================================================
   17. СТРАНИЦА «РЕМОНТ»  ·  Figma «десктоп-Ремонтируем пистолеты» 77:1653
   ========================================================================== */

/* Здесь текст прижат к верху, а отступ сверху на 7px больше, чем на других
   внутренних страницах (в макете контент начинается с 234px, а не с 227px) */
.page-hero--top {
  padding-top: 70px;
}

.page-hero--top .page-hero__inner {
  align-items: start;
}

/* --- 17.1 Этапы ремонта (77:1672) --- */
.steps {
  padding: 90px 0 118px;
}

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

.step {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px 30px;
  background: var(--white);
  border-radius: var(--r-lg);
}

.step__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.step__index {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--blue);
}

.step__marker {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  background: var(--blue);
  border-radius: 4px;
}

.step__title {
  font-weight: 700;
  font-size: 48px;
  line-height: 56px;
  color: var(--blue);
}

.step__text {
  /* высота из макета как минимум, длинный текст не обрежется */
  min-height: 89px;
  font-weight: 500;
  font-size: 24px;
  line-height: 34px;
  color: var(--grey);
}

/* ==========================================================================
   18. Адаптив
   ========================================================================== */

/* --- ≤1440: контент прижимается к краям, уменьшаем крупные группы --- */
@media (max-width: 1440px) {
  :root {
    --gutter: 40px;
  }

  .header__inner {
    gap: 40px;
  }

  .header__contacts {
    gap: 20px;
  }
}

/* --- ≤1320: шапке становится тесно, поджимаем отступы и мелкие элементы --- */
@media (max-width: 1320px) {
  .header__inner {
    gap: 28px;
  }

  .header__contacts {
    gap: 16px;
  }

  .header__logo {
    width: 160px;
  }

  .nav__list {
    gap: 16px;
  }

  .header__mail {
    font-size: 16px;
  }

  .socials {
    gap: 8px;
  }

  .socials__link img {
    width: 26px;
    height: 26px;
  }
}

/* --- ≤1280: карточка сравнения перестраивается в две строки --- */
@media (max-width: 1280px) {
  .compare__card {
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    padding: 40px;
  }

  .compare__card {
    align-items: center;
    height: auto;
  }

  .compare__card .compare__photo,
  .compare__card .compare__patent,
  .compare__card .compare__chip,
  .compare__card .compare__col,
  .compare__card .compare__percent {
    margin: 0;
  }

  .compare__note {
    margin-left: 0;
    margin-bottom: 12px;
  }

  .compare__photo,
  .compare__patent,
  .compare__col,
  .compare__percent {
    flex: 0 0 auto;
  }

  .service {
    grid-template-columns: minmax(0, 1fr) 42%;
  }

  .page-hero__inner {
    grid-template-columns: minmax(0, 1fr) 45%;
  }

  .specs__inner {
    grid-template-columns: minmax(0, 1fr) 46%;
  }
}

/* --- ≤1200: контейнер уже заметно уже макетного, поэтому крупный текст
       уменьшается на ступень — иначе он выглядит непропорционально --- */
@media (max-width: 1200px) {
  :root {
    --section-y: 84px;
  }

  .hero__text {
    font-size: 32px;
    line-height: 44px;
  }

  .stat__num {
    font-size: 88px;
    line-height: 64px;
  }

  .stat__unit {
    font-size: 34px;
  }

  .stat__value {
    height: 64px;
  }

  .service__title {
    font-size: 36px;
    line-height: 46px;
  }

  .service__text {
    font-size: 22px;
    line-height: 32px;
  }

  /* Ниже этой ширины кегль уже другой, и координаты макета не работают:
     возвращаем заголовку и описанию обычное поведение. */
  .services__list .service__title {
    max-width: none;
  }

  .services__list .service__text,
  .services__list .service--lead .service__text {
    min-height: 0;
  }

  .howto__title {
    font-size: 36px;
    line-height: 48px;
  }

  .howto__text {
    font-size: 22px;
    line-height: 32px;
  }

  .cta__title {
    font-size: 34px;
    line-height: 46px;
  }

  .cta__subtitle {
    font-size: 22px;
    line-height: 32px;
  }

  .page-hero__title {
    font-size: 40px;
    line-height: 50px;
  }

  .page-hero__text {
    font-size: 22px;
    line-height: 32px;
  }

  .specs__title {
    font-size: 36px;
    line-height: 46px;
  }

  .specs__text {
    font-size: 22px;
    line-height: 32px;
  }

  .contacts__title {
    font-size: 40px;
    line-height: 50px;
  }

  .contact-card__title {
    font-size: 30px;
    line-height: 40px;
  }

  .step__title {
    font-size: 40px;
    line-height: 50px;
  }

  .step__text {
    font-size: 22px;
    line-height: 32px;
  }

  .feature__title {
    font-size: 22px;
    line-height: 32px;
  }
}

/* --- ≤1200: мобильное меню. Ниже этой ширины строка меню уже не помещается
       в одну линию, поэтому шапка переключается на бургер. --- */
@media (max-width: 1200px) {
  :root {
    --header-h: 120px;
  }

  /* раскрытое меню не должно вылезать за экран */
  .header {
    max-height: 100vh;
    overflow-y: auto;
  }

  .header__inner {
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    min-height: 0;
    padding-block: 16px;
  }

  .header__logo {
    width: 140px;
    padding-top: 0;
  }

  .burger {
    display: flex;
    margin-top: 0;
    margin-left: auto;
  }

  .header__panel {
    flex: 0 0 100%;
    display: none;
    padding-top: 0;
    padding-bottom: 20px;
  }

  .header__panel.is-open {
    display: flex;
  }

  .header__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-top: 20px;
  }

  .header__contacts {
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero {
    min-height: 0;
  }

  .hero__body {
    padding: 80px 0;
  }
}

/* --- ≤992: одноколоночные секции --- */
@media (max-width: 992px) {
  :root {
    --section-y: 70px;
  }

  .hero__text {
    font-size: 30px;
    line-height: 40px;
  }

  .stats__list {
    gap: 32px;
  }

  .stat {
    flex: 1 1 240px;
  }

  .stat__num {
    font-size: 80px;
    line-height: 60px;
  }

  .service {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .service__media {
    order: -1;
    aspect-ratio: 16 / 10;
  }

  .service--lead .service__media {
    aspect-ratio: 16 / 10;
  }

  .services__list {
    gap: 70px;
  }

  .service__title {
    font-size: 32px;
    line-height: 42px;
  }

  .service__text {
    font-size: 20px;
    line-height: 30px;
  }

  .howto__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .howto__media {
    margin-top: 0;
    aspect-ratio: 16 / 9;
  }

  .howto__title {
    font-size: 32px;
    line-height: 44px;
  }

  .howto__text {
    font-size: 20px;
    line-height: 30px;
    margin-top: 30px;
  }

  .cta__title {
    font-size: 30px;
    line-height: 42px;
  }

  .cta__subtitle {
    font-size: 20px;
    line-height: 30px;
  }

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

  .footer {
    min-height: 0;
    padding: 70px 0 50px;
  }

  .footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    min-height: 0;
  }

  .footer__col {
    margin-top: 0;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .to-top {
    margin-top: 30px;
  }

  .footer__list {
    margin-top: 24px;
  }

  .page-hero {
    padding: 40px 0 60px;
  }

  .page-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .page-hero__title {
    font-size: 34px;
    line-height: 44px;
  }

  .page-hero__text {
    font-size: 20px;
    line-height: 30px;
    margin-top: 30px;
  }

  .page-hero__media {
    aspect-ratio: 16 / 9;
  }

  .terms {
    padding-top: 40px;
  }

  .pledge {
    padding: 60px 0 70px;
  }

  .service--plain .service__content {
    gap: 30px;
  }

  .page-hero--tall .page-hero__media {
    aspect-ratio: 16 / 9;
  }

  .features {
    padding-top: 50px;
  }

  .specs {
    padding: 70px 0;
  }

  .specs__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .specs__media {
    aspect-ratio: 16 / 9;
  }

  .specs__title {
    font-size: 32px;
    line-height: 42px;
  }

  .specs__text {
    font-size: 20px;
    line-height: 30px;
  }

  .contacts {
    padding: 40px 0 60px;
  }

  .contacts__title {
    font-size: 34px;
    line-height: 44px;
  }

  .contact-card__title {
    font-size: 28px;
    line-height: 38px;
  }

  .steps {
    padding: 50px 0 70px;
  }

  .step__title {
    font-size: 34px;
    line-height: 44px;
  }

  .step__text {
    font-size: 20px;
    line-height: 30px;
  }
}

/* --- ≤768: планшет / крупный телефон --- */
@media (max-width: 768px) {
  :root {
    --gutter: 20px;
    --section-y: 56px;
  }

  .hero__body {
    padding: 56px 0;
  }

  .hero__list {
    gap: 28px;
  }

  .hero__text {
    font-size: 24px;
    line-height: 34px;
  }

  .hero__icon {
    width: 36px;
    height: 40px;
  }

  .stat__num {
    font-size: 64px;
    line-height: 52px;
  }

  .stat__unit {
    font-size: 28px;
  }

  .stat__label {
    font-size: 20px;
    line-height: 28px;
  }

  /* карточка сравнения — вертикальный стек */
  .compare__card {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 32px 20px;
  }

  .compare__photo {
    align-items: center;
  }

  .compare__chip {
    margin-left: 0;
  }

  .compare__patent {
    align-items: center;
    text-align: center;
  }

  .btn {
    height: 60px;
    padding: 0 32px;
    gap: 20px;
  }

  .cta__title {
    font-size: 26px;
    line-height: 36px;
  }

  .cta__form {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .cta .btn {
    margin-top: 8px;
  }

  /* таблица не ломается: прокручивается по горизонтали внутри своей обёртки */
  .terms__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .terms__table {
    min-width: 640px;
  }

  .terms__table th,
  .terms__table td {
    padding: 12px 14px;
    font-size: 16px;
    line-height: 22px;
  }

  .terms__table thead th {
    font-size: 20px;
    line-height: 28px;
  }

  .features__list {
    gap: 20px;
  }

  .feature {
    flex: 1 1 100%;
  }

  .feature__text {
    min-height: 0;
  }

  .steps__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .step__text {
    min-height: 0;
  }

  .contacts__list {
    gap: 20px;
  }

  .contact-card {
    flex: 1 1 100%;
    min-height: 0;
    padding: 28px 24px;
  }

  .contact-card__text {
    min-height: 0;
    font-size: 20px;
    line-height: 30px;
  }

  .contact-card__head {
    gap: 20px;
  }

  .contact-card__icon {
    width: 56px;
    height: 56px;
  }

  .contact-card__icon img {
    width: 27px;
    height: 29px;
  }
}

/* --- ≤560: телефон --- */
@media (max-width: 560px) {
  .header__contacts {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .btn--compact {
    width: 100%;
  }

  .hero__text {
    font-size: 20px;
    line-height: 30px;
  }

  .stats__list {
    flex-direction: column;
  }

  .stat {
    flex: 1 1 auto;
  }

  .compare__percent {
    width: 220px;
    height: 220px;
    flex-basis: auto;
  }

  .compare__percent-value {
    width: fit-content;
    font-size: 80px;
    letter-spacing: -6px;
  }

  .compare__percent-value span {
    font-size: 32px;
  }

  .compare__percent-label {
    font-size: 24px;
  }

  .service__title {
    font-size: 26px;
    line-height: 34px;
  }

  .service__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .service__index {
    height: auto;
  }

  .howto__title {
    font-size: 26px;
    line-height: 36px;
  }

  .cta__title {
    font-size: 22px;
    line-height: 32px;
  }

  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .disclaimer__links {
    gap: 8px 16px;
  }

  .page-hero__title {
    font-size: 26px;
    line-height: 34px;
  }

  .specs__title {
    font-size: 26px;
    line-height: 34px;
  }

  .contacts__title {
    font-size: 26px;
    line-height: 34px;
  }

  .contact-card__title {
    font-size: 24px;
    line-height: 34px;
  }

  .step__title {
    font-size: 26px;
    line-height: 34px;
  }

  .modal {
    padding: 12px;
  }

  /* На телефоне ряд «карточка + крестик» шире экрана: карточка занимает
     всю ширину и стоит по центру, а крестик переезжает в её угол. */
  .modal__dialog {
    display: block;
    width: 100%;
  }

  .modal__close {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 24px;
    height: 24px;
    color: var(--blue);
  }

  .modal__title,
  .modal__thanks-title {
    /* место для крестика в углу карточки */
    padding: 0 24px;
  }

  .modal__card {
    padding: 28px 20px;
    gap: 24px;
  }

  .modal__card--thanks {
    padding: 40px 20px;
    gap: 28px;
  }

  .modal__submit {
    padding: 0 20px;
  }

  .modal__title {
    font-size: 20px;
    line-height: 28px;
  }

  .modal__thanks-title {
    font-size: 30px;
    line-height: 38px;
  }

  .modal__thanks-text {
    font-size: 18px;
    line-height: 26px;
  }
}