/* «Потолки Рестайл» — стили сайта.
   Все числа взяты из макета design/Restyle Page v2.dc.html (экспорт Claude Design,
   значения в нём прописаны у элементов). Макет нарисован на 1440 и 390 px —
   это и есть две опорные ширины. Промежуток 768–1199 в макете не нарисован,
   правила для него — из design/HANDOFF.md, раздел «Сетка и отступы».
   Токены объявлены один раз в :root и дальше только используются (rules/DESIGN.md §6). */

:root {
  --bg: #F5F3EF;
  --surface: #FFFFFF;
  --ink: #2B2A29;
  --muted: #6E6A63;
  --line: #DCD7CE;
  --line-dashed: #B9B3A8;
  --accent: #0E6E4E;
  --accent-hover: #0B5A40;
  --mint: #E3F0E9;
  --mint-ink: #0B4F38;
  --overlay: rgba(26, 24, 22, .55);
  --error: #B3261E;

  --head: 'Onest', system-ui, sans-serif;   /* заголовки, цифры, телефон */
  --text: 'Inter', system-ui, sans-serif;   /* текст и интерфейс */

  --gap: 24px;          /* промежуток между колонками сетки */
  --pad: 80px;          /* поля страницы на десктопе */
  --section: 120px;     /* вертикальный отступ секции */
  --header-h: 88px;

  --r-field: 6px;       /* поля ввода */
  --r-card: 8px;        /* кнопки и карточки */
  --r-plate: 12px;      /* крупные плашки и окна */
}

/* ─── Основа ─────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
a:hover { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Фото в ячейке сетки. Картинка позиционируется абсолютно: иначе height:100%
   у <img> некуда разрешиться, и ячейка вытягивается под пропорции файла
   (вертикальные 1013×1800 превращали ряд в 500 px вместо 200). */
