/* ==========================================================================
   КАМЕННЫЙ — карточка объекта
   Визуальный язык взят с референса test/assets: кремовая бумага, чернила,
   кирпично-красный акцент, золото, антиква Playfair + моноширинная гарнитура.
   Разметка и весь CSS написаны с нуля под страницу отдельного объекта.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Токены
   -------------------------------------------------------------------------- */

:root {
  --bg: #fcf4e4;
  --bg-rgb: 252, 244, 228;
  --ink: #2a2420;
  --ink-rgb: 42, 36, 32;
  --muted: #6b5f52;
  --faint: #a89c8a;
  --accent: #a8321f;
  --accent-deep: #8a2818;
  --accent-rgb: 168, 50, 31;
  --gold: #c9a96e;
  --gold-rgb: 201, 169, 110;

  --cream: #f4ecdc;
  --cream-rgb: 244, 236, 220;
  --night: #1f1a16;
  --night-deep: #17120f;
  --plate: #2a2420;
  --plate-raised: #332c26;
  --plate-ink: #f4ecdc;
  --plate-muted: #d8ccb6;

  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --text: "Manrope", "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(20px, 4.4vw, 64px);
  --shell: 1400px;
  --r-pill: 999px;
  --r-card: 12px;
  --r-tile: 10px;
  --r-field: 8px;

  --line: rgba(var(--ink-rgb), 0.14);
  --line-mid: rgba(var(--ink-rgb), 0.26);
  --line-soft: rgba(var(--ink-rgb), 0.08);

  --fast: 0.18s ease;
  --mid: 0.35s ease;
  --move: 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  --slow: 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

em { font-style: italic; color: var(--accent); }

button,
input,
select,
textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 300;
  padding: 12px 20px;
  background: var(--plate);
  color: var(--plate-ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: top var(--fast);
}

.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   2. Раскладка и общий словарь
   -------------------------------------------------------------------------- */

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.page { overflow: clip; }

/* Плита: секция листа с волосяной линией и подписью на поле */
.tplate {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 1.9vw, 44px);
  margin-top: clamp(44px, 3.6vw, 88px);
  padding-top: clamp(44px, 3.6vw, 88px);
  border-top: 1px solid var(--line);
}

.tplate--first {
  margin-top: clamp(30px, 2.4vw, 56px);
  padding-top: 0;
  border-top: 0;
}

.tplate__label {
  position: absolute;
  top: clamp(48px, 3.8vw, 96px);
  left: -46px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--faint);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  pointer-events: none;
}

.tplate--first .tplate__label { top: 8px; }

/* Шапка плиты: номер — линейка — подпись — примечание */
.tkicker {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.tkicker__rule {
  width: clamp(40px, 3.4vw, 86px);
  height: 1px;
  background: var(--line-mid);
}

.tkicker__label { color: var(--muted); }

.tkicker__note {
  margin-left: auto;
  color: var(--faint);
  letter-spacing: 0.2em;
}

/* Заголовок секции: крупная антиква слева, вводный абзац справа */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1460fr) minmax(0, 760fr);
  gap: clamp(32px, 4.4vw, 96px);
  align-items: end;
}

.section-head__title {
  font-size: clamp(29px, 3vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.024em;
}

.section-head__intro {
  margin-bottom: 8px;
  text-align: right;
  font-size: clamp(15px, 0.95vw, 18px);
  line-height: 1.7;
  color: var(--muted);
}

/* Крупная цифра с моноширинной подписью */
.figure {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.figure__value {
  font-family: var(--display);
  font-size: clamp(23px, 1.5vw, 34px);
  line-height: 1;
}

.figure__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Строки «ключ — значение» в точечную линейку */
.spec {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.spec__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px dotted var(--line-mid);
}

.spec__key {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec__value {
  font-size: 15px;
  text-align: right;
}

/* Таблетки-ярлыки */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pills li {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 17px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line-mid);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.pills__accent {
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.5) !important;
  color: var(--accent) !important;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 56px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--mid), color var(--mid), border-color var(--mid), gap var(--mid);
}

.btn__rule {
  width: 26px;
  height: 1px;
  background: currentColor;
  transition: width var(--mid);
}

.btn:hover .btn__rule,
.btn:focus-visible .btn__rule { width: 36px; }

.btn--ink {
  background: var(--ink);
  color: var(--bg);
}

.btn--ink:hover,
.btn--ink:focus-visible {
  background: var(--accent);
  color: var(--bg);
}

.btn--accent {
  background: var(--accent);
  color: var(--bg);
}

.btn--accent:hover,
.btn--accent:focus-visible { background: var(--ink); }

.btn--outline {
  border-color: var(--line-mid);
  color: var(--ink);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
}

.btn--gold:hover,
.btn--gold:focus-visible { background: var(--cream); }

.btn--ghost {
  border-color: rgba(var(--cream-rgb), 0.4);
  color: var(--cream);
}

.btn--ghost:hover,
.btn--ghost:focus-visible { border-color: var(--cream); }

.btn--wide { width: 100%; }

/* Текстовая ссылка с растущей линейкой */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  padding: 0;
  background: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.arrow-link::after {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  transition: width var(--mid);
}

.arrow-link:hover::after,
.arrow-link:focus-visible::after { width: 44px; }

/* Рамка под фотографию */
.frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-tile);
}

.frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--slow);
}

/* Уголки-засечки на фотографии */
.ticks span {
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.ticks span:nth-child(1) {
  top: 10px;
  left: 10px;
  border-left: 1px solid rgba(var(--cream-rgb), 0.6);
  border-top: 1px solid rgba(var(--cream-rgb), 0.6);
}

.ticks span:nth-child(2) {
  top: 10px;
  right: 10px;
  border-right: 1px solid rgba(var(--cream-rgb), 0.6);
  border-top: 1px solid rgba(var(--cream-rgb), 0.6);
}

.ticks span:nth-child(3) {
  bottom: 10px;
  left: 10px;
  border-left: 1px solid rgba(var(--cream-rgb), 0.4);
  border-bottom: 1px solid rgba(var(--cream-rgb), 0.4);
}

.ticks span:nth-child(4) {
  bottom: 10px;
  right: 10px;
  border-right: 1px solid rgba(var(--cream-rgb), 0.4);
  border-bottom: 1px solid rgba(var(--cream-rgb), 0.4);
}

/* Появление при прокрутке: без JS блоки просто видны */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform var(--slow);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   3. Шапка: служебная строка, меню, шторка
   -------------------------------------------------------------------------- */

.chrome {
  position: relative;
  z-index: 40;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 46px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.topbar__group {
  display: flex;
  align-items: center;
  gap: 34px;
}

.topbar a { color: var(--muted); transition: color var(--fast); }
.topbar a:hover { color: var(--accent); }

.topbar__phone,
.topbar__mail { letter-spacing: 0.06em; text-transform: none; }

.nav {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 88px;
  border-bottom: 1px solid var(--line-soft);
}

.logo {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
}

.logo__mark {
  width: 38px;
  height: 38px;
  color: var(--ink);
  transition: color var(--mid);
}

.logo:hover .logo__mark { color: var(--accent); }

.logo__type {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo__word {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.logo__sub {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(18px, 1.9vw, 34px);
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 33px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--fast);
}

.nav__link:hover,
.nav__link:focus-visible { color: var(--accent); }

.nav__link--on { color: var(--ink); }

.nav__link--on::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: 26px;
}

.nav__phone {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}

.nav__phone:hover { color: var(--accent); }

.nav__cta { height: 46px; padding: 0 24px; font-size: 10.5px; }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-mid);
  border-radius: 50%;
  background: transparent;
}

/* Шторка на узких экранах */
.drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  flex-direction: column;
  gap: 30px;
  padding: 26px var(--gutter) 40px;
  background: var(--bg);
  overflow-y: auto;
}

.drawer.is-open { display: flex; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.drawer__close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-mid);
  border-radius: 50%;
  background: transparent;
}

.drawer__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--display);
  font-size: 27px;
  line-height: 1.1;
}

.drawer__link span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.drawer__foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   4. Шапка страницы объекта
   -------------------------------------------------------------------------- */

.pagehead {
  position: relative;
  padding-bottom: clamp(26px, 2.2vw, 40px);
  border-bottom: 1px solid var(--line);
}

