/* Технология тепла — стили лендинга.
   Палитра снята с исходной презентации: тёплый бумажный фон, красный акцент,
   голубые врезки для смысловых выводов. */

:root {
  --red: #e93f3f;
  --red-dark: #cf2c2c;
  --red-soft: #fdecec;

  --ink: #14161a;
  --ink-2: #3d434d;
  --ink-3: #6b7280;

  --paper: #f7f7f5;
  --paper-2: #efefec;
  --white: #ffffff;
  --blue-soft: #e2eaef;
  --amber-soft: #fdf3e2;

  --line: #e2e0dc;
  --line-strong: #cfccc6;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --container: 1180px;
  --gutter: 24px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

em {
  font-style: normal;
  color: var(--red);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--white);
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover { background: var(--red-dark); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--white);
}

.btn--sm { padding: 11px 20px; font-size: 15px; white-space: nowrap; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------- Шапка */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 247, 245, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(247, 247, 245, 0.96);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo__mark { width: 40px; height: 40px; object-fit: contain; }
.logo__text {
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.logo__text span { color: var(--red); }

.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav__list a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-2);
  text-decoration: none;
  transition: color var(--transition);
}
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav__list a:hover { color: var(--ink); }
.nav__list a:hover::after,
.nav__list a.is-active::after { transform: scaleX(1); }
.nav__list a.is-active { color: var(--ink); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header__phone {
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header__phone:hover { color: var(--red); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------------------------------------- Первый экран */

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow--light { color: #ff8b8b; }

.hero { padding: 56px 0 20px; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 40px;
}
.hero__title {
  font-size: clamp(34px, 4.6vw, 58px);
  margin-bottom: 22px;
}
.hero__lead {
  max-width: 33em;
  font-size: 19px;
  color: var(--ink-2);
  margin-bottom: 30px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.hero__badges li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  color: var(--ink-2);
}
.hero__badges li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}
.hero__media img { width: 100%; }

/* ---------------------------------------------------------------- Цифры */

.stats { padding: 30px 0 10px; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  padding: 30px 28px;
  background: var(--white);
}
.stat__value {
  display: block;
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--red);
}
.stat__unit { font-size: 0.6em; }
.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-2);
  max-width: 20em;
}

/* ---------------------------------------------------------------- Секции */

.section { padding: 88px 0; }
.section--alt {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head {
  max-width: 780px;
  margin-bottom: 48px;
}
.section__title { font-size: clamp(28px, 3.4vw, 42px); }
.section__lead {
  margin-top: 18px;
  font-size: 18px;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- Карточки услуг */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 30px 28px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.card__icon {
  height: 56px;
  width: auto;
  margin-bottom: 20px;
  object-fit: contain;
  object-position: left center;
}
.card__title {
  font-size: 20px;
  margin-bottom: 10px;
}
.card p {
  font-size: 16px;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- Врезки */

.callout {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  margin-bottom: 34px;
  background: var(--blue-soft);
  border-radius: var(--radius);
}
.callout img { width: 72px; flex-shrink: 0; }
.callout p { font-size: 17px; }

.note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 16px;
}
.note img { width: 28px; flex-shrink: 0; }
.note--warn { background: var(--amber-soft); }
.note--good {
  background: var(--blue-soft);
  font-weight: 500;
}

/* ---------------------------------------------------------------- Аккордеон */

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.acc {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.acc.is-open { border-color: var(--line-strong); }

.acc__head {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 22px 26px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.acc__num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--red);
  color: var(--white);
  font-size: 19px;
  font-weight: 700;
}
.acc__title { flex: 1; }
.acc__chevron {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform var(--transition);
}
.acc.is-open .acc__chevron { transform: rotate(-135deg) translate(-3px, -3px); }

.acc__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition);
}
.acc.is-open .acc__body { grid-template-rows: 1fr; }
.acc__body > .acc__inner { overflow: hidden; }

.acc__inner {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 26px;
  padding: 0 26px;
}
.acc.is-open .acc__inner { padding-bottom: 28px; }
.acc__icon {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.acc__inner p { color: var(--ink-2); }
.acc__inner .note { color: var(--ink); }

/* ---------------------------------------------------------------- Выводы */

.conclusion {
  margin-top: 44px;
  padding: 44px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-lg);
}
.conclusion h3 {
  font-size: 30px;
  margin-bottom: 18px;
}
.conclusion p {
  max-width: 62ch;
  font-size: 18px;
  color: var(--ink-2);
}
.conclusion .btn { margin-top: 12px; }

/* ---------------------------------------------------------------- Проектирование */