.photo { position: relative; overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.container { width: min(1280px, 100% - var(--pad) * 2); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.section { padding: var(--section) 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ─── Типографика ────────────────────────────────────────────────────────── */

.h1 { font: 800 68px/1.02 var(--head); letter-spacing: -.03em; text-wrap: balance; }
.h2 { font: 800 48px/1.1 var(--head); letter-spacing: -.025em; }
.h2--xl { font-size: 64px; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.h2--md { font-size: 40px; line-height: 1.12; text-wrap: balance; }
.h3 { font: 700 22px/1.2 var(--head); }
.lead { font: 400 20px/1.55 var(--text); text-wrap: pretty; }
.text { font: 400 19px/1.6 var(--text); text-wrap: pretty; }
.text--sm { font-size: 18px; }
.muted { color: var(--muted); }

/* ─── Кнопки и ссылки ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 32px; border: 0;
  background: var(--accent); color: #fff; border-radius: var(--r-card);
  font: 600 17px/1 var(--text); text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn--lg { height: 64px; padding: 0 36px; font-size: 18px; }
.btn--wide { width: 100%; }

/* Вторичное действие — всегда текстовая ссылка, даже когда это <button> */
.link {
  display: inline-block; padding: 0; border: 0; background: none; color: inherit;
  text-align: left; cursor: pointer;
  font: 500 18px/1 var(--text);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
}
.link:hover { color: var(--accent); }
.link--sm { font-size: 17px; text-underline-offset: 5px; }

.form-error { margin-top: 4px; font: 500 15px/1.4 var(--text); color: var(--error); }

/* ─── Шапка ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-header__inner { height: var(--header-h); align-items: center; }
.site-header__logo { grid-column: 1 / 3; display: block; color: var(--ink); }
.site-header__logo svg, .site-header__logo img { height: 32px; width: auto; }
.site-header__nav {
  grid-column: 3 / 9; display: flex; gap: 32px; white-space: nowrap;
  font: 500 16px/1 var(--text);
}
.site-header__nav a { text-decoration: none; }
/* Бейдж Яндекса отдаётся айфреймом фиксированных 150×50 — размер его, не наш.
   Пунктирной рамки больше нет: она обозначала заглушку, у живого бейджа своя. */
.site-header__rating {
  grid-column: 9 / 11; justify-self: end;
  display: flex; align-items: center; width: 150px; height: 50px;
}
.site-header__rating iframe { display: block; width: 150px; height: 50px; border: 0; }
.site-header__right {
  grid-column: 11 / 13; justify-self: end;
  display: flex; align-items: center; gap: 18px;
}
.site-header__phone { font: 700 19px/1 var(--head); text-decoration: none; white-space: nowrap; }
.site-header__menu { display: none; }

/* Полноэкранное меню телефона (в макете не нарисовано — HANDOFF, блок 0) */
.nav-sheet {
  position: fixed; inset: 0; z-index: 40; display: none;
  background: var(--bg); padding: 0 20px 32px;
}
.nav-sheet[open] { display: block; }
.nav-sheet__top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-sheet__list { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; }
.nav-sheet__list a {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font: 500 19px/1.3 var(--text); text-decoration: none;
}
.nav-sheet__phone { margin-top: 28px; font: 700 24px/1 var(--head); text-decoration: none; }
.icon-close {
  width: 40px; height: 40px; border: 0; background: transparent;
  font: 400 30px/1 var(--text); color: var(--ink); cursor: pointer;
}

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

.hero { position: relative; min-height: 812px; }
/* Фото занимает всё от x=732 (макет, 1440) до правого края окна: на широких экранах
   граница едет вместе с контейнером — отсюда max(). Картинка лежит внутри блоком
   .photo, потому что у абсолютно позиционированного <img> ширина auto берётся
   из самого файла, а не из рамки, и фото не дотягивалось до края. */
.hero__photo {
  position: absolute; top: 0; bottom: 0; right: 0; left: max(732px, calc(50% + 12px));
}
.hero__photo img { object-position: 50% 64%; }
.hero__col {
  position: relative; width: 628px; min-height: 812px;
  padding: 48px 0 32px; display: flex; flex-direction: column;
}
.hero__h1 { margin-top: auto; }
.hero__lead { margin-top: 28px; }
.hero__actions { margin-top: 44px; display: flex; align-items: center; gap: 32px; }
.hero__facts {
  margin-top: auto; padding-top: 18px; border-top: 3px solid var(--accent);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap);
  font: 500 15px/1.45 var(--text);
}

/* ─── 2. Почему на замере сумма не вырастет ──────────────────────────────── */

.s-why { background: var(--accent); color: #fff; }
.s-why .grid { row-gap: 56px; }
.s-why__h2 { grid-column: 1 / 10; }
.s-why__text { grid-column: 1 / 7; display: flex; flex-direction: column; gap: 20px; font: 400 20px/1.6 var(--text); text-wrap: pretty; }
.s-why__card {
  grid-column: 7 / 13; background: var(--surface); color: var(--ink);
  border-radius: var(--r-plate); padding: 40px;
  display: flex; flex-direction: column; gap: 16px;
}
.s-why__card-title { font: 700 28px/1.2 var(--head); letter-spacing: -.01em; }

/* ─── 3. Потолок под ключ ────────────────────────────────────────────────── */

.s-price { background: var(--mint); }
.s-price .grid { row-gap: 48px; }
.s-price__h2 { grid-column: 1 / 13; }
.pack {
  grid-column: span 4; background: var(--surface);
  border-top: 4px solid var(--accent); border-radius: var(--r-card);
  padding: 32px; display: flex; flex-direction: column;
}
.pack__name { font: 700 24px/1.2 var(--head); }
.pack__price {
  margin-top: 16px; font: 800 56px/1 var(--head); letter-spacing: -.03em;
  color: var(--accent); white-space: nowrap;
}
.pack__list {
  margin: 24px 0 0; padding: 20px 0 0; list-style: none;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; font: 400 17px/1.4 var(--text);
}
.s-price__left { grid-column: 1 / 7; display: flex; flex-direction: column; gap: 16px; font: 400 18px/1.6 var(--text); text-wrap: pretty; }
.s-price__right { grid-column: 7 / 13; font: 400 18px/1.6 var(--text); text-wrap: pretty; }
.terms { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.terms__title {
  font: 600 14px/1.2 var(--text); letter-spacing: .06em;
  text-transform: uppercase; color: var(--mint-ink);
}
.terms__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.terms__list li {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--surface); border-radius: 999px;
  font: 500 16px/1.2 var(--text); white-space: nowrap;
}
.terms__list li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ─── 4. Какие потолки делаем ────────────────────────────────────────────── */

.s-kinds .grid { row-gap: var(--gap); }
.s-kinds__h2 { grid-column: 1 / 13; margin-bottom: var(--gap); }
.kind {
  grid-column: span 3; min-height: 200px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, background .15s;
}
.kind:hover { border-color: var(--accent); background: var(--mint); }
.kind__title { font: 700 22px/1.2 var(--head); }
.kind__note { font: 400 16px/1.5 var(--text); color: var(--muted); }
.kind--photo { grid-column: span 3; min-height: 200px; border-radius: var(--r-card); }
/* Макет требовал здесь крупный план потолка, а не вид комнаты. Раньше это
   добиралось увеличением вертикального кадра p3 до 220%. С 21.10.2026 в клетке
   горизонтальный p7, обрезанный до нужного плана ещё в исходнике (assets/p7.jpg),
   поэтому хватает обычного cover из .photo img — без растягивания. */
.note-dashed {
  grid-column: 1 / 13; margin-top: 8px;
  display: flex; align-items: center; gap: 14px; padding: 20px 28px;
  border: 1px dashed var(--line-dashed); border-radius: var(--r-card);
  font: 500 18px/1.4 var(--text); color: var(--muted);
}
.note-dashed__mark {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--line-dashed);
  display: flex; align-items: center; justify-content: center; font: 400 18px/1 var(--text);
}

/* ─── 5. Квиз ────────────────────────────────────────────────────────────── */

.s-quiz { background: var(--accent); color: #fff; }
.s-quiz .grid { align-items: start; }
.s-quiz__side { grid-column: 1 / 6; display: flex; flex-direction: column; gap: 20px; padding-right: var(--gap); }
.s-quiz__side h2 { font: 800 48px/1.05 var(--head); letter-spacing: -.03em; text-wrap: balance; }
.s-quiz__side p { font: 400 18px/1.6 var(--text); }
p.s-quiz__promise {
  background: var(--surface); color: var(--mint-ink);
  border-radius: var(--r-card); padding: 24px; font: 600 18px/1.55 var(--text);
}
.s-quiz__card { grid-column: 6 / 13; min-height: 600px; }

.quiz {
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-plate); padding: 44px;
  display: flex; flex-direction: column;
}
.quiz__head { display: flex; flex-direction: column; gap: 10px; }
.quiz__label { font: 600 15px/1 var(--text); color: var(--accent); }
.quiz__bar { height: 6px; border-radius: 3px; background: var(--mint); overflow: hidden; }
.quiz__bar span { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.quiz__q { margin-top: 28px; font: 800 36px/1.1 var(--head); letter-spacing: -.02em; }
.quiz__opts { margin-top: 24px; display: grid; gap: 10px; }
.quiz__opts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quiz__opt {
  min-height: 64px; width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-card); font: 500 18px/1.3 var(--text); color: inherit;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.quiz__opt:hover { border-color: var(--accent); background: var(--mint); color: inherit; }
.quiz__opt::after { content: '→'; color: var(--accent); font-size: 20px; }
.quiz__back { margin-top: 24px; align-self: flex-start; }
.quiz__field { margin-top: 20px; }
.quiz__consent { margin-top: 14px; }
.quiz__submit { margin-top: 20px; }
.quiz__sent { margin-top: 0; }
.quiz__sent-text { margin-top: 14px; font: 400 17px/1.55 var(--text); }
.quiz__note { margin-top: 18px; font: 400 16px/1.55 var(--text); }
.quiz__note + .quiz__note { margin-top: 8px; color: var(--muted); }
.quiz__sub { margin-top: 12px; font: 400 17px/1.5 var(--text); color: var(--muted); }

/* ─── 6. Наши работы ─────────────────────────────────────────────────────── */

.s-works .grid { row-gap: 48px; }
.s-works__h2 { grid-column: 1 / 13; }
.case { grid-column: span 4; display: flex; flex-direction: column; }
.case__photo { aspect-ratio: 4 / 3; border-radius: var(--r-card); }
.case__title { margin-top: 20px; font: 700 22px/1.25 var(--head); }
.case__what { margin-top: 8px; font: 400 16px/1.5 var(--text); }
.case__term { margin-top: 4px; font: 400 16px/1.5 var(--text); color: var(--muted); }
.case__sum { margin-top: 16px; font: 800 32px/1 var(--head); letter-spacing: -.02em; }

/* ─── 7. Как проходит работа ─────────────────────────────────────────────── */

.s-steps { padding-top: 0; }
.s-steps__h2 { grid-column: 1 / 13; margin-bottom: 48px; }
.step {
  grid-column: 1 / 13; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap); align-items: baseline;
  padding: 28px 0; border-top: 1px solid var(--line);
}
.step__n { grid-column: 1 / 2; font: 800 56px/.9 var(--head); color: var(--accent); }
.step__t { grid-column: 2 / 5; font: 700 24px/1.2 var(--head); }
.step__d { grid-column: 5 / 12; font: 400 19px/1.5 var(--text); }
.s-steps__pay {
  grid-column: 5 / 12; padding-top: 28px; border-top: 1px solid var(--line);
  font: 500 18px/1.5 var(--text);
}

/* ─── 8. Отзывы ──────────────────────────────────────────────────────────── */

.s-reviews { padding-top: 0; }
.s-reviews .grid { row-gap: 48px; }
.s-reviews__h2 { grid-column: 1 / 13; }
/* Виджет Яндекс Карт вместо трёх карточек-заглушек (21.10.2026).
   Ширину виджет держит свою (~760 px) и на весь экран не тянется: если отдать ему
   все 12 колонок, справа остаётся пустое поле внутри нашей рамки. Поэтому колонку
   ограничиваем и центрируем. Рамку не рисуем — у карточки виджета она своя,
   иначе получается рамка в рамке.
   Высота наша: содержимое внутри айфрейма скроллится само, подогнать её под
   контент нельзя — чужой домен. */
.s-reviews__widget {
  grid-column: 1 / 13; justify-self: center;
  width: 100%; max-width: 800px; height: 560px;
}
.s-reviews__widget iframe { display: block; width: 100%; height: 100%; border: 0; }
.s-reviews__all { grid-column: 1 / 13; font: 500 17px/1 var(--text); }

/* ─── 9. Чистый монтаж ───────────────────────────────────────────────────── */

.s-clean { padding-top: 0; }
/* Пропорция коллажа 1200×896: показываем его целиком, без обрезки по краям —
   кадрировать нечего, там инструмент, а не сцена. Высота колонки получается 469 px
   на десктопе, зелёная плашка справа растягивается до неё. */
.s-clean__photo { grid-column: 1 / 7; aspect-ratio: 1200 / 896; border-radius: var(--r-card); }
.s-clean__plate {
  grid-column: 7 / 13; background: var(--accent); color: #fff;
  border-radius: var(--r-card); padding: 56px;
  display: flex; flex-direction: column; justify-content: center; gap: 24px;
}

/* ─── 10. Гарантия ───────────────────────────────────────────────────────── */

.s-guarantee { background: var(--mint); }
.s-guarantee .grid { row-gap: 56px; }
.s-guarantee__h2 { grid-column: 1 / 13; }
.warranty { display: flex; flex-direction: column; gap: 20px; padding-top: 32px; border-top: 3px solid var(--accent); }
.warranty:first-of-type { grid-column: 1 / 7; }
.warranty:last-of-type { grid-column: 7 / 13; }
.warranty__head { display: flex; flex-direction: column; gap: 6px; }
.warranty__years { font: 800 120px/.95 var(--head); letter-spacing: -.04em; color: var(--accent); }
.warranty__what { font: 700 40px/1.1 var(--head); letter-spacing: -.02em; }
.warranty > p { max-width: 520px; }   /* только описание под цифрой, не подзаголовок */
.s-guarantee__note { grid-column: 1 / 13; font: 500 19px/1.5 var(--text); }

/* ─── 11. Кто делает ваш потолок ─────────────────────────────────────────── */

.s-team__text {
  grid-column: 1 / 7; display: flex; flex-direction: column; justify-content: center;
  gap: 24px; padding-right: 32px;
}
.s-team__photo { grid-column: 7 / 13; min-height: 560px; border-radius: var(--r-card); }
.s-team__photo img { object-position: 50% 30%; }   /* лицо в верхней трети кадра */
/* Телефон Романа прямо в тексте: акцентная ссылка, не кнопка (HANDOFF-kto-delaet) */
.s-team__phone {
  color: var(--accent); font-weight: 600; white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.s-team__phone:hover { color: var(--accent-hover); }

/* ─── 12. Вопросы и ответы ───────────────────────────────────────────────── */

.s-faq { padding-top: 0; }
.s-faq__h2 { grid-column: 1 / 5; }
.faq { grid-column: 5 / 13; border-bottom: 1px solid var(--line); }
.faq__item { border-top: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--gap);
  padding: 24px 0; background: none; border: 0; text-align: left; color: inherit; cursor: pointer;
  font: 700 22px/1.3 var(--head);
}
.faq__sign { flex: none; width: 24px; text-align: center; font: 400 28px/1 var(--text); }
.faq__a { padding: 0 64px 28px 0; font: 400 18px/1.6 var(--text); text-wrap: pretty; }
.faq__item[data-open='false'] .faq__a { display: none; }

/* ─── 13. Получить расчёт ────────────────────────────────────────────────── */

.s-form { padding: 0 0 var(--section); }
.s-form__plate {
  background: var(--accent); color: #fff; border-radius: var(--r-plate); padding: 64px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
  align-items: center;
}
.s-form__h2 { grid-column: 1 / 6; font: 800 56px/1.05 var(--head); letter-spacing: -.03em; }
.s-form__card {
  grid-column: 6 / 13; background: var(--surface); color: var(--ink);
  border-radius: var(--r-card); padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
}

/* ─── Поля, формы ────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 8px; font: 500 14px/1.2 var(--text); }
.field input {
  width: 100%; height: 52px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-field);
  background: #fff; font: 400 17px/1 var(--text); color: var(--ink); outline: none;
}
.field input:focus { border-color: var(--accent); }
.field--tall input { height: 56px; }
.field__error { display: none; font: 400 13px/1.3 var(--text); color: var(--error); }
.field[data-invalid='true'] input { border-color: var(--error); }
.field[data-invalid='true'] .field__error { display: block; }

.consent {
  display: flex; align-items: flex-start; gap: 10px;
  font: 400 14px/1.4 var(--text); cursor: pointer;
}
.consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.consent[data-invalid='true'] { color: var(--error); }

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.form-foot { display: flex; align-items: center; gap: var(--gap); }
.form-foot .btn { flex: none; }

/* ─── Окна ───────────────────────────────────────────────────────────────── */

.modal {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: var(--overlay);
  align-items: center; justify-content: center;
}
.modal[open] { display: flex; }
.modal__dialog {
  position: relative; width: 480px; max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--surface); border-radius: var(--r-plate); padding: 40px;
  display: flex; flex-direction: column;
}
.modal__dialog .icon-close { position: absolute; top: 16px; right: 16px; }
.modal__title { font: 800 32px/1.1 var(--head); letter-spacing: -.02em; padding-right: 40px; }
.modal__fields { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.modal__text { margin-top: 16px; font: 400 17px/1.55 var(--text); }
.modal__submit { margin-top: 20px; }
.modal__consent { margin-top: 16px; }
.modal__handle { display: none; }
.modal--exit .modal__dialog { width: 520px; border-top: 6px solid var(--accent); }
.modal--exit .modal__actions { margin-top: 24px; display: flex; align-items: center; gap: 28px; }

body.is-locked { overflow: hidden; }

/* ─── Закреплённая кнопка (только телефон) ───────────────────────────────── */

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: none;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
  transform: translateY(100%); transition: transform .25s ease;
}
.sticky-cta[data-visible='true'] { transform: translateY(0); }

/* ─── Подвал ─────────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; font: 400 16px/1.6 var(--text); }
.site-footer .grid { row-gap: 48px; }
.site-footer__brand { grid-column: 1 / 4; display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.site-footer__brand svg { height: 28px; width: auto; align-self: flex-start; }
.site-footer__contacts { grid-column: 4 / 7; display: flex; flex-direction: column; gap: 4px; }
.site-footer__phone { font: 700 19px/1.4 var(--head); text-decoration: none; }
.site-footer__contacts a { text-decoration: none; }
.site-footer__social { display: contents; }
.site-footer__links { display: flex; flex-direction: column; gap: 4px; }
.site-footer__links:nth-of-type(1) { grid-column: 7 / 10; }
.site-footer__links:nth-of-type(2) { grid-column: 10 / 13; }
.site-footer__links-title { font: 600 14px/1.6 var(--text); color: var(--muted); margin-bottom: 4px; }
.site-footer__bottom {
  grid-column: 1 / 13; display: flex; justify-content: space-between; gap: var(--gap);
  padding-top: 24px; border-top: 1px solid var(--line);
  font: 400 14px/1.4 var(--text); color: var(--muted);
}
.site-footer__agency { font-size: 13px; }

/* ─── Страница «Спасибо» ─────────────────────────────────────────────────── */

.thanks { position: relative; min-height: calc(100vh - var(--header-h)); }
.thanks__photo {
  position: absolute; top: 0; bottom: 0; right: 0; left: max(732px, calc(50% + 12px));
}
.thanks__photo img { object-position: 50% 30%; }
.thanks__col {
  position: relative; width: 628px; min-height: calc(100vh - var(--header-h));
  padding: 56px 0; display: flex; flex-direction: column; justify-content: center; gap: 20px;
}
.thanks__h1 { font: 800 72px/1.02 var(--head); letter-spacing: -.03em; }
.thanks__rule { height: 3px; background: var(--accent); margin: 8px 0; }
.thanks__sub { font: 800 32px/1.15 var(--head); letter-spacing: -.02em; }
.thanks__bonus {
  font: 600 19px/1.55 var(--text); color: var(--mint-ink);
  background: var(--mint); border-radius: var(--r-card); padding: 16px 20px;
}
.thanks__btn { margin-top: 12px; align-self: flex-start; }

/* ─── Страница квиза /raschet/ ───────────────────────────────────────────── */

.raschet { padding: 56px 0 80px; }
.raschet__side { grid-column: 1 / 6; display: flex; flex-direction: column; gap: 20px; padding-right: var(--gap); }
.raschet__side h1 { font: 800 52px/1.05 var(--head); letter-spacing: -.03em; text-wrap: balance; }
.raschet__side p { font: 400 18px/1.6 var(--text); }
p.raschet__promise {
  background: var(--mint); color: var(--mint-ink);
  border-radius: var(--r-card); padding: 24px; font: 600 18px/1.55 var(--text);
}
.raschet__card { grid-column: 6 / 13; }
/* На отдельной странице карточка квиза высокая, «← Назад» прижат к низу (макет, экран 2d) */
.raschet__card .quiz { min-height: 600px; }
.raschet__card .quiz__back { margin-top: auto; padding-top: 24px; }

/* ─── Политика обработки ПДн ─────────────────────────────────────────────── */

.legal { padding: 56px 0 80px; }
.legal__inner { grid-column: 1 / 9; display: flex; flex-direction: column; gap: 20px; }
.legal h1 { font: 800 48px/1.1 var(--head); letter-spacing: -.025em; }
.legal h2 { font: 700 24px/1.25 var(--head); margin-top: 20px; }
.legal p, .legal li { font: 400 17px/1.6 var(--text); }
.legal ul, .legal ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }

/* ═══ Промежуточные ширины: 768–1199 ═════════════════════════════════════ */

/* Нижняя граница 768 обязательна: телефон ниже переписывает раскладку целиком,
   и «планшетные» правила с более сильными селекторами (.s-faq .grid и т. п.)
   иначе протекают в неё поверх мобильных. */
@media (min-width: 768px) and (max-width: 1199px) {
  :root { --pad: 40px; --section: 88px; }

  .h1 { font-size: 52px; }
  .h2 { font-size: 40px; }
  .h2--xl { font-size: 48px; }
  .h2--md { font-size: 34px; }
  .warranty__years { font-size: 88px; }
  .warranty__what { font-size: 32px; }
  .s-form__h2 { font-size: 44px; }
  .thanks__h1 { font-size: 56px; }
  .raschet__side h1 { font-size: 40px; }
  .quiz__q { font-size: 30px; }

  .site-header__nav { gap: 20px; font-size: 15px; }
  .site-header__rating { display: none; }
  .site-header__right { grid-column: 10 / 13; }

  .hero, .hero__col { min-height: 640px; }
  .hero__col { width: 56%; }
  .hero__photo { left: 60%; }

  /* Две колонки вместо четырёх и шести — HANDOFF, «Сетка и отступы» */
  .kind, .kind--photo { grid-column: span 6; }
  .pack { grid-column: span 4; padding: 24px; }
  .pack__price { font-size: 40px; }
  .case { grid-column: span 4; }

  .s-why__h2, .s-why__text, .s-why__card,
  .s-price__left, .s-price__right,
  .s-quiz__side, .s-quiz__card,
  .s-clean__photo, .s-clean__plate,
  .s-team__text, .s-team__photo,
  .warranty:first-of-type, .warranty:last-of-type,
  .s-faq__h2, .faq,
  .raschet__side, .raschet__card,
  .legal__inner { grid-column: 1 / 13; }

  .s-why .grid, .s-guarantee .grid { row-gap: 40px; }
  .s-quiz .grid, .s-clean .grid, .s-team .grid, .s-faq .grid, .raschet .grid { row-gap: 40px; }
  .s-quiz__side, .raschet__side { padding-right: 0; }
  .s-team__text { padding-right: 0; }
  .s-team__photo { min-height: 360px; }   /* у коллажа про уборку высота от пропорции */
  .s-clean__plate { padding: 40px; }
  .quiz { padding: 32px; }
  .s-quiz__card { min-height: 0; }
  .step__n { grid-column: 1 / 2; font-size: 40px; }
  .step__t { grid-column: 2 / 6; }
  .step__d, .s-steps__pay { grid-column: 6 / 13; }
  .s-form__plate { padding: 40px; }
  .s-form__h2, .s-form__card { grid-column: 1 / 13; }
  .s-form__card { margin-top: 32px; }
  .site-footer__brand { grid-column: 1 / 7; }
  .site-footer__contacts { grid-column: 7 / 13; }
  .site-footer__links:nth-of-type(1) { grid-column: 1 / 7; }
  .site-footer__links:nth-of-type(2) { grid-column: 7 / 13; }
  .thanks__col { width: 56%; }
  .thanks__photo { left: 60%; }
}

/* ═══ Телефон: ≤767 ══════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  :root { --pad: 20px; --section: 56px; --gap: 16px; --header-h: 64px; }

  body { font-size: 16px; }
  .container { width: calc(100% - var(--pad) * 2); }
  /* Сетка разворачивается в одну колонку. align-items из десктопных правил
     (start, center) в колоночном флексе сжимает блоки по содержимому — гасим. */
  .grid { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
  .grid > * { grid-column: auto !important; }
  .s-quiz .grid, .s-form__plate { align-items: stretch; }

  .h1 { font-size: 32px; line-height: 1.05; letter-spacing: -.025em; }
  .h2 { font-size: 30px; line-height: 1.1; }
  .h2--xl { font-size: 34px; line-height: 1.06; }
  .h2--md { font-size: 28px; line-height: 1.12; }
  .h3 { font-size: 18px; line-height: 1.25; }
  .lead { font-size: 15px; line-height: 1.5; }
  .text { font-size: 16px; }
  .text--sm { font-size: 15px; }

  .btn { height: 56px; font-size: 17px; }
  .btn--lg { height: 58px; padding: 0 24px; font-size: 17px; }
  .link { font-size: 16px; text-underline-offset: 5px; }

  /* Шапка: лого, телефон и «Меню» */
  /* flex-direction задаём явно: .grid на телефоне разворачивает детей в колонку,
     а шапка остаётся строкой «лого — телефон и Меню» */
  .site-header__inner { height: 64px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
  .site-header__logo svg, .site-header__logo img { height: 24px; }
  .site-header__nav, .site-header__rating { display: none; }
  .site-header__right { display: flex; align-items: center; gap: 18px; }
  .site-header__phone { font-size: 15px; }
  .site-header__menu {
    display: inline-block; font: 500 15px/1 var(--text);
    background: none; border: 0; padding: 0; color: inherit; cursor: pointer;
  }

  /* Первый экран: фото сверху, затем текст и кнопка во всю ширину */
  .hero { min-height: 0; }
  .hero__photo { position: relative; width: 100%; height: 220px; left: auto; }
  .hero__photo img { object-position: 50% 74%; }
  .hero__col { width: 100%; min-height: 0; padding: 22px 0 0; }
  .hero__h1 { margin-top: 0; }
  .hero__lead { margin-top: 12px; }
  .hero__actions { margin-top: 24px; flex-direction: column; align-items: stretch; gap: 18px; }
  .hero__actions .link { align-self: flex-start; }
  .hero__facts {
    margin-top: 24px; padding-top: 14px;
    grid-template-columns: 1fr; gap: 6px; font-size: 14px; line-height: 1.4;
  }

  /* Ритм телефона из макета: у обычных секций только верхний отступ,
     у цветных полос — ещё и внешний, чтобы между зелёным и мятным
     оставалась полоса фона, а не стык двух заливок. */
  .section { padding: var(--section) 0 0; }
  .s-why, .s-price, .s-quiz, .s-guarantee { margin-top: var(--section); padding: var(--section) 0; }
  .s-form { padding: var(--section) 0 0; }
  .site-footer { margin-top: var(--section); }

  .s-why .grid { gap: 24px; }
  .s-why__text { font-size: 17px; gap: 16px; }
  .s-why__card { padding: 24px; gap: 10px; }
  .s-why__card-title { font-size: 21px; line-height: 1.25; }
  .s-why__card .text { font-size: 16px; }

  .s-price .grid { gap: 16px; }
  .s-price__h2 { margin-bottom: 8px; }
  .pack { padding: 24px; }
  .pack__name { font-size: 20px; }
  .pack__price { margin-top: 10px; font-size: 44px; }
  /* На телефоне состав пакета идёт строкой через точку (макет, блок 3) */
  .pack__list {
    margin-top: 16px; padding-top: 14px; font-size: 15px; line-height: 1.5;
    flex-direction: row; flex-wrap: wrap; gap: 0 6px;
  }
  .pack__list li + li::before { content: '·'; margin-right: 6px; }
  .s-price__left { font-size: 16px; }
  .s-price__right { font-size: 16px; }
  .terms__title { font-size: 13px; }
  .terms__list { gap: 6px; }
  .terms__list li { padding: 8px 12px; font-size: 14px; }

  /* Виды потолков: список с разделителями вместо сетки */
  .s-kinds__h2 { margin-bottom: 16px; }
  .kind {
    min-height: 0; padding: 16px 0; gap: 4px;
    background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  }
  .kind:hover { background: none; border-color: var(--line); }
  .kind__title { font: 700 18px/1.25 var(--head); }
  .kind__note { font-size: 15px; }
  .kind--photo { display: none; }
  .note-dashed { margin-top: 8px; padding: 14px 16px; gap: 12px; font-size: 15px; }
  .note-dashed__mark { width: 24px; height: 24px; font-size: 16px; }

  .s-quiz .grid { gap: 24px; }
  .s-quiz__side h2 { font-size: 30px; line-height: 1.05; }
  .s-quiz__side p { font-size: 15px; }
  p.s-quiz__promise { padding: 16px; font-size: 15px; }
  .s-quiz__card { min-height: 0; }
  .quiz { padding: 24px 16px; }
  .quiz__q { margin-top: 24px; font-size: 24px; line-height: 1.15; }
  .quiz__opts { margin-top: 20px; gap: 8px; }
  .quiz__opts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz__opts--two-mobile-one { grid-template-columns: minmax(0, 1fr); }
  .quiz__opt { min-height: 50px; padding: 12px 16px; font-size: 16px; }
  .quiz__note { font-size: 14px; }
  .quiz__sub { font-size: 15px; }

  .s-works .grid { gap: 32px; }
  .s-works__h2 { margin-bottom: 0; }
  .case__title { margin-top: 14px; font-size: 19px; }
  .case__what, .case__term { font-size: 15px; }
  .case__term { margin-top: 0; }
  .case__sum { margin-top: 10px; font-size: 26px; }

  .s-steps__h2 { margin-bottom: 16px; }
  .step {
    display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; row-gap: 6px;
    padding: 18px 0; align-items: baseline;
  }
  .step__n { font-size: 30px; line-height: 1; }
  .step__t { font-size: 19px; line-height: 1.3; }
  .step__d { grid-column: 2 !important; font-size: 15px; }
  .s-steps__pay { padding-top: 18px; font-size: 15px; }

  .s-reviews .grid { gap: 16px; }
  .s-reviews__h2 { margin-bottom: 8px; }
  /* На телефоне отзыв читается в одну колонку и занимает больше высоты,
     поэтому виджету даём вытянуться — иначе видно полтора отзыва. */
  .s-reviews__widget { height: 680px; }

  .s-clean .grid { gap: 20px; }
  .s-clean__photo { height: auto; }       /* пропорция 1200×896, коллаж виден целиком */
  /* На телефоне зелёной плашки нет: заголовок и текст идут прямо по фону (макет, блок 9) */
  .s-clean__plate { padding: 0; gap: 16px; background: none; color: var(--ink); border-radius: 0; }

  .s-guarantee .grid { gap: 32px; }
  .warranty { padding-top: 20px; gap: 12px; }
  .warranty__years { font-size: 72px; }
  .warranty__what { font-size: 26px; line-height: 1.15; }
  .warranty > p { font-size: 16px; }
  .s-guarantee__note { font-size: 16px; }

  .s-team .grid { gap: 20px; }
  .s-team__text { padding-right: 0; gap: 16px; }
  .s-team__photo { min-height: 0; height: 320px; }
  .s-team__photo img { object-position: 40% 30%; }   /* на узком кадре Роман уходит левее */

  .s-faq__h2 { margin-bottom: 16px; }
  .faq__q { padding: 18px 0; gap: 16px; font-size: 17px; line-height: 1.35; }
  .faq__sign { width: 20px; font-size: 24px; }
  .faq__a { padding: 0 0 20px; font-size: 15px; }

  .s-form__plate { padding: 28px 16px 16px; display: flex; flex-direction: column; }
  .s-form__h2 { font-size: 30px; line-height: 1.1; letter-spacing: -.025em; margin: 0 4px 20px; }
  .s-form__card { margin-top: 0; padding: 20px 16px; gap: 14px; }
  .form-row { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .form-foot { flex-direction: column; align-items: stretch; gap: 14px; }
  .form-foot .btn { width: 100%; }
  .field input { height: 50px; }
  .consent { font-size: 13px; }

  /* запас снизу — под закреплённую кнопку */
  .site-footer { padding: 40px 0 calc(40px + 72px); }
  .site-footer .grid { gap: 28px; }
  .site-footer__brand svg { height: 24px; }
  .site-footer__contacts { gap: 2px; }
  .site-footer__phone { font-size: 18px; }
  .site-footer__social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; font-size: 15px; }
  .site-footer__bottom { flex-direction: column; gap: 10px; padding-top: 20px; }
  .site-footer__agency { font-size: 12px; }

  /* Окна: лист снизу */
  .modal { align-items: flex-end; }
  .modal__dialog {
    width: 100%; max-height: 92vh; border-radius: var(--r-plate) var(--r-plate) 0 0;
    padding: 12px 20px calc(28px + env(safe-area-inset-bottom));
  }
  .modal__handle {
    display: block; width: 40px; height: 4px; border-radius: 2px;
    background: var(--line); align-self: center; margin-bottom: 16px;
  }
  .modal__dialog .icon-close { top: 8px; right: 16px; }
  .modal__title { font-size: 26px; }
  .modal--exit .modal__dialog { width: 100%; }
  .modal--exit .modal__actions { flex-wrap: wrap; gap: 20px; }

  .sticky-cta { display: block; }

  /* «Спасибо»: фото сверху */
  .thanks { min-height: 0; }
  .thanks__photo { position: relative; width: 100%; height: 200px; left: auto; }
  .thanks__photo img { object-position: 50% 34%; }
  .thanks__col { width: 100%; min-height: 0; padding: 24px 0 32px; gap: 14px; }
  .thanks__h1 { font-size: 36px; }
  .thanks__sub { font-size: 22px; }
  .thanks__bonus { font-size: 15px; }
  .thanks__btn { margin-top: 6px; align-self: stretch; }

  .raschet { padding: 16px 0 32px; }
  .raschet .grid { gap: 12px; }
  .raschet__side { padding-right: 0; gap: 10px; }
  .raschet__side h1 { font-size: 27px; }
  .raschet__side p { font-size: 15px; }
  p.raschet__promise { padding: 12px 14px; font-size: 14px; line-height: 1.5; }
  /* На телефоне квиз-страница идёт без белой карточки — вопросы прямо по фону (макет, 2e) */
  .raschet__card .quiz { padding: 0; min-height: 0; background: none; border-radius: 0; }
  /* Отбивка только на первом шаге: дальше экран занимают ответы */
  .raschet:not([data-step="0"]) .raschet__side { display: none; }

  .legal { padding: 32px 0 48px; }
  .legal h1 { font-size: 30px; }
  .legal h2 { font-size: 20px; }
  .legal p, .legal li { font-size: 15px; }
}