/* Видео-фон шапки: медиа-слой идёт на всю ширину страницы, текст остаётся
   в сетке .shell. Между кадром и текстом лежит затемняющий градиент, поэтому
   внутри .hero включаются светлые версии служебных токенов — заголовок, цена
   и полоса цифр читаются на любом участке видео. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--night-deep);
  color: #f6efe1;

  --ink: #f6efe1;
  --ink-rgb: 246, 239, 225;
  --muted: rgba(246, 239, 225, 0.88);
  --faint: rgba(246, 239, 225, 0.68);
  --accent: #e0836c;
  --gold: #dcc08b;
  --line: rgba(246, 239, 225, 0.24);
  --line-mid: rgba(246, 239, 225, 0.36);
  --line-soft: rgba(246, 239, 225, 0.14);
}

/* Кадр-фолбэк: виден до первого кадра видео и при reduced motion */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../img/spalnya-poster.jpg");
  background-position: center;
  background-size: cover;
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Кадр 4:3 растягивается на блок любой пропорции: cover режет края, а не буквы.
     Смещение ниже центра держит кровать и окно в кадре при узком вьюпорте. */
  object-fit: cover;
  object-position: center 44%;
}

/* Скрим между видео и текстом: виньетка — края и низ под текстом плотнее,
   середина кадра прозрачнее, чтобы комната читалась, а не превращалась в серое */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17, 13, 10, 0.58) 0%, rgba(17, 13, 10, 0.26) 44%, rgba(17, 13, 10, 0.74) 100%),
    linear-gradient(90deg, rgba(17, 13, 10, 0.6) 0%, rgba(17, 13, 10, 0.12) 44%, rgba(17, 13, 10, 0.16) 58%, rgba(17, 13, 10, 0.58) 100%);
}

.hero .pagehead {
  position: relative;
  z-index: 1;
  padding-top: clamp(30px, 3.2vw, 60px);
  padding-bottom: clamp(30px, 2.6vw, 46px);
}

/* Тень по краю букв — страховка на светлых участках кадра (окно, постель) */
.hero .pagehead__title,
.hero .pagehead__price-value,
.hero .pagehead__lead,
.hero .pagehead__price-note { text-shadow: 0 1px 22px rgba(10, 8, 6, 0.5); }

@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
}

.crumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: clamp(26px, 2.4vw, 46px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.crumbs__trail,
.crumbs__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs__trail { gap: 11px; }
.crumbs__trail a { color: var(--muted); transition: color var(--fast); }
.crumbs__trail a:hover { color: var(--accent); }
.crumbs__trail li[aria-current] { color: var(--ink); }

.crumbs__trail li + li::before {
  content: "/";
  margin-right: 11px;
  color: var(--line-mid);
}

.crumbs__meta { gap: 18px; color: var(--muted); }

.crumbs__meta li + li::before {
  content: "·";
  margin-right: 18px;
  color: var(--faint);
}

.pagehead__dot {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pagehead__dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.pagehead__row {
  display: grid;
  grid-template-columns: minmax(0, 1520fr) minmax(0, 620fr);
  gap: clamp(30px, 4vw, 90px);
  align-items: end;
}

.pagehead__title {
  font-size: clamp(34px, 5vw, 86px);
  line-height: 0.99;
  letter-spacing: -0.026em;
}

.pagehead__title small {
  display: block;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.pagehead__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  text-align: right;
}

.pagehead__lead {
  max-width: 34ch;
  font-size: clamp(15px, 0.92vw, 17px);
  line-height: 1.7;
  color: var(--muted);
}

.pagehead__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.pagehead__price-value {
  font-family: var(--display);
  font-size: clamp(28px, 2.6vw, 44px);
  line-height: 1;
}

.pagehead__price-note {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Полоса ключевых цифр под шапкой */
.register {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(24px, 2.2vw, 38px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.register__cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 26px;
  border-right: 1px solid var(--line-soft);
}

.register__cell:first-child { padding-left: 0; }
.register__cell:last-child { border-right: 0; }

.register__key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

.register__value {
  font-family: var(--display);
  font-size: clamp(21px, 1.6vw, 30px);
  line-height: 1;
}

.register__value span {
  font-family: var(--text);
  font-size: 13px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   5. Галерея
   -------------------------------------------------------------------------- */

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: clamp(210px, 18vw, 300px) clamp(210px, 18vw, 300px);
  gap: 12px;
}

.gallery__lead {
  grid-column: span 8;
  grid-row: span 2;
  margin: 0;
}

.gallery__cell { grid-column: span 2; }

.shot {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: var(--plate);
  text-align: left;
  color: var(--cream);
}

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 13, 0.26) 0%, rgba(20, 16, 13, 0) 34%, rgba(20, 16, 13, 0.42) 100%);
  opacity: 0.55;
  transition: opacity var(--mid);
  pointer-events: none;
}

.shot:hover::after,
.shot:focus-visible::after { opacity: 0.8; }

.shot .frame__img { transition: transform var(--slow); }

.shot:hover .frame__img,
.shot:focus-visible .frame__img { transform: scale(1.035); }

.shot__index {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cream);
}

