/* begovoyaparts.com — апартаменты «Слава».
   Палитра, шрифтовая пара и ритм — из docs/brand/brand-passport.md, отступать от него нельзя:
   разнобой внутри коммерческого контура читается как небрежность.
   Собственное здесь — композиция: редакционная вертикаль, полосные кадры, ценовая матрица. */

@import url("/assets/fonts/fonts.css");

:root {
  --ink: #100d0b;
  --ink-soft: #1a1613;
  --card: #211c18;
  --line: #332b25;
  --cream: #f4efe7;
  --cream-dim: #c4baac;
  --muted: #8e8477;
  --brass: #c9a227;
  --brass-soft: #e0c86b;

  --wrap: 1180px;
  --pad: clamp(16px, 2vw, 24px);
  --gap-section: clamp(72px, 9vw, 160px);
  --radius: 3px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; }

/* Оверсайз-типографика: заголовок секции занимает половину экрана по высоте строки и
   держит вертикальный ритм страницы. Именно этого не было в прошлой сборке. */
h1 { font-size: clamp(3rem, 9vw, 6.5rem); line-height: 0.98; }
h2 { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.04; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.3; }

p { margin: 0 0 1.1em; }
a { color: var(--brass-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }

/* Узкая колонка против воздуха: текст живёт в 58 знаках, справа остаётся пустое поле.
   Плотных «плиток в три ряда» на странице нет. */
.col { max-width: 58ch; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--cream-dim); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1.4rem;
}

/* Каждая секция начинается с воздуха. Раньше у идущих подряд секций верхний отступ
   обнулялся, и заголовок следующей прилипал к концу предыдущей. */
section { padding-block: var(--gap-section); }

.section-head { margin-bottom: clamp(32px, 4vw, 64px); }
.section-head .col { margin-top: clamp(20px, 2.4vw, 32px); }

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

