/* =========================================================
   Бюро каркасных домов — стили лендинга
   Mobile-first. Без внешних шрифтов и библиотек.
   ========================================================= */

:root {
  --bg: #f6f1e9;          /* кремовый фон */
  --bg-alt: #eee6d9;      /* фон чередующихся секций */
  --surface: #fffdf9;     /* карточки */
  --ink: #181512;         /* основной текст, кнопки */
  --ink-soft: #3a342e;
  --muted: #5e564c;       /* второстепенный текст (контраст ~6.5:1 на фоне) */
  --line: #d8ccba;
  --line-strong: #b9aa94;
  --wood: #b5703a;        /* акцент: только крупный текст и декор */
  --wood-ink: #8a4f22;    /* акцент для мелкого текста (контраст ≥ 4.5:1) */
  --ph-bg: #dcd5ca;       /* заглушки фото */
  --ph-line: #cfc6b8;
  --ok: #2f6b3a;
  --err: #a3321f;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(24, 21, 18, .05), 0 8px 30px rgba(24, 21, 18, .06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 64px;
  --gutter: 16px;
}

@media (min-width: 768px) {
  :root { --gutter: 28px; --header-h: 76px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 40px; }
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) { body { font-size: 17px; } }

body:has(dialog[open]) { overflow: hidden; }

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

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--wood-ink); }

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

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

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Типографика ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--wood-ink);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: currentColor;
}

