/* =========================================================
   ГК «Алюминиевые конструкции» — дизайн-система и стили
   Хабаровск · ak-27.ru
   ========================================================= */

/* ---------- 1. Шрифт (самохостинг, переменный Geologica) ---------- */

@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geologica-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geologica-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 2. Токены ---------- */

:root {
  /* Цвет */
  --navy-900: #0a2540;
  --navy-800: #0e3a5c;
  --navy-700: #14507c;
  --navy-600: #1c628f;
  --blue-500: #1b8ce3;
  --blue-600: #1573c4;
  --blue-050: #eaf4fd;

  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-alt: #eef1f5;

  --text: #0f172a;
  --text-muted: #5b6b7c;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #a9c4dc;

  --border: #e3e8ed;
  --border-dark: rgba(255, 255, 255, 0.14);

  --success: #15a06b;
  --danger: #d64545;

  /* Шкала отступов — строго кратна 4 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Скругления */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 16px 48px rgba(10, 37, 64, 0.12);

  /* Сетка */
  --container: 1280px;
  --gutter: 24px;

  /* Прочее */
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.18s var(--ease);
  --t-base: 0.28s var(--ease);
}

/* ---------- 3. Сброс и база ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: 'Geologica', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

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

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  display: block;
  padding: 0;
}

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

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-sm);
  transform: translateY(-200%);
  transition: transform var(--t-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 4. Раскладка ---------- */

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

.section {
  padding-block: var(--sp-9);
}

.section--tight {
  padding-block: var(--sp-8);
}

.section--dark {
  background: var(--navy-900);
  color: var(--text-on-dark);
}

/* Шапка секции: служебная подпись + заголовок + описание */

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-7);
}

.section-head__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-500);
}

.section--dark .section-label {
  color: var(--text-on-dark-muted);
}

.section-title {
  font-size: clamp(28px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--navy-800);
  text-wrap: balance;
}

.section--dark .section-title {
  color: #fff;
}

.section-desc {
  max-width: 56ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
}

.section--dark .section-desc {
  color: var(--text-on-dark-muted);
}

/* ---------- 5. Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: 0 var(--sp-6);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  transition: background var(--t-fast), color var(--t-fast),
    border-color var(--t-fast), transform var(--t-fast);
}

.btn:active {
  transform: translateY(1px);
}

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

.btn--primary {
  background: var(--blue-500);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-600);
}

.btn--navy {
  background: var(--navy-800);
  color: #fff;
}

.btn--navy:hover {
  background: var(--navy-700);
}

.btn--white {
  background: #fff;
  color: var(--navy-800);
}

.btn--white:hover {
  background: var(--blue-050);
}

.btn--outline {
  border-color: var(--border);
  background: transparent;
  color: var(--navy-800);
}

.btn--outline:hover {
  border-color: var(--navy-800);
  background: var(--surface);
}

.btn--outline-light {
  border-color: var(--border-dark);
  background: transparent;
  color: #fff;
}

.btn--outline-light:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.btn--sm {
  min-height: 44px;
  padding: 0 var(--sp-5);
  font-size: 14px;
}

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

/* Круглая кнопка со стрелкой */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--surface-alt);
  color: var(--navy-800);
  transition: background var(--t-fast), color var(--t-fast);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- 6. Мелкие компоненты ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--sp-5);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--navy-800);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-500);
  background: var(--blue-050);
  border-radius: var(--r-full);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}

/* Цифра-показатель */

.stat__value {
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--navy-800);
}

.stat__label {
  margin-top: var(--sp-2);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.section--dark .stat__value {
  color: #fff;
}

.section--dark .stat__label {
  color: var(--text-on-dark-muted);
}

/* Квадратная иконка-подложка */

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--blue-050);
  color: var(--blue-500);
}

.icon-box svg {
  width: 24px;
  height: 24px;
}

.icon-box--on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---------- 7. Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 246, 248, 0.92);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background var(--t-base);
}

.header.is-stuck {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  min-height: var(--header-h);
}

/* Полоса прогресса прокрутки */

.header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}

.header__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue-500);
  transition: width 0.1s linear;
}

/* Логотип */

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}

.logo__mark {
  width: 34px;
  height: 34px;
  flex: none;
  color: var(--blue-500);
}

.logo__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo__line {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--navy-800);
  white-space: nowrap;
}

.logo--light .logo__mark {
  color: #fff;
}

.logo--light .logo__line {
  color: #fff;
}

/* Навигация */

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-right: auto;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-800);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}

.nav__link:hover {
  color: var(--blue-500);
  background: rgba(27, 140, 227, 0.07);
}

.nav__link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--t-fast);
}

.nav__item {
  position: relative;
}

.nav__item.is-open > .nav__link svg {
  transform: rotate(180deg);
}