.top {
  position: absolute; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 26px var(--pad);
  max-width: var(--wrap); margin-inline: auto;
}
/* Знак сайта — название объекта, а не домен: домен небрендовый и запоминать его незачем. */
.top__mark { font-family: var(--serif); font-size: 1.3rem; color: var(--cream); text-decoration: none; letter-spacing: 0.02em; line-height: 1.1; }
.top__mark b { font-weight: 400; color: var(--brass-soft); }
.top__mark small { display: block; font-family: var(--sans); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.top.is-stuck .top__mark small { display: none; }
.top__nav { display: flex; gap: 26px; }
.top__nav a { color: var(--cream-dim); text-decoration: none; font-size: 0.92rem; transition: color 200ms; }
.top__nav a:hover { color: var(--cream); }
@media (max-width: 900px) { .top__nav { display: none; } }
/* На узком экране кнопка в шапке спорит с логотипом и съедает первый экран.
   Путь к заявке не теряется: в теле первого экрана стоит форма. */
@media (max-width: 620px) { .top > .btn { display: none; } .top { padding-block: 18px; } }

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

.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 0 0 clamp(28px, 4vw, 56px); }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
/* Затемнение сильнее в нижней половине: там лежит текст, и на светлых участках кадра
   подзаголовок иначе теряется — на мобильном это видно сразу. */
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,13,11,0.74) 0%, rgba(16,13,11,0.30) 30%,
              rgba(16,13,11,0.72) 62%, rgba(16,13,11,0.96) 100%);
}
.hero__inner { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.hero h1 { margin-bottom: 0.28em; }
/* Подзаголовок лежит поверх фотографии, а не поверх фона: цвет подписи здесь не проходит —
   на светлом участке кадра он теряется. Держим основной цвет и добавляем тень. */
.hero__sub {
  font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.9rem);
  color: var(--cream); margin: 0 0 1.6rem;
  text-shadow: 0 1px 12px rgba(16, 13, 11, 0.75);
}
.hero h1, .hero__price { text-shadow: 0 2px 18px rgba(16, 13, 11, 0.6); }
.hero__price { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--cream); margin-bottom: 2rem; }
.hero__price b { font-weight: 500; color: var(--brass-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 2.2rem; padding: 0; list-style: none; }
.chips li {
  font-size: 0.82rem; color: var(--cream-dim);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 7px 13px; background: rgba(26,22,19,0.66);
}
.hero__caption { font-size: 0.78rem; color: var(--muted); margin: 1.8rem 0 0; }

/* ─── Кнопки ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  background: var(--brass); color: var(--ink);
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  border: 1px solid var(--brass); border-radius: 2px;
  cursor: pointer; text-decoration: none;
  transition: background 200ms, border-color 200ms, color 200ms;
}
.btn:hover { background: var(--brass-soft); border-color: var(--brass-soft); }
.btn--ghost { background: transparent; color: var(--cream); border-color: var(--line); }
.btn--ghost:hover { background: transparent; color: var(--brass-soft); border-color: var(--brass); }

/* ─── Опорные цифры ─────────────────────────────────────────────────────── */

.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.figures div { background: var(--ink); padding: clamp(22px, 3vw, 40px) clamp(16px, 2vw, 28px); }
.figures dt { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.figures dd { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.9rem); line-height: 1; color: var(--cream); }
.figures dd b { font-weight: 400; font-family: inherit; font-variant-numeric: tabular-nums; }
.figures dd span { display: block; margin-top: 10px; font-family: var(--sans); font-size: 0.86rem; color: var(--cream-dim); }
@media (max-width: 860px) { .figures { grid-template-columns: repeat(2, 1fr); } }

/* ─── Полосный кадр ─────────────────────────────────────────────────────── */

/* Кадр во всю ширину и почти во всю высоту экрана. Мелкое изображение в премиум-сегменте
   читается как иллюстрация к статье; крупное — как сам предмет разговора. */
.plate { position: relative; margin-block: var(--gap-section); padding: 0; overflow: hidden; }
.plate img { width: 100%; height: clamp(420px, 88vh, 940px); object-fit: cover; will-change: transform; }
.plate figcaption { max-width: var(--wrap); margin: 12px auto 0; padding-inline: var(--pad); font-size: 0.78rem; color: var(--muted); }

/* Надпись поверх кадра: кадр перестаёт быть паузой и начинает нести смысл. */
.plate__over {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: clamp(28px, 6vw, 88px) 0 clamp(20px, 3vw, 44px);
  background: linear-gradient(180deg, transparent, rgba(16, 13, 11, 0.86));
}
.plate__over .wrap { color: var(--cream); }
.plate__over h2 { max-width: 18ch; text-shadow: 0 2px 22px rgba(16, 13, 11, 0.7); }
.plate__over p { max-width: 54ch; margin: 14px 0 0; color: var(--cream-dim); text-shadow: 0 1px 14px rgba(16, 13, 11, 0.8); }

/* ─── Секция на фоне изображения ────────────────────────────────────────── */

.band { position: relative; isolation: isolate; }
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--bg); background-size: cover; background-position: center;
  transform: scale(1.06);
}
.band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(16,13,11,0.93) 0%, rgba(16,13,11,0.70) 45%, rgba(16,13,11,0.95) 100%);
}
.band .eyebrow { color: var(--brass-soft); }
/* На десктопе фон стоит на месте, пока секция проезжает мимо — это и даёт ощущение глубины.
   На мобильных fixed отключён: iOS отрисовывает его рывками. */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .band::before { background-attachment: fixed; transform: none; }
}

/* ─── Текстовый разворот ────────────────────────────────────────────────── */

.spread { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
@media (max-width: 900px) { .spread { grid-template-columns: 1fr; } }

.ledger { border-top: 1px solid var(--line); }
.ledger div { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.ledger dt { color: var(--cream-dim); font-size: 0.94rem; }
.ledger dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--cream); font-size: 0.98rem; text-align: right; }