.shot__label {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.82);
}

.shot__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shot:hover .shot__bar,
.shot:focus-visible .shot__bar { width: 100%; }

.gallery__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 28px;
  padding-top: 4px;
}

.gallery__count {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.gallery__count b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0;
  color: var(--ink);
}

.gallery__tools {
  display: flex;
  align-items: center;
  gap: 26px;
}

.gallery__hint {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   6. Тёмная полоса с ценой и призывом
   -------------------------------------------------------------------------- */

.deal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(26px, 3vw, 60px);
  margin-top: clamp(24px, 2.4vw, 40px);
  padding: clamp(26px, 2.6vw, 44px) clamp(24px, 2.8vw, 46px);
  border-radius: var(--r-card);
  background: var(--night);
  color: var(--cream);
  overflow: hidden;
}

.deal::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(var(--cream-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(var(--cream-rgb), 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
  pointer-events: none;
}

.deal > * { position: relative; }

.deal__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.deal__kicker::after {
  content: "";
  width: 44px;
  height: 1px;
  background: rgba(var(--cream-rgb), 0.3);
}

.deal__price {
  margin-top: 14px;
  font-family: var(--display);
  font-size: clamp(34px, 3.4vw, 58px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.deal__price small {
  font-family: var(--text);
  font-size: 15px;
  letter-spacing: 0;
  color: rgba(var(--cream-rgb), 0.5);
}

.deal__note {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.55);
}

.deal__figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-left: clamp(0px, 2.2vw, 40px);
  border-left: 1px solid rgba(var(--cream-rgb), 0.18);
}

.deal__figures .figure__value { color: var(--cream); }

.deal__figures .figure__label { color: rgba(var(--cream-rgb), 0.5); }

.deal__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 264px;
}

.deal__call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(var(--cream-rgb), 0.72);
  transition: color var(--fast);
}

.deal__call:hover { color: var(--gold); }

.deal__call span:last-child {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   7. Тело объекта: описание, характеристики, планировка
   -------------------------------------------------------------------------- */

.object {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 390px);
  gap: clamp(34px, 4.2vw, 80px);
  align-items: start;
}

.object__main { min-width: 0; }

.object__aside {
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 68ch;
  font-size: clamp(16px, 0.98vw, 18px);
  line-height: 1.78;
  color: var(--muted);
}

.prose--lead {
  font-family: var(--display);
  font-size: clamp(20px, 1.55vw, 27px);
  line-height: 1.45;
  color: var(--ink);
}

.prose p:first-of-type::first-letter {
  float: left;
  margin: 6px 12px 0 0;
  font-family: var(--display);
  font-size: 3.6em;
  line-height: 0.82;
  color: var(--accent);
}

.prose__inner { max-width: 68ch; }

/* Список «что важно знать» с красным тире */
.notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px clamp(26px, 2.6vw, 54px);
  margin: 0;
  padding: clamp(22px, 2vw, 30px) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 15.5px;
  color: var(--muted);
}

.notes li {
  display: flex;
  gap: 13px;
  line-height: 1.6;
}

.notes li::before {
  content: "—";
  color: var(--accent);
  flex: 0 0 auto;
}

/* Двухколоночная таблица характеристик */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(30px, 4vw, 72px);
}

.specs .spec__row:first-child { border-top: 1px dotted var(--line-mid); }

/* Планировка */
.plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 20vw, 300px);
  gap: clamp(26px, 3vw, 54px);
  align-items: start;
  padding: clamp(20px, 2.2vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: rgba(var(--ink-rgb), 0.018);
}

.plan__stage {
  min-width: 0;
  border-radius: calc(var(--r-card) - 6px);
}

.plan__svg {
  width: 100%;
  height: auto;
  color: var(--ink);
}

.plan__legend {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.plan__legend .figure { gap: 5px; }

.plan__stamp {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Дом и место */
.house {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 52px);
  align-items: center;
}

.house__figure { margin: 0; }

/* Фотография парадной — вертикальный кадр, рамка держит пропорцию снимка */
.house__figure .frame { border-radius: var(--r-card); }

.house__caption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.house__title {
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.15;
}

.house__text {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
}

.distances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.distances .figure__value { font-size: clamp(20px, 1.4vw, 26px); }
.distances .figure__label { font-size: 10px; }

/* --------------------------------------------------------------------------
   8. Карточка риэлтора — компактная (aside) и полная
   -------------------------------------------------------------------------- */

.agentcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fbf1de;
  overflow: hidden;
}