/* Мегаменю */

.megamenu {
  position: absolute;
  top: calc(100% + 12px);
  left: -16px;
  z-index: 110;
  width: min(760px, calc(100vw - 48px));
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-fast), transform var(--t-fast),
    visibility var(--t-fast);
}

.nav__item.is-open .megamenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.megamenu__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-1);
}

.megamenu__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--navy-800);
  transition: background var(--t-fast), color var(--t-fast);
}

.megamenu__link:hover {
  background: var(--blue-050);
  color: var(--blue-600);
}

.megamenu__link svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--blue-500);
}

.megamenu__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

/* Правая часть шапки */

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex: none;
}

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

.header__phone b {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-800);
  white-space: nowrap;
}

.header__phone span {
  font-size: 12px;
  color: var(--text-muted);
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--navy-800);
  color: #fff;
}

.burger svg {
  width: 22px;
  height: 22px;
}

/* Мобильное меню */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  background: var(--navy-900);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--border-dark);
}

.mobile-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.mobile-menu__close svg {
  width: 22px;
  height: 22px;
}

.mobile-menu__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-5) var(--gutter) var(--sp-7);
  -webkit-overflow-scrolling: touch;
}

.mobile-menu__title {
  margin: var(--sp-6) 0 var(--sp-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.mobile-menu__title:first-child {
  margin-top: 0;
}

.mobile-menu__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-dark);
}

.mobile-menu__link svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--blue-500);
}

.mobile-menu__foot {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--gutter);
  border-top: 1px solid var(--border-dark);
  background: var(--navy-900);
}

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

.hero {
  padding-top: var(--sp-7);
  padding-bottom: var(--sp-9);
}

.hero__head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end;
  gap: var(--sp-7);
  margin-bottom: var(--sp-7);
}

.hero__title {
  margin-top: var(--sp-4);
  font-size: clamp(32px, 4.4vw, 58px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-transform: uppercase;
  color: var(--navy-900);
  text-wrap: balance;
}

.hero__title em {
  font-style: normal;
  color: var(--blue-500);
}

.hero__aside {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding-bottom: var(--sp-2);
}

.hero__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* Сетка фото первого экрана */

.hero__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.hero__cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-alt);
  aspect-ratio: 1 / 1;
}

/* Параллакс двигает эту обёртку внутри рамки плитки, поэтому она
   с запасом по высоте. Сама плитка остаётся на месте и не наезжает
   на цифры под сеткой. */

.hero__cell-media {
  position: absolute;
  top: -10%;
  left: 0;
  display: block;
  width: 100%;
  height: 120%;
}

.hero__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.hero__cell:hover img {
  transform: scale(1.04);
}

.hero__cell-caption {
  position: absolute;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-4);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(10, 37, 64, 0.72);
  backdrop-filter: blur(6px);
  border-radius: var(--r-sm);
}

/* Плашка-призыв в сетке */

.hero__cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-6);
  aspect-ratio: 1 / 1;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-lg);
  text-align: left;
  transition: background var(--t-base);
}

.hero__cta:hover {
  background: var(--navy-700);
}

.hero__cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.hero__cta-title {
  display: block;
  font-size: clamp(20px, 1.7vw, 26px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero__cta-note {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-on-dark-muted);
}

.hero__cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.14);
}

.hero__cta-arrow svg {
  width: 20px;
  height: 20px;
}

/* Цифры под сеткой */

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

/* ---------- 9. Полоса клиентов ---------- */

.clients {
  padding-block: var(--sp-7);
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.clients__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.clients__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-800);
}

.clients__note {
  font-size: 14px;
  color: var(--text-muted);
}

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee__track {
  display: flex;
  gap: var(--sp-3);
  width: max-content;
  animation: marquee 48s linear infinite;
}

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

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

/* ---------- 10. Каталог услуг ---------- */

.catalog__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: var(--sp-6);
  align-items: start;
}

.catalog__preview {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-5));
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.catalog__figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-alt);
  aspect-ratio: 4 / 5;
}

.catalog__figure img {
  position: absolute;
  top: -6%;
  left: 0;
  width: 100%;
  /* с запасом по высоте, чтобы параллакс не обнажал края */
  height: 112%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.catalog__figure img.is-active {
  opacity: 1;
}

.catalog__caption {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-3) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-800);
}

.catalog__caption svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--blue-500);
}

.catalog__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.service-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: background var(--t-base), border-color var(--t-base),
    color var(--t-base), transform var(--t-base);
}

.service-row:hover,
.service-row:focus-visible {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
  transform: translateX(4px);
}

.service-row__icon {
  color: var(--blue-500);
  transition: color var(--t-base);
}

.service-row__icon svg {
  width: 24px;
  height: 24px;
}