/* ─── Signature: ценовая матрица «корпус × этаж» ────────────────────────── */

/* Клетка держится ближе к квадрату: вытянутые полосы читались бы как диаграмма Ганта,
   а здесь важно сравнивать соседей и по горизонтали, и по вертикали. */
.matrix { display: grid; grid-template-columns: 38px repeat(4, minmax(0, 1fr)); gap: 4px; max-width: 340px; }
.matrix__h { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); text-align: center; padding-bottom: 10px; }
.matrix__f { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; padding-right: 8px; line-height: 20px; }
.matrix__cell {
  height: 20px; border: 0; padding: 0; border-radius: 1px;
  background: var(--card); cursor: pointer;
  transition: outline-color 160ms, filter 160ms;
  outline: 1px solid transparent;
}
.matrix__cell[data-empty] { background: transparent; border: 1px solid rgba(51,43,37,0.55); cursor: default; }
.matrix__cell:not([data-empty]):hover, .matrix__cell:not([data-empty]):focus-visible { outline-color: var(--cream); }
.matrix__legend { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 0.8rem; color: var(--muted); }
.matrix__scale { flex: 1; max-width: 220px; height: 8px; border-radius: 1px; background: linear-gradient(90deg, rgba(201,162,39,0.22), var(--brass)); }
.matrix__read { margin-top: 26px; min-height: 3.2em; font-size: 0.95rem; color: var(--cream-dim); }
.matrix__read b { color: var(--cream); font-weight: 500; }
@media (max-width: 620px) { .matrix { grid-template-columns: 34px repeat(4, minmax(0, 1fr)); } .matrix__cell, .matrix__f { height: 14px; line-height: 14px; } }

/* ─── Каталог ───────────────────────────────────────────────────────────── */

.filters { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: flex-end; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field select, .field input {
  min-height: 44px; min-width: 128px; padding: 0 12px;
  background: var(--card); color: var(--cream);
  border: 1px solid var(--line); border-radius: 2px;
  font-family: var(--sans); font-size: 0.95rem;
}
.field select:focus, .field input:focus { border-color: var(--brass); outline: none; }

/* Ввод числа мышью: кнопки по краям поля. Клавиатурный ввод при этом никуда не девается. */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 2px; background: var(--card); }
.stepper input { border: 0; background: none; text-align: center; min-width: 92px; font-variant-numeric: tabular-nums; }
.stepper input:focus { outline: 2px solid var(--brass); outline-offset: -2px; }
.stepper button {
  width: 44px; min-height: 44px; border: 0; background: none; cursor: pointer;
  color: var(--brass); font-size: 1.3rem; line-height: 1;
  transition: background 180ms, color 180ms;
}
.stepper button:hover { background: rgba(201, 162, 39, 0.14); color: var(--brass-soft); }
.stepper button:active { background: rgba(201, 162, 39, 0.24); }

.calc__cta { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.calc__cta p { font-size: 0.88rem; color: var(--cream-dim); margin-bottom: 14px; }

.catalog__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: baseline; padding: 22px 0 30px; }
.catalog__count { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 2rem); }
.catalog__count span { color: var(--brass-soft); }

.lots { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); list-style: none; margin: 0; padding: 0; }
.lot { background: var(--ink); padding: clamp(20px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 14px; }
.lot__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lot__type { font-family: var(--serif); font-size: 1.5rem; }
.lot__korp { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.lot__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.lot__grid dt { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lot__grid dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; font-size: 0.98rem; }
.lot__price { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.6rem; color: var(--cream); }
.lot__m2 { font-family: var(--sans); font-size: 0.86rem; color: var(--cream-dim); }
.lot__repair { font-size: 0.84rem; color: var(--brass-soft); }
.catalog__more { display: flex; justify-content: center; padding-top: 34px; }
.catalog__empty { padding: 48px 0; color: var(--cream-dim); }

/* ─── Калькулятор ───────────────────────────────────────────────────────── */

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.calc__out { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); }
.calc__total { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--brass-soft); }
.calc__total + p { margin-top: 10px; color: var(--cream-dim); font-size: 0.88rem; }
.calc__rows { margin: 22px 0 0; border-top: 1px solid var(--line); }
.calc__rows div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.calc__rows dt { color: var(--cream-dim); font-size: 0.9rem; }
.calc__rows dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ─── Карта ─────────────────────────────────────────────────────────────── */