.agentcard__top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.agentcard__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.agentcard__kicker {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.agentcard__name {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.1;
}

.agentcard__role {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}

.agentcard__figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.agentcard__figures .figure__value { font-size: 22px; }
.agentcard__figures .figure__label { font-size: 9.5px; }

.agentcard__actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.agentcard__actions .btn { height: 48px; font-size: 10px; padding: 0 18px; }

.agentcard__note {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}

/* Круглый «портрет»-монограмма: фото риэлтора в демо нет */
.agent__photo {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--night);
  color: var(--gold);
  font-family: var(--display);
  font-size: 25px;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.agent__photo::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(var(--gold-rgb), 0.45);
  border-radius: 50%;
}

.agent__photo::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 92px;
  height: 62px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(var(--gold-rgb), 0.12);
}

/* Мини-блок «ипотека» под карточкой */
.mortgage {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.mortgage__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.mortgage__value {
  font-family: var(--display);
  font-size: 25px;
  line-height: 1;
}

.mortgage__value span {
  font-family: var(--text);
  font-size: 13px;
  color: var(--muted);
}

.mortgage__note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--faint);
}

/* Полная карточка консультанта */
.agentplate {
  display: grid;
  grid-template-columns: clamp(240px, 27vw, 340px) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf1de;
  overflow: hidden;
}

.agentplate__portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 34px 26px;
  background: var(--night);
  color: var(--gold);
  overflow: hidden;
}

.agentplate__portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(var(--cream-rgb), 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(var(--cream-rgb), 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

.agentplate__monogram {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(120px, 12vw, 168px);
  height: clamp(120px, 12vw, 168px);
  border: 1px solid rgba(var(--gold-rgb), 0.55);
  border-radius: 50%;
  font-family: var(--display);
  font-size: clamp(40px, 4.2vw, 62px);
  letter-spacing: 0.02em;
}

.agentplate__monogram::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(var(--gold-rgb), 0.24);
  border-radius: 50%;
}

.agentplate__portrait p {
  position: relative;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.55);
  text-align: center;
}

.agentplate__content {
  padding: clamp(24px, 3vw, 46px);
}

.agentplate__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.agentplate__name {
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1.05;
}

.agentplate__role {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.agentplate__quote {
  margin-top: 22px;
  padding-left: 20px;
  border-left: 2px solid var(--gold);
  font-family: var(--display);
  font-size: clamp(18px, 1.35vw, 23px);
  line-height: 1.5;
  color: var(--ink);
}

.agentplate__figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.agentplate__figures .figure__value { font-size: clamp(24px, 1.7vw, 32px); }

.agentplate__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin-top: 24px;
}

.agentplate__contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.agentplate__contact span {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.agentplate__contact a:hover { color: var(--accent); }

.agentplate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.agentplate__actions .btn { height: 50px; font-size: 10px; }

/* --------------------------------------------------------------------------
   9. Похожие объекты
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 34px);
}

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  transition: border-color var(--mid);
}

.pcard:hover { border-top-color: var(--accent); }

.pcard__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-tile);
  background: var(--plate);
}

.pcard__media .frame {
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

.pcard__media .frame__img { transition: transform var(--slow); }

.pcard:hover .pcard__media .frame__img { transform: scale(1.04); }

.pcard__flag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 3px;
  background: rgba(var(--cream-rgb), 0.92);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.pcard__flag--accent {
  background: var(--accent);
  color: var(--cream);
}

.pcard__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.pcard__title {
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.2;
}

.pcard__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

.pcard:hover .pcard__title a { color: var(--accent); }

.pcard__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.pcard__specs span + span::before {
  content: "·";
  margin-right: 16px;
  color: var(--line-mid);
}

.pcard__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dotted var(--line-mid);
}

.pcard__price {
  font-family: var(--display);
  font-size: clamp(19px, 1.5vw, 24px);
  line-height: 1;
}

.pcard__arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-mid);
  border-radius: 50%;
  color: var(--ink);
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.pcard:hover .pcard__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   10. Запись на просмотр
   -------------------------------------------------------------------------- */

.booking {
  position: relative;
  padding: clamp(48px, 6vw, 96px) 0;
  background: var(--night);
  color: var(--cream);
  overflow: hidden;
}

.booking::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(var(--cream-rgb), 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(var(--cream-rgb), 0.03) 1px, transparent 1px);
  background-size: 110px 110px;
  pointer-events: none;
}