.service-row:hover .service-row__icon {
  color: #fff;
}

.service-row__text {
  min-width: 0;
  margin-right: auto;
}

.service-row__title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.service-row__tagline {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color var(--t-base);
}

.service-row:hover .service-row__tagline {
  color: var(--text-on-dark-muted);
}

.service-row__arrow {
  transition: background var(--t-base), color var(--t-base);
}

.service-row:hover .service-row__arrow {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* ---------- 11. О компании ---------- */

.about__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.about__lead {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--navy-800);
}

.about__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

.about__actions {
  margin-top: var(--sp-2);
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-8);
  padding-top: var(--sp-7);
  border-top: 1px solid var(--border);
}

.about__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-7);
}

.about__media figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 3 / 2;
  background: var(--surface-alt);
}

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

/* ---------- 12. Преимущества ---------- */

.advantages {
  position: relative;
  overflow: hidden;
}

.advantages__watermark {
  position: absolute;
  top: -3%;
  /* отступ от правого края, чтобы «7» не срезалась на широких экранах */
  right: clamp(16px, 5vw, 72px);
  font-size: clamp(150px, 24vw, 380px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-align: right;
  text-transform: uppercase;
  color: rgba(14, 58, 92, 0.045);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.advantages .container {
  position: relative;
  z-index: 1;
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.advantage {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  min-height: 280px;
  padding: var(--sp-6);
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-lg);
  transition: background var(--t-base);
}

.advantage:hover {
  background: var(--navy-700);
}

.advantage__body {
  margin-top: auto;
}

.advantage__title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.advantage__text {
  margin-top: var(--sp-3);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-on-dark-muted);
}

/* ---------- 13. Квиз-калькулятор ---------- */

.quiz {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 0;
  overflow: hidden;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-xl);
}

.quiz__body {
  display: flex;
  flex-direction: column;
  padding: var(--sp-8);
}

.quiz__title {
  margin-top: var(--sp-4);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.quiz__lead {
  margin-top: var(--sp-4);
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}

.quiz__progress {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.quiz__bar {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.quiz__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 25%;
  background: var(--blue-500);
  border-radius: var(--r-full);
  transition: width var(--t-base);
}

.quiz__step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  white-space: nowrap;
}

.quiz__steps {
  margin-top: var(--sp-6);
}

.quiz__step {
  display: none;
  flex-direction: column;
  gap: var(--sp-5);
}

.quiz__step.is-active {
  display: flex;
}

.quiz__question {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.quiz__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-3);
}

.quiz__option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-3) var(--sp-5);
  text-align: left;
  font-size: 15px;
  line-height: 1.35;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-md);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.quiz__option:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.quiz__option.is-selected {
  background: var(--blue-500);
  border-color: var(--blue-500);
}

.quiz__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.quiz__back {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  padding: 10px 4px;
  transition: color var(--t-fast);
}

.quiz__back:hover {
  color: #fff;
}

.quiz__final {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-4);
  align-items: end;
}

/* Фото менеджера */

.quiz__person {
  position: relative;
  min-height: 100%;
  background: var(--navy-900);
}

.quiz__person img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* рамка меняется с вертикальной (480×615) на широкую полосу на планшете.
     40% — точка, при которой лицо остаётся в кадре на всех ширинах */
  object-position: 50% 40%;
}

.quiz__person-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  height: 100%;
  min-height: 320px;
  padding: var(--sp-6);
  text-align: center;
  color: var(--text-on-dark-muted);
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
}

.quiz__person-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

.quiz__person-card {
  position: absolute;
  left: var(--sp-5);
  right: var(--sp-5);
  bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(10, 37, 64, 0.82);
  backdrop-filter: blur(8px);
  border-radius: var(--r-md);
}

.quiz__person-card b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.quiz__person-card span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-on-dark-muted);
}

/* ---------- 14. Этапы работы ---------- */

.process__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sp-4);
}

/* Линия, связывающая этапы: видна в промежутках между карточками
   и прочерчивается синим, когда блок появляется на экране. */

.process__grid::before,
.process__grid::after {
  content: '';
  position: absolute;
  top: 44px;
  left: 10%;
  height: 2px;
  border-radius: var(--r-full);
}

.process__grid::before {
  right: 10%;
  background: var(--border);
}

.process__grid::after {
  width: 0;
  background: var(--blue-500);
  transition: width 1.4s var(--ease) 0.25s;
}

.process__grid.is-in::after {
  width: 80%;
}

.step {
  position: relative;
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--t-base), transform var(--t-base),
    box-shadow var(--t-base);
}

.step:hover {
  border-color: var(--blue-500);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.step__num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--blue-500);
}

.step__time {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--navy-800);
  background: var(--surface-alt);
  border-radius: var(--r-full);
}