/* Карта — во всю ширину экрана и почти во всю высоту: мелкая картинка в рамке
   выглядела вставкой из другого документа. */
.map { position: relative; width: 100vw; margin-left: calc(50% - 50vw); background: var(--ink-soft); overflow: hidden; }
.map img { width: 100%; height: clamp(460px, 86vh, 1000px); object-fit: cover; display: block; }
.map__foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px;
  max-width: var(--wrap); margin-inline: auto; padding: 18px var(--pad);
  font-size: 0.76rem; color: var(--cream-dim);
}
.map__foot span { background: rgba(16, 13, 11, 0.72); padding: 6px 10px; border-radius: 2px; }
.map__note {
  position: absolute; top: clamp(18px, 3vw, 34px); left: 0; right: 0;
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad);
}
.map__note b {
  display: inline-block; font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem); color: var(--cream);
  background: rgba(16, 13, 11, 0.74); padding: 10px 16px; border-left: 2px solid var(--brass);
}
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 26px 0 0; list-style: none; }
.legend li { font-size: 0.88rem; color: var(--cream-dim); font-variant-numeric: tabular-nums; }
.legend b { color: var(--cream); font-weight: 500; }

/* ─── Галерея ───────────────────────────────────────────────────────────── */

/* Плитка из восьми мелких кадров — самый дешёвый способ показать изображения. Здесь
   вместо неё крупные полосы: один кадр на всю ширину, следом пара, следом снова один. */
/* Ряды сходятся ровно: 12 / 6+6 / 4+4+4 / 6+6. Прошлая раскладка оставляла дыру справа —
   последние кадры вставали разной ширины друг под другом. */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(14px, 2vw, 26px); list-style: none; margin: 0; padding: 0; }
.gallery li { grid-column: span 6; }
.gallery li:nth-child(1) { grid-column: span 12; }
.gallery li:nth-child(4), .gallery li:nth-child(5), .gallery li:nth-child(6) { grid-column: span 4; }
.gallery figure { margin: 0; display: flex; flex-direction: column; height: 100%; }
.gallery button { padding: 0; border: 0; background: none; cursor: pointer; display: block; width: 100%; overflow: hidden; }
.gallery img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 700ms cubic-bezier(.2, .7, .2, 1), filter 400ms;
}
.gallery li img { aspect-ratio: 16 / 10; }
.gallery li:nth-child(1) img { aspect-ratio: 21 / 9; }
.gallery li:nth-child(4) img, .gallery li:nth-child(5) img, .gallery li:nth-child(6) img { aspect-ratio: 3 / 4; }
/* Увеличение внутри рамки: соседи не сдвигаются, а кадр оживает под курсором. */
.gallery button:hover img, .gallery button:focus-visible img { transform: scale(1.045); filter: brightness(1.06); }
.gallery figcaption { font-size: 0.78rem; color: var(--muted); padding-top: 9px; }
@media (max-width: 760px) {
  .gallery li, .gallery li:nth-child(4), .gallery li:nth-child(5), .gallery li:nth-child(8) { grid-column: span 12; }
  .gallery li img { aspect-ratio: 4 / 3; }
}

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(12, 10, 9, 0.92); }
dialog.lightbox img { max-height: 82vh; width: auto; margin-inline: auto; }
dialog.lightbox figcaption { color: var(--cream-dim); font-size: 0.84rem; padding-top: 12px; text-align: center; }