.designs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.design__link {
  display: block;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
.design__link:hover {
  border-color: var(--red);
  transform: translateY(-3px);
}
.design__caption {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- Галерея */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.gallery__item { margin: 0; }
.gallery__link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.gallery__link img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery__link:hover img { transform: scale(1.05); }
.gallery__link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 26, 0.16);
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery__link:hover::after { opacity: 1; }

/* ---------------------------------------------------------------- Этапы */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  counter-reset: step;
}
.step {
  padding-top: 22px;
  border-top: 2px solid var(--line-strong);
}
.step__num {
  display: block;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.04em;
}
.step h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.step p {
  font-size: 15px;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- Заявка */

.lead {
  padding: 88px 0;
  background: var(--ink);
  color: var(--white);
}
.lead__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 56px;
  align-items: start;
}
.lead__title {
  font-size: clamp(26px, 3.2vw, 38px);
  margin-bottom: 20px;
}
.lead__lead {
  font-size: 18px;
  color: #b9bec7;
  margin-bottom: 26px;
  max-width: 44ch;
}
.lead__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 34px;
}
.lead__list li {
  position: relative;
  padding-left: 26px;
  color: #dfe2e7;
}
.lead__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}
.lead__contacts {
  padding-top: 28px;
  border-top: 1px solid #2c3038;
}
.lead__phone {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.lead__phone:hover { color: #ff8b8b; }
.lead__mail {
  display: inline-block;
  margin-top: 8px;
  color: #b9bec7;
}
.lead__person {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-3);
}

.form {
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  color: var(--ink);
}
.form__title {
  font-size: 22px;
  margin-bottom: 22px;
}
.field {
  margin-bottom: 18px;
  border: 0;
  padding: 0;
}
.field label,
.field legend {
  display: block;
  margin-bottom: 7px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition);
}
.field input:focus,
.field textarea:focus {
  background: var(--white);
  border-color: var(--ink-3);
}
.field textarea { resize: vertical; }
.field.has-error input,
.field.has-error textarea { border-color: var(--red); }

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--red);
}
.field.has-error .field__error,
.field__error.is-visible { display: block; }

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice span {
  display: inline-block;
  padding: 9px 16px;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.choice span:hover { border-color: var(--line-strong); }
.choice input:checked + span {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red-dark);
  font-weight: 500;
}
.choice input:focus-visible + span {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.consent input { margin-top: 3px; flex-shrink: 0; }

.form .btn { margin-top: 14px; }
.form__note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}
.form__status {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  display: none;
}
.form__status.is-visible { display: block; }
.form__status.is-ok {
  background: var(--blue-soft);
  color: var(--ink);
}

/* ---------------------------------------------------------------- Контакты и подвал */

.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.contacts__item {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contacts__item h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.contacts__item a {
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.contacts__item a:hover { color: var(--red); }
.contacts__item p {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-2);
}
.contacts__plain {
  font-size: 18px !important;
  font-weight: 600;
  color: var(--ink) !important;
  margin-top: 0 !important;
}

.footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__copy {
  font-size: 14px;
  color: var(--ink-3);
}
.footer__legal {
  font-size: 14px;
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.footer__legal:hover { color: var(--accent); border-bottom-color: currentColor; }
.footer__phone {
  font-weight: 700;
  text-decoration: none;
}

/* ---------------------------------------------------------------- Текстовые страницы */

.legal {
  padding: 40px 0 64px;
}
.legal__inner {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.legal__back {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-3);
}
.legal__back:hover { color: var(--accent); }
.legal h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin-bottom: 10px;
}
.legal__updated {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 30px;
}
.legal h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 34px 0 12px;
}
.legal p,
.legal li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}
.legal p { margin-bottom: 12px; }
.legal ul {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.legal ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
}
/* Тире вместо маркера: в исходном тексте политики перечисления идут именно так. */
.legal ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.legal__table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 12px;
  font-size: 15px;
}
.legal__table th,
.legal__table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--ink-2);
}
.legal__table th {
  width: 34%;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-2, rgba(0, 0, 0, .02));
}
.legal a { color: var(--accent); }

@media (max-width: 520px) {
  .legal__table,
  .legal__table tbody,
  .legal__table tr,
  .legal__table th,
  .legal__table td { display: block; width: 100%; }
  .legal__table tr { margin-bottom: 12px; }
  .legal__table th { border-bottom: none; }
}

/* ---------------------------------------------------------------- Плавающая кнопка */

.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: none;
  padding: 15px 26px;
  background: var(--red);
  color: var(--white);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.fab.is-visible { display: block; }

/* ---------------------------------------------------------------- Лайтбокс */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  background: rgba(12, 13, 15, 0.94);
}
.lightbox[hidden] { display: none; }

.lightbox__img {
  grid-column: 2;
  grid-row: 1;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.lightbox__caption {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: #d6d9de;
  font-size: 15px;
  text-align: center;
}
.lightbox__nav,
.lightbox__close {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition);
}
.lightbox__nav:hover,
.lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox__nav {
  grid-row: 1;
  width: 52px;
  height: 52px;
  font-size: 30px;
  line-height: 1;
}
.lightbox__nav--prev { grid-column: 1; }
.lightbox__nav--next { grid-column: 3; }
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
}