.step__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy-800);
}

.step__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---------- 15. Портфолио ---------- */

.works__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.work {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-alt);
  aspect-ratio: 1 / 1;
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.work:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.work:hover img {
  transform: scale(1.06);
}

.work__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--sp-7) var(--sp-5) var(--sp-5);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(transparent, rgba(10, 37, 64, 0.88));
}

.work__caption small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-on-dark-muted);
}

/* Только там, где есть настоящее наведение: подпись объекта
   выезжает при hover, на тач-устройствах видна всегда. */

@media (hover: hover) {
  .work__caption small {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height var(--t-base), opacity var(--t-base),
      margin-top var(--t-base);
  }

  .work:hover .work__caption small {
    max-height: 48px;
    margin-top: 4px;
    opacity: 1;
  }
}

/* ---------- 15b. Просмотр работ (попап-галерея) ---------- */

.gallery {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  flex-direction: column;
  /* непрозрачный фон: в галерее ничто не должно отвлекать от фото */
  background: #061626;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}

.gallery.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex: none;
  padding: var(--sp-4) var(--gutter);
  color: #fff;
}

.gallery__counter {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-on-dark-muted);
  font-variant-numeric: tabular-nums;
}

.gallery__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: background var(--t-fast);
}

.gallery__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.gallery__close svg {
  width: 22px;
  height: 22px;
}

.gallery__stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 var(--sp-4) var(--sp-5);
}

.gallery__img {
  max-width: min(100%, 1100px);
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
  opacity: 0;
  transition: opacity var(--t-base);
}

.gallery__img.is-ready {
  opacity: 1;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background var(--t-fast);
}

.gallery__nav:hover {
  background: var(--blue-500);
}

.gallery__nav svg {
  width: 24px;
  height: 24px;
}

.gallery__nav--prev {
  left: var(--sp-5);
}

.gallery__nav--prev svg {
  transform: rotate(180deg);
}

.gallery__nav--next {
  right: var(--sp-5);
}

/* Плитка «ещё N работ» в сетке на главной */

.work--more {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--navy-800);
  color: #fff;
  text-align: left;
  transition: background var(--t-base), transform var(--t-base);
}

.work--more:hover {
  background: var(--navy-700);
  transform: translateY(-6px);
}

.work__more-count {
  display: block;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.work__more-label {
  display: block;
  margin-top: var(--sp-2);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-on-dark-muted);
}

.work__more-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.14);
}

.work__more-icon svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 767px) {
  .gallery__stage {
    padding: 0 var(--sp-2) var(--sp-4);
  }

  .gallery__nav {
    width: 46px;
    height: 46px;
  }

  .gallery__nav--prev {
    left: var(--sp-2);
  }

  .gallery__nav--next {
    right: var(--sp-2);
  }

  .work--more {
    padding: var(--sp-5);
  }
}

/* ---------- 16. Гарантия ---------- */

.guarantee {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--sp-8);
  align-items: start;
}

.guarantee__big {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-7);
  background: var(--blue-500);
  color: #fff;
  border-radius: var(--r-xl);
}

.guarantee__big-value {
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.guarantee__big-label {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.guarantee__big-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.guarantee__list {
  display: grid;
  gap: var(--sp-3);
}

.guarantee__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.guarantee__item svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 2px;
  color: var(--blue-500);
}

.guarantee__item b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy-800);
}

.guarantee__item span {
  display: block;
  margin-top: 4px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

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

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.review {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.review__stars {
  display: flex;
  gap: 2px;
  color: #f5a623;
}

.review__stars svg {
  width: 18px;
  height: 18px;
}

.review__text {
  flex: 1;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.review__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.review__author b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-800);
}

.review__author span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Источник отзыва: фирменный значок сервиса + название */

.review__source {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--t-fast);
}

a.review__source:hover {
  color: var(--navy-800);
}

.review__source-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.review__source-icon--2gis {
  background: #19aa1e;
  font-size: 9px;
  letter-spacing: -0.02em;
}

.review__source-icon--yandex {
  background: #fc3f1d;
  font-size: 13px;
}

/* Сводка рейтингов над карточками */

.ratings {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), transform var(--t-fast);
}

.rating-chip:hover {
  border-color: var(--blue-500);
  transform: translateY(-2px);
}

.rating-chip__value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--navy-800);
}

.rating-chip__meta {
  display: grid;
  gap: 1px;
}

.rating-chip__meta b {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy-800);
}

.rating-chip__meta span {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
}

/* ---------- 18. FAQ ---------- */

.faq__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--sp-8);
  align-items: start;
}

.faq__list {
  display: grid;
  gap: var(--sp-3);
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--t-base);
}

.faq__item.is-open {
  border-color: var(--blue-500);
}