.section__title {
  font-size: clamp(28px, 6.4vw, 48px);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.section__lead {
  margin-top: 16px;
  max-width: 40em;
  color: var(--muted);
  font-size: 1.05em;
}
.section__head { margin-bottom: 36px; }
@media (min-width: 1024px) { .section__head { margin-bottom: 52px; } }

.accent { color: var(--wood); }

.note {
  margin-top: 28px;
  max-width: 52em;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Секции ---------- */
.section { padding-block: 72px; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--ink); color: #f3ede4; }
.section--dark .section__lead { color: #cfc5b8; }
@media (min-width: 1024px) { .section { padding-block: 112px; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px; font-weight: 600; line-height: 1.2;
  text-align: center; text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover:not([disabled]) { background: #3b332b; color: #fff; }

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

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover:not([disabled]) { border-color: var(--ink); color: var(--ink); }

.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--block { width: 100%; }

.section--dark :focus-visible { outline-color: #e2b98f; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 233, .92);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.header.is-scrolled { border-bottom-color: var(--line); }

.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--header-h);
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  flex-shrink: 0;
}
.logo:hover { color: var(--ink); }
.logo__icon { flex-shrink: 0; }
.logo__text {
  display: flex; flex-direction: column;
  font-size: 12.5px; font-weight: 700; line-height: 1.15;
  letter-spacing: .14em; text-transform: uppercase;
}
.logo__text span:first-child { font-weight: 500; color: var(--muted); }

.header__actions { display: flex; align-items: center; gap: 12px; }

.header__phone {
  display: none;
  flex-direction: column; align-items: flex-end;
  text-decoration: none; line-height: 1.2;
}
.header__phone-num { font-weight: 650; font-size: 16px; white-space: nowrap; }
.header__phone-note { font-size: 12.5px; color: var(--muted); }
.header__cta { display: none; }

@media (min-width: 768px) {
  .header__phone { display: flex; }
  .header__cta { display: inline-flex; }
}

/* бургер */
.burger {
  width: 46px; height: 46px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: transparent;
}
.burger span {
  display: block; width: 18px; height: 1.6px; background: var(--ink);
  transition: transform .25s, opacity .2s;
}
.header.is-open .burger span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.header.is-open .burger span:nth-child(2) { opacity: 0; }
.header.is-open .burger span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* навигация: мобильная панель */
.nav {
  position: fixed; left: 0; right: 0; top: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 24px;
  display: none;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  box-shadow: 0 20px 30px rgba(24, 21, 18, .08);
}
.header.is-open .nav { display: block; }
.nav__list a {
  display: block; padding: 14px 0;
  font-size: 19px; font-weight: 550; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav__phone {
  display: inline-block; margin-top: 20px;
  font-size: 20px; font-weight: 650; text-decoration: none;
}

@media (min-width: 1200px) {
  .burger { display: none; }
  .nav {
    position: static; display: block;
    background: none; border: 0; padding: 0; box-shadow: none;
    max-height: none; overflow: visible;
    margin-inline: auto;
  }
  .nav__list { display: flex; gap: 26px; }
  .nav__list a {
    padding: 6px 0; border: 0;
    font-size: 15px; font-weight: 500; color: var(--ink-soft);
    position: relative;
  }
  .nav__list a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0;
    height: 1px; background: currentColor;
    transform: scaleX(0); transform-origin: left; transition: transform .25s;
  }
  .nav__list a:hover { color: var(--ink); }
  .nav__list a:hover::after { transform: scaleX(1); }
  .nav__phone { display: none; }
}

/* ---------- Заглушки фото ---------- */
.media {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.media--hero  { aspect-ratio: 4 / 3; }
.media--card  { aspect-ratio: 4 / 3; border-radius: var(--radius) var(--radius) 0 0; }
.media--work  { aspect-ratio: 3 / 2; }
.media--about { aspect-ratio: 4 / 5; }
@media (min-width: 1024px) {
  .hero__media { align-self: center; }
  .media--hero { aspect-ratio: 7 / 5; }
}

.ph {
  position: relative;
  display: grid; place-items: center;
  background-color: var(--ph-bg);
  background-image: repeating-linear-gradient(135deg, transparent 0 22px, var(--ph-line) 22px 23px);
  overflow: hidden;
}
.ph__label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 253, 249, .88);
  border-radius: 999px;
  font-size: 14px; font-weight: 550; color: var(--ink-soft);
  text-align: center;
}
.ph__label::before {
  content: "";
  width: 16px; height: 16px; flex-shrink: 0;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e564c' stroke-width='1.6' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 16 5-5 4 4 3-3 6 6'/%3E%3Ccircle cx='16' cy='9' r='1.5'/%3E%3C/svg%3E");
}

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.field__opt { font-weight: 400; color: var(--muted); }
.field__input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 17px;
  transition: border-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: #8f857a; }
.field__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(181, 112, 58, .25); }
.field__input[aria-invalid="true"] { border-color: var(--err); }
.field__error { font-size: 14px; color: var(--err); }

.consent {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 14px;
  font-size: 13.5px; line-height: 1.45; color: var(--muted);
  cursor: pointer;
}
.consent input {
  flex-shrink: 0;
  width: 20px; height: 20px; margin: 0;
  accent-color: var(--ink);
}
.consent a { color: var(--ink-soft); }
.consent + .field__error { margin-top: 6px; }

/* honeypot: спрятано от людей, видно ботам */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px; line-height: 1.5;
  background: var(--bg-alt);
  color: var(--ink);
}
.form-status a { font-weight: 650; white-space: nowrap; }
.form-status.is-ok   { background: #e5eedf; color: var(--ok); }
.form-status.is-err  { background: #f6e0d9; color: var(--err); }
.form-status.is-test { background: #f3e6c9; color: #6b4a12; }

/* после успешной отправки прячем поля */
.lead-form.is-done .field,
.lead-form.is-done .consent,
.lead-form.is-done .field__error,
.lead-form.is-done button[type="submit"],
.lead-form.is-done .lead-form__row,
.lead-form.is-done .lead-form__note { display: none; }

.lead-form { position: relative; }
.lead-form__title { font-size: 18px; font-weight: 650; line-height: 1.3; margin-bottom: 14px; }
.lead-form__note { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* ---------- Первый экран ---------- */
.hero { padding-block: 28px 64px; }
.hero__grid { display: grid; gap: 28px; }
.hero__title {
  font-size: clamp(30px, 7.6vw, 52px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero__lead {
  margin-top: 18px;
  max-width: 34em;
  font-size: 1.08em;
  color: var(--ink-soft);
}
.lead-form--hero { margin-top: 26px; padding: 20px; box-shadow: var(--shadow); max-width: 560px; }
.lead-form__row { display: grid; gap: 12px; }
.lead-form__submit { width: 100%; }

@media (min-width: 560px) {
  .lead-form__row { grid-template-columns: 1fr auto; align-items: end; }
  .lead-form__submit { width: auto; }
}

.metrics {
  display: grid; gap: 0;
  border-top: 1px solid var(--line);
}
.metric {
  display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.metric__value {
  font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  color: var(--ink);
}
.metric__text { color: var(--muted); font-size: 15px; line-height: 1.45; }

@media (min-width: 768px) {
  .hero { padding-top: 48px; }
  .metrics { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .metric { grid-template-columns: 1fr; gap: 6px; padding: 22px 24px 22px 0; border-bottom: 0; }
  .metric + .metric { padding-left: 24px; border-left: 1px solid var(--line); }
  .metric__value { font-size: 34px; }
}

@media (min-width: 1024px) {
  .hero { padding-block: 56px 96px; }
  .hero__grid {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    column-gap: 48px; row-gap: 48px;
  }
  .hero__content { align-self: center; }
  .metrics { grid-column: 1 / -1; }
}

/* ---------- Проекты ---------- */
.projects {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.project {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.project:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
/* Эскизы проектов (SVG 4:3): вписываем целиком, без обрезки */
.project img.media--card { object-fit: contain; background: var(--bg); border-bottom: 1px solid var(--line); }
/* Картинки проектов от нейросети (jpg): заполняют карточку, без рамки снизу */
.project img.media--card[src$=".jpg"] { object-fit: cover; border-bottom: 0; }
.project__body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.project__title { font-size: 20px; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; }
.project__specs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.project__specs dt { font-size: 13px; color: var(--muted); }
.project__specs dd { font-weight: 600; font-size: 15px; }
.project__price {
  margin: 16px 0 18px;
  font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25;
  margin-top: auto; padding-top: 16px;
}
.project__price span { display: block; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.project .btn { min-height: 48px; font-size: 15px; }

/* ---------- Квиз ---------- */
.quiz { position: relative; padding: 22px 18px; max-width: 860px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .quiz { padding: 40px 44px; } }

.quiz__top { margin-bottom: 26px; }
.quiz__counter { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.quiz__bar { height: 4px; background: var(--bg-alt); border-radius: 4px; overflow: hidden; }
.quiz__bar-fill {
  display: block; height: 100%; width: 20%;
  background: var(--wood);
  border-radius: inherit;
  transition: width .35s ease;
}

.quiz__step { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__question {
  padding: 0; margin-bottom: 20px;
  font-size: clamp(22px, 4.6vw, 30px); font-weight: 650; line-height: 1.2; letter-spacing: -.015em;
}
.quiz__question:focus { outline: none; }
.quiz__sub { margin: -8px 0 18px; color: var(--muted); }
.quiz__hint { margin-top: 16px; font-size: 14px; color: var(--muted); }

.options { display: grid; gap: 10px; }
@media (min-width: 640px) { .options { grid-template-columns: 1fr 1fr; } }

.option { position: relative; display: block; cursor: pointer; }
.option input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.option span {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 64px; height: 100%;
  padding: 14px 18px 14px 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-weight: 600; line-height: 1.3;
  position: relative;
  transition: border-color .2s, background-color .2s;
}
.option span::before {
  content: "";
  position: absolute; left: 18px; top: 50%;
  width: 20px; height: 20px; margin-top: -10px;
  border: 1.5px solid var(--line-strong); border-radius: 50%;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.option small { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 400; color: var(--muted); }
.option:hover span { border-color: var(--ink); }
.option input:checked + span { border-color: var(--ink); background: #fbf6ee; }
.option input:checked + span::before { border-color: var(--ink); box-shadow: inset 0 0 0 5px var(--ink); }
.option input:focus-visible + span { outline: 2px solid var(--wood-ink); outline-offset: 2px; }

.quiz__fields { display: grid; gap: 14px; }
@media (min-width: 640px) { .quiz__fields { grid-template-columns: 1fr 1fr; } }
.quiz__submit { margin-top: 20px; width: 100%; }
@media (min-width: 640px) { .quiz__submit { width: auto; } }

.quiz__nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.quiz__nav .btn { min-width: 0; flex: 0 1 auto; }
.quiz.is-last .quiz__nav [data-quiz-next] { visibility: hidden; }
.quiz.is-done .quiz__nav,
.quiz.is-done .quiz__top,
.quiz.is-done .quiz__step { display: none; }

/* ---------- Этапы ---------- */
.steps {
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  counter-reset: none;
}
.step { background: var(--bg); padding: 26px 22px; }
.step__num {
  display: block; margin-bottom: 18px;
  font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--wood-ink);
}
.step__title { font-size: 20px; font-weight: 650; line-height: 1.25; margin-bottom: 10px; }
.step p { color: var(--muted); }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 34px 32px; }
}

.info-row { display: grid; gap: 16px; margin-top: 24px; }
@media (min-width: 768px) { .info-row { grid-template-columns: 1fr 1fr; gap: 20px; } }
.info { padding: 24px 22px; }
.info__title { font-size: 18px; font-weight: 650; margin-bottom: 8px; }
.info p { color: var(--ink-soft); }
@media (min-width: 1024px) { .info { padding: 30px 32px; } }

/* ---------- Материалы ---------- */
.layers { border-top: 1px solid var(--line-strong); }
.layer {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.layer__num { font-size: 14px; font-weight: 700; color: var(--wood-ink); letter-spacing: .08em; padding-top: 4px; }
.layer__title { font-size: 19px; font-weight: 650; line-height: 1.3; margin-bottom: 8px; }
.layer p { color: var(--ink-soft); max-width: 46em; }
@media (min-width: 1024px) {
  .layers { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
  .layer { grid-template-columns: 56px 1fr; padding: 30px 0; }
}

/* ---------- Портфолио ---------- */
/* Портфолио: горизонтальная лента (листается пальцем или стрелками) */
.works-wrap { position: relative; margin-inline: calc(-1 * var(--gutter)); }
.works {
  display: flex; gap: 16px; list-style: none; margin: 0;
  padding: 4px var(--gutter) 10px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.works::-webkit-scrollbar { display: none; }
.works:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 12px; }
.works .work { flex: 0 0 82%; max-width: 380px; scroll-snap-align: start; }
@media (min-width: 640px) { .works .work { flex-basis: 46%; } }
@media (min-width: 1024px) { .works .work { flex-basis: calc((100% - 2 * var(--gutter) - 32px) / 3); max-width: none; } }
.works-hint { margin-top: 6px; font-size: 13px; color: var(--muted); }
@media (min-width: 1024px) { .works-hint { display: none; } }
.works-nav {
  position: absolute; top: 34%; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(24, 21, 18, .16); cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.works-nav:hover { transform: scale(1.06); background: #fff; }
.works-nav:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.works-nav--prev { left: calc(var(--gutter) - 10px); }
.works-nav--next { right: calc(var(--gutter) - 10px); }
@media (min-width: 768px) { .works-nav:not([hidden]) { display: inline-flex; } }
@media (prefers-reduced-motion: reduce) { .works-nav { transition: none; } }
.work__specs { margin-top: 14px; }
.work__specs div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.work__specs dt { color: var(--muted); }
.work__specs dd { font-weight: 600; text-align: right; }
.work__todo { margin-top: 10px; font-size: 13px; color: var(--muted); font-style: italic; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; gap: 8px; }
.faq-call { margin-top: 24px; }
@media (min-width: 1024px) {
  .faq-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
  .faq-layout .section__head { position: sticky; top: calc(var(--header-h) + 32px); }
}

.faq { border-top: 1px solid var(--line-strong); }
.faq__item { border-bottom: 1px solid var(--line-strong); }
.faq__item summary {
  position: relative;
  display: block;
  padding: 20px 48px 20px 0;
  font-size: 18px; font-weight: 600; line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before,
.faq__item summary::after {
  content: "";
  position: absolute; right: 8px; top: 50%;
  width: 16px; height: 1.6px; background: var(--ink);
  transition: transform .25s;
}
.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0deg); }
.faq__item summary:hover { color: var(--wood-ink); }
.faq__body { padding: 0 0 22px; color: var(--ink-soft); max-width: 44em; }
.faq__body p + p { margin-top: 10px; }
@media (min-width: 768px) { .faq__item summary { font-size: 19px; padding-block: 24px; } }

/* ---------- Отзывы (заглушка) ---------- */
.reviews { display: grid; gap: 16px; }
@media (min-width: 768px) { .reviews { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.review-ph {
  display: grid; place-items: center;
  min-height: 180px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted); font-size: 15px;
}

/* ---------- О компании ---------- */
.about { display: grid; gap: 36px; }
.about__text > p:not(.eyebrow) { margin-top: 18px; color: var(--ink-soft); max-width: 38em; }
.about__text .section__title { margin-bottom: 4px; }
.facts { display: grid; gap: 10px; margin-top: 26px; }
.facts li {
  position: relative; padding-left: 30px; font-weight: 600;
}
.facts li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 16px; height: 9px;
  border-left: 2px solid var(--wood); border-bottom: 2px solid var(--wood);
  transform: rotate(-45deg) translateY(-3px);
}
.tg-link {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 30px; padding: 14px 20px;
  border: 1px solid var(--ink); border-radius: 999px;
  font-weight: 600; text-decoration: none; line-height: 1.3;
}
.tg-link:hover { background: var(--ink); color: #fff; }
.tg-link svg { flex-shrink: 0; }
@media (min-width: 1024px) {
  .about { grid-template-columns: 1fr; }
}

/* ---------- Финальный блок ---------- */
.cta { display: grid; gap: 36px; }
.section--dark .section__title { color: #fff; }
.contacts { display: grid; gap: 20px; margin-top: 30px; }
.contacts li { display: grid; gap: 2px; }
.contacts__label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #b5a998; }
.contacts__value { font-size: 22px; font-weight: 650; color: #fff; text-decoration: none; overflow-wrap: anywhere; }
a.contacts__value:hover { color: #e2b98f; }
.contacts__value--plain { font-size: 18px; font-weight: 500; }
.contacts__note { font-size: 14px; color: #cfc5b8; }

.lead-form--final { padding: 24px 20px; color: var(--ink); display: grid; gap: 14px; }
.lead-form--final .lead-form__title { margin-bottom: 0; font-size: 20px; }
.lead-form--final .consent { margin-top: 0; }
@media (min-width: 768px) { .lead-form--final { padding: 34px 32px; } }
@media (min-width: 1024px) {
  .cta { grid-template-columns: 1fr minmax(0, 460px); gap: 80px; align-items: center; }
}

/* ---------- Подвал ---------- */
.footer { padding: 56px 0 28px; border-top: 1px solid var(--line); }
.footer__inner { display: grid; gap: 28px; }
.footer__text { margin-top: 16px; max-width: 30em; font-size: 15px; color: var(--muted); }
.footer__contacts { display: grid; gap: 10px; align-content: start; font-size: 15px; }
.footer__contacts a { text-decoration: none; }
.footer__contacts a:hover { text-decoration: underline; }
.footer__phone { font-size: 20px; font-weight: 650; }
.footer__bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
@media (min-width: 768px) {
  .footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer__contacts { text-align: right; justify-items: end; }
}

/* ---------- Мобильная панель ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(246, 241, 233, .96);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.mobile-bar__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border-radius: 999px;
  font-weight: 650; font-size: 16px; text-decoration: none;
}
.mobile-bar__btn--call { border: 1px solid var(--ink); color: var(--ink); }
.mobile-bar__btn--calc { background: var(--ink); color: #fff; }
.mobile-bar__btn--calc:hover { color: #fff; }
body { padding-bottom: 76px; }
@media (min-width: 768px) {
  .mobile-bar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Всплывающее окно ---------- */
.modal {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0; margin: auto;
  border: 0; border-radius: 18px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px rgba(24, 21, 18, .3);
  overflow: auto;
}
.modal::backdrop { background: rgba(24, 21, 18, .55); }
.modal[open] { animation: modal-in .25s ease-out; }
.modal__box { position: relative; padding: 30px 22px 24px; }
@media (min-width: 560px) { .modal__box { padding: 40px 40px 32px; } }
.modal__close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
}
.modal__close:hover { background: var(--bg-alt); }
.modal__title { font-size: clamp(23px, 5.6vw, 30px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; padding-right: 30px; }
.modal__project {
  display: inline-block; margin-top: 12px; padding: 4px 12px;
  border-radius: 999px; background: var(--bg-alt);
  font-size: 14px; font-weight: 600;
}
.modal__text { margin: 12px 0 20px; color: var(--muted); }
.lead-form--modal .btn { margin-top: 16px; }

/* запасной вариант для браузеров без <dialog> */
.modal.is-fallback[open] {
  position: fixed; inset: 0; z-index: 100;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Плавное появление ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Страница политики ---------- */
.doc { padding-block: 40px 80px; }
.doc__inner { max-width: 820px; }
.doc h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 12px; }
.doc h2 { font-size: 22px; line-height: 1.3; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc p + p { margin-top: 10px; }
.doc ul { list-style: disc; padding-left: 22px; margin: 10px 0; }
.doc ol { list-style: decimal; padding-left: 22px; margin: 10px 0; }
.doc li + li { margin-top: 6px; }
.doc__meta { color: var(--muted); font-size: 15px; }
.doc__fill { background: #f3e6c9; padding: 0 4px; border-radius: 4px; }
.doc__back { display: inline-block; margin-bottom: 28px; font-weight: 600; }
.doc__box { margin-top: 48px; padding: 24px; }
body.page-doc { padding-bottom: 0; }
.page-doc .header__inner { gap: 12px; }

/* =========================================================
   ЭФФЕКТЫ И НОВЫЕ БЛОКИ (октябрь 2026)
   Первый экран, счётчики, линия этапов, разрез стены,
   калькулятор, слайдер «до / после», наклон карточек,
   тени, зерно на тёмных блоках, микровзаимодействия.
   Анимируем только transform и opacity. Скрытие «до анимации» —
   только через классы, которые ставит JS (.fx-hero, .js, .is-closed,
   .is-tracking): без JS всё видно сразу.
   ========================================================= */

:root {
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  /* мягкие многослойные тени (переопределяет --shadow выше) */
  --shadow: 0 1px 1px rgba(24, 21, 18, .04), 0 2px 6px -1px rgba(24, 21, 18, .05),
            0 10px 22px -6px rgba(24, 21, 18, .07), 0 28px 52px -18px rgba(24, 21, 18, .10);
  --shadow-lift: 0 1px 2px rgba(24, 21, 18, .05), 0 6px 14px -4px rgba(24, 21, 18, .08),
                 0 20px 38px -12px rgba(24, 21, 18, .14), 0 44px 80px -30px rgba(24, 21, 18, .20);
  /* зерно: SVG-шум, белые крапинки с прозрачностью до ~9% */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Тёмные блоки: зерно и тёплый отсвет ---------- */
.section--dark {
  background-color: var(--ink);
  background-image: var(--grain), radial-gradient(120% 80% at 100% 0%, rgba(181, 112, 58, .16), transparent 60%);
}
.section--dark .eyebrow { color: #e2b98f; }
/* светлая карточка внутри тёмного блока — фокус снова тёмный, чтобы был виден */
.section--dark .card :focus-visible { outline-color: var(--wood-ink); }

/* ---------- Кнопки: подсветка и смещение ---------- */
.btn {
  transition: background-color .2s, color .2s, border-color .2s,
              transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.btn--dark { background-image: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 60%); }
@media (hover: hover) {
  .btn--dark:hover:not([disabled]) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -12px rgba(24, 21, 18, .65), 0 0 0 4px rgba(181, 112, 58, .14);
  }
  .btn--outline:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -14px rgba(24, 21, 18, .5); }
  .btn--ghost:hover:not([disabled]) { transform: translateY(-1px); }
}
.btn:active:not([disabled]) { transform: translateY(1px); box-shadow: none; transition-duration: .08s; }

/* ---------- Появление при прокрутке: каскад ---------- */
/* --rd (задержка) ставит main.js блокам, которые показались одновременно */
.js .reveal {
  transform: translateY(22px);
  transition: opacity .8s var(--ease-out) var(--rd, 0ms), transform .8s var(--ease-out) var(--rd, 0ms);
}

/* ---------- 1. Первый экран ---------- */
.hero__title .line { display: block; }
.hero__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
  box-shadow: var(--shadow-lift);
}
.lead-form--hero { box-shadow: var(--shadow-lift); }

@media (prefers-reduced-motion: no-preference) {
  .fx-hero .hero__title .line { animation: fx-rise .9s var(--ease-out) both; }
  .fx-hero .hero__title .line:nth-child(2) { animation-delay: .14s; }
  .fx-hero .hero .eyebrow { animation: fx-fade .8s ease both; }
  .fx-hero .hero__lead { animation: fx-rise .8s var(--ease-out) .26s both; }
  .fx-hero .lead-form--hero { animation: fx-rise .8s var(--ease-out) .36s both; }
  .fx-hero .hero__media { animation: fx-media 1.2s var(--ease-out) .1s both; }
  .fx-hero .metrics { animation: fx-fade .9s ease .5s both; }
  /* фото «дышит»: 1.00 → 1.05 за 16 с и обратно */
  .hero__media img {
    transform-origin: 60% 55%;
    animation: fx-breathe 16s ease-in-out 1.3s infinite alternate;
    will-change: transform;
  }
}
@keyframes fx-rise  { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fx-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-media { from { opacity: 0; transform: scale(.975); } to { opacity: 1; transform: none; } }
@keyframes fx-breathe { from { transform: scale(1); } to { transform: scale(1.05); } }

/* ---------- 6. Метрики: 4 штуки, числа не прыгают по ширине ---------- */
.metric__value { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .metric { grid-template-columns: 136px 1fr; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(odd) { padding-left: 0; border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (min-width: 1024px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 5. Этапы: вертикальная линия прогресса ---------- */
/* Без JS линия заполнена и все шаги выглядят «пройденными». */
.steps {
  --mk: 33px;                     /* высота маркера от верха шага; читает fx.js */
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px;
  padding-left: 44px;
  background: none; border: 0; border-radius: 0; overflow: visible;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute; left: 15px; top: var(--mk);
  width: 2px; height: var(--tl-h, calc(100% - 2 * var(--mk)));
  border-radius: 2px;
  z-index: 0;
}
.steps::before { background: var(--line); }
.steps::after {
  background: linear-gradient(var(--wood), var(--wood-ink));
  transform-origin: 50% 0;
  transform: scaleY(var(--p, 1));
}
.step {
  position: relative; z-index: 1;
  background: none;
  padding: 20px 18px;
}
.step::before {               /* маркер на линии */
  content: "";
  position: absolute; left: -37px; top: calc(var(--mk) - 9px);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--wood); border: 2px solid var(--wood);
  box-shadow: 0 0 0 5px var(--bg);
  transition: background-color .35s, border-color .35s, box-shadow .35s, transform .35s var(--ease-out);
}
.step::after {                /* подложка текущего шага */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .5s var(--ease-out);
}
.step__num { margin-bottom: 8px; }
.step__title { transition: color .35s; }
.js .step.reveal {
  transition: opacity .8s var(--ease-out) var(--rd, 0ms), transform .8s var(--ease-out) var(--rd, 0ms),
              translate .5s var(--ease-out);
}
.steps.is-tracking .step:not(.is-lit)::before { background: var(--bg); border-color: var(--line-strong); transform: scale(.8); }
.steps.is-tracking .step:not(.is-lit) .step__title { color: var(--ink-soft); }
.step.is-current { translate: 0 -3px; }
.step.is-current::after { opacity: 1; }
.step.is-current::before { box-shadow: 0 0 0 5px var(--bg), 0 0 0 10px rgba(181, 112, 58, .18); }

@media (min-width: 1024px) {
  .steps { --mk: 43px; padding-left: 60px; gap: 6px; }
  .steps::before, .steps::after { left: 21px; }
  .step {
    display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.5fr);
    column-gap: 32px; align-items: baseline;
    padding: 32px 36px;
  }
  .step::before { left: -47px; }
  .step__num, .step__title { margin: 0; }
}

/* ---------- 4. Разрез стены ---------- */
.wall {
  display: grid; gap: 24px;
  margin-top: 56px; padding: 24px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.wall__title { font-size: clamp(22px, 4.6vw, 30px); font-weight: 650; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.wall__lead { margin-top: 12px; color: var(--ink-soft); max-width: 36em; }
.wall__figure { margin: 0; min-width: 0; }
.wall__svg { width: 100%; height: auto; overflow: visible; }
.wall__caption { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.wall__list { display: grid; gap: 2px; }
.wall__item {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  padding: 10px 10px 10px 4px;
  border-radius: var(--radius-sm);
  transition: background-color .25s;
}
.wall__n {
  display: grid; place-items: center;
  width: 26px; height: 26px; margin-top: 1px;
  border-radius: 50%;
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 1;
}
.wall__item-title { font-size: 16.5px; font-weight: 650; line-height: 1.35; }
.wall__item p { margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* SVG: слои и подписи */
.wall__edge { fill: none; stroke: rgba(24, 21, 18, .5); stroke-width: 1; stroke-linejoin: round; }
.wall__grain { stroke: rgba(90, 52, 20, .28); stroke-width: 1; }
.wall__side { font: 600 16px var(--font); fill: var(--muted); }
.wall__label text { font: 600 22px var(--font); fill: var(--ink); }
.wall__label > circle:first-child { fill: var(--ink); }
.wall__label path { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.wall__label .wall__badge { fill: var(--ink); }
.wall__label .wall__badge-n { font: 700 14px var(--font); fill: #fff; text-anchor: middle; }

.wall__slab { transition: transform 1.2s var(--ease-out), opacity .3s; }
.wall__label { transition: transform 1.2s var(--ease-out), opacity .5s ease calc(.6s + var(--i, 0) * .16s); }
/* .is-closed ставит fx.js до появления схемы на экране — слои собраны, подписей нет */
.wall.is-closed .wall__slab { transform: translateY(var(--c)); }
.wall.is-closed .wall__label { transform: translateY(var(--c)); opacity: 0; }

/* подсветка слоя: наведение на пункт списка или на слой */
.wall[data-active] .wall__slab { opacity: .35; }
.wall[data-active="1"] .wall__slab[data-l="1"],
.wall[data-active="2"] .wall__slab[data-l="2"],
.wall[data-active="3"] .wall__slab[data-l="3"],
.wall[data-active="4"] .wall__slab[data-l="4"],
.wall[data-active="5"] .wall__slab[data-l="5"] { opacity: 1; }
.wall[data-active="1"] [data-wall-item="1"],
.wall[data-active="2"] [data-wall-item="2"],
.wall[data-active="3"] [data-wall-item="3"],
.wall[data-active="4"] [data-wall-item="4"],
.wall[data-active="5"] [data-wall-item="5"] { background: var(--bg-alt); }

/* на телефоне схема ~320 px шириной — подписи внутри SVG крупнее */
@media (max-width: 767px) {
  .wall__side { font-size: 21px; }
  .wall__label text { font-size: 24px; }
  .wall__label .wall__badge { r: 14px; }
  .wall__label .wall__badge-n { font-size: 16px; }
}
@media (min-width: 768px) {
  .wall { padding: 36px 32px; }
}
@media (min-width: 1024px) {
  .wall {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-areas: "head fig" "list fig";
    grid-template-rows: auto 1fr;
    column-gap: 56px; row-gap: 20px;
    margin-top: 72px; padding: 48px;
  }
  .wall__head { grid-area: head; }
  .wall__list { grid-area: list; align-self: start; }
  .wall__figure { grid-area: fig; align-self: center; }
}

/* ---------- 3. Калькулятор ---------- */
.calc { display: grid; gap: 28px; }
.calc__controls { display: grid; gap: 28px; min-width: 0; }
.calc__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc__label {
  display: block; padding: 0; margin-bottom: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: #b5a998;
}
.calc__label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.calc__label-row .calc__label { margin-bottom: 0; }
.calc__area {
  font-size: clamp(30px, 7vw, 44px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
  color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.calc__range-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; margin-top: 8px; }
.calc__step {
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(243, 237, 228, .35); border-radius: 50%;
  background: transparent; color: #fff;
  font-size: 22px; line-height: 1;
  transition: border-color .2s, background-color .2s, transform .2s var(--ease-out);
}
.calc__step:hover { border-color: #fff; background: rgba(243, 237, 228, .08); }
.calc__step:active { transform: scale(.92); }

/* ползунок площади: крупный, на телефоне ещё крупнее */
.calc__range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 44px; margin: 0;
  background: transparent; cursor: pointer;
  --fill: 26.15%;
}
.calc__range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(to right, var(--wood) 0 var(--fill), rgba(243, 237, 228, .2) var(--fill) 100%);
}
.calc__range::-moz-range-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(to right, var(--wood) 0 var(--fill), rgba(243, 237, 228, .2) var(--fill) 100%);
}
.calc__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; margin-top: -12px;
  border: 0; border-radius: 50%;
  background: #fffdf9;
  box-shadow: 0 0 0 6px rgba(181, 112, 58, .3), 0 4px 12px rgba(0, 0, 0, .35);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.calc__range::-moz-range-thumb {
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  background: #fffdf9;
  box-shadow: 0 0 0 6px rgba(181, 112, 58, .3), 0 4px 12px rgba(0, 0, 0, .35);
}
.calc__range:active::-webkit-slider-thumb { transform: scale(1.08); }
.calc__range:focus-visible { outline: none; }
.calc__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px #e2b98f, 0 4px 12px rgba(0, 0, 0, .35); }
.calc__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px #e2b98f, 0 4px 12px rgba(0, 0, 0, .35); }
@media (pointer: coarse) {
  .calc__range { height: 52px; }
  .calc__range::-webkit-slider-thumb { width: 38px; height: 38px; margin-top: -16px; }
  .calc__range::-moz-range-thumb { width: 38px; height: 38px; }
}

.calc__presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.calc__chip {
  min-height: 40px; padding: 0 14px;
  border: 1px solid rgba(243, 237, 228, .28); border-radius: 999px;
  background: transparent; color: #e9e1d6;
  font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color .2s, border-color .2s, color .2s;
}
.calc__chip:hover { border-color: rgba(243, 237, 228, .75); color: #fff; }
.calc__chip[aria-pressed="true"] { background: #f3ede4; border-color: #f3ede4; color: var(--ink); }
.calc__hint { margin-top: 12px; font-size: 14px; color: #b5a998; }

/* сегментные переключатели (радиокнопки) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 480px) { .seg--4 { grid-template-columns: repeat(4, 1fr); } }
.seg__opt { position: relative; display: block; cursor: pointer; }
.seg__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg__opt span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 56px; height: 100%; padding: 8px 12px;
  border: 1px solid rgba(243, 237, 228, .28); border-radius: var(--radius-sm);
  color: #e9e1d6; text-align: center;
  font-size: 15px; font-weight: 600; line-height: 1.25;
  transition: background-color .2s, border-color .2s, color .2s;
}
.seg__opt small { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: #b5a998; }
.seg__opt:hover span { border-color: rgba(243, 237, 228, .75); }
.seg__opt input:checked + span { background: #f3ede4; border-color: #f3ede4; color: var(--ink); }
.seg__opt input:checked + span small { color: var(--muted); }
.seg__opt input:focus-visible + span { outline: 2px solid #e2b98f; outline-offset: 2px; }

/* итог */
.calc__result {
  padding: 26px 22px;
  color: var(--ink);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 30px 60px -28px rgba(0, 0, 0, .65);
}
.calc__result-label { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--wood-ink); }
.calc__price {
  margin-top: 8px;
  font-size: clamp(30px, 8.4vw, 50px); font-weight: 700; letter-spacing: -.025em; line-height: 1.05;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.calc__from { font-size: .52em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.calc__na { margin-top: 8px; font-size: clamp(26px, 6vw, 34px); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.calc__per { margin-top: 10px; min-height: 1.6em; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.calc__msg { margin-top: 10px; font-size: 15px; color: var(--ink-soft); }
.calc__note { margin: 18px 0 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

@media (min-width: 768px) { .calc__result { padding: 34px 32px; } }
@media (min-width: 1024px) {
  .calc { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 64px; align-items: start; }
  .calc__result { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- 7. Карточки: наклон под курсором (только мышь, ставит fx.js) ---------- */
.projects, .works { perspective: 1400px; }
.js .project.reveal,
.js .work.reveal {
  transition: opacity .8s var(--ease-out) var(--rd, 0ms), transform .8s var(--ease-out) var(--rd, 0ms),
              rotate .4s var(--ease-out), translate .4s var(--ease-out),
              box-shadow .3s, border-color .3s;
}
.project.is-tilt,
.work.is-tilt {
  rotate: var(--tilt-x, 0) var(--tilt-y, 1) 0 var(--tilt-a, 0deg);
  translate: 0 -4px;
}
.project:hover { box-shadow: var(--shadow-lift); }
.work .media { transition: box-shadow .3s; }
.work.is-tilt .media { box-shadow: var(--shadow-lift); }

/* ---------- Без анимаций по просьбе системы ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__media img { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .project.is-tilt, .work.is-tilt, .step.is-current { rotate: none; translate: none; }
  .btn:hover, .btn:active { transform: none; }
  .wall.is-closed .wall__slab,
  .wall.is-closed .wall__label { transform: none; opacity: 1; }
  .steps::after { transform: none; }
}


/* ---------- География работы ---------- */
.geo {
  display: grid; gap: 14px; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.geo__item { padding: 20px 20px 22px; }
.geo__item h3 { font-size: 18px; font-weight: 650; margin-bottom: 8px; }
.geo__item p { font-size: 15px; color: var(--ink-soft); }
.geo__cta { margin-top: 28px; display: grid; gap: 16px; justify-items: start; max-width: 640px; }
.geo__cta p { color: var(--ink-soft); }
@media (min-width: 768px) {
  .geo__cta { grid-template-columns: 1fr auto; align-items: center; max-width: none; gap: 28px; }
}


/* ---------- Варианты дома в карточке проекта ---------- */
.project img.media--card, .project img.media--plan { transition: opacity .25s ease; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 0; }
.variants__btn {
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  font: inherit; font-size: 14px; font-weight: 550; line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.variants__btn:hover { border-color: var(--ink); color: var(--ink); }
.variants__btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.variants__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.variants + .project__body { padding-top: 14px; }
@media (prefers-reduced-motion: reduce) { .project img.media--card, .project img.media--plan { transition: none; } }


/* ---------- Вкладки «Вид | План» в карточке проекта (включает fx.js) ----------
   Разметка: .gallery[data-gallery] > .gallery__tabs[role=tablist] + .gallery__track > .gallery__slide[role=tabpanel].
   Без JS вкладки и слайд «План» скрыты атрибутом hidden — видно только фото, как раньше.
   С JS (.gallery.is-ready) слайды стоят в ряд, листаются пальцем со «щелчком» (scroll-snap). */
.gallery { position: relative; min-width: 0; }
.gallery__slide { position: relative; }
.gallery__tabs { display: flex; padding: 12px 14px 10px; }
.gallery__tabs[hidden] { display: none; }
.gallery__tab {
  min-height: 34px; padding: 0 16px;
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--ink-soft); font-size: 14px; font-weight: 600; line-height: 1;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.gallery__tab:first-child { border-radius: 999px 0 0 999px; }
.gallery__tab:last-child { border-radius: 0 999px 999px 0; margin-left: -1px; }
.gallery__tab:hover { color: var(--ink); border-color: var(--ink); position: relative; }
.gallery__tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; position: relative; }
.gallery__tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 999px; position: relative; z-index: 1; }

.gallery.is-ready .gallery__track {
  display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line);
}
.gallery.is-ready .gallery__track::-webkit-scrollbar { display: none; }
.gallery.is-ready .gallery__slide {
  flex: 0 0 100%; width: 100%; min-width: 0;
  scroll-snap-align: start; scroll-snap-stop: always;
}
.gallery.is-ready .media { border-radius: 0; }
.gallery__slide:focus-visible { outline: 2px solid var(--wood-ink); outline-offset: -4px; border-radius: 4px; }

/* схема планировки: вписываем целиком на кремовом фоне */
.media--plan { object-fit: contain; background: var(--bg); }

/* плашка на фото */
.gallery__badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  max-width: calc(100% - 20px);
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(246, 241, 233, .92);
  box-shadow: 0 1px 2px rgba(24, 21, 18, .12), 0 2px 8px rgba(24, 21, 18, .10);
  color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.2;
  pointer-events: none;
}

/* под картинкой: кнопки вариантов (на «Виде») и подпись к схеме (на «Плане») занимают одно место,
   поэтому при переключении карточка не прыгает по высоте */
.gallery__under { display: grid; }
.gallery__under > * { grid-area: 1 / 1; }
.gallery__under + .project__body { padding-top: 14px; }
.gallery__note {
  padding: 16px 20px 0;
  font-size: 13px; line-height: 1.4; color: var(--muted);
}
.gallery__note[hidden] { display: none; }
[data-show-on] { transition: opacity .2s ease, visibility .2s ease; }
[data-show-on].is-off { opacity: 0; visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .gallery__tab, [data-show-on] { transition: none; }
}


/* ---------- Плашка «строим круглый год» на первом экране ---------- */
.season-chip {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 10px 16px 10px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 600; line-height: 1.3;
}
.season-chip svg { flex: none; color: #4a7a96; }
@media (max-width: 480px) { .season-chip { border-radius: 16px; } }

/* Списки внутри ответов FAQ */
.faq__body ul { margin: 12px 0; padding-left: 20px; display: grid; gap: 8px; list-style: disc; }
.faq__body li { padding-left: 2px; }
.faq__body li::marker { color: #b5703a; }
.faq__body ul + p { margin-top: 10px; }


/* =========================================================
   ЭФФЕКТЫ, ЧАСТЬ 2 (fx2.js, октябрь 2026)
   Дом по этапам, снег, параллакс, просмотр фото, подсветка карточек,
   «дыхание» кнопок, заголовки по словам. Скрытие «до анимации» — только
   через классы, которые ставит fx2.js: без JS всё видно сразу.
   ========================================================= */

/* ---------- 1. Дом собирается по ходу этапов ---------- */
.flow { display: grid; gap: 18px; }
.build {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 3;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 16px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.build__svg { flex: none; width: 152px; height: auto; border-radius: var(--radius-sm); }
.build__info { min-width: 0; flex: 1; }
.build__cap { line-height: 1.3; }
.build__n { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wood-ink); }
.build__t { display: block; margin-top: 2px; font-size: 16px; font-weight: 650; }
.build__bar { display: flex; gap: 4px; margin-top: 10px; }
.build__bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background-color .4s; }
.build__bar i.on { background: var(--wood); }
.build__ghost { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.b-grow { transform-box: fill-box; transform-origin: 50% 100%; }
@media (min-width: 560px) and (max-width: 959px) {
  .build__svg { width: 190px; }
}
@media (min-width: 960px) {
  .flow { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); column-gap: 44px; align-items: start; }
  .flow .steps { grid-column: 1; grid-row: 1; }
  .build {
    grid-column: 2; grid-row: 1;
    top: calc(var(--header-h) + 28px);
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 16px 18px 20px;
  }
  .build__svg { width: 100%; }
  .build__t { font-size: 18px; }
}
@media (min-width: 1024px) {
  /* колонка этапов стала уже: номер слева, заголовок и текст друг под другом */
  .flow .step { grid-template-columns: 48px minmax(0, 1fr); column-gap: 24px; padding: 28px 30px; }
  .flow .step p { grid-column: 2; margin-top: 8px; }
}
.build.is-live .b-st { opacity: 0; transition: opacity .6s var(--ease-out), transform .9s var(--ease-out); }
.build.is-live .b-rise { transform: translateY(10px); }
.build.is-live .b-drop { transform: translateY(-18px); }
.build.is-live .b-grow { transform: scaleY(0); }
.build.is-live .b-st.on { opacity: 1; transform: none; }
.build.is-live .b-draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease-out); }
.build.is-live .on .b-draw { stroke-dashoffset: 0; }
.build.is-live .build__ghost { transition: stroke-dashoffset .3s linear; }

/* ---------- 2. Снег на первом экране ---------- */
.snow {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease;
}
.snow.is-on { opacity: 1; }

/* ---------- 3. Параллакс фото первого экрана ---------- */
.hero__pan { display: block; }
/* увеличение на 8% даёт запас по краям; смещение пишет fx2.js на этот же элемент */
.fx-par .hero__pan { transform: scale(1.08); will-change: transform; }

/* ---------- 4. Просмотр фото на весь экран ---------- */
.lb-on .works img,
.lb-on .project img.media--card,
.lb-on .project img.media--plan { cursor: zoom-in; }
.lb-on .works img:focus-visible,
.lb-on .project img:focus-visible { outline: 3px solid var(--wood-ink); outline-offset: -3px; }

.lb {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: #f3ede4;
  overflow: hidden;
}
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb::backdrop { background: rgba(16, 13, 11, .95); }
.lb__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 6px 18px; }
.lb__count { font-size: 14px; font-weight: 600; letter-spacing: .06em; color: #cfc5b8; font-variant-numeric: tabular-nums; }
.lb__stage {
  display: flex; align-items: center; justify-content: center;
  min-height: 0; padding: 0 12px;
  touch-action: pinch-zoom;
}
.lb__img {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  transition: opacity .2s ease;
  -webkit-user-select: none; user-select: none;
  -webkit-user-drag: none;
}
.lb__img--vec { width: 100%; height: 100%; background: none; box-shadow: none; }
.lb__img.is-swap { opacity: 0; }
.lb__bottom { display: flex; align-items: center; gap: 10px; padding: 12px 10px calc(14px + env(safe-area-inset-bottom)); }
.lb__cap {
  flex: 1; min-width: 0; text-align: center;
  font-size: 14px; line-height: 1.45; color: #e9e1d6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lb__btn {
  flex: none;
  display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(243, 237, 228, .28); border-radius: 50%;
  background: rgba(255, 253, 249, .08); color: #fff;
  transition: background-color .2s, border-color .2s;
}
.lb__btn:hover { background: rgba(255, 253, 249, .18); border-color: rgba(243, 237, 228, .6); }
.lb__btn[hidden] { display: none; }
.lb :focus-visible { outline: 2px solid #e2b98f; outline-offset: 3px; }
@media (min-width: 768px) {
  .lb__stage { padding: 0 88px; }
  .lb__nav { position: absolute; top: 50%; margin-top: -26px; width: 52px; height: 52px; }
  .lb__nav--prev { left: 20px; }
  .lb__nav--next { right: 20px; }
  .lb__bottom { padding: 14px 88px 22px; }
  .lb__cap { font-size: 15px; -webkit-line-clamp: 2; }
  .lb__top { padding: 14px 16px 8px 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .lb[open], .lb[open]::backdrop { animation: lb-in .24s ease-out; }
  .lb[open] .lb__img { animation: lb-zoom .32s var(--ease-out); }
  .lb.is-closing, .lb.is-closing::backdrop { animation: lb-out .18s ease-in forwards; }
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lb-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes lb-zoom { from { transform: scale(.95); } to { transform: none; } }

/* ---------- 5. Тёплая подсветка карточек за курсором (только мышь) ---------- */
@media (hover: hover) and (pointer: fine) {
  .spot .project, .spot .work, .spot .geo__item { position: relative; isolation: isolate; }
  .spot .project::after, .spot .work::after, .spot .geo__item::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(181, 112, 58, .13), rgba(181, 112, 58, 0) 70%);
    opacity: 0;
    transition: opacity .35s ease;
  }
  .spot .work::after { inset: -10px -10px -6px; border-radius: calc(var(--radius) + 6px); }
  .spot .is-spot::after { opacity: 1; }
}

/* ---------- 6. «Дыхание» главных кнопок ---------- */
.fx-pulse { position: relative; }
.fx-pulse::after {
  content: "";
  position: absolute; inset: 0;
  border: 2px solid var(--wood);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  animation: fx-pulse 4s cubic-bezier(.2, .6, .3, 1) 2.4s infinite;
}
.fx-pulse:hover::after,
.fx-pulse:focus-visible::after,
.fx-pulse[disabled]::after,
.fx-pulse.is-loading::after,
.fx-pulse.is-paused::after { animation: none; opacity: 0; }
@keyframes fx-pulse {
  0%   { opacity: 0;   transform: scale(1); }
  6%   { opacity: .75; }
  40%  { opacity: 0;   transform: scale(var(--px, 1.1), var(--py, 1.4)); }
  100% { opacity: 0;   transform: scale(var(--px, 1.1), var(--py, 1.4)); }
}

/* ---------- 7. Заголовки разделов по словам ---------- */
/* блок с заголовком проявляется как раньше, кроме самого заголовка — он идёт по словам */
.js .wh-host.reveal { opacity: 1; transform: none; }
.js .wh-host.reveal > :not(.section__title) {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease-out) var(--rd, 0ms), transform .8s var(--ease-out) var(--rd, 0ms);
}
.js .wh-host.reveal.is-visible > :not(.section__title) { opacity: 1; transform: none; }
.wh-wait { opacity: 0; }
.wh-split .w {
  display: inline-block; vertical-align: top;
  overflow: hidden;
  padding-bottom: .12em; margin-bottom: -.12em;
}
.wh-split .w__i {
  display: inline-block;
  opacity: 0; transform: translateY(.55em);
  transition: transform .7s var(--ease-out), opacity .5s ease;
}
.wh-split.wh-go .w__i { opacity: 1; transform: none; }

/* ---------- Без анимаций по просьбе системы ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-par .hero__pan { transform: none !important; }
  .snow { display: none; }
  .fx-pulse::after { animation: none; opacity: 0; }
  .wh-wait { opacity: 1; }
  .build.is-live .b-st { opacity: 1; transform: none; }
  .build.is-live .b-draw, .build__ghost { stroke-dashoffset: 0 !important; }
  .js .wh-host.reveal > :not(.section__title) { opacity: 1; transform: none; }
}

/* Страница города: ряд проектных домов */
.city-photos { display: grid; gap: 14px; margin-top: 32px; }
.city-photos li { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.city-photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.city-photos span { font-size: .95rem; color: var(--ink-soft); }
.city-photos__note { margin-top: 14px; font-size: .9rem; color: var(--ink-soft); }
@media (min-width: 768px) { .city-photos { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