.booking > .shell { position: relative; }

.booking__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(34px, 5vw, 88px);
  align-items: start;
}

.booking__kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.booking__kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.booking__title {
  margin-top: 20px;
  font-size: clamp(30px, 3.6vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.booking__title em {
  font-style: italic;
  color: var(--gold);
}

.booking__lead {
  margin-top: 20px;
  max-width: 44ch;
  font-size: clamp(15px, 0.95vw, 17px);
  line-height: 1.75;
  color: rgba(var(--cream-rgb), 0.66);
}

.booking__points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 30px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid rgba(var(--cream-rgb), 0.16);
  list-style: none;
  font-size: 14.5px;
  color: rgba(var(--cream-rgb), 0.78);
}

.booking__points li {
  display: flex;
  gap: 12px;
  line-height: 1.55;
}

.booking__points li::before {
  content: "—";
  color: var(--accent);
  flex: 0 0 auto;
}

.booking__aside {
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.4);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(20px, 2.4vw, 34px);
  border: 1px solid rgba(var(--cream-rgb), 0.16);
  border-radius: 14px;
  background: rgba(var(--cream-rgb), 0.045);
}

.form__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(var(--cream-rgb), 0.14);
}

.form__title {
  font-family: var(--display);
  font-size: 23px;
  line-height: 1.2;
  color: var(--cream);
}

.form__stamp {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.4);
  white-space: nowrap;
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field--wide { grid-column: 1 / -1; }

.field__label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.5);
}

.field__req { color: var(--gold); }

.field__input {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(var(--cream-rgb), 0.22);
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  color: var(--cream);
  transition: border-color var(--fast);
}

.field__input::placeholder { color: rgba(var(--cream-rgb), 0.3); }

.field__input:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

textarea.field__input {
  min-height: 64px;
  resize: vertical;
  line-height: 1.5;
}

.field__hint {
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(var(--cream-rgb), 0.36);
}

.times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.time {
  position: relative;
  display: inline-flex;
}

.time input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.time span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 17px;
  border: 1px solid rgba(var(--cream-rgb), 0.2);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(var(--cream-rgb), 0.66);
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.time:hover span {
  border-color: rgba(var(--gold-rgb), 0.7);
  color: var(--cream);
}

.time input:checked + span {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--night);
}

.time input:focus-visible + span {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(var(--cream-rgb), 0.5);
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  border: 1px solid rgba(var(--cream-rgb), 0.35);
  border-radius: 3px;
  background: transparent;
  transition: background var(--fast), border-color var(--fast);
}

.check input:checked {
  border-color: var(--gold);
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1 6.2 4.4 9.6 11 2.6' fill='none' stroke='%231f1a16' stroke-width='1.7'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
}

.check a {
  color: rgba(var(--cream-rgb), 0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form__actions {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.form__actions .btn { height: 56px; }

.form__note {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(var(--cream-rgb), 0.34);
}

.form__success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
}

.form__success[hidden] { display: none; }

.form__success-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 18px;
}

.form__success h3 {
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.2;
  color: var(--cream);
}

.form__success p {
  max-width: 42ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(var(--cream-rgb), 0.6);
}

.form__success .arrow-link { color: var(--gold); }

/* --------------------------------------------------------------------------
   11. Подвал
   -------------------------------------------------------------------------- */

.footer {
  position: relative;
  padding: clamp(48px, 5vw, 86px) 0 26px;
  background: var(--night-deep);
  color: rgba(var(--cream-rgb), 0.72);
  overflow: hidden;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3vw, 56px);
  padding-bottom: clamp(30px, 3vw, 54px);
}

.footer__brand { display: flex; flex-direction: column; gap: 18px; max-width: 34ch; }

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
}

.footer__logo svg { width: 34px; height: 34px; color: var(--gold); }

.footer__logo span {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__about {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(var(--cream-rgb), 0.45);
}

.footer__phone {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--cream);
}

.footer__phone:hover { color: var(--gold); }

.footer__col { display: flex; flex-direction: column; gap: 13px; }

.footer__title {
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer__col a,
.footer__col span {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(var(--cream-rgb), 0.62);
  transition: color var(--fast);
}

.footer__col a:hover { color: var(--cream); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--cream-rgb), 0.12);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.34);
}

.footer__bottom a:hover { color: var(--cream); }

