/* ЖК «Курортный городок» — стили сайта
   Структура: шрифты → токены → база → компоненты по порядку страницы → диалоги → адаптив.
   Сетка: контент секций ограничен --max и центрирован; фото-блоки идут почти во всю ширину с отступом --inset. */

/* ---------- Шрифты (SIL OFL): Cormorant Garamond — заголовки, Manrope — текст ---------- */

@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-cyrillic.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-latin.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-cyrillic-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-latin-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-cyrillic.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Токены ---------- */

:root {
  --ink: #183b39;
  --ink-deep: #173c37;
  --teal: #487e72;
  --paper: #f5f4ef;
  --white: #ffffff;
  --sage: #e5e9e1;
  --muted: #69736c;
  --line: #d8ddd6;
  --line-dark: #ffffff26;
  --gold: #a88a5a;
  --sand: #c2b79d;
  --error: #b3261e;

  --serif: "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Manrope", Arial, Helvetica, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);

  --max: 1320px;                              /* ширина контента */
  --gutter: clamp(20px, 5vw, 72px);           /* минимальные поля секций */
  --pad-x: max(var(--gutter), calc((100% - var(--max)) / 2));
  --inset: 16px;                              /* отступ фото-блоков от края экрана */
  --space: clamp(84px, 9vw, 132px);           /* вертикальный ритм секций */
  --gap: 24px;
  --header-h: 92px;
}

/* ---------- База ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.75 var(--sans); letter-spacing: .1px; -webkit-font-smoothing: antialiased; }
main { overflow-x: clip; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }
[hidden] { display: none !important; }
p { margin: 0 0 1em; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h2 { font-size: clamp(42px, 5vw, 76px); line-height: 1.02; letter-spacing: -1px; }
h3 { font-size: 26px; line-height: 1.2; font-weight: 500; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; }
h2 em { color: var(--teal); }

.eyebrow { font: 500 11px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; }
.skip-link:focus { left: 8px; }

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

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 22px;
  min-height: 56px; padding: 16px 30px; border: 1px solid transparent;
  font: 500 11px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; text-align: center;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.button:disabled { opacity: .6; cursor: progress; }
.button.teal { background: var(--ink); color: #fff; }
.button.teal:hover { background: #24524e; }
.button.light { background: var(--paper); color: var(--ink); }
.button.light:hover { background: #dde8e3; }
.button.outline { background: transparent; border-color: #9fb3ab; color: var(--ink); }
.button.outline:hover { background: #dde8e3; }
.button.ghost { background: transparent; border-color: #ffffff8c; color: #fff; }
.button.ghost:hover { background: #ffffff1f; }
.button-count { border-left: 1px solid #173c3b33; padding-left: 18px; }

.text-link { display: inline-block; padding: 0 0 5px; border: 0; border-bottom: 1px solid currentColor; background: none; font-size: 14px; }
.text-link:hover { color: var(--teal); }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--pad-x);
  background: var(--paper); transition: height .3s var(--ease), box-shadow .3s;
}
.site-header.scrolled { height: 70px; box-shadow: 0 1px 0 #173c3b1a; }
.brand { display: flex; flex-direction: column; width: max-content; }
.brand-name { font: 500 30px/1.1 var(--serif); white-space: nowrap; }
.brand-sub { margin-top: 5px; font: 500 8.5px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; }
.scrolled .brand-sub { display: none; }
nav { display: flex; gap: 26px; margin: 0 auto; font-size: 13px; letter-spacing: .02em; }
nav a { white-space: nowrap; transition: color .2s; }
nav a:hover { color: var(--teal); }
.header-phone { font-size: 14px; white-space: nowrap; }
.header-cta { padding: 12px 18px; border: 1px solid var(--ink); background: transparent; font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; transition: background .3s, color .3s; }
.header-cta:hover { background: var(--ink); color: #fff; }
.menu { display: none; padding: 4px 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; font-size: 14px; }

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

.hero {
  position: relative; overflow: hidden; margin: 0 var(--inset);
  height: min(860px, calc(100svh - var(--header-h) - var(--inset))); min-height: 620px;
  background: #0b252a; color: #fff;
}
.hero-photo, .hero-video, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-photo { object-position: center 60%; filter: saturate(.85); animation: kenburns 24s var(--ease) both; }
.hero-video { opacity: 0; transition: opacity 1.2s; }
.hero-video.ready { opacity: 1; }
.hero-shade { background: linear-gradient(180deg, #0b252a59 0%, #0b252a0d 32%, #0b252aa6 74%, #0b252ae0 100%); }
.hero-top, .hero-content, .hero-foot { position: absolute; left: clamp(22px, 4vw, 56px); right: clamp(22px, 4vw, 56px); }
.hero-top { top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font: 500 11px/1.4 var(--sans); letter-spacing: .18em; animation: fade 1.6s .5s var(--ease) both; }
.hero-status { padding: 8px 14px; border: 1px solid #d0bea480; white-space: nowrap; }
.hero-content { bottom: 104px; }
.hero-content > * { animation: rise 1.4s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: .15s; }
.hero-content > :nth-child(3) { animation-delay: .3s; }
.hero h1 { margin: 18px 0 30px; font-size: clamp(64px, 8vw, 132px); line-height: .98; letter-spacing: -2px; }
.hero-bottom { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.hero-bottom p { margin: 0; font-size: 15px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.hero-foot { bottom: 22px; display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid #ffffff40; animation: fade 1.6s .5s var(--ease) both; }
.film-full, .film-toggle { padding: 6px 0; border: 0; background: none; color: #fff; font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.film-full { border-bottom: 1px solid #ffffff70; }

@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Секции ---------- */