/* ─── Таблица корпусов ──────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
th { font-family: var(--sans); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
td.num, th.num { text-align: right; padding-right: 0; }

/* ─── Списки фактов, минусы, FAQ ────────────────────────────────────────── */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); list-style: none; margin: 0; padding: 0; }
.facts li { background: var(--ink); padding: clamp(20px, 2.4vw, 30px); }
/* Фактов семь, колонок четыре — последний растягивается, иначе в углу зияет пустая клетка. */
@media (min-width: 1080px) { .facts li:last-child { grid-column: span 2; } }
.facts b { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--brass-soft); font-weight: 400; margin-bottom: 8px; }

.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 18px 0 18px 26px; border-bottom: 1px solid var(--line); position: relative; color: var(--cream-dim); }
.notes li::before { content: ""; position: absolute; left: 0; top: 27px; width: 12px; height: 1px; background: var(--brass); }
.notes b { color: var(--cream); font-weight: 500; }

details { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; padding: 20px 0; font-family: var(--serif); font-size: clamp(1.05rem, 1.7vw, 1.3rem); list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--brass); font-family: var(--sans); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details .col { padding-bottom: 22px; color: var(--cream-dim); }

/* ─── Эксперт ───────────────────────────────────────────────────────────── */

.expert { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 760px) { .expert { grid-template-columns: 1fr; } }
.expert img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.expert figcaption { font-size: 0.76rem; color: var(--muted); padding-top: 8px; }

/* ─── Форма ─────────────────────────────────────────────────────────────── */

.form { display: grid; gap: 18px; max-width: 520px; }
.form textarea { min-height: 104px; padding: 12px; background: var(--card); color: var(--cream); border: 1px solid var(--line); border-radius: 2px; font-family: var(--sans); font-size: 0.95rem; }
.form textarea:focus { border-color: var(--brass); outline: none; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.86rem; color: var(--cream-dim); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brass); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Форма в первом экране: строка связи + кнопка, согласие строкой ниже. Поверх фото,
   поэтому поле на карточном фоне с теми же рамками, что у полей фильтров. */
.hero-form { display: grid; gap: 12px; max-width: 560px; }
.hero-form__row { display: flex; gap: 12px; }
.hero-form__row input { flex: 1; min-width: 0; min-height: 48px; padding: 12px 14px; background: var(--card); color: var(--cream); border: 1px solid var(--line); border-radius: 2px; font-family: var(--sans); font-size: 0.95rem; }
.hero-form__row input:focus { border-color: var(--brass); outline: none; }
.hero-form .consent { margin: 0; }
@media (max-width: 620px) {
  .hero-form__row { flex-direction: column; }
  .hero-form__row .btn { width: 100%; }
}

dialog.request { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-soft); color: var(--cream); padding: clamp(24px, 3vw, 40px); max-width: min(560px, 94vw); }
dialog.request::backdrop { background: rgba(12, 10, 9, 0.86); }
dialog.request h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.6em; }
dialog.request .close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--cream-dim); font-size: 1.5rem; cursor: pointer; line-height: 1; }

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

.foot { border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 84px); color: var(--cream-dim); font-size: 0.9rem; }
.foot__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.foot a { color: var(--cream-dim); }
.foot__legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); }