.faq__q {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  width: 100%;
  padding: var(--sp-5);
  text-align: left;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy-800);
}

.faq__q-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  color: var(--navy-800);
  transition: background var(--t-fast), color var(--t-fast),
    transform var(--t-fast);
}

.faq__q-icon svg {
  width: 16px;
  height: 16px;
}

.faq__item.is-open .faq__q-icon {
  background: var(--blue-500);
  color: #fff;
  transform: rotate(45deg);
}

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-base);
}

.faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
}

.faq__a-inner {
  overflow: hidden;
}

.faq__a p {
  padding: 0 var(--sp-5) var(--sp-5);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.faq__aside {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-5));
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-xl);
}

.faq__aside-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.faq__aside-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}

/* ---------- 19. Форма и финальный призыв ---------- */

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-xl);
}

.lead__body {
  padding: var(--sp-8);
}

.lead__title {
  margin-top: var(--sp-4);
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.lead__text {
  margin-top: var(--sp-4);
  max-width: 48ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}

.lead__points {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.lead__point {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 15px;
  line-height: 1.45;
}

.lead__point svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--blue-500);
}

.lead__media {
  position: relative;
  min-height: 100%;
  background: var(--navy-900);
}

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

/* Форма */

.form {
  display: grid;
  gap: var(--sp-4);
}

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

.form--inline .form-field--full,
.form--inline .form__submit,
.form--inline .form__consent {
  grid-column: 1 / -1;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-field__control {
  width: 100%;
  min-height: 56px;
  padding: 0 var(--sp-4);
  font-size: 16px;
  color: var(--text);
  /* именно background-color: shorthand сбросил бы no-repeat у стрелки select */
  background-color: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

textarea.form-field__control {
  min-height: 104px;
  padding: 14px var(--sp-4);
  line-height: 1.55;
  resize: vertical;
}

select.form-field__control {
  appearance: none;
  padding-right: var(--sp-7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px 18px;
}

.form-field__control::placeholder {
  color: #9aa8b6;
}

.form-field__control:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(27, 140, 227, 0.14);
}

.form-field__error {
  display: none;
  font-size: 13px;
  line-height: 1.4;
  color: var(--danger);
}

.form-field.has-error .form-field__control {
  border-color: var(--danger);
}

.form-field.has-error .form-field__error {
  display: block;
}

/* Форма на тёмном фоне */

.form--on-dark .form-field__label {
  color: var(--text-on-dark-muted);
}

.form--on-dark .form-field__control {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.form--on-dark .form-field__control::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form--on-dark .form-field__control:focus {
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.form--on-dark select.form-field__control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9c4dc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.form--on-dark select.form-field__control option {
  color: var(--text);
  background: #fff;
}

.form--on-dark .form-field.has-error .form-field__control {
  border-color: #ff9d9d;
}

.form--on-dark .form-field__error {
  color: #ff9d9d;
}

/* Согласие */

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}

.form--on-dark .form__consent {
  color: var(--text-on-dark-muted);
}

.form__consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--blue-500);
  cursor: pointer;
}

.form__consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form__consent a:hover {
  color: var(--blue-500);
}

/* Связаться через мессенджер — альтернатива форме для тех, кто не любит звонки */

.form__alt {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.form--on-dark .form__alt {
  border-top-color: var(--border-dark);
}

.form__alt-label {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

.form--on-dark .form__alt-label {
  color: var(--text-on-dark-muted);
}

.form__alt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-left: auto;
}

.btn-msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-4);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border-radius: var(--r-md);
  transition: background var(--t-fast), transform var(--t-fast);
}

.btn-msg:active {
  transform: translateY(1px);
}

.btn-msg svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-msg--wa {
  background: #25d366;
}

.btn-msg--wa:hover {
  background: #1eb856;
}

.btn-msg--tg {
  background: #29a9eb;
}

.btn-msg--tg:hover {
  background: #1f92d1;
}

@media (max-width: 767px) {
  .form__alt {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
  }

  .form__alt-buttons {
    margin-left: 0;
  }

  .form__alt-buttons .btn-msg {
    flex: 1;
  }
}

/* Сообщение о сбое отправки */

.form__error {
  grid-column: 1 / -1;
  padding: var(--sp-4);
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
  background: rgba(214, 69, 69, 0.9);
  border-radius: var(--r-md);
}

.form__error a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

/* Ловушка для ботов — видна только им */

.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Состояние отправки и успеха */

.form.is-sending .btn {
  opacity: 0.6;
  pointer-events: none;
}

.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
}

.form-success.is-visible {
  display: flex;
}

.form-success svg {
  width: 56px;
  height: 56px;
  color: var(--success);
}