.footer__mark {
  margin: clamp(22px, 2.6vw, 40px) 0 0;
  font-family: var(--display);
  font-size: clamp(52px, 12vw, 176px);
  line-height: 0.78;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--cream-rgb), 0.13);
  user-select: none;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   12. Просмотрщик фотографий
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  gap: 18px;
  padding: clamp(14px, 2.6vw, 34px);
  background: rgba(16, 13, 10, 0.96);
  backdrop-filter: blur(6px);
}

.lightbox.is-open { display: flex; }

.lightbox__bar,
.lightbox__cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.55);
}

.lightbox__bar { color: var(--cream); }

.lightbox__nav { display: flex; align-items: center; gap: 9px; }

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(var(--cream-rgb), 0.28);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  transition: border-color var(--fast), color var(--fast), background var(--fast);
}

.lightbox__btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.lightbox__close { border-radius: 50%; }

.lightbox__stage {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
}

.lightbox__img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 3px;
  object-fit: contain;
}

.lightbox__cap { flex: 0 0 auto; }

.lightbox__cap b {
  font-weight: 400;
  letter-spacing: 0.18em;
}

body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   13. Липкая полоса на телефоне
   -------------------------------------------------------------------------- */

.mobilebar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(var(--cream-rgb), 0.14);
  background: rgba(27, 22, 18, 0.97);
  backdrop-filter: blur(12px);
}

.mobilebar__price {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-right: auto;
}

.mobilebar__price b {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
}

.mobilebar__price span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb), 0.45);
}

.mobilebar .btn {
  height: 44px;
  padding: 0 18px;
  font-size: 9.5px;
  gap: 10px;
}

.mobilebar__call {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--cream-rgb), 0.28);
  border-radius: 50%;
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   14. Адаптив
   -------------------------------------------------------------------------- */

@media (max-width: 1240px) {
  .deal { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .deal__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    min-width: 0;
  }
  .deal__actions .btn { flex: 1 1 auto; }
  .deal__call { flex: 0 0 auto; }
}

@media (max-width: 1120px) {
  .tplate__label { display: none; }
  .nav { gap: 18px; }
  .nav__list { gap: 18px; }
  .nav__actions { margin-left: 12px; }
  .nav__phone { display: none; }
  .object { grid-template-columns: minmax(0, 1fr) clamp(280px, 30vw, 330px); }
}

@media (max-width: 1060px) {
  .nav__list { display: none; }
  .nav__toggle { display: inline-flex; order: 3; }
  .nav__actions { margin-left: auto; }
  .nav__cta { display: none; }
  .pagehead__row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pagehead__aside {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px 34px;
    text-align: left;
  }
  .pagehead__price { align-items: flex-start; }
  .pagehead__lead { max-width: 52ch; }
  .object { grid-template-columns: minmax(0, 1fr); }
  .object__aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .agentcard__actions .btn { height: 46px; }
  .plan { grid-template-columns: minmax(0, 1fr) minmax(0, 260px); }
  .booking__grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .booking__lead { max-width: 60ch; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; max-width: 46ch; }
}