/* ─── Появление секций ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms ease, transform 700ms cubic-bezier(.2, .7, .2, 1); }
  .reveal.is-in { opacity: 1; transform: none; }

  /* Элементы внутри секции выходят по очереди, а не все разом: страница читается
     как последовательность, а не как одномоментно включённый свет. */
  .is-in .figures div, .is-in .facts li, .is-in .notes li, .is-in .gallery li, .is-in .ledger div {
    animation: rise 700ms cubic-bezier(.2, .7, .2, 1) both;
  }
  .is-in .figures div:nth-child(2), .is-in .facts li:nth-child(2), .is-in .notes li:nth-child(2),
  .is-in .gallery li:nth-child(2), .is-in .ledger div:nth-child(2) { animation-delay: 80ms; }
  .is-in .figures div:nth-child(3), .is-in .facts li:nth-child(3), .is-in .notes li:nth-child(3),
  .is-in .gallery li:nth-child(3), .is-in .ledger div:nth-child(3) { animation-delay: 160ms; }
  .is-in .figures div:nth-child(4), .is-in .facts li:nth-child(4),
  .is-in .gallery li:nth-child(4), .is-in .ledger div:nth-child(4) { animation-delay: 240ms; }
  .is-in .facts li:nth-child(n+5), .is-in .gallery li:nth-child(n+5),
  .is-in .ledger div:nth-child(n+5) { animation-delay: 320ms; }

  /* Первый экран собирается сам, без прокрутки: это первое движение, которое видит посетитель. */
  .hero h1 { animation: rise 900ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero__sub { animation: rise 900ms 120ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero__price { animation: rise 900ms 220ms cubic-bezier(.2, .7, .2, 1) both; }
  .hero .chips li { animation: rise 700ms both cubic-bezier(.2, .7, .2, 1); }
  .hero .chips li:nth-child(1) { animation-delay: 320ms; }
  .hero .chips li:nth-child(2) { animation-delay: 380ms; }
  .hero .chips li:nth-child(3) { animation-delay: 440ms; }
  .hero .chips li:nth-child(4) { animation-delay: 500ms; }
  .hero .chips li:nth-child(5) { animation-delay: 560ms; }
  .hero__inner > .hero-form { animation: rise 800ms 620ms cubic-bezier(.2, .7, .2, 1) both; }

  /* Матрица проявляется волной сверху вниз — видно, что это живая карта дома. */
  .is-in .matrix__cell { animation: fade 520ms both; }
  .matrix__cell { transition: outline-color 160ms, filter 160ms, transform 200ms; }
  .matrix__cell:not([data-empty]):hover { transform: translateX(2px); }

  .lot { transition: background 260ms, transform 260ms; }
  .lot:hover { background: var(--ink-soft); transform: translateY(-3px); }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Шапка: на первом экране прозрачная, дальше — на фоне, иначе логотип теряется на кадрах. */
.top { transition: background 300ms, border-color 300ms, padding 300ms; border-bottom: 1px solid transparent; }
.top.is-stuck {
  position: fixed; top: 0; left: 0; right: 0; max-width: none;
  padding-block: 14px;
  padding-inline: max(var(--pad), calc((100vw - var(--wrap)) / 2));
  background: rgba(16, 13, 11, 0.92); border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* Без JS ничего не должно оставаться невидимым: класс снимается скриптом,
   поэтому при отключённом JS элементы просто не получают .reveal. */
.no-js .reveal { opacity: 1; transform: none; }

/* Уведомление о cookie: узкая полоса у нижнего края, не перекрывает первый экран —
   в прошлой сборке баннер налезал на заголовок и был первым, что видел посетитель. */
/* display:flex сильнее атрибута hidden, поэтому полоса не исчезала по кнопке «Понятно».
   Правило ниже возвращает hidden его смысл. */
.crumb[hidden] { display: none; }
.crumb {
  position: fixed; left: var(--pad); right: var(--pad); bottom: var(--pad); z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; max-width: var(--wrap); margin-inline: auto;
  padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.crumb p { margin: 0; font-size: 0.86rem; color: var(--cream-dim); max-width: 72ch; }
.crumb .btn { min-height: 40px; padding: 0 20px; }
@media (max-width: 620px) {
  .crumb { gap: 10px; padding: 11px 14px; }
  .crumb p { font-size: 0.78rem; line-height: 1.45; }
  .crumb .btn { min-height: 38px; padding: 0 16px; font-size: 0.86rem; }
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--pad); top: 12px; z-index: 60; background: var(--brass); color: var(--ink); padding: 10px 16px; }