.form-success b {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.form-success p {
  max-width: 40ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}

/* ---------- 19b. Модальные формы ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--sp-5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, 0.62);
  backdrop-filter: blur(6px);
}

.modal__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - var(--sp-5) * 2);
  overflow: hidden auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.98);
  transition: transform var(--t-base);
}

.modal.is-open .modal__dialog {
  transform: none;
}

/* колонки шаблона должны стать ячейками сетки самого диалога */
.modal__slot {
  display: contents;
}

.modal__close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  color: var(--navy-800);
  background: var(--surface-alt);
  transition: background var(--t-fast), color var(--t-fast);
}

.modal__close:hover {
  background: var(--navy-800);
  color: #fff;
}

.modal__close svg {
  width: 20px;
  height: 20px;
}

/* Левая тёмная колонка */

.modal__aside {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-7) var(--sp-6);
  background: var(--navy-800);
  color: #fff;
}

.modal__title {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.modal__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}

.modal__points {
  display: grid;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-5);
}

.modal__point {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 14.5px;
  line-height: 1.45;
}

.modal__point svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--blue-500);
}

.modal__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding-top: var(--sp-5);
  margin-top: var(--sp-2);
  border-top: 1px solid var(--border-dark);
  font-size: 17px;
  font-weight: 600;
  transition: color var(--t-fast);
}

.modal__phone:hover {
  color: var(--blue-500);
}

.modal__phone svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--blue-500);
}

/* Правая колонка с формой */

.modal__body {
  padding: var(--sp-7) var(--sp-6);
}

.modal__body-title {
  margin-bottom: var(--sp-5);
  padding-right: 56px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy-800);
}

.modal .form-success {
  padding: var(--sp-6) 0;
}

.modal .form-success b {
  color: var(--navy-800);
}

.modal .form-success p {
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .modal {
    padding: var(--sp-3);
    place-items: end center;
  }

  .modal__dialog {
    grid-template-columns: minmax(0, 1fr);
    max-height: calc(100vh - var(--sp-6));
    border-radius: var(--r-lg);
  }

  .modal__aside {
    gap: var(--sp-3);
    padding: var(--sp-6) var(--sp-5) var(--sp-5);
  }

  .modal__aside .section-label {
    padding-right: 56px;
  }

  .modal__text {
    font-size: 14px;
    line-height: 1.5;
  }

  /* в узком окне важнее увидеть форму, а не список выгод */
  .modal__points,
  .modal__phone {
    display: none;
  }

  .modal__body {
    padding: var(--sp-5);
  }

  .modal__body-title {
    display: none;
  }

  .modal__close {
    top: var(--sp-3);
    right: var(--sp-3);
    width: 40px;
    height: 40px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
  }
}

/* ---------- 20. Контакты ---------- */

.contacts__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.contact-card__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-card__value {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy-800);
}

.contact-card__value a {
  transition: color var(--t-fast);
}

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

.contact-card__note {
  margin-top: auto;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ---------- 21. Подвал ---------- */

.footer {
  padding-top: var(--sp-8);
  background: var(--navy-900);
  color: var(--text-on-dark);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--sp-7);
  padding-bottom: var(--sp-8);
}

.footer__about {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.footer__tagline {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
  max-width: 40ch;
}

.footer__socials {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background var(--t-fast);
}

.footer__social:hover {
  background: var(--blue-500);
}

.footer__social svg {
  width: 20px;
  height: 20px;
}

.footer__col-title {
  margin-bottom: var(--sp-4);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.footer__links {
  display: grid;
  gap: var(--sp-3);
}

.footer__links a {
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.86);
  transition: color var(--t-fast);
}

.footer__links a:hover {
  color: var(--blue-500);
}

.footer__contact-item {
  display: grid;
  gap: 2px;
  margin-bottom: var(--sp-4);
}

.footer__contact-item span {
  font-size: 13px;
  color: var(--text-on-dark-muted);
}

.footer__contact-item a,
.footer__contact-item b {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  padding-block: var(--sp-5);
  border-top: 1px solid var(--border-dark);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-on-dark-muted);
}

.footer__bottom a:hover {
  color: var(--blue-500);
}

/* =========================================================
   21a. Страница услуги
   ========================================================= */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--blue-500);
}

.breadcrumbs span[aria-hidden] {
  opacity: 0.5;
}

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

.page-hero {
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-8);
}

.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--sp-7);
  align-items: center;
}

.page-hero__title {
  margin-top: var(--sp-4);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--navy-900);
  text-wrap: balance;
}

.page-hero__lead {
  margin-top: var(--sp-5);
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.page-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}

.fact {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy-800);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}

.fact svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--blue-500);
}

.page-hero__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  aspect-ratio: 4 / 3;
  background: var(--surface-alt);
}

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