@media (max-width: 940px) {
  .agentplate { grid-template-columns: minmax(0, 1fr); }
  .agentplate__portrait {
    flex-direction: row;
    justify-content: flex-start;
    gap: 24px;
    padding: 24px clamp(20px, 3vw, 32px);
  }
  .agentplate__portrait p { margin-top: 0; text-align: left; max-width: 24ch; }
  .agentplate__monogram { width: 92px; height: 92px; font-size: 34px; }
  .agentplate__foot { gap: 16px 24px; }
  .agentplate__actions { width: 100%; margin-left: 0; }
  .agentplate__actions .btn { flex: 1 1 180px; }
  .cards {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(72vw, 330px);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 0 14px;
    scrollbar-width: thin;
  }
  .pcard { scroll-snap-align: start; }
  .house { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .house__figure { order: -1; }
  .distances { margin-top: 20px; }
}

@media (max-width: 860px) {
  .topbar__group--info { display: none; }
  .gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  .gallery__lead {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 16 / 11;
  }
  .gallery__cell { aspect-ratio: 4 / 3; }
  .shot__label { display: none; }
  .mobilebar { display: flex; }
  .page { padding-bottom: 74px; }
  .footer { padding-bottom: 84px; }
  .gallery__hint { display: none; }
  .crumbs { flex-wrap: wrap; gap: 12px 24px; margin-bottom: 26px; }
}

@media (max-width: 760px) {
  .register { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .register__cell { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
  .register__cell:nth-child(2n) { border-right: 0; }
  .register__cell:nth-child(2n + 1) { padding-left: 0; }
  .register__cell:nth-child(n + 3) { border-bottom: 0; }
  .deal {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .deal__figures {
    padding-left: 0;
    padding-top: 20px;
    border-left: 0;
    border-top: 1px solid rgba(var(--cream-rgb), 0.18);
  }
  .deal__actions { flex-direction: column; align-items: stretch; }
  .deal__call { justify-content: space-between; }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .plan { grid-template-columns: minmax(0, 1fr); }
  .plan__legend { flex-direction: row; flex-wrap: wrap; gap: 18px 30px; }
  .plan__stamp { width: 100%; }
  .agentplate__head { flex-direction: column; gap: 12px; }
  .section-head__intro { text-align: left; }
  .pills li { height: 34px; padding: 0 14px; font-size: 10px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
  }
  .section-head__intro { max-width: 46ch; margin-bottom: 0; }
  .object__aside { grid-template-columns: minmax(0, 1fr); }
  .agentcard__actions .btn { height: 50px; }
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .form__head { flex-direction: column; gap: 6px; align-items: flex-start; }
  .booking__points { font-size: 14px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__brand { gap: 14px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .pagehead__price-value { font-size: 26px; }
  .crumbs__meta { display: none; }
  .gallery__count { font-size: 10px; }
  .gallery__grid { gap: 10px; }
  .cards { grid-auto-columns: 84vw; }
  .agentplate__figures { gap: 12px; }
  .agentplate__figures .figure__value { font-size: 22px; }
  .agentplate__figures .figure__label { font-size: 9px; letter-spacing: 0.12em; }
}

@media (max-width: 500px) {
  .topbar { height: auto; padding: 9px 0; font-size: 9.5px; }
  .topbar__group--contact { gap: 16px; }
  .nav { min-height: 70px; }
  .logo__sub { display: none; }
  .logo__word { font-size: 18px; }
  .logo__mark { width: 32px; height: 32px; }
  .pagehead__lead { font-size: 15px; }
  .gallery__lead { aspect-ratio: 4 / 3; }
  .gallery__grid { grid-template-columns: minmax(0, 1fr); }
  .gallery__cell { aspect-ratio: 16 / 10; }
  .gallery__cell:nth-child(n + 4) { display: none; }
  .deal { padding: 22px 20px; }
  .deal__figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .deal__figures .figure:last-child { grid-column: 1 / -1; }
  .prose { font-size: 15.5px; }
  .prose--lead { font-size: 19px; }
  .prose p:first-of-type::first-letter { font-size: 3em; }
  .agentplate__portrait { flex-direction: column; align-items: flex-start; gap: 16px; }
  .agentplate__actions .btn { flex: 1 1 100%; }
  .times { gap: 7px; }
  .time span { height: 38px; padding: 0 13px; font-size: 10.5px; }
  .mobilebar__price b { font-size: 17px; }
  .mobilebar .btn { padding: 0 14px; font-size: 9px; letter-spacing: 0.14em; }
  .footer__mark { -webkit-text-stroke-width: 0.8px; }
  /* План на узких экранах уменьшается в масштабе — подписи компенсируем */
  .plan__svg .plan__room { font-size: 13px; letter-spacing: 0.9px; }
  .plan__svg .plan__area { font-size: 11.5px; letter-spacing: 0.3px; }
  .plan__svg .plan__entry { font-size: 9px; letter-spacing: 0.8px; }
}


/* --------------------------------------------------------------------------
   15. Служебные обёртки для вертикального ритма
   -------------------------------------------------------------------------- */

.gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 2.6vw, 44px);
}

.object__main { display: flex; flex-direction: column; gap: clamp(26px, 2.6vw, 42px); }

.house__body { min-width: 0; }

.house__body .pills { margin-top: 18px; }

.specs-title,
.plan-title {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}


/* --------------------------------------------------------------------------
   16. Доработки после сборки разметки
   -------------------------------------------------------------------------- */

.pagehead { padding-top: clamp(18px, 2vw, 34px); }

.shot { cursor: zoom-in; }

/* Кнопка-кадр: рамка растягивается на всю площадь плитки */
.shot .frame {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.check input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Нативные элементы даты на тёмной карточке */
.field__input[type="date"] {
  color-scheme: dark;
}

.field__input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}

/* Отправленная заявка: заголовок без разделителя */
.form.is-sent .form__head {
  padding-bottom: 0;
  border-bottom: 0;
}

/* Стрелка в карточках похожих объектов */
.pcard__arrow {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 13px;
}