.section { padding: var(--space) var(--pad-x); }
/* Соседние светлые секции разделяет один отступ, а не два */
.section:not(.contact) + .section:not(.contact) { padding-top: 0; }
.section-kicker {
  display: flex; justify-content: space-between; gap: 20px; margin-bottom: 56px; padding-bottom: 20px;
  border-bottom: 1px solid var(--line); color: var(--muted);
  font: 500 11px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase;
}
.section-kicker > span:first-child { color: var(--gold); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 48px; }
.section-heading p { flex: 0 1 380px; margin: 0; font-size: 14px; color: var(--muted); }

/* 01 — Манифест */
.intro-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(32px, 7vw, 110px); align-items: end; }
.manifesto { font-size: clamp(40px, 4.6vw, 72px); line-height: 1.06; }
.intro-copy p { margin: 0 0 18px; }
.signature { margin-top: 26px !important; font: italic 400 21px var(--serif); color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(56px, 7vw, 100px); padding-top: 36px; border-top: 1px solid var(--line); }
.stats > div { display: flex; flex-direction: column; padding: 0 32px; border-left: 1px solid var(--line); }
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats strong { font: 400 64px/1 var(--serif); }
.stats small { font-size: 26px; }
.stats span { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* Фото-история: архитектура → галерея → место (одна колонка фото с равными зазорами) */
.architecture, .gallery, .location { margin: 0 var(--inset); }
.architecture + .gallery, .gallery + .location { margin-top: var(--inset); }
.architecture { position: relative; height: 78vh; min-height: 560px; max-height: 860px; overflow: hidden; }
.architecture img { width: 100%; height: 100%; object-fit: cover; }
.architecture-note { position: absolute; right: 0; bottom: 0; width: 440px; padding: 52px; background: var(--ink-deep); color: #fff; }
.architecture-note .eyebrow { color: var(--sand); }
.architecture-note h2 { margin: 18px 0; font-size: 50px; }
.architecture-note h2 em { color: #fff; }
.architecture-note p { font-size: 14px; color: #d2dedb; }

.gallery-track { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--inset); height: clamp(360px, 42vw, 620px); }
.gallery-item { padding: 0; border: 0; overflow: hidden; background: #dfe3dc; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gallery-item:hover img { transform: scale(1.03); }

.location { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--sage); }
.location-photo { position: relative; min-height: 640px; overflow: hidden; }
.location-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.location-photo > span { position: absolute; left: 32px; bottom: 26px; color: #fff; font: 500 11px/1.4 var(--sans); letter-spacing: .18em; text-shadow: 0 1px 8px #0009; }
.location-copy { align-self: center; padding: 64px clamp(32px, 6vw, 96px); }
.location-copy .eyebrow { color: var(--gold); }
.location-copy h2 { margin: 20px 0 26px; font-size: clamp(46px, 4.6vw, 72px); }
.location-copy > p:not(.eyebrow) { font-size: 15px; color: var(--muted); }
.location-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid #c4d0c9; font-size: 13px; }
.location-line strong { font: 400 21px var(--serif); text-align: right; }
.location-copy .button { margin-top: 32px; }

/* Вкладки (генплан, планировки) */
.genplan-tabs, .plan-tabs, .floor-tabs { display: flex; gap: 26px; }
.genplan-tabs button, .plan-tabs button, .floor-tabs button {
  padding: 10px 0; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--muted);
  font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.genplan-tabs .active, .plan-tabs .active, .floor-tabs .active { border-color: var(--ink); color: var(--ink); }

/* 03 — Генплан: заголовок в сетке, сам план — во всю ширину (стили ниже) */
.genplan { padding-bottom: 40px; }

/* 04 — Каждый день */
.everyday h2 { margin-bottom: 52px; }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.benefits article > span, .finish-num { font: italic 400 22px var(--serif); color: var(--gold); }
.benefits h3 { margin: 12px 0 10px; font-size: 30px; }
.benefits p { max-width: 340px; margin: 0; font-size: 15px; color: var(--muted); }

/* 05 — Дома */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filters button { padding: 12px 20px; border: 1px solid var(--line); background: transparent; font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.filters button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.filters sup { margin-left: 6px; font-size: 9px; }
.homes { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.home { display: flex; flex-direction: column; min-width: 0; }
.home-image { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: #e1e3dc; }
.home-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); transition: transform .8s var(--ease); }
.home:hover .home-image img { transform: scale(1.04); }
.home-image span { position: absolute; top: 12px; left: 12px; padding: 5px 9px; background: #f7f8f5ee; font: 500 9px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.home-image .home-status { left: auto; right: 12px; background: var(--ink); color: #fff; }
.is-reserved .home-status { background: #9a7b3c; }
.is-sold .home-status { background: #6b6b6b; }
.is-sold .home-image img { filter: grayscale(1); }
.home h3 { margin: 20px 0 4px; font-size: 30px; }
.home .type { margin: 0 0 16px; font-size: 12px; color: var(--muted); }
.home-spec { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.home-price { margin: 16px 0 2px; font: italic 500 26px/1.2 var(--serif); color: var(--teal); }
.home-ppm { margin: 0 0 8px; font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.home-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; }
.home-actions button { padding: 12px 0; border: 0; background: none; font-size: 13px; text-align: left; }
.home-actions button:hover { text-decoration: underline; text-underline-offset: 4px; }
.home-actions .accent { color: var(--teal); font-weight: 600; }
.availability { max-width: 820px; margin: 28px 0 0; font-size: 12px; color: var(--muted); }

/* 06 — Планировки */
.plan-layout { display: grid; grid-template-columns: 1fr 1.7fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.plan-description h3 { margin: 34px 0 8px; font-size: 44px; }
.plan-area { margin: 10px 0 16px; font: 400 72px/1 var(--serif); }
.plan-area small { font-size: 26px; }
.plan-description > p:not(.plan-area) { max-width: 340px; font-size: 14px; color: var(--muted); }
.floor-tabs { margin: 22px 0 8px; }
.plan-description .text-link { display: block; width: max-content; margin-top: 12px; }
.plan-description .button { margin-top: 32px; }
.plan-stage { display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 36px; min-height: 480px; background: var(--white); }
.plan-stage > button { width: 100%; padding: 0; border: 0; background: var(--white); cursor: zoom-in; }
.plan-stage img { width: 100%; height: 440px; object-fit: contain; }
.plan-stage figcaption { margin-top: 20px; text-align: center; font-size: 12px; color: var(--muted); }

/* 07 — Варианты покупки */
.finish-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.finish-card { display: flex; flex-direction: column; padding: clamp(28px, 4vw, 52px); background: var(--white); }
.finish-card.dark { background: var(--ink-deep); color: #fff; }
.finish-card.dark .finish-num { color: var(--sand); }
.finish-card h3 { margin: 12px 0 14px; font-size: 42px; }
.finish-card > p { font-size: 15px; color: var(--muted); }
.finish-card.dark > p { color: #d2dedb; }
.finish-card ul { margin: 6px 0 34px; padding: 0; list-style: none; font-size: 14px; }
.finish-card li { padding: 11px 0; border-top: 1px solid #173c3b1f; }
.finish-card.dark li { border-color: var(--line-dark); color: #e3ebe8; }
.finish-card .button { align-self: flex-start; margin-top: auto; }
.finish-card .studio-note { margin: -16px 0 26px; font-size: 12px; color: #a9bcb7; }
.studio-note a { text-decoration: underline; text-underline-offset: 3px; }
.studio-note strong { color: var(--sand); font-weight: 500; }

.interior { margin-top: 64px; }
.interior-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 20px; }
.interior-head h3 { font-size: 36px; }
.interior-head p { margin: 0; font-size: 13px; color: var(--muted); }
.interior-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 12px) / 4); gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.interior-item { padding: 0; border: 0; overflow: hidden; aspect-ratio: 4 / 3.6; background: #e1e3dc; cursor: zoom-in; scroll-snap-align: start; }
.interior-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.interior-item:hover img { transform: scale(1.04); }
.studio-link { display: flex; align-items: baseline; gap: 16px; margin-top: 20px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.studio-link span { font: 500 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.studio-link strong { font: italic 500 26px var(--serif); }
.studio-link i { margin-left: auto; font-style: normal; font-size: 20px; color: var(--gold); transition: transform .3s; }
.studio-link:hover strong { color: var(--teal); }
.studio-link:hover i { transform: translate(3px, -3px); }

/* 08 — Инвестиции */
.invest-frame iframe { display: block; width: 100%; height: 2400px; border: 0; transition: height .2s; }
.invest-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; margin-top: 32px; }

/* 09 — Вопросы */
.faq-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-layout h2 { position: sticky; top: 110px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 22px 44px 22px 0; list-style: none; cursor: pointer; font: 500 25px/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 20px; font: 300 28px var(--sans); color: var(--teal); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 680px; margin: 0 0 24px; color: var(--muted); }
.faq details a { text-decoration: underline; }

/* Контакты */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(36px, 7vw, 110px); align-items: center; background: var(--ink-deep); color: #fff; }
.contact .eyebrow { color: var(--sand); }
.contact h2 { margin-top: 22px; font-size: clamp(46px, 5vw, 78px); }
.contact h2 em { color: #fff; }
.contact-lead { max-width: 460px; margin: 26px 0 18px; font-size: 15px; color: #c4d4d0; }
.contact-phone { display: block; font: 400 34px var(--serif); }

/* Формы */
.lead-form { display: grid; gap: 16px; }
.lead-form label { display: grid; gap: 6px; font-size: 13px; }
.lead-form input:not([type=checkbox]):not([type=radio]), .lead-form textarea {
  width: 100%; padding: 14px 16px; border: 1px solid #b9c5bf; border-radius: 0; background: #fff; color: var(--ink); font: 16px var(--sans);
}
.lead-form textarea { resize: vertical; }
.lead-form .invalid { border-color: var(--error) !important; }
.lead-form label.consent.invalid span { text-decoration: underline wavy var(--error); }
.lead-form .button { width: 100%; }
.channel { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; border: 0; font-size: 13px; }
.channel legend { margin-bottom: 6px; padding: 0; }
.channel label { display: flex; align-items: center; gap: 6px; }
.lead-form .consent { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; line-height: 1.5; }
.consent input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; }
.consent a { text-decoration: underline; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1em; margin: 0; font-size: 13px; }
.form-status.error { color: var(--error); }
.form-status.ok { color: #2e6b4f; font-weight: 600; }
.form-status a { text-decoration: underline; }
.lead-form.inline { padding: 32px; border: 1px solid var(--line-dark); background: #ffffff0d; }
.lead-form.inline input:not([type=checkbox]):not([type=radio]) { border-color: transparent; }
.lead-form.inline .form-status.error { color: #ffb4ab; }
.lead-form.inline .form-status.ok { color: #b6e3c9; }

/* Подвал */
.site-footer { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 30px; align-items: start; padding: 54px var(--pad-x) 26px; }
.site-footer p { margin: 0; font-size: 13px; }
.site-footer > div { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.site-footer > div a:hover { text-decoration: underline; }
.site-footer > div span { font-size: 11px; color: var(--muted); }
.site-footer .footer-note { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

.mobile-bar { display: none; }

/* ---------- Диалоги ---------- */

dialog { width: calc(100% - 32px); max-width: 720px; max-height: 90svh; overflow-y: auto; padding: 48px; border: 0; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #0b2529b5; backdrop-filter: blur(5px); }
dialog h2 { margin: 16px 0; font-size: 48px; }
dialog p { font-size: 15px; }
dialog .button { display: flex; width: 100%; margin-top: 14px; }
.close { position: absolute; top: 8px; right: 16px; z-index: 2; border: 0; background: transparent; color: var(--ink); font-size: 32px; }
#lead-dialog { max-width: 560px; }
.detail-photo { width: 100%; max-height: 320px; object-fit: cover; }
.detail-specs { display: flex; flex-wrap: wrap; gap: 32px; margin: 22px 0; }
.detail-specs strong { display: block; font: 500 30px var(--serif); }
.detail-specs span { font-size: 13px; color: var(--muted); }
.detail-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 25px 0 6px; padding: 15px; background: var(--white); }
.detail-plans img { width: 100%; height: 220px; object-fit: contain; }
.detail-plans a { font-size: 12px; text-align: center; }
.detail-plans span { display: block; }
dialog .detail-note { margin: 0; font-size: 12px; color: var(--muted); }
#plan-dialog { max-width: 1250px; }
#expanded-plan { width: 100%; height: 72svh; object-fit: contain; }
#expanded-caption { text-align: center; }
#film-dialog, #gallery-dialog { max-width: 1400px; padding: 46px 16px 16px; background: #142723; color: #fff; }
#film-dialog .close, #gallery-dialog .close { color: #fff; }
#film-dialog video { width: 100%; max-height: 78svh; }
#gallery-image { width: 100%; max-height: 76svh; object-fit: contain; }
.gallery-nav { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 12px; font-size: 13px; }
.gallery-nav button { width: 44px; height: 44px; border: 1px solid #ffffff55; background: none; color: #fff; font-size: 18px; }

/* Cookie */
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 30; max-width: 440px; padding: 20px; background: #fff; box-shadow: 0 10px 40px #0b25292e; font-size: 13px; }
.cookie p { margin: 0 0 12px; }
.cookie a { text-decoration: underline; }
.cookie div { display: flex; gap: 8px; }
.cookie .button { min-height: 42px; padding: 10px 16px; }

/* Появление при прокрутке — включается скриптом; без него всё видно сразу */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-img img { transform: scale(1.1); transition: transform 2s var(--ease); }
.js .reveal-img.is-in img { transform: scale(1); }

/* ---------- Адаптив ---------- */

@media (max-width: 1400px) {
  .header-cta { display: none; }
}

@media (max-width: 1180px) {
  :root { --header-h: 80px; }
  .site-header, .site-header.scrolled { height: var(--header-h); justify-content: space-between; }
  .scrolled .brand-sub { display: block; }
  .brand-name { font-size: 26px; }
  .header-phone { margin-left: auto; }
  .menu { display: block; }
  nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px; background: var(--paper); box-shadow: 0 14px 24px #0b25291a; font-size: 16px; }
  nav a { padding: 13px 0; border-bottom: 1px solid #173c3b14; }
  nav.open { display: flex; }
  .homes { grid-template-columns: repeat(2, 1fr); gap: 40px var(--gap); }
  .interior-track { grid-auto-columns: calc((100% - 2 * 12px) / 3); }
}

@media (max-width: 1000px) {
  .intro-grid, .plan-layout, .faq-layout, .contact { grid-template-columns: 1fr; }
  .faq-layout h2 { position: static; }
  .location { grid-template-columns: 1fr; }
  .location-photo { min-height: 460px; }
  .location-copy { padding: 52px var(--gutter); }
  .stats strong { font-size: 48px; }
  .benefits { gap: 32px; }
  .finish-grid { grid-template-columns: 1fr; }
  .architecture-note { width: 400px; padding: 40px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  :root { --header-h: 68px; --inset: 10px; --gap: 16px; }
  body { padding-bottom: 64px; }
  h2 { font-size: clamp(38px, 10.5vw, 48px); letter-spacing: -.5px; }
  .brand-name { font-size: 23px; }
  .brand-sub { font-size: 7.5px; letter-spacing: .18em; }
  .header-phone { display: none; }

  .hero { min-height: 600px; height: calc(100svh - var(--header-h) - 74px); max-height: 780px; }
  .hero-photo { object-position: 57% center; }
  .hero-top { top: 20px; font-size: 9px; letter-spacing: .12em; }
  .hero-status { padding: 6px 8px; font-size: 8px; }
  .hero-content { bottom: 72px; }
  .hero h1 { margin: 14px 0 20px; font-size: clamp(50px, 13.5vw, 64px); letter-spacing: -1px; line-height: 1.02; }
  .hero-bottom { display: block; }
  .hero-bottom p { max-width: 290px; font-size: 14px; }
  .hero-actions { flex-direction: column; margin-top: 22px; }
  .hero-actions .button { width: 100%; justify-content: space-between; min-height: 52px; }
  .hero-actions .ghost { display: none; }
  .film-full, .film-toggle { font-size: 9.5px; letter-spacing: .1em; }

  .section-kicker { margin-bottom: 36px; font-size: 9.5px; letter-spacing: .14em; }
  .section-kicker > span:last-child { display: none; }
  .section-heading { display: block; margin-bottom: 32px; }
  .section-heading p { margin-top: 18px; }

  .manifesto { font-size: 38px; line-height: 1.08; }
  .stats { grid-template-columns: 1fr; margin-top: 44px; padding-top: 0; border: 0; }
  .stats > div, .stats > div:first-child { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stats strong { font-size: 40px; white-space: nowrap; }
  .stats small { font-size: 20px; }
  .stats span { max-width: 150px; margin: 0; font-size: 12px; text-align: right; }

  .architecture { height: auto; min-height: 0; max-height: none; background: var(--ink-deep); }
  .architecture img { height: 300px; object-position: 35% center; }
  .architecture-note { position: relative; width: 100%; padding: 30px 22px; }
  .architecture-note h2 { font-size: 40px; }
  .gallery-track { grid-template-columns: 1fr; height: auto; }
  .gallery-item { height: 240px; }
  .location-photo { min-height: 320px; }
  .location-copy { padding: 40px 22px; }
  .location-copy h2 { font-size: 44px; }
  .location-copy .button { width: 100%; }

  .plan-tabs, .floor-tabs { gap: 20px; }

  .everyday h2 { margin-bottom: 28px; }
  .benefits { grid-template-columns: 1fr; gap: 0; }
  .benefits article { padding: 22px 0; border-top: 1px solid var(--line); }
  .benefits p { max-width: none; }

  .filters { flex-wrap: nowrap; gap: 8px; }
  .filters button { padding: 11px 12px; font-size: 10px; letter-spacing: .08em; }
  .homes { grid-template-columns: 1fr; gap: 44px; }
  .home-image { aspect-ratio: 4 / 3; }

  .plan-description h3 { margin-top: 24px; font-size: 34px; }
  .plan-area { font-size: 56px; }
  .plan-description > p:not(.plan-area) { max-width: none; }
  .plan-description .button { width: 100%; }
  .plan-stage { min-height: 320px; padding: 20px 12px; }
  .plan-stage img { height: 340px; }

  .finish-card h3 { font-size: 34px; }
  .finish-card .button { align-self: stretch; }
  .interior { margin-top: 48px; }
  .interior-head { display: block; }
  .interior-head h3 { margin-bottom: 6px; font-size: 28px; }
  .interior-track { grid-auto-columns: 80%; margin-right: calc(-1 * var(--gutter)); }
  .studio-link { flex-wrap: wrap; gap: 4px 12px; }

  .invest-actions .button { width: 100%; }

  .faq summary { font-size: 21px; }
  .contact h2 { font-size: 44px; }
  .contact-phone { font-size: 28px; }
  .lead-form.inline { padding: 22px 18px; }
  .site-footer { grid-template-columns: 1fr; gap: 22px; padding-top: 40px; }

  .mobile-bar { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--paper); box-shadow: 0 -1px 0 #173c3b22; }
  .mobile-bar a, .mobile-bar button { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--ink); background: transparent; font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
  .mobile-bar button { background: var(--ink); color: #fff; }
  .cookie { left: 10px; right: 10px; bottom: 74px; max-width: none; }

  dialog { padding: 40px 22px 26px; }
  dialog h2 { font-size: 36px; }
  .detail-specs { gap: 20px; }
  .detail-specs strong { font-size: 24px; }
  .detail-plans img { height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .reveal-img img { opacity: 1; transform: none; }
}

/* ---------- Карта продаж ---------- */

.sales-map { margin-bottom: 64px; }
.sales-map-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; margin-bottom: 18px; }
.sales-map-head h3 { font-size: 34px; }
.sales-map-legend { display: flex; flex-wrap: wrap; gap: 18px; font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 8px; }
.lg i { width: 12px; height: 12px; border-radius: 50%; }
.lg-free i { background: #fff; box-shadow: 0 0 0 3px var(--teal); }
.lg-reserved i { background: var(--gold); }
.lg-sold i { background: #49625e; opacity: .6; }
.sales-map-count { margin: 0 0 0 auto; font: italic 400 22px var(--serif); color: var(--ink); }
.sales-map-count strong { font-weight: 500; color: var(--teal); }
.sales-map-scroll { overflow-x: auto; scrollbar-width: thin; }
.sales-map-stage { position: relative; aspect-ratio: 1680 / 1025; overflow: hidden; background: #0b252a; }
.sales-map-stage img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72) brightness(.94); }
.sales-map-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, transparent 55%, #0b252a59 100%); }
#sales-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.mb rect { fill: #f5f4efeb; }
.mb text { font: 600 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; fill: var(--ink); text-anchor: middle; }
.mu text { font: 700 14px var(--sans); text-anchor: middle; pointer-events: none; }
.mu .mu-dot { transform-box: fill-box; transform-origin: center; transition: transform .3s var(--ease); }
.mu.is-sold .mu-dot { fill: #0f2826a6; stroke: #ffffffa0; stroke-width: 1.5; }
.mu.is-sold text { font-size: 11px; font-weight: 600; fill: #ffffffd9; }
.mu.is-free .mu-dot { fill: #fff; stroke: var(--teal); stroke-width: 4; }
.mu.is-free text { fill: var(--ink); }
.mu.is-reserved .mu-dot { fill: var(--gold); stroke: #fff; stroke-width: 2; }
.mu.is-reserved text { fill: #fff; }
.mu.is-free, .mu.is-reserved { cursor: pointer; outline: none; }
.mu.is-free:hover .mu-dot, .mu.is-free:focus .mu-dot, .mu.is-reserved:hover .mu-dot { transform: scale(1.18); }
.mu-pulse { fill: none; stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: mupulse 2.6s var(--ease) infinite; }
.mu.is-reserved .mu-pulse { stroke: var(--gold); }
@keyframes mupulse { 0% { transform: scale(.75); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }
.sales-map-tip { position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 26px)); min-width: 190px; padding: 12px 16px; background: var(--paper); box-shadow: 0 12px 32px #0b252a40; pointer-events: none; font-size: 13px; line-height: 1.5; }
.sales-map-tip strong { display: block; font: 500 20px var(--serif); }
.sales-map-tip span { display: block; color: var(--muted); }
.sales-map-tip em { display: block; margin-top: 4px; font-style: normal; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.sales-map-hint { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- Отдых рядом ---------- */

.leisure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.leisure-card { display: flex; flex-direction: column; padding: 32px 30px 30px; background: var(--white); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.leisure-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px #0b252a14; }
.leisure-tag { align-self: flex-start; padding: 5px 10px; border: 1px solid #a88a5a66; color: var(--gold); font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.leisure-card h3 { margin: 22px 0 10px; font-size: 30px; }
.leisure-card p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Три варианта отделки и офисы ---------- */

.finish-grid { grid-template-columns: repeat(3, 1fr); }
.finish-card h3 { font-size: 36px; }
.finish-price { margin: -4px 0 12px !important; font: italic 500 24px/1.2 var(--serif) !important; color: var(--teal) !important; }
.finish-card.dark .finish-price { color: var(--sand) !important; }
.offices { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line-dark); }
.office span { display: block; margin-bottom: 6px; font: 500 10px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sand); }
.office p { margin: 0 0 6px; font-size: 14px; color: #e3ebe8; }
.office small { color: #a9bcb7; font-size: 12px; }
.office a { font-size: 12px; letter-spacing: .06em; border-bottom: 1px solid #ffffff55; }

@media (max-width: 1180px) {
  .finish-grid { grid-template-columns: 1fr; }
  .leisure-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .sales-map { margin-bottom: 44px; }
  .sales-map-head h3 { font-size: 28px; }
  .sales-map-count { margin-left: 0; width: 100%; font-size: 20px; }
  .leisure-grid { grid-template-columns: 1fr; }
  .leisure-card { padding: 26px 22px; }
  .leisure-card h3 { font-size: 26px; }
  .finish-card h3 { font-size: 30px; }
  .offices { grid-template-columns: 1fr; }
}

/* ---------- Генплан во всю ширину: номера на плане и всплывающие описания ---------- */

.genplan-full { margin: 0 var(--inset); }
.genplan-full + .section { padding-top: var(--space); }
.genplan-scroll { overflow-x: auto; scrollbar-width: thin; }
.genplan-stage { position: relative; background: #0b252a; }
.gp-canvas { position: relative; aspect-ratio: 1491 / 1055; width: 100%; }
.gp-canvas img { width: 100%; height: 100%; object-fit: cover; }
#genplan-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gp-route { fill: none; stroke: #fff; stroke-width: 3.5; stroke-dasharray: 2 12; stroke-linecap: round; opacity: .9; }
.gp-route-label, .gp-lake { font: italic 500 30px var(--serif); fill: #fff; text-anchor: middle; paint-order: stroke; stroke: #0b252a99; stroke-width: 6px; stroke-linejoin: round; }
.gp-lake { font-size: 44px; letter-spacing: .02em; fill: #ffffffd9; }
.gp-pin { cursor: pointer; outline: none; }
.gp-pin .gp-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: transform .3s var(--ease), fill .3s; }
.gp-pin text { font: 500 24px var(--serif); fill: var(--ink); text-anchor: middle; pointer-events: none; }
.gp-pin .gp-halo { fill: #f5f4ef40; transform-box: fill-box; transform-origin: center; animation: gphalo 3s var(--ease) infinite; }
.gp-pin:hover .gp-dot, .gp-pin:focus .gp-dot { transform: scale(1.15); }
.gp-pin.is-active .gp-dot { fill: var(--ink); stroke: #fff; }
.gp-pin.is-active text { fill: #fff; }
@keyframes gphalo { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.gp-pop { position: absolute; z-index: 2; width: 300px; transform: translate(-50%, calc(-100% - 34px)); padding: 22px 24px 20px; background: var(--paper); box-shadow: 0 18px 44px #0b252a4d; }
.gp-pop.below { transform: translate(-50%, 34px); }
.gp-pop-num { font: italic 400 20px var(--serif); color: var(--gold); }
.gp-pop h3 { margin: 4px 0 8px; font-size: 26px; }
.gp-pop p { margin: 0; font-size: 13px; color: var(--muted); }
.gp-close { position: absolute; top: 6px; right: 10px; border: 0; background: none; font-size: 24px; color: var(--muted); }
.map-open { position: absolute; right: 18px; bottom: 18px; z-index: 2; padding: 11px 16px; border: 0; background: #f5f4efeb; font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.map-open:hover { background: #fff; }
.genplan-stage:fullscreen { display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh; }
.genplan-stage:fullscreen .gp-canvas { width: min(100vw, calc(100vh * 1491 / 1055)); }

/* ---------- Просмотр картинок на весь экран ---------- */

#gallery-dialog, #plan-dialog, #film-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 56px 24px 20px; background: #0b1d1bf7; color: #fff; overflow: hidden; }
#gallery-dialog[open], #plan-dialog[open], #film-dialog[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
#gallery-dialog::backdrop, #plan-dialog::backdrop, #film-dialog::backdrop { background: #0b1d1b; }
#gallery-dialog .close, #plan-dialog .close, #film-dialog .close { top: 10px; right: 20px; color: #fff; font-size: 38px; }
#gallery-image, #expanded-plan { flex: 1 1 auto; width: 100%; height: auto; min-height: 0; max-height: none; object-fit: contain; }
#plan-dialog { background: #f5f4effa; color: var(--ink); }
#plan-dialog .close { color: var(--ink); }
#expanded-caption { margin: 0; color: var(--muted); }
#film-dialog video { flex: 1 1 auto; width: 100%; min-height: 0; max-height: none; object-fit: contain; }

@media (max-width: 680px) {
  .genplan { padding-bottom: 28px; }
  .gp-pop { width: 260px; }
  #gallery-dialog, #plan-dialog, #film-dialog { padding: 52px 8px 14px; }
}

/* ---------- Отдых рядом: карточки-ссылки и страницы мест ---------- */

a.leisure-card { color: inherit; }
.leisure-more { margin-top: auto; padding-top: 18px; font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.leisure-all { margin: 32px 0 0; }

.place-header { position: sticky; }
.place-nav { display: flex; gap: 26px; margin: 0 auto; font-size: 13px; }
.place-hero { position: relative; margin: 0 var(--inset); min-height: min(78vh, 760px); display: flex; align-items: flex-end; overflow: hidden; background: var(--ink-deep); color: #fff; }
.place-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); animation: kenburns 24s var(--ease) both; }
.place-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, #0b252a33 0%, #0b252a14 35%, #0b252ad9 100%); }
.place-hero.no-photo { min-height: 520px; background: radial-gradient(ellipse at 20% 0%, #24524e 0%, var(--ink-deep) 55%, #0f2a27 100%); }
.place-hero.no-photo .place-hero-shade { display: none; }
.place-hero-content { position: relative; z-index: 1; max-width: 980px; padding: 0 clamp(22px, 4vw, 56px) clamp(40px, 6vw, 72px); }
.crumbs { font: 500 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.crumbs a { border-bottom: 1px solid currentColor; }
.place-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 18px; }
.place-tags span { padding: 6px 11px; border: 1px solid #ffffff59; font: 500 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.place-title { font: 400 clamp(52px, 7vw, 112px)/1 var(--serif); letter-spacing: -1.5px; margin: 0; }
.place-title em { font-style: italic; color: var(--teal); }
.place-hero .place-title em { color: #fff; }
.place-lead { max-width: 680px; margin: 22px 0 0; font-size: 17px; line-height: 1.7; }
.place-hero .place-lead { color: #e3ebe8; }
.place-intro .place-lead { color: var(--muted); margin-bottom: 52px; }
.place-intro .crumbs { margin-bottom: 28px; color: var(--muted); }
.place-intro .place-title { margin-top: 10px; }

.place-body-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(36px, 7vw, 110px); align-items: start; }
.place-text h2 { margin: 0 0 14px; font-size: clamp(32px, 3vw, 44px); }
.place-text h2:not(:first-child) { margin-top: 48px; }
.place-text p { font-size: 17px; line-height: 1.8; color: #2c4a47; }
.place-aside { display: grid; gap: 22px; position: sticky; top: 100px; }
.place-facts { margin: 0; background: var(--white); padding: 8px 26px; }
.place-facts div { display: flex; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.place-facts div:last-child { border-bottom: 0; }
.place-facts dt { font-size: 12px; color: var(--muted); }
.place-facts dd { margin: 0; font: 500 18px/1.3 var(--serif); text-align: right; }
.place-cta { padding: 28px 26px; background: var(--ink-deep); color: #fff; }
.place-cta .eyebrow { color: var(--sand); }
.place-cta p { color: #d2dedb; font-size: 14px; }
.place-cta .button { display: flex; width: 100%; margin-top: 10px; }
.place-cta .button.outline { color: #fff; border-color: #ffffff66; }
.place-cta .button.outline:hover { background: #ffffff14; }
.place-sources .eyebrow { color: var(--gold); margin-bottom: 8px; }
.place-sources ul { margin: 0; padding-left: 18px; font-size: 13px; }
.place-sources li { margin-bottom: 6px; }
.place-sources a { text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.place-sources .note { font-size: 12px; color: var(--muted); }
.place-more h2 { margin-bottom: 36px; }

@media (max-width: 1000px) {
  .place-body-grid { grid-template-columns: 1fr; }
  .place-aside { position: static; }
  .place-nav { display: none; }
}
@media (max-width: 680px) {
  .place-hero { margin: 0 var(--inset); min-height: 70svh; }
  .place-hero.no-photo { min-height: 440px; }
  .place-title { font-size: clamp(42px, 12vw, 56px); }
  .place-lead { font-size: 15px; }
  .place-text p { font-size: 16px; }
}

/* ---------- Фото мест отдыха: карточки, галерея, подписи авторов ---------- */

.leisure-card { padding: 0; overflow: hidden; }
.leisure-photo { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink-deep); }
.leisure-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.leisure-card:hover .leisure-photo img { transform: scale(1.05); }
.leisure-body { display: flex; flex-direction: column; flex: 1; padding: 26px 30px 30px; }
.place-credit { position: absolute; right: 14px; bottom: 10px; z-index: 1; max-width: 46%; font-size: 10px; line-height: 1.4; color: #ffffffa6; text-align: right; }
.place-credit:hover { color: #fff; }
.place-gallery { padding-top: 0; }
.place-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.place-gallery-grid.n1 { grid-template-columns: minmax(0, 2fr) 1fr; }
.place-gallery-grid.n2 { grid-template-columns: 1fr 1fr; }
.place-gallery figure { margin: 0; }
.place-zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--ink-deep); cursor: zoom-in; overflow: hidden; aspect-ratio: 3 / 2; }
.place-zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.place-zoom:hover img { transform: scale(1.04); }
.place-gallery figcaption { margin-top: 10px; font-size: 13px; color: var(--ink); }
.place-gallery figcaption a { display: block; padding: 4px 0; font-size: 11px; color: var(--muted); }
#place-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 56px 24px 20px; border: 0; background: #0b1d1bf7; color: #fff; }
#place-dialog[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
#place-dialog::backdrop { background: #0b1d1b; }
#place-dialog img { flex: 1 1 auto; width: 100%; min-height: 0; object-fit: contain; }
#place-dialog p { margin: 0; color: #d2dedb; }
#place-dialog .close { position: absolute; top: 10px; right: 20px; border: 0; background: none; color: #fff; font-size: 38px; line-height: 1; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 680px) {
  .leisure-body { padding: 22px 22px 24px; }
  .place-credit { left: 22px; right: 14px; bottom: 8px; max-width: none; text-align: left; }
  .place-gallery-grid, .place-gallery-grid.n1, .place-gallery-grid.n2 { grid-template-columns: 1fr; }
  #place-dialog { padding: 52px 8px 14px; }
}

/* ---------- Анимации (assets/js/motion.js): строки заголовков, слова манифеста, шторки фото ---------- */

.motion .lines .line { display: block; overflow: hidden; padding: 0 .12em .14em 0; margin-bottom: -.14em; }
.motion .lines .line > span { display: block; transform: translateY(110%); transition: transform 1.25s var(--ease); transition-delay: calc(var(--i) * 130ms + 80ms); }
.motion .lines.is-in .line > span { transform: none; }
.motion .manifesto .w { display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(.35em); transition: opacity .9s var(--ease), filter .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.motion .manifesto.is-in .w { opacity: 1; filter: none; transform: none; }
.motion .curtain { clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease); }
.motion .curtain.is-in { clip-path: inset(0 0 0 0); }
.motion .stats strong { font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) and (pointer: fine) {
  .motion .architecture img, .motion .location-photo img, .motion .place-hero > img { scale: 1.08; will-change: translate; }
}

/* Меню страниц мест на ширине 1000–1180: строка, а не выпадающий список главной */
@media (max-width: 1180px) and (min-width: 1001px) {
  .place-nav { position: static; flex-direction: row; gap: 22px; padding: 0; background: none; box-shadow: none; font-size: 13px; }
  .place-nav a { padding: 0; border: 0; }
}
.place-hero-content > * { animation: rise 1.4s var(--ease) both; }
.place-hero-content > :nth-child(2) { animation-delay: .1s; }
.place-hero-content > :nth-child(3) { animation-delay: .2s; }
.place-hero-content > :nth-child(4) { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .place-hero-content > * { animation: none; } }

/* Переносы: заголовки делятся на ровные строки, в абзацах нет одиноких слов в последней строке */
h1, h2, h3, .place-lead, .leisure-card h3 { text-wrap: balance; }
p, li, dd, figcaption, .faq-list summary { text-wrap: pretty; }
.architecture picture { display: block; height: 100%; }

/* ---------- Карты: превью на странице и развёрнутый слой (app.js, mapWraps) ---------- */

.map-wrap { position: relative; }
.map-wrap:not(.is-open) { overflow: hidden; }
.map-ui { display: none; }
.map-open { z-index: 2; cursor: zoom-in; color: var(--ink); }
.map-wrap.is-open { position: fixed; inset: 0; z-index: 1000; margin: 0; padding: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: #0b1d1b; touch-action: pan-x pan-y; }
.map-wrap.is-open > .genplan-stage, .map-wrap.is-open > .sales-map-stage { width: calc(max(100vw, 100dvh * var(--ar)) * var(--z, 1)); max-width: none; transition: width .35s var(--ease); }
.map-wrap.is-open .map-open { display: none; }
.map-wrap.is-open .map-ui { display: flex; position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 1001; gap: 8px; }
.map-ui button { width: 46px; height: 46px; border: 0; background: #f5f4efeb; color: var(--ink); font: 400 26px/1 var(--sans); cursor: pointer; box-shadow: 0 6px 18px #0b252a40; }
.map-ui .map-close { background: var(--ink-deep); color: #fff; font-size: 30px; }
html.map-locked, html.map-locked body { overflow: hidden; }
.map-wrap.is-open .sales-map-stage, .map-wrap.is-open .genplan-stage { clip-path: none; }

@media (max-width: 680px) {
  .map-wrap:not(.is-open) { cursor: zoom-in; }
  .map-wrap:not(.is-open) .mb, .map-wrap:not(.is-open) .gp-route-label, .map-wrap:not(.is-open) .mu-pulse, .map-wrap:not(.is-open) .gp-halo { display: none; }
  .map-open { right: 10px; bottom: 10px; padding: 10px 12px; font-size: 10px; }
  .map-wrap.is-open .gp-pop { width: min(300px, 80vw); }
}

/* ---------- Диалоги: крестик в своей строке и всегда на виду, без рамки фокуса при открытии ---------- */

#home-dialog, #lead-dialog { padding-top: 0; }
#home-dialog > .close, #lead-dialog > .close { position: sticky; top: 0; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 -20px 0 auto; background: var(--paper); font-size: 30px; line-height: 1; }
dialog:focus { outline: none; }
dialog .close:focus:not(:focus-visible) { outline: none; }
.detail-photo { display: block; margin-bottom: 22px; }
#home-content .eyebrow { margin-top: 0; }
#home-content h2 { margin-top: 8px; }
@media (max-width: 680px) {
  #home-dialog, #lead-dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; padding: 0 20px calc(24px + env(safe-area-inset-bottom)); }
  #home-dialog > .close, #lead-dialog > .close { margin-right: -10px; }
  .detail-photo { max-height: 240px; }
}

/* ---------- Телефон: кнопка карты не закрывает метки, удобные зоны нажатия ---------- */

@media (max-width: 680px) {
  .map-open { top: 8px; right: 8px; bottom: auto; width: 40px; height: 40px; padding: 0; font-size: 0; display: flex; align-items: center; justify-content: center; }
  .map-open span { font-size: 18px; }
  .hero-foot a, .hero-foot button { min-height: 40px; display: inline-flex; align-items: center; }
  .site-footer > div a { padding: 6px 0; }
}
/* Варианты отделки: кнопки в карточках на одной линии */
.finish-card > .button { margin-top: auto; align-self: flex-start; }
.finish-card ul { margin-bottom: 34px; }
@media (max-width: 680px) { .finish-card > .button { align-self: stretch; } }