.page-hero__price {
  position: absolute;
  left: var(--sp-5);
  bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(10, 37, 64, 0.86);
  backdrop-filter: blur(8px);
  border-radius: var(--r-md);
  color: #fff;
}

.page-hero__price b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.page-hero__price span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-on-dark-muted);
}

/* Преимущества услуги — светлые карточки */

.benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.benefit {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--t-base), transform var(--t-base);
}

.benefit:hover {
  border-color: var(--blue-500);
  transform: translateY(-4px);
}

.benefit h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy-800);
}

.benefit p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Типы конструкций */

.types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.type {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.type--featured {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 1px var(--blue-500);
}

.type__badge {
  align-self: flex-start;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue-500);
  border-radius: var(--r-full);
}

.type__title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy-800);
}

.type__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.type__list {
  display: grid;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.type__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy-800);
}

.type__list svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
  color: var(--blue-500);
}

/* Характеристики + область применения */

.specs {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--sp-6);
  align-items: stretch;
}

.spec-table {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.spec-table__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.spec-table__row:last-child {
  border-bottom: 0;
}

.spec-table__row dt {
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

.spec-table__row dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
  color: var(--navy-800);
}

.applications {
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-lg);
}

/* прижат к низу карточки, чтобы не оставалось пустого места рядом с таблицей */
.applications__cta {
  margin-top: auto;
  padding-top: var(--sp-6);
}

.applications__cta .btn {
  width: 100%;
}

.applications__note {
  margin-top: var(--sp-3);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  color: var(--text-on-dark-muted);
}

.applications h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.applications p {
  margin-top: var(--sp-3);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-on-dark-muted);
}

.applications ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.applications li {
  padding: 7px 13px;
  font-size: 13.5px;
  line-height: 1.3;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--r-full);
}

/* Другие услуги внизу страницы */

.related {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

@media (max-width: 1100px) {
  .page-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
  }

  /* на узком экране сначала оффер и кнопки, фото — следом:
     иначе первый экран уходит под картинку и CTA не виден */
  .page-hero__media {
    aspect-ratio: 16 / 9;
  }

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

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

@media (max-width: 767px) {
  .page-hero {
    padding-bottom: var(--sp-7);
  }

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

  .page-hero__actions .btn {
    flex: 1 1 100%;
  }

  .spec-table__row {
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-4);
  }

  .page-hero__price {
    left: var(--sp-3);
    right: auto;
    bottom: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
  }

  .page-hero__price b {
    font-size: 18px;
  }

  .page-hero__price span {
    font-size: 12px;
  }
}

/* ---------- 21b. Текстовая (юридическая) страница ---------- */

.legal {
  max-width: 78ch;
}

.legal h1 {
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--navy-800);
}

.legal h2 {
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-4);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy-800);
}

.legal p,
.legal li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

.legal p + p {
  margin-top: var(--sp-4);
}

.legal ul {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.legal li {
  position: relative;
  padding-left: var(--sp-5);
}

.legal li::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-500);
}

.legal__meta {
  margin-top: var(--sp-4);
  font-size: 14px;
  color: var(--text-muted);
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  font-size: 15px;
  font-weight: 500;
  color: var(--blue-500);
}

.legal__back svg {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
}

/* ---------- 22. Плавающие элементы ---------- */

.floats {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.float-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-full);
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.float-btn:hover {
  transform: scale(1.06);
}

.float-btn svg {
  width: 24px;
  height: 24px;
}

.float-btn--wa {
  background: #25d366;
}

.float-btn--tg {
  background: #29a9eb;
}

.float-btn--top {
  background: var(--navy-800);
  opacity: 0;
  visibility: hidden;
}

.float-btn--top.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Липкая мобильная панель */

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  display: none;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--gutter);
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.mobile-bar .btn {
  flex: 1;
  min-height: 52px;
  padding-inline: var(--sp-3);
  font-size: 14px;
  white-space: nowrap;
}

/* Cookie */

.cookie {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  max-width: 720px;
  margin-inline: auto;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(140%);
  transition: transform var(--t-base);
}

.cookie.is-visible {
  transform: translateY(0);
}