/* ---------------------------------------------------------------- Попап заявки */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(12, 13, 15, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.modal-overlay[hidden] { display: none; }
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 32px 28px 26px;
  background: var(--white);
  border-radius: var(--radius-lg);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.modal-overlay.is-open .modal { transform: none; }

.modal h2 {
  font-size: 26px;
  margin-bottom: 8px;
  padding-right: 40px;
}
.modal > div > p {
  margin-bottom: 22px;
  font-size: 16px;
  color: var(--ink-2);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover {
  background: var(--red-soft);
  color: var(--red-dark);
}

.modal__note {
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
  color: var(--ink-3);
}
.modal__note a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.modal-success {
  display: none;
  padding: 14px 0 4px;
  text-align: center;
}
.modal-success.is-shown { display: block; }
.modal-success p {
  margin: 10px 0 22px;
  color: var(--ink-2);
}

body.modal-open { overflow: hidden; }

/* Поля попапа */

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.form-group input {
  width: 100%;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition);
}
.form-group input:focus {
  background: var(--white);
  border-color: var(--ink-3);
}
.form-group input.is-invalid { border-color: var(--red); }

/* Ловушка для ботов: поле не видно людям, но его заполняют автоматы. */
.form-group--trap {
  position: absolute;
  left: -9999px;
  height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
}

.field-error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--red);
}
.field-error.is-shown { display: block; }
#leadPrivacyError.is-shown,
#leadSendError.is-shown { margin-bottom: 12px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}
.checkbox-row input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--red);
  cursor: pointer;
}
.checkbox-row label { cursor: pointer; }
.checkbox-row.is-invalid label { color: var(--red); }

/* ---------------------------------------------------------------- Нижнее меню на мобильных */

.mobile-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(20, 22, 26, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
body.has-mobile-dock {
  padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
}

.mobile-dock-half {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-dock-half + .mobile-dock-half {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-dock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 58px;
  border: 0;
  background: transparent;
  color: #eceef1;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
}
.mobile-dock-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}
.mobile-dock-btn.is-active { color: #ff8b8b; }

.mobile-dock-flyout {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition), visibility var(--transition);
}
.mobile-dock-flyout.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-dock-flyout a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #22262d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
}
.mobile-dock-flyout a:active { background: #2e333c; }
.mobile-dock-flyout svg { width: 22px; height: 22px; }

.mobile-dock-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(12, 13, 15, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.mobile-dock-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-dock-nav {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px calc(90px + env(safe-area-inset-bottom, 0px));
  background: rgba(20, 22, 26, 0.98);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-dock-nav.is-open {
  opacity: 1;
  visibility: visible;
}
.mobile-dock-nav-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.mobile-dock-nav-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}
.mobile-dock-nav-logo span { color: var(--red); }
.mobile-dock-nav-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #22262d;
  color: #b9bec7;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mobile-dock-nav-list {
  width: 100%;
  max-width: 320px;
  text-align: center;
}
.mobile-dock-nav-list a,
.mobile-dock-nav-list button {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #eceef1;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.mobile-dock-nav-list .dock-nav-cta {
  margin-top: 14px;
  background: var(--red);
  border-radius: 999px;
  color: var(--white);
  font-weight: 600;
}

/* ---------------------------------------------------------------- Появление при скролле */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- Адаптив */

@media (max-width: 1000px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero__media {
    order: -1;
    max-width: 460px;
  }
  .lead__inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 1080px) {
  html { scroll-padding-top: 76px; }

  .header__inner { min-height: 68px; gap: 14px; }
  .header__actions { margin-left: auto; }
  .burger { display: block; }

  .nav {
    position: fixed;
    inset: 68px 0 auto;
    margin: 0;
    padding: 12px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    transition: transform var(--transition);
  }
  .nav.is-open { transform: none; }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav__list li + li { border-top: 1px solid var(--line); }
  .nav__list a {
    display: block;
    padding: 15px 2px;
    font-size: 17px;
  }
  .nav__list a::after { display: none; }
}

@media (min-width: 861px) {
  .mobile-dock,
  .mobile-dock-nav,
  .mobile-dock-backdrop { display: none !important; }
}

@media (max-width: 860px) {
  .header__phone { display: none; }
  /* На мобильных роль плавающей кнопки берёт на себя нижний док. */
  .fab { display: none !important; }
  .modal { padding: 26px 20px 22px; }
  .modal-overlay {
    align-items: flex-start;
    padding: max(12px, env(safe-area-inset-top)) 16px 32px;
  }

  .section { padding: 62px 0; }
  .stats__grid { grid-template-columns: 1fr; }
  .conclusion { padding: 30px 24px; }
  .form { padding: 24px; }
  .acc__head { padding: 18px; font-size: 17px; gap: 14px; }
  .acc__inner {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 18px;
  }
  .acc__icon { width: 72px; }
  .callout { flex-direction: column; align-items: flex-start; gap: 14px; }
  .lightbox {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    padding: 12px;
  }
  .lightbox__nav { width: 44px; height: 44px; font-size: 26px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding: 32px 0 8px; }
  .hero__actions .btn { width: 100%; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .footer__inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