.cookie__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.cookie__text a {
  color: var(--blue-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- 23. Появление при скролле ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

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

/* Крупные тёмные плашки (квиз, заявка) не выезжают, а «встают на место» */

.reveal--plate {
  transform: translateY(24px) scale(0.98);
  transition-duration: 0.75s;
}

.reveal--plate.is-in {
  transform: none;
}

/* Поочерёдное появление элементов сетки: задержку каждому ребёнку
   проставляет main.js, здесь только сама анимация.

   Именно animation, а не transition: с transition правило .stagger > *
   перебивало бы собственные transform и transition карточек и ломало
   hover-эффекты (подъём работ, сдвиг строки каталога). animation
   с fill-mode: backwards держит стартовый кадр только до запуска,
   а после отдаёт transform обратно карточке. */

.stagger > * {
  opacity: 0;
}

.stagger.is-in > * {
  opacity: 1;
  animation: stagger-in 0.55s var(--ease) backwards;
}

@keyframes stagger-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .stagger > * {
    opacity: 1;
    transform: none;
  }

  .header__progress span,
  .process__grid::after {
    transition: none;
  }
}

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

@media (max-width: 1200px) {
  .hero__stats,
  .about__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-5);
  }

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

  /* этапы переносятся на две строки — соединяющая линия теряет смысл */
  .process__grid::before,
  .process__grid::after {
    display: none;
  }

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

@media (max-width: 1100px) {
  :root {
    --header-h: 72px;
  }

  .nav {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .header__actions {
    margin-left: auto;
  }

  .hero__head {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-5);
  }

  .hero__aside {
    padding-bottom: 0;
  }

  .catalog__layout,
  .about__layout,
  .faq__layout,
  .guarantee {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
  }

  .catalog__preview,
  .faq__aside {
    position: static;
  }

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

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

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

  .quiz__person,
  .lead__media {
    min-height: 0;
    order: -1;
  }

  .lead__media {
    min-height: 260px;
  }

  .lead__media img {
    max-height: 340px;
  }

  /* портретному кадру нужно чуть больше высоты, чем фото объекта */
  .quiz__person img {
    max-height: 400px;
  }

  .quiz__person-placeholder {
    min-height: 0;
    height: 200px;
  }

  .quiz__body,
  .lead__body {
    padding: var(--sp-7) var(--sp-6);
  }
}

@media (max-width: 900px) {
  .section {
    padding-block: var(--sp-8);
  }

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

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

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
  }

  body {
    padding-bottom: 76px; /* место под липкую панель */
  }

  .header__phone,
  .header__actions .btn {
    display: none;
  }

  .section,
  .section--tight {
    padding-block: var(--sp-7);
  }

  .section-head {
    margin-bottom: var(--sp-6);
  }

  .section-head__row {
    align-items: flex-start;
    gap: var(--sp-4);
  }

  .hero {
    padding-top: var(--sp-5);
    padding-bottom: var(--sp-7);
  }

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

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .hero__cell {
    aspect-ratio: 16 / 10;
  }

  .hero__cta {
    aspect-ratio: auto;
    gap: var(--sp-4);
    padding: var(--sp-5);
  }

  .hero__stats,
  .about__stats {
    gap: var(--sp-5) var(--sp-4);
  }

  .about__media,
  .process__grid,
  .advantages__grid,
  .reviews__grid,
  .contacts__grid,
  .form--inline {
    grid-template-columns: minmax(0, 1fr);
  }

  .advantage {
    min-height: 0;
    gap: var(--sp-4);
    padding: var(--sp-5);
  }

  .quiz__body,
  .lead__body {
    padding: var(--sp-6) var(--sp-5);
  }

  .quiz__final {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

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

  .guarantee__big {
    padding: var(--sp-6);
  }

  .service-row {
    padding: var(--sp-4);
    gap: var(--sp-3);
  }

  .service-row:hover {
    transform: none;
  }

  .service-row__title {
    font-size: 16px;
  }

  /* Стрелка попадает под плавающие кнопки мессенджеров, а вся строка и так
     является ссылкой — на мобильном убираем. */
  .service-row__arrow {
    display: none;
  }

  .catalog__preview {
    display: none;
  }

  .faq__q {
    gap: var(--sp-4);
    padding: var(--sp-4);
    font-size: 15.5px;
  }

  .faq__a p {
    padding: 0 var(--sp-4) var(--sp-4);
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-6);
  }

  .footer__about,
  .footer__grid > :last-child {
    grid-column: 1 / -1;
  }

  .footer__bottom {
    justify-content: flex-start;
    gap: var(--sp-3);
    /* чтобы текст не уходил под плавающие кнопки мессенджеров */
    padding-right: 64px;
  }

  .floats {
    right: 16px;
    bottom: 88px;
  }

  .float-btn {
    width: 46px;
    height: 46px;
  }

  /* На мобильном внизу уже есть липкая панель — третья кнопка лишняя */
  .float-btn--top {
    display: none;
  }

  .mobile-bar {
    display: flex;
  }

  .cookie {
    left: 12px;
    right: 12px;
    bottom: 84px;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-4);
    padding: var(--sp-4);
  }

  .work__caption {
    padding: var(--sp-6) var(--sp-4) var(--sp-4);
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .logo__mark {
    width: 30px;
    height: 30px;
  }

  .logo__line {
    font-size: 11.5px;
  }

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

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