/* ============================================================
   PARK RESIDENCES — premium residential complex
   Palette:  deep ink · garden green · sage · cool paper · champagne
   Type:     Cormorant Garamond (display serif) + Manrope (sans)
   Signature: recurring thin wave line + champagne hairline accents
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --ink:    #0B1E2A;   /* deep night */
  --ink-2:  #10293a;
  /* Акцент проекта — садовая зелень: Park Residences стоит в парковой
     части Sea Breeze, и рендеры целиком в зелени. Меняется здесь одним
     местом: --tide тянет за собой eyebrow, ссылки, выделение текста. */
  --tide:   #2E6B4F;   /* brand garden green */
  --tide-d: #24543E;
  --mist:   #A9C4AE;   /* soft sage */
  --paper:  #F4F6F7;   /* cool near-white */
  --paper-2:#EDF1F2;
  --foam:   #FFFFFF;
  --gold:   #C0A062;   /* champagne accent — used with restraint */
  --gold-d: #a98a4e;

  --text:   #22333c;
  --text-mut:#5b6f78;
  --line:   rgba(11,30,42,.12);

  --font-d: "Cormorant Garamond", Georgia, serif;
  --font-b: "Manrope", "Segoe UI", system-ui, sans-serif;
  /* Шрифт для статистических цифр: строчные (lining) цифры одной высоты,
     в отличие от старостильных цифр Cormorant, которые «прыгают» по базовой линии */
  --font-n: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  /* Геометрический гротеск в духе Futura — заголовок видеоблока, как на parkresidences.az */
  --font-g: "Jost", "Century Gothic", "Futura", var(--font-b);
  /* Шрифт верхней панели. На seabreezerealestate.az шапка набрана
     Pragmatica Extended — это платный ParaType, отдавать её файлы мы не можем.
     Archivo с осью ширины (wdth 112.5–125) — ближайший бесплатный аналог:
     тот же нейтральный гротеск, только расширенный. Ось задаётся не
     font-family, а font-stretch, см. --hdr-wdth.

     Кириллицы у Archivo нет (Google отдаёт только latin / latin-ext /
     vietnamese), поэтому русская шапка сваливалась в Manrope: другой
     рисунок, и font-stretch у него не работает — оси ширины нет.
     Вторым в стеке стоит Roboto Flex: тот же нейтральный гротеск, есть
     кириллица И та же ось wdth, так что 112.5% отрабатывает и там —
     русские пункты выходят той же ширины и ритма, что английские.
     Подмена идёт по глифам: латиница берётся из Archivo, кириллица —
     из Roboto Flex, поэтому смешанная шапка (RU/EN/AZ, «Park Residences»)
     остаётся однородной, и на en/az лишний файл вообще не качается. */
  --font-h: "Archivo", "Roboto Flex", "Manrope", "Segoe UI", system-ui, sans-serif;
  --hdr-wdth: 112.5%;

  --accent: #5C8266;  /* CTA / icon accent */

  /* Шапка: высота в покое и после прокрутки, поля по краям и высота
     органов управления — язык, кнопка заявки, «пилюля» меню. */
  --header-h: 96px;
  --hdr-h-min: 78px;
  --hdr-pad: clamp(20px, 4vw, 64px);
  --ctl-h: 52px;
  --menu-h: 56px;

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  --sect-y: clamp(72px, 11vw, 160px);

  --ease: cubic-bezier(.22,1,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur: .7s;
  --r: 4px;
}

/* ---------- Reset / base ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-b);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-weight: 400;
  font-size: clamp(15px, 1.05vw, 17px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--tide); color: #fff; }

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

/* ---------- Typography helpers ---------- */
.h-display {
  font-family: var(--font-d);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.01em;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  color: var(--ink);
  /* у Cormorant по умолчанию старостильные цифры: «360°» читается
     как «з6о°». Включаем прописные (lining) — они одной высоты. */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}
.h-display em { font-style: italic; color: var(--tide); }
/* заголовок не должен «слипаться» со следующим абзацем */
.h-display + .lead,
.h-display + .body-text,
.h-display + p { margin-top: clamp(1.1rem, 2.2vw, 2rem); }
.h-display { padding-bottom: .08em; }

.eyebrow {
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--tide);
  display: inline-flex;
  align-items: center;
  gap: .8em;
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: ""; width: 34px; height: 1px; background: var(--gold);
}
.eyebrow--light { color: rgba(255,255,255,.82); }
.eyebrow--light::before { background: var(--gold); }

.lead   { font-size: clamp(1.05rem,1.5vw,1.28rem); color: var(--text-mut); max-width: 46ch; line-height: 1.75; }
.body-text { color: var(--text-mut); max-width: 52ch; margin-bottom: 1.1rem; line-height: 1.8; }
.body-text strong { color: var(--ink); font-weight: 600; }

/* ---------- Section rhythm (single source of truth) ---------- */
.section { padding-block: var(--sect-y); position: relative; }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.section-head--center { flex-direction: column; align-items: center; text-align: center; }
.section-head__note { color: var(--text-mut); max-width: 34ch; font-size: 1.02rem; }
/* центрированный подзаголовок длиннее бокового: шире колонка и
   выравнивание строк по длине, чтобы не оставалось «хвостов» */
.section-head__note--center {
  max-width: 62ch; margin-inline: auto;
  line-height: 1.72; text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--tide); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  padding: 1.05em 2.1em; border-radius: 100px;
  font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  color: var(--fg); background: var(--bg);
  overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), color .4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); transform: translateY(101%);
  transition: transform .5s var(--ease); border-radius: inherit;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(11,30,42,.5); }
.btn:hover::before { transform: translateY(0); }
.btn__ar { transition: transform .4s var(--ease); }
.btn:hover .btn__ar { transform: translateX(4px); }

.btn--primary { --bg: var(--tide); }
.btn--dark { --bg: var(--ink); }
.btn--dark::before { background: var(--tide); }
.btn--full { width: 100%; justify-content: center; }

.btn--ghost {
  --fg: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,.4);
}
.btn--ghost::before { background: #fff; }
.btn--ghost:hover { color: var(--ink); border-color: #fff; }
.btn--ghost-dark { --fg: var(--paper); border-color: rgba(255,255,255,.28); }
.btn--ghost-dark::before { background: var(--gold); }
.btn--ghost-dark:hover { color: var(--ink); }

.link-more {
  display: inline-flex; align-items: center; gap: .55em;
  font-weight: 600; font-size: .92rem; color: var(--tide);
  padding-bottom: 4px; position: relative; width: max-content;
}
.link-more span { transition: transform .4s var(--ease); }
.link-more::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(.4); transform-origin: left;
  transition: transform .45s var(--ease);
}
.link-more:hover span { transform: translateX(5px); }
.link-more:hover::after { transform: scaleX(1); }
.link-more--light { color: #fff; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999; background: var(--ink);
  display: grid; place-content: center; justify-items: center; gap: 1.2rem;
  color: var(--paper); transition: opacity .8s var(--ease), visibility .8s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
/* logo drifts up a touch as the curtain lifts */
.preloader.is-done .preloader__logo { transform: translateY(-10px) scale(1.04); }

/* На занавесе — тот же логотип, что в шапке, только светлый:
   фон здесь --ink, и тёмный logo.png на нём не читается.
   Файл квадратный с полями, поэтому кадр шире прежней иконки —
   иначе надпись «PARK RESIDENCES» выходит слишком мелкой. */
.preloader__logo {
  width: clamp(190px, 38vw, 300px);
  transition: transform .8s var(--ease);
  animation: pl-logo-in 1.25s var(--ease-out) both;
}
.preloader__logo img { display: block; width: 100%; height: auto; }

.preloader__line {
  width: clamp(190px, 38vw, 300px); height: 1px;
  background: var(--gold); transform-origin: left center;
  animation: pl-line 1.1s var(--ease) .35s both;
}

@keyframes pl-logo-in {
  from { opacity: 0; transform: translateY(16px) scale(.92); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes pl-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .preloader__logo, .preloader__line { animation-duration: .01ms; }
}

/* ============================================================
   ШАПКА
   ------------------------------------------------------------
   Раскладка: слева «пилюля» МЕНЮ, по центру логотип, справа
   переключатель языка и кнопка заявки. Горизонтального меню в
   шапке нет — все шесть пунктов живут в панели, которая
   выезжает слева (см. «Меню» ниже).
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 900;
  height: var(--header-h);
  background: #fff;
  box-shadow: 0 1px 0 rgba(11,30,42,.08);
  transition: height .45s var(--ease), background-color .55s var(--ease),
              box-shadow .45s var(--ease);
}
.header.is-scrolled {
  height: var(--hdr-h-min);
  box-shadow: 0 10px 30px -24px rgba(11,30,42,.75);
}
/* Три колонки, а не space-between: боковые группы разной ширины,
   и при flex логотип уезжал от центра — на широком экране это видно. */
.header__inner {
  height: 100%;
  width: 100%; max-width: 1920px; margin-inline: auto;
  padding-inline: var(--hdr-pad);
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: clamp(.8rem, 2vw, 2rem);
}

/* ---------- Логотип ---------- */
.logo {
  justify-self: center; position: relative;
  display: inline-flex; align-items: center;
}
.logo__img {
  height: 64px; width: auto; display: block;
  transition: height .45s var(--ease), opacity .5s var(--ease);
}
.header.is-scrolled .logo__img { height: 50px; }
.logo--footer .logo__img { height: 76px; }
/* светлая копия лежит поверх тёмной и проявляется, когда открыто меню:
   шапка в этот момент становится прозрачной над тёмной панелью */
.logo__img--light {
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  opacity: 0; pointer-events: none;
}
body.menu-open .logo__img--dark  { opacity: 0; }
body.menu-open .logo__img--light { opacity: 1; }

/* ---------- «Пилюля» МЕНЮ ---------- */
.menu-btn {
  justify-self: start;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .9rem;
  height: var(--menu-h); padding: 0 1.6rem 0 1.35rem;
  border: 1px solid rgba(11,30,42,.2); border-radius: 100px;
  background: transparent; color: var(--ink); cursor: pointer;
  font-family: var(--font-h); font-stretch: var(--hdr-wdth);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  transition: height .45s var(--ease), color .4s var(--ease),
              border-color .4s var(--ease);
}
.header.is-scrolled .menu-btn { height: calc(var(--menu-h) - 6px); }
/* заливка наезжает снизу — тот же приём, что у .btn на всём сайте */
.menu-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); border-radius: inherit;
  transform: translateY(101%);
  transition: transform .55s var(--ease);
}
.menu-btn:hover { color: #fff; border-color: var(--ink); }
.menu-btn:hover::before { transform: translateY(0); }
.menu-btn:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; }

/* Иконка: три равные черты. Толщина и шаг заданы целыми пикселями —
   на 1,5px и дробном шаге верхняя черта попадала между рядами
   пикселей и на обычном экране почти пропадала. */
.menu-btn__icon { position: relative; display: block; flex: none; width: 20px; height: 14px; }
.menu-btn__icon span {
  position: absolute; left: 0; height: 2px; border-radius: 1px;
  background: currentColor;
  transition: transform .5s var(--ease), width .45s var(--ease), opacity .25s var(--ease);
}
.menu-btn__icon span:nth-child(1) { top: 0;   width: 20px; }
.menu-btn__icon span:nth-child(2) { top: 6px; width: 20px; }
.menu-btn__icon span:nth-child(3) { top: 12px; width: 20px; }
/* на наведении средняя черта поджимается — движение есть,
   но иконка не «мигает» и не меняет вес */
.menu-btn:hover .menu-btn__icon span:nth-child(2) { width: 12px; }

body.menu-open .menu-btn__icon span:nth-child(1) { top: 6px; transform: rotate(45deg); }
body.menu-open .menu-btn__icon span:nth-child(2) { width: 0; opacity: 0; }
body.menu-open .menu-btn__icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* МЕНЮ ⇄ ЗАКРЫТЬ: слова лежат в одной ячейке грида, поэтому ширина
   кнопки берётся по длинному из них и не скачет при переключении */
.menu-btn__label { display: grid; overflow: hidden; height: 1em; line-height: 1; }
.menu-btn__word {
  grid-area: 1 / 1;
  transition: transform .5s var(--ease), opacity .35s var(--ease);
}
.menu-btn__word--close { transform: translateY(105%); opacity: 0; }
body.menu-open .menu-btn__word--open  { transform: translateY(-105%); opacity: 0; }
body.menu-open .menu-btn__word--close { transform: none; opacity: 1; }

/* ---------- Правая группа ---------- */
.header__actions {
  justify-self: end;
  display: flex; align-items: center; gap: clamp(.5rem, .9vw, .95rem);
}

/* ---------- Переключатель языка ----------
   Все три языка видны сразу и переключаются одним нажатием — это
   обычные ссылки, поэтому работает и без JS (адреса им всё равно
   проставляет initLangSwitch в main.js, но в разметке они верные). */
.lang {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  height: var(--ctl-h); padding: 4px; border-radius: 100px;
  border: 1px solid rgba(11,30,42,.16); background: rgba(11,30,42,.03);
  transition: height .45s var(--ease), background-color .5s var(--ease),
              border-color .5s var(--ease);
}
.header.is-scrolled .lang { height: calc(var(--ctl-h) - 6px); }
.lang__opt {
  display: grid; place-content: center; min-width: 44px; height: 100%;
  padding: 0 .5rem; border-radius: 100px;
  font-family: var(--font-h); font-stretch: var(--hdr-wdth);
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-mut); white-space: nowrap;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.lang__opt:hover { color: var(--ink); background: rgba(11,30,42,.07); }
.lang__opt.is-current {
  background: var(--ink); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(11,30,42,.85);
}
.lang__opt.is-current:hover { background: var(--ink); color: #fff; }
.lang__opt:focus-visible { outline: 2px solid var(--tide); outline-offset: 2px; }

/* ---------- Кнопка заявки ----------
   Тёмная «пилюля» с золотой заливкой на наведении и стрелкой-указателем.
   Стрелка нарисована в ::after: текст кнопки приходит из Firebase через
   data-live-html и переписывает содержимое целиком, так что вложенный
   <span> со стрелкой там не выживет. */
.header__cta {
  --bg: var(--ink); --fg: #fff;
  height: var(--ctl-h); padding: 0 1.7rem 0 1.9rem; gap: .9em;
  font-family: var(--font-h); font-stretch: var(--hdr-wdth);
  font-size: clamp(.66rem, .74vw, .76rem); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap;
  transition: height .45s var(--ease), transform .5s var(--ease),
              box-shadow .5s var(--ease), color .4s var(--ease),
              background-color .5s var(--ease);
}
.header.is-scrolled .header__cta { height: calc(var(--ctl-h) - 6px); }
.header__cta::before { background: var(--gold); }
.header__cta::after {
  content: "→"; font-size: 1.15em; line-height: 1; letter-spacing: 0;
  transition: transform .4s var(--ease);
}
.header__cta:hover { color: var(--ink); }
.header__cta:hover::after { transform: translateX(4px); }

/* Русская шапка набирается не Archivo, а Roboto Flex (см. --font-h):
   у него мельче строчные и уже очко, поэтому при равном кегле русские
   подписи выглядели мельче английских. Добавляем ровно 1px — только RU. */
html[lang="ru"] .lang__opt { font-size: calc(.68rem + 1px); }
html[lang="ru"] .header__cta { font-size: calc(clamp(.66rem, .74vw, .76rem) + 1px); }
html[lang="ru"] .menu-btn { font-size: calc(.74rem + 1px); }

/* ---------- Появление шапки ----------
   body.loaded ставит main.js, когда уходит прелоадер: элементы шапки
   выезжают по очереди уже на открытом кадре, а не под занавесом. */
.menu-btn, .logo, .lang, .header__cta { opacity: 0; transform: translateY(-10px); }
body.loaded .menu-btn,
body.loaded .logo,
body.loaded .lang,
body.loaded .header__cta { animation: hdr-in .85s var(--ease-out) both; }
body.loaded .logo        { animation-delay: .05s; }
body.loaded .menu-btn    { animation-delay: .18s; }
body.loaded .lang        { animation-delay: .26s; }
body.loaded .header__cta { animation-delay: .32s; }
@keyframes hdr-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Шапка над открытым меню ----------
   Панель меню (z-index 800) проходит под шапкой (900): строка с
   логотипом и кнопками остаётся на месте, только перекрашивается в
   светлое — иначе белая полоса резала тёмный экран пополам. */
body.menu-open .header { background: transparent; box-shadow: none; }
body.menu-open .menu-btn { color: #fff; border-color: rgba(255,255,255,.32); }
body.menu-open .menu-btn::before { background: #fff; }
body.menu-open .menu-btn:hover { color: var(--ink); border-color: #fff; }

body.menu-open .lang { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.06); }
body.menu-open .lang__opt { color: rgba(255,255,255,.6); }
body.menu-open .lang__opt:hover { color: #fff; background: rgba(255,255,255,.12); }
body.menu-open .lang__opt.is-current { background: #fff; color: var(--ink); }
body.menu-open .lang__opt.is-current:hover { background: #fff; color: var(--ink); }

/* Кнопка заявки белая: тёмная «пилюля» на притемнённой странице
   пропадала. На наведении заливается тёмным — приём тот же. */
body.menu-open .header__cta { background: #fff; color: var(--ink); }
body.menu-open .header__cta::before { background: var(--ink); }
body.menu-open .header__cta:hover { color: #fff; }

/* ============================================================
   МЕНЮ — панель слева
   ------------------------------------------------------------
   Панель прижата к левому краю во всю высоту экрана и занимает
   примерно 45% ширины. Верх уходит под шапку: кнопка «Закрыть»
   ложится прямо на панель, остальная шапка — на притемнение.
   ============================================================ */
.mobile-menu {
  position: fixed; inset: 0; z-index: 800; color: var(--paper);
  display: block; padding: 0;
  background: rgba(8,22,31,.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  /* visibility ждёт конца затухания, иначе панель исчезала бы рывком */
  transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
body.menu-open .mobile-menu {
  opacity: 1; visibility: visible;
  transition: opacity .45s var(--ease), visibility 0s linear 0s;
}

.mobile-menu__inner {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: clamp(380px, 45vw, 900px);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--header-h) + clamp(1.2rem, 3.5vh, 2.6rem)) var(--hdr-pad) clamp(1.6rem, 4vh, 2.8rem);
  background: var(--ink);
  /* мягкая подсветка углов — ровная заливка выглядит плоско */
  background-image:
    radial-gradient(85% 55% at 0% 100%, rgba(46,107,79,.4), transparent 62%),
    radial-gradient(70% 45% at 100% 0%, rgba(192,160,98,.12), transparent 65%);
  box-shadow: 26px 0 70px -30px rgba(4,14,20,.8);
  opacity: 0; transform: translateX(-100%);
  transition: opacity .5s var(--ease), transform .65s var(--ease);
}
body.menu-open .mobile-menu__inner { opacity: 1; transform: none; }

/* список стоит по центру свободной высоты, контакты — у нижнего края */
.mobile-menu__nav { display: flex; flex-direction: column; flex: none; margin-block: auto; }

/* каждый пункт — своя маска: строка выезжает снизу, а не проявляется */
.mobile-menu__item {
  display: block; overflow: hidden;
  padding-block: .12em;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-menu__item:first-child { border-top: 1px solid rgba(255,255,255,.08); }

.mobile-menu__link {
  position: relative;
  display: flex; align-items: baseline; gap: 1.2rem;
  padding-block: clamp(.4rem, 1.3vh, .85rem);
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 2.3vw, 2.4rem);
  font-weight: 400; line-height: 1.2; color: var(--paper);
  opacity: 0; transform: translateY(115%);
  transition: opacity .7s var(--ease), transform .8s var(--ease), color .35s var(--ease);
}
body.menu-open .mobile-menu__link { opacity: 1; transform: none; }
.mobile-menu__item:nth-child(1) .mobile-menu__link { transition-delay: .18s; }
.mobile-menu__item:nth-child(2) .mobile-menu__link { transition-delay: .24s; }
.mobile-menu__item:nth-child(3) .mobile-menu__link { transition-delay: .30s; }
.mobile-menu__item:nth-child(4) .mobile-menu__link { transition-delay: .36s; }
.mobile-menu__item:nth-child(5) .mobile-menu__link { transition-delay: .42s; }
.mobile-menu__item:nth-child(6) .mobile-menu__link { transition-delay: .48s; }

.mobile-menu__idx {
  flex: none; width: 1.9em;
  font-family: var(--font-h); font-stretch: var(--hdr-wdth);
  font-size: .62rem; font-weight: 600; letter-spacing: .18em;
  color: rgba(192,160,98,.85);
  transition: color .35s var(--ease), transform .45s var(--ease);
}
.mobile-menu__link:hover { color: var(--gold); }
.mobile-menu__link:hover .mobile-menu__idx { transform: translateX(4px); color: var(--gold); }
/* текущая страница помечена в разметке aria-current="page" */
.mobile-menu__link[aria-current] { color: var(--mist); }
/* пункт ведёт на будущую отдельную страницу — пока некликабелен */
.mobile-menu__link--soon { color: var(--text-mut); cursor: default; pointer-events: none; }
.footer__soon { opacity: .5; cursor: default; }

/* Контакты в меню. Подписи «Контакты» над строчками нет: три ссылки
   и так читаются как контакты, а заголовок в панели только шумит. */
.mobile-menu__foot {
  display: flex; flex-direction: row; flex-wrap: wrap; flex: none;
  column-gap: 1.6rem; row-gap: .2rem;
  margin-top: clamp(1.4rem, 4vh, 2.6rem);
  opacity: 0; transform: translateY(10px);
  transition: opacity .6s var(--ease) .46s, transform .6s var(--ease) .46s;
}
body.menu-open .mobile-menu__foot { opacity: 1; transform: none; }
.mobile-menu__foot a {
  padding-block: .25rem;
  font-family: var(--font-b); font-size: .92rem; letter-spacing: .01em;
  color: rgba(244,246,247,.72); transition: color .3s var(--ease);
}
.mobile-menu__foot a:hover { color: var(--gold); }

/* ---------- Пороги шапки и панели ----------
   45% ширины хороши на большом мониторе; на планшете панель
   забирает больше места, на телефоне — весь экран. */
@media (max-width: 1100px) {
  :root { --ctl-h: 48px; --menu-h: 50px; }
  .header__cta { padding: 0 1.3rem 0 1.5rem; }
  .mobile-menu__inner { width: min(64vw, 560px); }
}
@media (max-width: 900px) {
  :root { --header-h: 74px; --hdr-h-min: 66px; --ctl-h: 42px; --menu-h: 44px; }
  .logo__img { height: 46px; }
  .header.is-scrolled .logo__img { height: 40px; }
  .lang__opt { min-width: 36px; }
  .menu-btn { padding: 0 1.15rem; gap: .7rem; font-size: .68rem; letter-spacing: .12em; }
}
@media (max-width: 760px) {
  .mobile-menu__inner { width: 100%; }
  /* размытие всей страницы на телефоне стоит слишком дорого,
     а видно из-под панели всё равно нечего */
  .mobile-menu { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* На узком экране в строку помещаются только меню, логотип и язык:
   кнопка заявки уходит — она и так дублируется в первом экране. */
@media (max-width: 680px) {
  .header__cta { display: none; }
  .menu-btn__label { display: none; }
  .menu-btn { width: var(--menu-h); padding: 0; justify-content: center; }
  .mobile-menu__link { font-size: clamp(1.5rem, 6.5vw, 1.9rem); }
  .mobile-menu__foot { column-gap: 1.1rem; }
  .mobile-menu__foot a { font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-btn, .logo, .lang, .header__cta { opacity: 1; transform: none; animation: none; }
  .mobile-menu { transition-duration: .01ms; }
  .mobile-menu__inner,
  .mobile-menu__link,
  .mobile-menu__foot { transition-duration: .01ms; transition-delay: 0s; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  margin-top: var(--header-h);
  /* не выше пропорций самой картинки (16:9) — иначе cover обрезает её по бокам
     и здания "наезжают" на текст */
  min-height: max(560px, min(calc(100svh - var(--header-h)), 56.25vw));
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(40px, 7.5vw, 150px) var(--gutter) clamp(32px, 6vh, 80px);
  overflow: hidden;
  background: #cfe0ea;
}
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #cfe0ea; }

/* Ролик первого экрана.
   Лежит поверх слайдшоу и проявляется только когда действительно пошёл
   (класс ставит main.js по событию playing). Пока этого не случилось —
   а на узком экране и при запрете автозапуска не случится вовсе — под ним
   видны прежние фотографии, и первый экран не пустеет. */
.hero__video {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: 0; transition: opacity 1.4s var(--ease);
  pointer-events: none;
}
.hero__video.is-live { opacity: 1; }

/* Затемнения первого экрана в css НЕТ — ни на одном языке, и это намеренно.
   Оно запечено прямо в файлы: ru/en/az/index.html берут кадры, постер и
   ролик из renders-in-use/dim/, куда их положил tools/hero-dim.py (там же,
   в константе STOPS, задана форма градиента — раньше она жила здесь).

   Причина: слой поверх кадра приходится смешивать на каждом кадре
   прокрутки, а первый экран на главной прибит (.intro .hero) — там любая
   работа за кадр выходит рывками, и на «вниз и сразу вверх» кадр мерцал.
   В запечённом виде поверх .hero__media не лежит вообще ничего.

   Вернуть вуаль в css (например, если понадобятся кадры без затемнения):
   правило .hero__media::after с градиентом, стопы взять из STOPS, и
   вернуть пути картинок с dim/ на renders-in-use/. */
.hero__slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transform: scale(1.08);
  opacity: 0; transition: opacity 1.5s var(--ease);
  will-change: transform, opacity;
}
.hero__slide.is-active { opacity: 1; }
/* длительность одного «отъезда» — меняется здесь */
.hero__slide.is-zooming { animation: heroZoom 9s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Заголовок и подпись лежат ПОВЕРХ слайдов, а слайд почти всё время в
   движении: heroZoom идёт 9 секунд и перезапускается на каждом следующем
   кадре (js/main.js), плюс кроссфейд по opacity. Пока текст живёт в одном
   слое с картинкой, Chrome перерисовывает буквы на каждом кадре этой
   анимации — на прокрутке это и читается как мерцание подписи.

   Лечится тем, что текст уезжает в собственный слой: он статичный,
   растрируется один раз и дальше только композитится поверх картинки.

   Именно will-change, хотя ниже у .cmp сказано его не держать постоянно.
   Там довод про три полноэкранные текстуры на весь сеанс, здесь текстура
   одна и маленькая — блок текста максимум 1100px в ширину. А привычный
   translateZ(0) не годится: Chrome сводит его к плоской матрице
   (getComputedStyle отдаёт matrix(1,0,0,1,0,0)), и как сигнал к отдельному
   слою он ненадёжен. backface-visibility гасит подрагивание на дробных
   смещениях от плавной прокрутки.

   Побочный эффект: в отдельном слое отключается субпиксельное сглаживание,
   белый текст на фото становится на волос мягче. Это и есть плата за то,
   что он перестаёт дрожать. */
.hero__content {
  position: relative; z-index: 1;
  width: 100%; max-width: 1100px; margin-inline: auto;
  text-align: center; color: #fff;
  will-change: transform;
  backface-visibility: hidden;
}
.hero__title {
  font-family: var(--font-b);
  font-weight: 200;
  color: #fff;
  font-size: clamp(2.15rem, 4.95vw, 6rem);
  line-height: .97;
  letter-spacing: -.005em;
  margin: 0;
}
.hero__title em { font-style: normal; color: #fff; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span { display: block; }

.hero__sub {
  font-family: var(--font-b);
  font-weight: 300;
  font-size: clamp(.92rem, 1.25vw, 1.4rem);
  color: rgba(255,255,255,.95);
  letter-spacing: .005em;
  margin: clamp(.7rem, 2.6vw, 1.5rem) auto 0;
  max-width: 46ch;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.about__media { position: relative; }
.media-frame {
  position: relative; overflow: hidden; border-radius: var(--r);
  aspect-ratio: 4/5; box-shadow: 0 40px 80px -50px rgba(11,30,42,.6);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.media-frame:hover img { transform: scale(1.05); }
.media-frame::after {
  content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.14); border-radius: inherit; pointer-events: none;
}
.about__badge {
  position: absolute; right: -14px; bottom: 30px;
  background: var(--ink); color: var(--paper); font-size: .68rem; letter-spacing: .25em;
  text-transform: uppercase; padding: .8rem 1.3rem; border-left: 2px solid var(--gold);
}
.about__stats { display: flex; gap: clamp(1.5rem,3vw,2.5rem); margin: 2.4rem 0; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
/* шрифт цифр — общий с карточками «минут», см. хелпер .num ниже */
.stat__num { font-size: clamp(2.2rem,4vw,3.2rem); color: var(--tide); line-height: 1; }
.stat__label { font-size: .82rem; color: var(--text-mut); margin-top: .5rem; max-width: 14ch; }

/* ---------- Wave divider (signature) ---------- */
.wave-divider { overflow: hidden; line-height: 0; opacity: .6; }
.wave-divider svg { width: 140%; height: 60px; margin-left: -20%; animation: waveShift 18s linear infinite; }
@keyframes waveShift { from { transform: translateX(0);} to { transform: translateX(-14.28%);} }

/* ============================================================
   ПРОЕКТ И РЕАЛЬНОСТЬ — шторка сравнения

   Два кадра одного двора: рендер и фотография, снятые почти из одной
   точки и сведённые по геометрии заранее (одинаковый кадр, одинаковый
   размер файла) — иначе при перетаскивании шторки картинка «прыгает».

   Главное здесь — стоимость кадра при перетаскивании. Ни clip-path, ни
   ширина окна не годятся: и то и другое заставляет браузер каждый кадр
   заново рисовать двухмегапиксельную картинку. Вместо этого окно
   .cmp__after и кадр внутри него ездят встречными transform: окно
   открывается, кадр остаётся на месте, а работа целиком уходит на
   видеокарту — ни раскладки, ни перерисовки.
   ============================================================ */
.compare { background: var(--paper-2); }

.cmp {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: clamp(2rem, 4vw, 3.4rem);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--ink-2);
  /* перерисовка не выходит за рамку кадра */
  contain: layout paint style;
  /* по вертикали страница листается как обычно; горизонталь забирает
     себе только сама рукоятка (см. .cmp__grip) */
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.cmp__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  pointer-events: none; -webkit-user-drag: none;
}
/* Кадры грузятся врозь, и на миг было видно половину сравнения на пустой
   подложке. Ждём оба и показываем разом. Класс ставит и снимает JS —
   без него картинки видны сразу, так что при отключённом скрипте секция
   не пропадает. */
.cmp.is-loading .cmp__img { opacity: 0; }
.cmp__img { transition: opacity .5s var(--ease); }

.cmp__after { position: absolute; inset: 0; overflow: hidden; transform: translate3d(50%, 0, 0); }
.cmp__after-inner { position: absolute; inset: 0; transform: translate3d(-50%, 0, 0); }
.cmp__bar { position: absolute; inset: 0; pointer-events: none; transform: translate3d(50%, 0, 0); }

/* Слой поднимаем на видеокарту только пока с ним работают: постоянный
   will-change держал бы в памяти три текстуры на весь сеанс. */
.cmp.is-live .cmp__after,
.cmp.is-live .cmp__after-inner,
.cmp.is-live .cmp__bar { will-change: transform; }

/* Первое появление: шторка приоткрывается сама — иначе не видно, что её
   можно тянуть. Дальше переходов нет, движение идёт кадр в кадр с рукой. */
.cmp.is-intro .cmp__after,
.cmp.is-intro .cmp__after-inner,
.cmp.is-intro .cmp__bar { transition: transform 1s var(--ease-out); }

.cmp__line {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 2px; margin-left: -1px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 14px rgba(11, 30, 42, .45);
}

.cmp__grip {
  position: absolute; top: 50%; left: 0;
  transform: translate(-50%, -50%);
  display: flex; align-items: stretch; gap: 5px;
  padding: 0; border: 0; background: none;
  pointer-events: auto;
  cursor: ew-resize;
  touch-action: none;          /* рукоятка тянется пальцем */
  -webkit-tap-highlight-color: transparent;
}
.cmp__grip:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 100px; }

.cmp__tag {
  writing-mode: vertical-rl;
  display: inline-flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 1.6vw, 1.5rem) clamp(.5rem, .68vw, .66rem);
  border-radius: 100px;
  font-size: clamp(.6rem, .74vw, .72rem);
  letter-spacing: .22em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 6px 22px -10px rgba(11, 30, 42, .6);
}
.cmp__tag--before { background: #fff; color: var(--ink); }
.cmp__tag--after { background: var(--ink); color: #fff; }

@media (max-width: 900px) {
  .cmp { aspect-ratio: 3 / 2; }
}
@media (max-width: 560px) {
  .cmp { aspect-ratio: 4 / 3; }
  .cmp__tag { padding: .9rem .46rem; font-size: .58rem; letter-spacing: .16em; }
}
@media (prefers-reduced-motion: reduce) {
  .cmp.is-intro .cmp__after,
  .cmp.is-intro .cmp__after-inner,
  .cmp.is-intro .cmp__bar { transition: none; }
}

/* Цифры статистики: единая высота и общая базовая линия во всех карточках.
   `.num` — общий хелпер, чтобы позже раскатать на остальные секции. */
.num,
.stat__num {
  font-family: var(--font-n);
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: "lnum" 1, "pnum" 1;
  font-weight: 500;
  letter-spacing: -.015em;
}

/* ============================================================
   LIFESTYLE / BOULEVARD
   ============================================================ */
.lifestyle { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
.lifestyle__media { position: absolute; inset: -8% 0 0 0; z-index: -1; }
.lifestyle__media img { width: 100%; height: 116%; object-fit: cover; }
.lifestyle__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,30,42,.15) 0%, rgba(11,30,42,.7) 60%); }
.lifestyle__inner { display: flex; justify-content: flex-end; }
/* без backdrop-filter: размытие подложки браузер пересчитывает на каждом
   кадре прокрутки, пока элемент на экране, — подложка просто плотнее */
.lifestyle__card {
  background: rgba(11,30,42,.74);
  border: 1px solid rgba(255,255,255,.1); border-radius: 6px;
  padding: clamp(2rem, 4vw, 3.4rem); max-width: 520px; color: #fff;
}
.lifestyle__title { font-family: var(--font-d); font-weight: 400; font-size: clamp(2rem,4.5vw,3.4rem); line-height: 1.04; margin-bottom: 1.4rem; }
.lifestyle__text { color: rgba(255,255,255,.82); margin-bottom: 2rem; font-weight: 300; line-height: 1.8; }

/* ============================================================
   TOUR placeholder
   ============================================================ */
.tour { background: var(--ink); color: var(--paper); }
.tour .h-display { color: #fff; }
.tour .eyebrow { color: var(--mist); }
.tour .section-head__note { color: rgba(255,255,255,.62); }

.tour-embed {
  position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12); background: var(--ink-2);
}
.tour-embed__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.tour-embed__scrim { position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(11,30,42,.3), rgba(11,30,42,.82)); }
.tour-embed__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem; }
.tour-play {
  position: relative; width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-content: center; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.35);
  transition: transform .5s var(--ease), background .4s;
}
.tour-play:hover { transform: scale(1.06); background: rgba(192,160,98,.25); }
.tour-play svg { margin-left: 4px; }
.tour-play__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(192,160,98,.55); animation: pulse 2.6s ease-out infinite; }
.tour-play__ring--2 { animation-delay: 1.3s; }
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
.tour-embed__badge { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.tour-embed__soon {
  position: absolute; top: 1.2rem; left: 1.2rem; z-index: 2;
  font-size: .68rem; letter-spacing: .25em; text-transform: uppercase;
  padding: .5rem 1rem; border: 1px solid var(--gold); color: var(--gold); border-radius: 100px;
}
.tour-embed__corner { position: absolute; width: 26px; height: 26px; border-color: rgba(255,255,255,.4); border-style: solid; border-width: 0; }
.tour-embed__corner--tl { top: 14px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.tour-embed__corner--tr { top: 14px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
.tour-embed__corner--bl { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
.tour-embed__corner--br { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }
/* --- Живой 360° тур (iframe подгружается по клику) --- */
.tour-embed__frame {
  position: absolute; inset: 0; z-index: 3;
  width: 100%; height: 100%; border: 0; display: block;
  opacity: 0; animation: tourIn .7s var(--ease) forwards;
}
@keyframes tourIn { to { opacity: 1; } }
.tour-embed.is-live .tour-embed__bg,
.tour-embed.is-live .tour-embed__scrim,
.tour-embed.is-live .tour-embed__center,
.tour-embed.is-live .tour-embed__corner {
  opacity: 0; pointer-events: none; transition: opacity .45s var(--ease);
}
.tour-embed__loader {
  position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%,-50%);
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.tour-embed.is-ready .tour-embed__loader { opacity: 0; pointer-events: none; transition: opacity .4s; }
.tour-fs {
  position: absolute; z-index: 5; right: 14px; bottom: 14px;
  display: none; align-items: center; gap: .5rem;
  padding: .55rem .9rem; border-radius: 100px;
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: #fff; background: rgba(11,30,42,.72); border: 1px solid rgba(255,255,255,.28);
  transition: background .3s, border-color .3s;
}
.tour-fs:hover { background: rgba(192,160,98,.35); border-color: var(--gold); }
.tour-embed.is-live .tour-fs { display: inline-flex; }
.tour-embed:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }

.tour__hint { text-align: center; margin-top: 2.2rem; color: rgba(255,255,255,.6); }
.tour__hint a { color: var(--gold); font-weight: 600; }
.tour__hint a:hover { text-decoration: underline; }

/* ============================================================
   ВИДЕО О PARK RESIDENCES
   Full-bleed постер с заголовком и круглой кнопкой. YouTube
   подгружается только по клику (см. initVideo в js/main.js),
   поэтому до нажатия на странице нет сторонних скриптов и куки.
   ============================================================ */
.video-block { background: var(--ink); }
.video-embed {
  position: relative; overflow: hidden;
  height: clamp(460px, 88vh, 940px);
  background: var(--ink);
}
.video-embed__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* мягкое затемнение к центру + общий градиент: заголовок читается
   на любом кадре превью, картинка при этом остаётся живой */
.video-embed__scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(62% 56% at 50% 46%, rgba(11,30,42,.30), rgba(11,30,42,0) 72%),
    linear-gradient(180deg, rgba(11,30,42,.36), rgba(11,30,42,.24) 45%, rgba(11,30,42,.46));
}
.video-embed__center {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(1.1rem, 2vw, 2.4rem);
  padding: 0 var(--gutter); text-align: center;
}
.video-embed__title {
  font-family: var(--font-g);
  font-weight: 300;
  font-size: clamp(2rem, 4.3vw, 4.9rem);
  line-height: 1.12;
  color: #fff;
  text-shadow: 0 2px 30px rgba(11,30,42,.4);
}
.video-play {
  width: clamp(62px, 4.4vw, 82px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-content: center;
  background: #fff; color: var(--accent); border: 0; cursor: pointer;
  box-shadow: 0 12px 44px rgba(11,30,42,.3);
  transition: transform .5s var(--ease), background .4s;
}
.video-play svg { width: clamp(21px, 1.5vw, 28px); height: auto; margin-left: 3px; }
.video-play:hover { transform: scale(1.07); background: var(--paper); }
.video-embed__frame {
  position: absolute; inset: 0; z-index: 3;
  width: 100%; height: 100%; border: 0; display: block;
}
/* после запуска блок принимает пропорции ролика, иначе YouTube
   добавляет чёрные поля по бокам */
.video-embed.is-live { height: auto; aspect-ratio: 16/9; }
.video-embed.is-live .video-embed__bg,
.video-embed.is-live .video-embed__scrim,
.video-embed.is-live .video-embed__center {
  opacity: 0; pointer-events: none; transition: opacity .45s var(--ease);
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: clamp(.8rem,1.5vw,1.2rem); }
.g-item { position: relative; overflow: hidden; border-radius: var(--r); background: var(--tide); }
.g-item--wide { grid-column: span 2; }
.g-item--tall { grid-row: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.g-item::after { content: ""; position: absolute; inset: 0; background: rgba(11,30,42,.25); opacity: 0; transition: opacity .5s var(--ease); }
.g-item:hover img { transform: scale(1.07); }
.g-item:hover::after { opacity: 1; }
.g-item__plus {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink);
  display: grid; place-content: center; font-size: 1.4rem; font-weight: 300;
  opacity: 0; scale: .8; transition: all .5s var(--ease); z-index: 2;
}
.g-item:hover .g-item__plus { opacity: 1; scale: 1; }

/* ============================================================
   NEWS
   ============================================================ */
.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(1.2rem,2.5vw,2rem); }
.news-card { display: flex; flex-direction: column; background: var(--foam); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.news-card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(11,30,42,.35); }
.news-card__media { aspect-ratio: 3/2; overflow: hidden; background: var(--tide); }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.news-card:hover .news-card__media img { transform: scale(1.06); }
.news-card__body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.news-card__date { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--tide); }
.news-card__body h3 { font-family: var(--font-d); font-weight: 500; font-size: 1.4rem; line-height: 1.2; color: var(--ink); }
.news-card__body p { color: var(--text-mut); font-size: .95rem; flex: 1; }
.news-card__more { font-weight: 600; font-size: .9rem; color: var(--gold); }

/* ============================================================
   PLANNING (планировки — превью на главной + отдельная страница)
   ============================================================ */
.plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
/* Типов планировок три (трёшек в проекте нет), и на четырёх колонках
   ряд оставался неполным. */
.plans-grid--3 { grid-template-columns: repeat(3, 1fr); }
.plan-tile__area {
  flex-basis: 100%; font-size: .78rem; letter-spacing: .02em; color: var(--text-mut);
  font-variant-numeric: tabular-nums; margin-top: -.35rem;
}

/* Превью на главной: первая планировка типа + ссылка «Больше» */
.plan-tile { display: flex; flex-direction: column; }
.plan-tile__media {
  display: block; position: relative; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--foam); padding: clamp(.7rem, 1.4vw, 1.2rem);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.plan-tile__media img { width: 100%; height: 100%; object-fit: contain; }
.plan-tile:hover .plan-tile__media { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(11,30,42,.35); border-color: var(--mist); }
.plan-tile__foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; margin-top: .95rem;
}
.plan-tile__type { font-family: var(--font-d); font-size: 1.35rem; line-height: 1.1; color: var(--ink); }
.plan-tile__more {
  display: inline-flex; align-items: center; gap: .45em;
  font-weight: 600; font-size: .9rem; color: var(--tide);
  border-bottom: 1px solid var(--gold); padding-bottom: .12em;
  transition: color .35s var(--ease), gap .35s var(--ease);
}
.plan-tile__more:hover { color: var(--ink); gap: .8em; }

/* Отдельная страница со всеми планировками */
.plans-page { padding-top: calc(var(--header-h) + clamp(2.2rem, 5vw, 4.4rem)); padding-bottom: var(--sect-y); }
.plans-page__head { margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem); }
.plans-page__back {
  /* flex, а не inline-flex: .eyebrow ниже — тоже inline-flex и иначе
     встаёт в одну строку со ссылкой «назад» */
  display: flex; width: fit-content; align-items: center; gap: .5em; margin-bottom: 1.2rem;
  font-size: .85rem; font-weight: 600; color: var(--text-mut); transition: color .3s var(--ease);
}
.plans-page__back:hover { color: var(--tide); }

.plans-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: clamp(1.8rem, 3vw, 2.6rem); }
.plans-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.plan-item { display: flex; flex-direction: column; }
.plan-item.is-hidden { display: none; }
/* Кадр плана. Подъём на наведение живёт здесь, а не на .plan-item__media:
   кнопка «Связаться» лежит рядом с планом (вложенные <button> нельзя),
   и вместе они должны двигаться одним блоком. */
.plan-item__stage { position: relative; transition: transform .5s var(--ease); }
.plan-item__media {
  display: block; width: 100%; cursor: zoom-in;
  position: relative; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--foam); padding: clamp(.7rem, 1.4vw, 1.2rem);
  transition: box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.plan-item__media img { width: 100%; height: 100%; object-fit: contain; }
.plan-item:hover .plan-item__stage { transform: translateY(-6px); }
.plan-item:hover .plan-item__media { box-shadow: 0 30px 50px -30px rgba(11,30,42,.35); border-color: var(--mist); }
.plan-item__zoom, .plan-item__ask {
  position: absolute; bottom: 12px; height: 38px;
  background: rgba(11,30,42,.82); color: #fff; line-height: 1;
  opacity: 0; scale: .9;
  transition: opacity .4s var(--ease), scale .4s var(--ease), background .3s var(--ease);
}
.plan-item__zoom {
  right: 12px; width: 38px; border-radius: 50%; display: grid; place-content: center;
  font-size: 1.3rem;
}
.plan-item__zoom::before { content: "+"; margin-top: -.12em; }
.plan-item__ask {
  left: 12px; display: grid; place-content: center; padding-inline: 1.05rem;
  border-radius: 100px; font-size: .78rem; font-weight: 500; letter-spacing: .02em;
}
.plan-item__ask:hover { background: var(--tide); }
.plan-item:hover .plan-item__zoom, .plan-item:focus-within .plan-item__zoom,
.plan-item:hover .plan-item__ask, .plan-item:focus-within .plan-item__ask { opacity: 1; scale: 1; }
/* на тач-экранах наведения нет — иначе кнопки не показать вовсе */
@media (hover: none) {
  .plan-item__zoom, .plan-item__ask { opacity: 1; scale: 1; }
}
.plan-item__foot { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-top: .85rem; }
.plan-item__type { font-family: var(--font-d); font-size: 1.2rem; color: var(--ink); line-height: 1.1; }
.plan-item__idx { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mut); }
.plans-empty { padding: 3rem 0; color: var(--text-mut); }
.plans-cta { text-align: center; margin-top: clamp(2.5rem, 5vw, 4rem); color: var(--text-mut); }
.plans-cta button { color: var(--tide); font-weight: 600; }
.plans-cta button:hover { text-decoration: underline; }

@media (max-width: 1100px) { .plans-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .plans-grid, .plans-grid--3, .plans-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .plans-grid, .plans-grid--3, .plans-gallery { grid-template-columns: 1fr; } }

/* ============================================================
   LOCATION / MAP
   ============================================================ */
.location { background: var(--paper-2); }
.map-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.6rem; }
.chip {
  padding: .6em 1.2em; border-radius: 100px; border: 1px solid var(--line);
  font-size: .85rem; font-weight: 500; color: var(--text-mut);
  transition: all .35s var(--ease);
}
.chip span { color: var(--gold); font-weight: 700; }
.chip:hover { border-color: var(--tide); color: var(--ink); }
.chip--active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip--active span { color: var(--gold); }
/* z-index: 0 создаёт свой контекст наложения: внутренние слои Leaflet
   (у контролов +/− z-index 1000) больше не лезут поверх шапки (900) */
.map-wrap { position: relative; z-index: 0; isolation: isolate; aspect-ratio: 16/8; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(11,30,42,.4); background: #eef1f3; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }
.map-canvas { width: 100%; height: 100%; }
.map-fallback { padding: 2.5rem 1.5rem; text-align: center; color: var(--text-mut); }

/* Тайлы OpenStreetMap приводим к светло-серому виду (как CARTO Positron):
   фильтры попиксельные, поэтому швов между тайлами не появляется. */
.leaflet-layer.map-tiles { filter: grayscale(1) contrast(.78) brightness(1.16); }

/* Брендовая метка-карточка поверх встроенной карты */
.map-place {
  position: absolute; left: clamp(14px, 3vw, 26px); bottom: clamp(14px, 3vw, 26px);
  z-index: 2; display: flex; align-items: flex-start; gap: .85rem;
  max-width: min(320px, calc(100% - 2.2rem));
  padding: .95rem 1.15rem; border-radius: 14px;
  background: rgba(255,255,255,.95);   /* без backdrop-filter — см. .lifestyle__card */
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 22px 48px -24px rgba(11,30,42,.55), 0 2px 8px -4px rgba(11,30,42,.25);
  font-family: var(--font-b);
  animation: mapPlaceIn .7s var(--ease-out) both;
}
.map-place__pin {
  position: relative; flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px; color: var(--ink);
  background: linear-gradient(150deg, var(--paper) 0%, #dfe7ea 100%);
  box-shadow: inset 0 0 0 1px rgba(11,30,42,.08);
}
.map-place__pin::after {
  content: ""; position: absolute; inset: -6px; border-radius: 16px;
  border: 2px solid var(--gold); opacity: 0; animation: mapPinPulse 2.6s ease-out infinite;
}
.map-place__body { display: flex; flex-direction: column; min-width: 0; }
.map-place__body strong {
  font-family: var(--font-d); font-weight: 600; font-size: 1.28rem;
  line-height: 1.1; color: var(--ink); letter-spacing: .01em;
}
.map-place__body > span { font-size: .82rem; color: var(--text-mut); margin-top: .2rem; }
.map-place__dir {
  display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start;
  margin-top: .7rem; padding: .42rem .8rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; letter-spacing: .01em;
  color: #fff; background: var(--tide); text-decoration: none;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.map-place__dir svg { transition: transform .25s var(--ease); }
.map-place__dir:hover { background: var(--ink); transform: translateY(-1px); }
.map-place__dir:hover svg { transform: translateX(3px); }

@keyframes mapPlaceIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mapPinPulse {
  0%   { opacity: .55; transform: scale(.82); }
  70%  { opacity: 0;   transform: scale(1.15); }
  100% { opacity: 0;   transform: scale(1.15); }
}
@media (max-width: 700px) {
  .map-place { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .map-place { animation: none; }
  .map-place__pin::after { animation: none; }
}

/* карточка объекта в всплывашке Google */
.map-iw { font-family: var(--font-b); min-width: 150px; padding: 2px 2px 0; }
.map-iw b { display: block; font-weight: 600; font-size: .95rem; color: #131426; }
.map-iw span { display: block; font-size: .78rem; color: var(--text-mut); margin-top: .15rem; }
.map-iw a { display: inline-block; margin-top: .5rem; font-size: .82rem; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
/* --- Leaflet: метки-пины и всплывашки под брендовую палитру --- */
.map-pin { background: none; border: 0; }
.map-pin svg { display: block; filter: drop-shadow(0 4px 6px rgba(11,30,42,.32)); }
/* подпись с названием над меткой: дисплейный шрифт, «стеклянная» плашка,
   без стрелки и рамки, которые Leaflet рисует по умолчанию */
.map-label,
.leaflet-tooltip.map-label {
  padding: 3px 10px; border: 0; border-radius: 100px;
  background: rgba(255,255,255,.95);   /* без backdrop-filter — см. .lifestyle__card */
  box-shadow: 0 8px 20px -12px rgba(11,30,42,.75), 0 0 0 1px rgba(11,30,42,.06);
  font-family: var(--font-d); font-weight: 600; font-size: .92rem; line-height: 1.25;
  letter-spacing: .02em; color: var(--ink); white-space: nowrap;
}
.map-label::before { display: none; }          /* уголок-стрелка не нужен */
.map-label.map-label--home,
.leaflet-tooltip.map-label--home {
  background: var(--ink); color: #fff; font-size: 1.05rem; padding: 4px 13px;
  box-shadow: 0 10px 24px -12px rgba(11,30,42,.9);
}
/* подпись, налезшая на соседнюю, — скрываем (см. declutter в main.js) */
.map-label.is-hidden { visibility: hidden; }
@media (max-width: 700px) {
  .map-label, .leaflet-tooltip.map-label { font-size: .82rem; padding: 2px 8px; }
  .map-label--home { font-size: .95rem; }
}
.leaflet-container { font-family: var(--font-b); background: #eef1f3; }
.leaflet-popup-content-wrapper {
  border-radius: 8px; box-shadow: 0 18px 40px -20px rgba(11,30,42,.5);
}
.leaflet-popup-content { margin: 12px 14px; line-height: 1.4; }
.leaflet-bar a { color: var(--ink); }

@media (max-width: 700px) { .map-wrap { aspect-ratio: 4/5; } }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--ink); color: var(--paper); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem,6vw,6rem); align-items: start; }
.contact__title { font-family: var(--font-d); font-weight: 400; font-size: clamp(2.2rem,5vw,3.8rem); line-height: 1.03; color: #fff; margin: 1rem 0 1.4rem; }
.contact__lead { color: rgba(255,255,255,.68); max-width: 40ch; margin-bottom: 2.4rem; font-weight: 300; }
.contact__list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.contact__list li { display: flex; flex-direction: column; gap: .2rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.contact__list span { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mist); }
.contact__list a { color: #fff; font-size: 1.15rem; font-family: var(--font-d); }
.contact__list a:hover { color: var(--gold); }

.contact__form { display: flex; flex-direction: column; gap: 1.3rem; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: clamp(1.6rem,3vw,2.6rem); }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,.22);
  color: #fff; font-family: inherit; font-size: 1rem; padding: .9rem 0 .7rem; outline: none;
  transition: border-color .4s var(--ease);
}
/* Без уголка-растяжки: первая отрисовка нативного «resizer» стоила видеокарте
   200–300 мс — это был самый длинный кадр на всей главной, ровно в момент,
   когда форма въезжала в экран. Поле и так прокручивается внутри себя. */
.field textarea { resize: none; }
.field label {
  position: absolute; left: 0; top: .9rem; color: rgba(255,255,255,.55); font-size: 1rem;
  pointer-events: none; transition: all .35s var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: -.6rem; font-size: .72rem; letter-spacing: .1em; color: var(--gold);
}
/* Метка телефона поднята всегда: в поле сразу виден код страны. Отдельным
   правилом, а не в списке выше: селекторы там опираются на соседство
   input + label, а intl-tel-input оборачивает input в .iti и это соседство
   рвётся. Специфичность (0,3,0) — иначе перебивает .field label. */
.contact__form .field .label--tel {
  top: -.6rem; font-size: .72rem; letter-spacing: .1em; color: var(--gold);
}
.consent { display: flex; align-items: flex-start; gap: .7rem; font-size: .85rem; color: rgba(255,255,255,.6); cursor: pointer; }
.consent input { accent-color: var(--gold); margin-top: 3px; }
/* подпись ведёт на PDF с согласием — подчёркиваем, чтобы читалась как ссылка */
.consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.consent a:hover { color: var(--gold); }
.form-status { font-size: .9rem; min-height: 1em; }
.form-status.ok { color: #7fd6a5; }
.form-status.err { color: #ff8d82; }

/* ── Поле телефона: флаг и код страны (intl-tel-input) ──────────────
   Библиотека оборачивает input[type=tel] в .iti и ставит слева кнопку
   выбора страны; код страны показан префиксом, в значении поля его нет —
   полный номер собирает main.js перед отправкой (fullPhone).
   Если библиотека не загрузилась, поле остаётся обычным input.
   Список стран на телефоне открывается на весь экран и живёт в <body>,
   поэтому его вид задаётся здесь глобально, а не через .contact__form. */
.iti {
  display: block; width: 100%;
  /* серую подложку под флагом гасим: внутри «пилюли» и на подчёркивании
     она читается как артефакт. На наведение отвечает каретка */
  --iti-hover-color: transparent;
  --iti-spacer-horizontal: 10px;
}
/* Размер флагов (--iti-flag-width / --iti-flag-height) не трогать!
   Флаг — окно 16×12 в спрайте 3904×12 со смещением по стране
   (.iti__az { --iti-flag-offset: -240px }). Любой другой размер сдвигает
   окно, и в флаг попадает полоска соседней страны — то есть на месте
   одного флага рисуется часть чужого. Масштабировать можно только вместе
   со --iti-flag-sprite-width/height и всеми смещениями, чего не стоит делать. */
.iti__country-container:hover .iti__arrow { border-top-color: var(--accent); }

/* Карточка со списком: белая, скруглённая, мягкая тень — как панель заявки. */
.iti__dropdown-content {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 10px; min-width: 290px; color: var(--text);
  font-family: var(--font-b); font-size: .95rem;
  box-shadow: 0 26px 54px -26px rgba(11,30,42,.55);
}
.iti--inline-dropdown .iti__dropdown-content { margin-top: 10px; }
/* поиск — такое же поле-«пилюля», как в форме; убираем чёрную рамку
   фокуса по умолчанию, вместо неё мягкое кольцо в цвете акцента */
/* Селектор с [type] намеренно: в контактной форме поле поиска попадает под
   .field input (белый текст, прозрачный фон, свои отступы) — на белой карточке
   получался белый текст на белом. [type="text"] добавляет вес и перебивает.
   height + line-height: normal — иначе поле наследует межстрочный интервал
   страницы (24px), текст встаёт по нему и уезжает вниз от центра «пилюли». */
.iti__search-input[type="text"] {
  /* flex: none — на телефоне список открывается на весь экран, там поле
     становится flex-элементом и без этого сжимается вдвое */
  width: 100%; height: 44px; flex: none; padding: 0 .85rem; line-height: normal;
  font-family: var(--font-b); font-size: .92rem; color: var(--text);
  background: var(--foam); border: 1px solid var(--line); border-radius: 100px;
  outline: none; transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.iti__search-input[type="text"]::placeholder { color: #98a6b4; }
.iti__search-input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,125,162,.14); }
.iti__search-input + .iti__country-list { border-top: none; margin-top: 8px; }
.iti__country { padding: .5rem .8rem; border-radius: 12px; }
.iti__country-name { color: var(--text); }
.iti__dial-code { color: var(--text-mut); }
.iti__country.iti__highlight { background: rgba(99,125,162,.12); }
.iti--inline-dropdown .iti__country-list { max-height: 236px; }
/* системная полоса прокрутки здесь слишком груба */
.iti__country-list { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(11,30,42,.22) transparent; }
.iti__country-list::-webkit-scrollbar { width: 6px; }
.iti__country-list::-webkit-scrollbar-track { background: transparent; }
.iti__country-list::-webkit-scrollbar-thumb { background: rgba(11,30,42,.2); border-radius: 100px; }
/* на телефоне список открывается на весь экран */
.iti--fullscreen-popup .iti__dropdown-content { border-radius: 22px; padding: 12px; }
.iti--fullscreen-popup .iti__country { padding: .7rem .8rem; }

/* контактная форма — тёмный фон, поля-подчёркивания */
.contact__form .iti { --iti-arrow-color: rgba(255,255,255,.5); }
.contact__form .iti__selected-country-primary { padding-left: 0; }
.contact__form .iti__selected-dial-code { color: #fff; }
.contact__form .iti__country-container:hover .iti__arrow { border-top-color: var(--gold); }

/* согласие не отмечено: подсвечиваем сам чекбокс — из одного текста
   в статусе не видно, что именно просят сделать */
.consent.is-invalid { color: #ff8d82; }
.consent.is-invalid input { outline: 2px solid #ff8d82; outline-offset: 3px; accent-color: #ff8d82; }
.drawer__consent.is-invalid { color: #c0342b; }
.drawer__consent.is-invalid input { outline: 2px solid #c0342b; outline-offset: 3px; accent-color: #c0342b; }
@media (prefers-reduced-motion: no-preference) {
  .consent.is-invalid, .drawer__consent.is-invalid { animation: consent-nudge .45s var(--ease); }
}
@keyframes consent-nudge {
  20% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  100% { transform: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #08161f; color: var(--paper); padding-top: clamp(3.5rem,7vw,6rem); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3.5rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.logo--footer { color: #fff; margin-bottom: 1.4rem; }
.footer__about { color: rgba(255,255,255,.55); font-size: .92rem; max-width: 30ch; line-height: 1.7; }
.footer__col { display: flex; flex-direction: column; gap: .7rem; }
.footer__col h4 { font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mist); margin-bottom: .6rem; font-weight: 600; }
.footer__col a, .footer__col span, .footer__col p { color: rgba(255,255,255,.68); font-size: .92rem; }
.footer__col a { transition: color .3s; }
.footer__col a:hover { color: var(--gold); }
.footer__col p { line-height: 1.7; margin-bottom: .4rem; }
.footer__socials { display: flex; gap: .6rem; margin-top: .6rem; }
.footer__socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); display: grid; place-content: center; font-size: .72rem; font-weight: 600; }
.footer__socials svg { display: block; }
.footer__socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.footer__cta-col .btn { margin-top: .6rem; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.8rem; flex-wrap: wrap; font-size: .82rem; color: rgba(255,255,255,.45); }
.footer__legal { display: flex; gap: 1.6rem; }
.footer__legal a:hover { color: var(--gold); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(8,16,22,.94); display: grid; place-content: center; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: 90vw; max-height: 84vh; border-radius: 4px; box-shadow: 0 30px 80px rgba(0,0,0,.6); transform: scale(.96); transition: transform .5s var(--ease); }
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close, .lightbox__nav { position: absolute; color: #fff; width: 54px; height: 54px; border-radius: 50%; display: grid; place-content: center; font-size: 2rem; line-height: 1; border: 1px solid rgba(255,255,255,.2); transition: background .3s; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.12); }
.lightbox__close { top: 24px; right: 24px; font-size: 1.6rem; }
.lightbox__nav { top: 50%; translate: 0 -50%; }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }

/* ============================================================
   REVEAL animations
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: none; }

[data-reveal-mask] > span { display: block; transform: translateY(105%); transition: transform 1s var(--ease); }
[data-reveal-mask].is-in > span { transform: translateY(0); }

/* graceful image fallback */
.no-img { background: linear-gradient(135deg, var(--tide), var(--ink)); }
.no-img img { opacity: 0; }

/* ============================================================
   Боковая панель заявки
   ============================================================ */
.drawer { position: fixed; inset: 0; z-index: 1000; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(11,30,42,.45);
  opacity: 0; transition: opacity .5s var(--ease);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(640px, 100%);
  background: #fff; color: var(--text);
  padding: clamp(28px, 4vw, 52px) clamp(20px, 3.4vw, 52px);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform .6s var(--ease);
  box-shadow: -30px 0 80px -40px rgba(11,30,42,.6);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close {
  position: absolute; top: clamp(22px, 3vw, 40px); right: clamp(20px, 3vw, 44px);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-content: center;
  border: 1px solid rgba(11,30,42,.14); color: #131426;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.drawer__close:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.drawer__title {
  font-family: var(--font-b); font-weight: 400; color: #131426;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.2;
  padding-right: 64px; margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}
.drawer__form { display: flex; flex-direction: column; flex: 1; }
.drawer__fields { display: flex; flex-direction: column; gap: 14px; }
.drawer__input {
  width: 100%; font: inherit; color: #131426;
  padding: 1.15rem 1.4rem;
  background: #fff; border: 1px solid rgba(11,30,42,.16); border-radius: 100px;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.drawer__input::placeholder { color: #98a6b4; }
.drawer__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,125,162,.14); }
.drawer__input--area { border-radius: 22px; resize: none; min-height: 130px; }   /* resize — см. .field textarea */
.drawer__foot { margin-top: auto; padding-top: 2.5rem; }
.drawer__submit { padding-block: 1.15em; font-weight: 500; }
.drawer__consent {
  display: flex; gap: .7rem; align-items: flex-start;
  margin-top: 1.1rem; font-size: .84rem; color: var(--text-mut); line-height: 1.5;
}
.drawer__consent input { margin-top: .18rem; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.drawer__consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
/* телефон в панели: кнопку страны вдвигаем на отступ «пилюли» */
.drawer__form .iti { --iti-arrow-color: rgba(19,20,38,.45); }
.drawer__form .iti__selected-country-primary { padding-left: 1.4rem; }
.drawer__form .iti__selected-dial-code { color: #131426; }
/* на белом фоне светлый красный из .form-status.err не читается */
.drawer__form .form-status.err { color: #c0342b; }
body.drawer-open { overflow: hidden; }

/* ============================================================
   Боковая панель с подробностями о проекте
   Та же механика, что у панели заявки: выезжает справа, скрим
   гасит страницу. Содержимое приходит из <template class="phz__detail">
   внутри карточки проекта (см. initPhaseInfo, js/main.js).
   ============================================================ */
.idrw { position: fixed; inset: 0; z-index: 1001; visibility: hidden; }
.idrw.is-open { visibility: visible; }
.idrw__scrim {
  position: absolute; inset: 0; background: rgba(11,30,42,.45);
  opacity: 0; transition: opacity .5s var(--ease);
}
.idrw.is-open .idrw__scrim { opacity: 1; }
.idrw__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(720px, 100%);
  background: #fff; color: var(--text);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform .6s var(--ease);
  box-shadow: -30px 0 80px -40px rgba(11,30,42,.6);
}
.idrw.is-open .idrw__panel { transform: none; }
.idrw__close {
  position: absolute; top: clamp(18px, 2.6vw, 30px); right: clamp(18px, 2.6vw, 32px);
  z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-content: center;
  /* без backdrop-filter: размытие под кнопкой заставляло браузер
     пересобирать всю выезжающую панель — открытие запиналось */
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(11,30,42,.14); color: #131426;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.idrw__close:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.idrw__figure { position: relative; margin: 0; flex: none; height: clamp(180px, 26vh, 280px); overflow: hidden; }
.idrw__img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* мягкий переход снимка в белый фон панели */
.idrw__figure::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
}
.idrw__body { padding: clamp(22px, 3vw, 34px) clamp(20px, 3.4vw, 52px) 0; }
.idrw__eyebrow {
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .7rem;
}
.idrw__title {
  font-family: var(--font-b); font-weight: 400; color: #131426;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.15;
  margin-bottom: clamp(.9rem, 1.6vw, 1.3rem);
}
.idrw__lead { color: var(--text-mut); line-height: 1.65; font-size: clamp(.95rem, 1.1vw, 1.03rem); }
.idrw__facts {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; margin-top: clamp(1.6rem, 3vw, 2.2rem);
  background: rgba(11,30,42,.10); border: 1px solid rgba(11,30,42,.10);
  border-radius: 18px; overflow: hidden;
}
.idrw__facts > div { background: #fff; padding: 1rem 1.2rem; }
/* последний факт (паркинг) занимает всю ширину — так сетка не рвётся */
.idrw__facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.idrw__facts dt {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-mut); margin-bottom: .4rem;
}
.idrw__facts dd { font-size: 1.05rem; color: #131426; line-height: 1.3; }
.idrw__sub {
  font-family: var(--font-b); font-weight: 400; color: #131426;
  font-size: 1.15rem; margin: clamp(1.6rem, 3vw, 2.2rem) 0 .9rem;
}
.idrw__list { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; }
.idrw__list li {
  padding: .55rem 1.05rem; border-radius: 100px;
  background: var(--tide-soft, rgba(99,125,162,.10)); color: #131426;
  font-size: .92rem; line-height: 1.2;
}
.idrw__foot {
  margin-top: auto; padding: clamp(1.6rem, 3vw, 2.2rem) clamp(20px, 3.4vw, 52px) clamp(24px, 3.4vw, 40px);
  position: sticky; bottom: 0; background: #fff;
}
.idrw__ask { padding-block: 1.15em; font-weight: 500; }
body.idrw-open { overflow: hidden; }

@media (max-width: 900px) {
  .idrw__panel { width: 100%; }
  .idrw__facts { grid-template-columns: 1fr; }
}

.tour__hint-link { color: var(--tide); font-weight: 600; }
.tour__hint-link:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .drawer__panel { width: 100%; }
}

/* ============================================================
   УТИЛИТЫ
   ============================================================ */
/* Значение по этому пути в Firebase пустое — подпись без данных не нужна.
   Ставит live-data.js, см. data-live-blank. */
.is-blank { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ============================================================
   ОЧЕРЕДИ ПРОЕКТА (Park Residences I–V)
   Раскрывающаяся гармошка: свёрнутые панели держат вертикальную
   подпись, раскрытая показывает карточку очереди.
   На десктопе панели делят ширину (flex-grow), на узком экране
   складываются в столбик и делят высоту — логика в JS одна и та же.
   ============================================================ */
.phases { background: var(--ink); color: #fff; overflow: hidden; }
.phases .eyebrow { color: var(--mist); }
.phases .h-display { color: #fff; }
.phases .section-head__note { color: rgba(255, 255, 255, .68); }

.phz {
  display: flex; gap: clamp(6px, .7vw, 12px);
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
  height: clamp(430px, 64vh, 640px);
  /* доля ширины раскрытой панели; её же читает initPhases, чтобы
     посчитать --phz-open — ширину раскрытой панели в пикселях */
  --phz-grow: 4.2;
}

.phz__panel {
  position: relative; flex: 1 1 0; min-width: 0;
  border-radius: 5px; overflow: hidden;
  background: var(--ink-2);
  /* тянется только доля ширины — раскладка соседей пересчитывается сама */
  transition: flex-grow .85s var(--ease-out);
  /* Панель — замкнутая коробка: раскрытие соседа не заставляет браузер
     заново считать раскладку и перерисовывать содержимое этой панели,
     а перерисовка кадра не выходит за её границы. Без этого гармошка
     дёргала весь экран во время скролла. */
  contain: layout paint style;
}
.phz__panel.is-active { flex-grow: var(--phz-grow); }

/* кнопка-подложка: ловит клик по всей панели. Лежит НИЖЕ .phz__body,
   поэтому кнопка внутри карточки остаётся кликабельной, а вложенных
   друг в друга <button> в разметке нет */
.phz__hit {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; display: block;
  -webkit-tap-highlight-color: transparent;
}
.phz__hit:focus-visible { outline: 2px solid var(--gold); outline-offset: -6px; }
.phz__panel.is-active .phz__hit { cursor: default; }

/* Приглушение свёрнутого кадра раньше делал filter на самой картинке.
   Фильтр на растянутом кадре браузер не умеет считать на видеокарте: пока
   гармошка переключалась, все пять кадров перерисовывались заново — и это
   как раз приходилось на прокрутку. Теперь картинка только едет
   (transform), а темнит её отдельный слой поверх — см. .phz__scrim. */
/* Размер картинки НЕ зависит от ширины панели — это главное здесь.
   Пока стояло width:100%, каждый кадр раскрытия менял габариты кадра, и
   Chrome заново растрировал все пять картинок 60 раз в секунду 0,85 с —
   отсюда и лаги. Теперь высота фиксирована высотой панели (она постоянна),
   ширина берётся из пропорций файла, и кадр центрируется сдвигом. Габариты
   не меняются ни разу — панель просто обрезает картинку по-разному, а это
   работа композитора.

   Картинка при этом выглядит ровно как раньше: у cover в этой раскладке
   масштаб и так задавала высота (панель ниже, чем нужно кадру по ширине),
   а по горизонтали кадр центрировался. Редкий случай, когда панель шире
   пропорций файла (очень низкое окно), ловит min-width: там всё работает
   как прежде, через cover.

   max-width: none — обязательно: глобальное правило img{max-width:100%}
   иначе прижмёт кадр к ширине панели и всё вернётся к пересчёту. */
.phz__img {
  position: absolute; top: 0; left: 50%; right: auto;
  width: auto; height: 100%; min-width: 100%; max-width: none;
  object-fit: cover; z-index: 0;
  transform: translateX(-50%) scale(1.06); transform-origin: 50% 55%;
  transition: transform 1.2s var(--ease-out);
  /* Свой слой на всё время, а не только пока идёт transition: иначе три
     «соседних» кадра, которые не двигаются, лежат в слое панели и
     перерастрируются на каждом кадре, пока панель меняет ширину. Слоёв
     пять, и живут они только на ПК — ниже 1100px гармошка скрыта. */
  will-change: transform;
}
.phz__panel.is-active .phz__img { transform: translateX(-50%) scale(1); }

/* Вуаль над кадром: два слоя, свёрнутый и раскрытый, перекрёстно гаснут
   по opacity. Раньше здесь анимировался background с градиентами — такую
   анимацию браузер не интерполирует и перерисовывает панель целиком. */
/* Ширина вуали — как у раскрытой панели и не меняется: градиенты идут
   только по вертикали, так что узкая панель просто обрезает её, а растр
   не пересобирается, пока соседи делят ширину. */
.phz__scrim {
  position: absolute; inset: 0; right: auto; width: var(--phz-open, 100%);
  z-index: 1; pointer-events: none;
}
.phz__scrim::before,
.phz__scrim::after {
  content: ""; position: absolute; inset: 0;
  transition: opacity .7s var(--ease);
}
/* свёрнутая: ровное затемнение вместо прежнего brightness(.72) + подписи снизу */
.phz__scrim::before {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(11, 30, 42, .30) 0%, rgba(11, 30, 42, 0) 34%),
    linear-gradient(0deg, rgba(11, 30, 42, .92) 0%, rgba(11, 30, 42, .30) 42%, rgba(11, 30, 42, 0) 68%),
    rgba(11, 30, 42, .30);
}
/* Раскрытая панель несёт целый абзац поверх светлого рендера: у аэросъёмки
   низ кадра такой же яркий, как верх, и градиента «на четверть высоты» не
   хватает. Под текстом тень плотнее и выше. */
.phz__scrim::after {
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(11, 30, 42, .34) 0%, rgba(11, 30, 42, 0) 30%),
    linear-gradient(0deg, rgba(11, 30, 42, .96) 0%, rgba(11, 30, 42, .86) 30%,
                          rgba(11, 30, 42, .52) 58%, rgba(11, 30, 42, 0) 88%);
}
.phz__panel.is-active .phz__scrim::before { opacity: 0; }
.phz__panel.is-active .phz__scrim::after { opacity: 1; }

/* ---- свёрнутая панель: вертикальная подпись ---- */
.phz__rail {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: clamp(18px, 2.4vw, 34px);
  pointer-events: none;
  opacity: 1; transition: opacity .4s var(--ease);
}
.phz__panel.is-active .phz__rail { opacity: 0; transition-duration: .25s; }

.phz__rail-txt {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: clamp(.68rem, .82vw, .82rem);
  letter-spacing: .34em; text-transform: uppercase;
  color: rgba(255, 255, 255, .9); white-space: nowrap;
  text-shadow: 0 2px 18px rgba(11, 30, 42, .8);
}
.phz__rail-num {
  position: absolute; top: clamp(16px, 2vw, 26px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-d); font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  line-height: 1; color: var(--gold); font-variant-numeric: lining-nums;
}

/* ---- раскрытая панель: карточка очереди ---- */
/* Ширина карточки сразу равна ширине раскрытой панели (--phz-open).
   Пока стояло right: 0, текст переносился заново на каждом кадре
   раскрытия: строки прыгали, а браузер пересчитывал и перерисовывал
   абзац 50 раз подряд. Теперь раскладка карточки за анимацию не меняется
   ни разу — растущая панель просто открывает её из-под обрезки. */
.phz__body {
  position: absolute; z-index: 3; left: 0; bottom: 0;
  width: var(--phz-open, 100%);
  padding: clamp(22px, 2.4vw, 40px);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(.5rem, .8vw, .9rem);
  opacity: 0; transform: translateY(18px);
  pointer-events: none;
  transition: opacity .5s var(--ease) .12s, transform .6s var(--ease-out) .12s;
}
.phz__panel.is-active .phz__body { opacity: 1; transform: none; pointer-events: auto; }
/* пока панель узкая, подпись не должна «просвечивать» обрезанными строками */
.phz__panel:not(.is-active) .phz__body { visibility: hidden; }

/* Номер очереди — водяной знак в углу кадра, а не строка в карточке:
   в потоке он спорил бы с заголовком, а свёрнутая панель показывает
   тот же номер в .phz__rail-num */
.phz__num {
  position: absolute; top: clamp(16px, 2vw, 30px); right: clamp(20px, 2.4vw, 38px);
  font-family: var(--font-d); font-size: clamp(3rem, 5.2vw, 5.6rem);
  line-height: .85; letter-spacing: .04em;
  color: rgba(255, 255, 255, .16);
  -webkit-text-stroke: 1px rgba(192, 160, 98, .5);
  pointer-events: none; z-index: 3;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .5s var(--ease) .15s, transform .6s var(--ease-out) .15s;
}
/* у свёрнутой панели тот же номер уже стоит в .phz__rail-num */
.phz__panel.is-active .phz__num { opacity: 1; transform: none; }

/* «Сдача» — слово, а не число: дисплейный шрифт и кегль цифр ему не идут */
.phz__facts dd.phz__fact--word {
  font-family: var(--font-b); font-size: clamp(.95rem, 1.1vw, 1.08rem);
  font-weight: 500; padding-block: .18em;
}
.phz__status {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .42em 1.05em; border-radius: 100px;
  font-size: clamp(.66rem, .78vw, .76rem); letter-spacing: .16em; text-transform: uppercase;
  /* без backdrop-filter: пять размытых подложек в секции заставляли браузер
     пересчитывать размытие на каждом кадре прокрутки */
  background: rgba(11, 30, 42, .38); border: 1px solid rgba(255, 255, 255, .32);
  color: #fff;
}
.phz__status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.phz__title {
  font-family: var(--font-d); font-weight: 400; color: #fff;
  font-size: clamp(1.6rem, 2.4vw, 2.5rem); line-height: 1.05;
}
.phz__text {
  color: rgba(255, 255, 255, .78); max-width: 46ch;
  font-size: clamp(.92rem, 1vw, 1.02rem); line-height: 1.7;
}

.phz__facts { display: flex; gap: clamp(1.4rem, 2.6vw, 3rem); flex-wrap: wrap; margin-top: .3rem; }
.phz__facts dt {
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55); margin-bottom: .3rem;
}
.phz__facts dd {
  font-family: var(--font-n); font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  color: #fff; font-variant-numeric: lining-nums;
}

.phz__cta {
  margin-top: .5rem; display: inline-flex; align-items: center; gap: .6em;
  padding-bottom: .3em; border-bottom: 1px solid rgba(255, 255, 255, .38);
  color: #fff; font-size: .92rem; letter-spacing: .04em;
  transition: border-color .3s var(--ease), gap .3s var(--ease);
}
.phz__cta:hover { border-color: var(--gold); gap: 1em; }
.phz__cta span { color: var(--gold); }

/* ---- узкий экран: столбик ---- */
@media (max-width: 900px) {
  .phz {
    flex-direction: column; height: auto;
    gap: 8px; padding-inline: clamp(14px, 4vw, 28px);
  }
  /* в столбике доля высоты фиксированная: flex-grow по высоте
     на auto-высоте контейнера не даёт предсказуемой анимации */
  .phz__panel { flex: 0 0 auto; height: 78px; transition: height .7s var(--ease-out); }
  .phz__panel.is-active { height: min(74vh, 520px); }
  .phz__rail { align-items: center; justify-content: flex-start; padding: 0 22px; }
  .phz__rail-txt { writing-mode: horizontal-tb; transform: none; letter-spacing: .22em; }
  .phz__rail-num { top: 50%; left: auto; right: 22px; transform: translateY(-50%); }
  .phz__text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .phz__panel, .phz__img, .phz__body, .phz__rail { transition-duration: .01ms; }
}

/* ---- какой из двух видов раздела показать ----
   Раздел «Пять воплощений одной идеи» лежит в разметке дважды: гармошка
   .phz и сцены глубины .dpt (css/phases-depth.css). На ПК работает
   гармошка — панели делят ширину и раскрываются книгой; ниже 1100px она
   вырождается в столбик одинаковых полос, поэтому там показываем сцены:
   вертикальный список кадров во всю ширину. Порог тот же, на котором
   .dpt отключает проход камеры, — состояний «между» не возникает. */
.phases--desk { display: none; }
@media (min-width: 1100px) {
  .phases--desk { display: block; }
  .dpt--mob { display: none; }
}

/* ============================================================
   ГЕНПЛАН
   ============================================================ */
.masterplan { padding: 0; background: var(--ink); }
.mp__stage { position: relative; }
.mp__scroller { overflow: hidden; }
.mp__canvas {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Кадр очереди. Все пять лежат друг на друге, показан один —
   так переключение таба не дёргает высоту секции. Пины лежат
   внутри своего кадра и прячутся вместе с ним. */
.mp__frame {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .55s var(--ease), visibility .55s;
}
.mp__frame.is-active { opacity: 1; visibility: visible; }
.mp__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-user-drag: none; user-select: none;
  transform: scale(1.03);
  transition: transform 1.4s var(--ease-out);
}
.mp__frame.is-active .mp__img { transform: none; }

/* Заголовок и табы лежат поверх плана. Аэросъёмка сверху светлая — без
   плотной вуали белый «Генплан» на ней теряется. */
.mp__veil {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: linear-gradient(180deg,
    rgba(11,30,42,.72) 0%, rgba(11,30,42,.46) 14%,
    rgba(11,30,42,.16) 28%, rgba(11,30,42,0) 44%);
}

/* ---- контуры корпусов ----
   Пути приходят из Firebase (masterplan/outlines) и рисуются скриптом —
   число корпусов у проекта не зашито в вёрстку. Координаты в процентах
   кадра: viewBox 0 0 100 100 + preserveAspectRatio="none" держат обводку
   на здании при любом размере блока. */
.mp__svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none;
}
/* слой подсветки: событий мыши не получает.
   Гауссов фильтр не используем — при быстром движении мыши он пересчитывает
   размытие всей области и подвешивает страницу. Мягкость края даёт широкий
   штрих цвета заливки, а анимируется только opacity. */
.mp__paint { pointer-events: none; }
.mp__fill {
  fill: rgba(233, 243, 252, .32);
  stroke: rgba(233, 243, 252, .16);
  stroke-width: .6;                     /* в единицах viewBox — тянется с планом */
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity .22s var(--ease);
  will-change: opacity;
}
.mp__fill.is-on { opacity: 1; }
/* слой попадания: прозрачный, ловит курсор по точной геометрии */
.mp__shape { fill: transparent; stroke: none; pointer-events: all; cursor: pointer; }

/* ---- пины корпусов ----
   Кольцо, а не подпись: номера корпусов уже напечатаны на самом рендере
   застройщиком, пин их обводит. Поэтому пин ничего не перекрывает, а
   промах в полпроцента незаметен. */
.mp__pin {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 3; width: clamp(30px, 3.1vw, 46px); aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.72);
  background: rgba(11,30,42,.10);
  box-shadow: 0 6px 20px -8px rgba(11,30,42,.8);
  font-size: 0;                          /* номер виден на подложке, дублировать не нужно */
  cursor: pointer;
  transition: background .28s var(--ease), border-color .28s var(--ease),
              transform .28s var(--ease), opacity .28s var(--ease);
}
.mp__pin::after {
  content: ""; position: absolute; inset: -7px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.32);
  opacity: 0; transform: scale(.82);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.mp__pin:hover, .mp__pin.is-on {
  background: rgba(92,130,102,.55); border-color: #fff;
  transform: translate(-50%, -50%) scale(1.1);
}
.mp__pin:hover::after, .mp__pin.is-on::after, .mp__pin:focus-visible::after { opacity: 1; transform: none; }
.mp__pin:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ---- шапка блока ---- */
.mp__head {
  position: absolute; top: clamp(18px, 2.6vw, 40px); left: 0; right: 0; z-index: 4;
  padding-inline: clamp(18px, 3.2vw, 56px);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  pointer-events: none;
}
.mp__head > * { pointer-events: auto; }
.mp__title {
  /* тот же дисплейный шрифт, что у заголовков секций, — Manrope тут
     смотрелся как системный текст поверх фотографии */
  font-family: var(--font-d);
  font-weight: 300; color: #fff;
  font-size: clamp(2.2rem, 4.6vw, 4.4rem);
  line-height: .95; letter-spacing: .015em;
  text-shadow: 0 3px 30px rgba(11,30,42,.5);
}
.mp__tools { display: flex; align-items: center; gap: clamp(.5rem, 1.2vw, 1.2rem); flex-wrap: wrap; justify-content: flex-end; }
.mp__filters { display: flex; align-items: center; gap: clamp(.35rem, .7vw, .7rem); flex-wrap: wrap; }
/* Табы подписаны только римскими цифрами — само по себе это не читается
   как «очередь», поэтому перед ними стоит подпись группы */
.mp__phase-label {
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255,255,255,.72); white-space: nowrap; margin-right: .3rem;
}
.mp__chip {
  padding: .8em 1.7em; border-radius: 100px;
  border: 1px solid rgba(255,255,255,.65); color: #fff;
  font-size: clamp(.78rem, .92vw, .95rem); white-space: nowrap;
  background: rgba(11,30,42,.34);   /* без backdrop-filter — см. .lifestyle__card */
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.mp__chip:hover { background: rgba(255,255,255,.22); }
.mp__chip.is-active { background: #fff; border-color: #fff; color: #131426; font-weight: 500; }
.mp__help { padding: .95em 1.9em; font-size: clamp(.78rem, .92vw, .95rem); font-weight: 500; --bg: var(--accent); }

/* ---- карточка: только при наведении / нажатии ---- */
/* карточка идёт за курсором: позицию проставляет скрипт */
.mp__cards {
  position: absolute; top: 0; left: 0; z-index: 5;
  width: clamp(268px, 21vw, 320px);
  display: grid; pointer-events: none;
  will-change: transform;
}
.mp__card {
  grid-area: 1 / 1;                    /* все карточки в одной ячейке */
  /* без этого карточка растягивается до высоты самой длинной из четырёх:
     у корпуса с одной строкой «Скоро поступит в продажу» под текстом
     оставалось полкарточки пустой белизны */
  align-self: start;
  background: #fff; border-radius: 4px;
  padding: clamp(20px, 1.6vw, 28px) clamp(22px, 1.8vw, 30px);
  box-shadow: 0 30px 60px -30px rgba(11,30,42,.55);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .32s var(--ease), transform .32s var(--ease), visibility .32s;
}
.mp__card.is-active { opacity: 1; visibility: visible; transform: none; }
.mp__card-title {
  font-family: var(--font-b); font-weight: 400; color: #131426;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.2;
  letter-spacing: .01em;
}
/* «-9» — номер приписывает скрипт по наведённому корпусу, поэтому в
   разметке span пустой. Цвет наследуется: в карточке «PARK RESIDENCES 3-9»
   читается одним именем, а не именем с приставкой */
.mp__card-b { color: inherit; white-space: nowrap; }
/* «Скоро поступит в продажу» — вместо таблицы у корпуса без цифр */
.mp__card-note {
  margin-top: .9rem; color: var(--text-mut);
  font-size: clamp(.9rem, 1.02vw, 1.02rem); line-height: 1.35;
}
.mp__rows { margin-top: 1.15rem; }
.mp__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .42rem 0; font-size: clamp(.9rem, 1.02vw, 1.02rem);
  transition: opacity .3s var(--ease);
}
/* слева — подпись характеристики, справа — значение корпуса */
.mp__row span {
  color: var(--text-mut); font-size: .82em; letter-spacing: .06em;
}
.mp__row b { font-weight: 400; color: #131426; }
.mp__row.is-muted { opacity: .3; }
.mp__row.is-hit b { color: var(--accent); font-weight: 600; }

/* подсказка под планом. Текст разный для курсора и пальца — подменяет
   скрипт, поэтому в разметке лежат оба варианта */
.mp__hint {
  text-align: center; color: rgba(255,255,255,.75);
  /* поля сверху и снизу равные — иначе строка сидит вплотную к нижнему
     краю синей подложки и выглядит несцентрованной */
  font-size: .78rem; padding: 12px 16px;
}
.mp__hint .mp__hint--touch { display: none; }
/* тач-раскладка вешается классом, а не шириной экрана:
   планшет в альбомной ориентации тоже без курсора */
.mp__stage.is-touch .mp__hint .mp__hint--fine { display: none; }
.mp__stage.is-touch .mp__hint .mp__hint--touch { display: inline; }
.mp__stage.is-touch .mp__cards {
  position: static; width: auto; transform: none !important;
  padding: 14px clamp(16px, 4vw, 28px) 24px; background: var(--ink-2);
}
.mp__stage.is-touch .mp__card { box-shadow: none; }

/* ---- адаптив ---- */
@media (max-width: 1180px) {
  .mp__head { flex-direction: column; gap: .9rem; }
  .mp__tools { justify-content: flex-start; }
}
@media (max-width: 860px) {
  /* план не сжимаем — он становится нечитаемым; даём прокрутку по горизонтали */
  .mp__head {
    position: static; padding: 18px clamp(16px, 4vw, 28px);
    background: var(--ink); gap: .8rem;
  }
  .mp__scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mp__canvas { min-width: 780px; }
  /* min-width:0 обязателен: у flex-элемента он по умолчанию auto, строка
     фильтров не сжималась до ширины экрана и растягивала страницу
     (на 320px — на 71px вправо), а внутренняя прокрутка не включалась */
  .mp__tools { width: 100%; min-width: 0; }
  .mp__filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; }
  .mp__filters::-webkit-scrollbar { display: none; }
  .mp__help { width: 100%; justify-content: center; }
  .mp__pin { padding: .45em .85em; letter-spacing: .03em; font-size: .62rem; }
  .mp__cards {
    position: static; width: auto; padding: 14px clamp(16px, 4vw, 28px) 24px;
    background: var(--ink-2); transform: none !important;
  }
  .mp__card { box-shadow: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero { min-height: min(74svh, 620px); padding-top: clamp(48px, 9vh, 90px); }
  /* Размер привязан к ширине экрана так, чтобы самая длинная строка
     («хочется наслаждаться») ещё помещалась в одну строку. */
  .hero__title { font-size: clamp(1.95rem, calc(9.5vw - 3px), 3.6rem); }
  /* На телефоне подзаголовок крупнее и шире: при 24ch русская фраза рвалась
     на четыре рваные строки с висящими «у моря». balance выравнивает строки
     по длине. */
  .hero__sub {
    font-size: clamp(1.05rem, 4.3vw, 1.2rem);
    line-height: 1.5;
    max-width: 30ch;
    text-wrap: balance;
    margin-top: 1.1rem;
  }

  /* Латиница в азербайджанском и английском заголовке: у «ş», «ə», «g», «y»
     длинные выносные, реальная высота глифов больше строки (89px против 74px),
     а .line обрезает лишнее маской для анимации выезда — хвосты букв срезало,
     и строки выглядели слипшимися. У кириллицы там пусто, поэтому на русском
     проблемы нет и его не трогаем. */
  html[lang="az"] .hero__title,
  html[lang="en"] .hero__title { line-height: 1.3; }
  html[lang="az"] .hero__title .line,
  html[lang="en"] .hero__title .line { padding-bottom: .06em; }
  html[lang="az"] .hero__sub,
  html[lang="en"] .hero__sub { max-width: 30ch; line-height: 1.6; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-auto-rows: 220px; }
  .news-grid { grid-template-columns: 1fr; }
  .lifestyle__inner { justify-content: center; }
}
@media (max-width: 700px) {
  /* у заголовка hero поля поуже, чтобы крупный шрифт не переносился */
  .hero { padding-inline: 14px; }
  .tour-embed { aspect-ratio: 3/4; }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-auto-rows: 240px; }
  .g-item--wide, .g-item--tall { grid-column: auto; grid-row: auto; }
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .about__stats { gap: 1.4rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal], [data-reveal-mask] > span { opacity: 1 !important; transform: none !important; }
  .hero__slide { animation: none; transform: none; }
}

/* ============================================================
   ПЛАНИРОВКИ v2 (пока только /en/plans.html)
   ------------------------------------------------------------
   Отдельный слой с префиксом .plansx / .pcard / .pmodal: старая
   разметка (.plan-item, .plans-gallery) ещё живёт на ru и az, и
   её стили выше трогать нельзя. Когда все три языка переедут,
   старый блок можно удалить целиком.
   ============================================================ */

.plansx { padding-top: calc(var(--header-h) + clamp(2rem, 4.5vw, 4rem)); padding-bottom: var(--sect-y); }

/* ---- Шапка страницы ---- */
.plansx__head { margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.plansx__head .lead { max-width: 46ch; }

/* Разброс площадей под заголовком. Цифра набрана Jost (--font-g) —
   лёгкий геометрический гротеск: рядом с засечным заголовком он читается
   как подпись к чертежу, а не как второй заголовок. Playfair (--font-n),
   которым набраны цифры в остальных блоках, тут спорил с h1. */
.plansx__stats { display: flex; gap: clamp(1.6rem, 4vw, 3.4rem); margin-top: 1.9rem; flex-wrap: wrap; }
.plansx__stat { display: flex; flex-direction: column; gap: .45rem; }
.plansx__stat b {
  font-family: var(--font-g); font-weight: 300; font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  color: var(--ink); line-height: 1; letter-spacing: .01em; font-variant-numeric: tabular-nums;
}
.plansx__stat b sup { font-size: .5em; font-weight: 400; margin-left: .1em; vertical-align: super; }
.plansx__stat span { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-mut); }

/* ---- Панель фильтров ---- */
/* position: sticky — список длинный, и уезжать за фильтрами вверх на
   каждую смену типа неудобно. top считается от высоты сжатой шапки. */
.plansx__bar {
  position: sticky; top: calc(var(--hdr-h-min) - 1px); z-index: 40;
  display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); flex-wrap: wrap;
  padding: .9rem 0 1.1rem; margin-bottom: 1.3rem;
  background: linear-gradient(var(--paper) calc(100% - 12px), rgba(244,246,247,0));
}
.plansx__bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .5rem; height: 1px;
  background: var(--line);
}
.plansx__group { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.plansx__group-t {
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-mut); margin-right: .3rem;
}

.plansx__chip {
  position: relative; padding: .58em 1.1em; border-radius: 100px;
  border: 1px solid var(--line); background: transparent;
  font-size: .84rem; font-weight: 500; color: var(--text-mut); cursor: pointer;
  transition: color .35s var(--ease), border-color .35s var(--ease), background-color .35s var(--ease);
}
.plansx__chip-n { margin-left: .45em; font-size: .74em; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.plansx__chip:hover:not(:disabled) { color: var(--ink); border-color: var(--tide); }
.plansx__chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.plansx__chip:disabled { opacity: .38; cursor: default; }
.plansx__chip:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; }

.plansx__count { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut); margin-bottom: 1.5rem; font-variant-numeric: tabular-nums; }

/* ---- Сетка ---- */
/* Пауза между «старые погасли» и «новые встали»: без неё высота грида
   меняется в том же кадре и страница дёргается под курсором. */
.plansx__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.8rem);
  grid-auto-flow: dense;   /* горизонтальные планы шире — dense не оставляет дыр */
  transition: opacity .17s ease;
}
/* Горизонтальный план (двушки) в вертикальной карточке выглядел маркой на
   конверте. Он занимает две колонки, и его пропорция удвоена вместе с
   шириной — высота ряда та же, сетка не разъезжается. */
.pcard.is-wide { grid-column: span 2; }
.pcard.is-wide .pcard__stage { aspect-ratio: 8.05 / 4.6; }
/* Срез, где широкие планы остались одни: тянуть каждый на две колонки
   из трёх — значит оставить пустую колонку в каждом ряду. */
.plansx__grid.is-wide-only { grid-template-columns: repeat(2, 1fr); }
.plansx__grid.is-wide-only .pcard.is-wide { grid-column: span 1; }
.plansx__grid.is-wide-only .pcard.is-wide .pcard__stage { aspect-ratio: 4 / 3.2; }
.plansx__grid.is-swapping { opacity: 0; }

.pcard { display: flex; flex-direction: column; align-self: start; opacity: 0; transform: translateY(16px); }
.pcard.is-in {
  opacity: 1; transform: none;
  transition: opacity .62s var(--ease-out) calc(var(--i) * 45ms),
              transform .62s var(--ease-out) calc(var(--i) * 45ms);
}

.pcard__stage {
  position: relative; display: block; width: 100%; padding: 0; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: var(--foam); aspect-ratio: 4 / 4.6;
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.pcard__img {
  width: 100%; height: 100%; object-fit: contain; padding: clamp(.9rem, 2vw, 1.5rem);
  transition: transform .7s var(--ease);
}
.pcard__stage:hover { border-color: var(--mist); box-shadow: 0 26px 44px -30px rgba(11,30,42,.42); }
.pcard__stage:hover .pcard__img { transform: scale(1.028); }
.pcard__stage:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; }

.pcard__badge {
  position: absolute; top: .8rem; left: .8rem;
  padding: .38em .8em; border-radius: 100px;
  background: rgba(255,255,255,.86); border: 1px solid var(--line);
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut);
}

/* Плашка «Смотреть план» выезжает снизу. На телефоне hover нет, поэтому
   ниже по медиазапросу она просто видна всегда. */
.pcard__open {
  position: absolute; inset: auto 0 0 0; padding: .9rem;
  display: grid; place-items: center;
  background: linear-gradient(rgba(11,30,42,0), rgba(11,30,42,.82));
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.pcard__open span { color: #fff; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
.pcard__stage:hover .pcard__open, .pcard__stage:focus-visible .pcard__open { opacity: 1; transform: none; }

.pcard__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: .9rem; }
.pcard__type { font-family: var(--font-d); font-size: 1.25rem; font-weight: 500; color: var(--ink); line-height: 1.1; }
.pcard__sub { font-size: .78rem; letter-spacing: .02em; color: var(--text-mut); margin-top: .4rem; }
.pcard__area { display: flex; align-items: baseline; gap: .2em; white-space: nowrap; }
.pcard__area b { font-family: var(--font-n); font-size: 1.45rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.pcard__area i { font-style: normal; font-size: .74rem; color: var(--text-mut); }

.plansx__empty { padding: 3.5rem 0; text-align: center; color: var(--text-mut); }

@media (max-width: 1180px) { .plansx__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .plansx__bar { position: static; background: none; }
  .pcard__open { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .plansx__grid { grid-template-columns: 1fr; }
  /* в одну колонку растягивать некуда — карточка снова обычная */
  .pcard.is-wide { grid-column: span 1; }
  .pcard.is-wide .pcard__stage { aspect-ratio: 4 / 3.4; }
}

/* ============================================================
   ОКНО ПЛАНИРОВКИ
   ============================================================ */
.pmodal { position: fixed; inset: 0; z-index: 1200; }
.pmodal[hidden] { display: none; }
.pmodal__scrim { position: absolute; inset: 0; background: rgba(8,16,22,.72); opacity: 0; transition: opacity .32s ease; }
.pmodal.is-open .pmodal__scrim { opacity: 1; }

.pmodal__panel {
  position: absolute; inset: clamp(.6rem, 3vh, 2.4rem) clamp(.6rem, 3vw, 2.4rem);
  max-width: 1180px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
  background: var(--foam); border-radius: 8px; overflow: hidden;
  box-shadow: 0 50px 110px -40px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(14px) scale(.99);
  transition: opacity .38s var(--ease-out), transform .38s var(--ease-out);
}
.pmodal.is-open .pmodal__panel { opacity: 1; transform: none; }

.pmodal__figure {
  --pad: clamp(1.2rem, 3vw, 2.6rem);
  position: relative; background: var(--paper-2);
  min-height: 0; min-width: 0; overflow: hidden;
}
/* План уложен в рамку абсолютом с явными процентами — и то и другое важно.
   В обычном потоке grid-ячейка растягивалась под саму картинку, и
   вертикальные студии (522×1002) вылезали за низ окна. Абсолют это чинит,
   но inset+auto у картинки не работает: для замещаемого элемента auto —
   это его собственный размер, а не рамка. Проценты у абсолюта считаются
   от padding-box рамки, высота которой задана всегда, поэтому object-fit
   укладывает план целиком при любой пропорции. */
.pmodal__img {
  position: absolute; top: var(--pad); left: var(--pad);
  width: calc(100% - var(--pad) * 2);
  height: calc(100% - var(--pad) * 2);
  max-width: none; max-height: none;
  object-fit: contain;
}

/* Стрелки принципиально неподвижны: их жмут подряд, перелистывая планы,
   и любой сдвиг на наведении уводит кнопку из-под курсора. Меняется только
   заливка, и та без перехода — иначе на быстрых кликах она мерцает. */
.pmodal__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-content: center; font-size: 1.5rem; line-height: 1;
  color: var(--ink); background: rgba(255,255,255,.9); border: 1px solid var(--line);
  cursor: pointer; transition: none;
}
.pmodal__nav:hover { background: #fff; border-color: var(--mist); }
.pmodal__nav:active, .pmodal__nav:focus-visible { transform: none; }
.pmodal__nav--prev { left: .9rem; }
.pmodal__nav--next { right: .9rem; }
.pmodal__pos {
  position: absolute; bottom: .9rem; left: 50%; translate: -50% 0;
  padding: .3em .8em; border-radius: 100px; background: rgba(255,255,255,.88);
  font-size: .7rem; letter-spacing: .16em; color: var(--text-mut); font-variant-numeric: tabular-nums;
}

.pmodal__side {
  display: flex; flex-direction: column; gap: 1.15rem;
  padding: clamp(1.5rem, 3vw, 2.6rem); overflow-y: auto;
  border-left: 1px solid var(--line);
}
.pmodal__eyebrow { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--tide); }
.pmodal__title { font-family: var(--font-d); font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 500; color: var(--ink); line-height: 1.05; margin-top: -.45rem; }

.pmodal__figures { display: flex; flex-direction: column; gap: .5rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
/* Строка «подпись — число»: числа в одной колонке справа, поэтому взгляд
   идёт по цифрам, а не рыскает по строке. */
.pmodal__fig { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.pmodal__fig dt { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut); }
.pmodal__fig dd { font-family: var(--font-g); font-weight: 300; font-size: 1.05rem; color: var(--text); font-variant-numeric: tabular-nums; }
.pmodal__fig dd span { font-size: .74em; margin-left: .18em; color: var(--text-mut); }
/* Главная цифра — площадь квартиры: она стоит первой, крупно, подпись под ней. */
.pmodal__fig.is-lead { flex-direction: column; align-items: flex-start; gap: .3rem; margin-bottom: .5rem; }
.pmodal__fig.is-lead dd { font-size: clamp(2.1rem, 4vw, 2.7rem); color: var(--ink); line-height: 1; }
.pmodal__fig.is-lead dd span { font-size: .34em; }

.pmodal__rooms-t { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mut); }
.pmodal__rooms { display: flex; flex-direction: column; gap: 3px; margin-top: -.55rem; }

/* Доля комнаты показана заливкой самой строки, а не отдельной полоской в
   узкой колонке: те тонкие чёрточки висели между названием и числом и
   читались как случайные штрихи. Ширина — доля от самой большой комнаты
   этой квартиры, поэтому видно, во сколько раз гостиная больше санузла. */
.pmodal__room {
  position: relative; display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: .52rem .7rem; border-radius: 5px; overflow: hidden;
  font-size: .88rem; color: var(--text);
}
.pmodal__room-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: rgba(169, 196, 174, .42); border-radius: inherit;
}
/* Заливка едет от нуля уже после вставки в DOM (класс is-drawn) —
   иначе перехода не будет, строка сразу нарисуется нужной длины. */
.pmodal__rooms.is-drawn .pmodal__room-fill {
  width: var(--w);
  transition: width .62s var(--ease-out) calc(140ms + var(--i) * 42ms);
}
.pmodal__room-n, .pmodal__room-v { position: relative; }
.pmodal__room-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmodal__room-v { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
/* Терраса и балкон — не жилая площадь, поэтому другим цветом */
.pmodal__room.is-out { color: var(--text-mut); }
.pmodal__room.is-out .pmodal__room-fill { background: rgba(192, 160, 98, .3); }

.pmodal__ask { margin-top: auto; justify-content: center; text-align: center; }
.pmodal__close {
  position: absolute; top: .8rem; right: .8rem; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-content: center; font-size: 1.4rem; line-height: 1;
  color: var(--ink); background: rgba(255,255,255,.9); border: 1px solid var(--line);
  cursor: pointer; transition: background-color .3s, rotate .4s var(--ease);
}
.pmodal__close:hover { background: #fff; rotate: 90deg; }

body.plan-modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .pmodal__panel { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; overflow-y: auto; inset: .5rem; }
  .pmodal__figure { min-height: 46vh; }
  .pmodal__side { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .pmodal__nav { width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .pcard { opacity: 1 !important; transform: none !important; }
  .plansx__grid.is-swapping { opacity: 1; }
  .pmodal__rooms .pmodal__room-fill { width: var(--w); }
}

/* ============================================================
   Мобильные цели нажатия и мелкий текст
   На телефоне текстовые ссылки-строки выходили в 14–28px по высоте —
   для пальца мало (минимум по WCAG 2.5.8 — 24px, комфортно от 40px).
   Вертикальный padding расширяет область нажатия, не меняя раскладку.

   Условие шире, чем «узкий экран»: планшет в альбомной ориентации — это
   1024px и палец, там раскладка десктопная, а цели нажатия нужны крупные.
   Поэтому вторая ветка ловит любое устройство без наведения вплоть до
   1180px. Мышиные экраны той же ширины правил не получают.
   ============================================================ */
@media (max-width: 860px), (hover: none) and (max-width: 1180px) {
  .footer__legal { gap: .4rem 1.6rem; flex-wrap: wrap; }
  .footer__legal a { padding-block: .5rem; }
  .footer__col a { padding-block: .3rem; }
  .footer__col { gap: .35rem; }
  .link-more, .plan-tile__more { padding-block: .45rem .5rem; }
  .tour__hint-link, .plans-cta button { display: inline-block; padding-block: .4rem; }
  .plans-page__back { padding-block: .45rem; }
  /* чекбокс согласия 13×13 пальцем почти не попадается;
     flex:none — иначе он ужимается как flex-элемент */
  .consent input { flex: none; width: 24px; height: 24px; margin-top: 1px; }
  .consent { gap: .6rem; }
  .consent a, .footer__legal a { padding-block: .45rem; }
  /* переключатель языка: 36×32 — самая мелкая цель в шапке */
  .lang__opt { min-width: 42px; min-height: 40px; display: inline-flex;
               align-items: center; justify-content: center; }
  /* «Узнать подробнее» в гармошке очередей (ru/az) */
  .phz__cta { padding-block: .7rem; }
  /* Кнопки масштаба Leaflet: у библиотеки они 30×30 даже в тач-режиме.
     Селектор нарочно длиннее библиотечного (.leaflet-touch .leaflet-bar a):
     leaflet.css теперь подключается по требованию, то есть ПОЗЖЕ этого
     файла, и при равном весе выигрывал бы он. */
  .leaflet-touch .leaflet-control-zoom.leaflet-bar a,
  .leaflet-container .leaflet-control-zoom a {
    width: 40px; height: 40px; line-height: 40px; font-size: 1.25rem;
  }

  /* Ползунки калькулятора: дорожка 26px, палец попадает мимо бегунка */
  .inv-range { height: 40px; }
  .inv-range::-webkit-slider-thumb { width: 26px; height: 26px; }
  .inv-range::-moz-range-thumb { width: 26px; height: 26px; }

  /* подписи, которые на телефоне уходили ниже 10px */
  .mp__pin { font-size: .7rem; }
  .about__badge { font-size: .72rem; letter-spacing: .18em; }
  .pcard__badge { font-size: .7rem; letter-spacing: .12em; }
  .idrw__facts dt, .phz__facts dt, .pmodal__fig dt { font-size: .7rem; }
  .plansx__group-t { font-size: .7rem; }
  .hero__cue span, .intro__cue span { font-size: .7rem; }
}

/* Вертикальные подписи шторки сравнения: 9,3px — самый мелкий текст сайта.
   Правило отдельное, потому что у .cmp__tag уже есть свой брейкпоинт на
   560px, и он должен остаться последним по каскаду. */
@media (max-width: 860px), (hover: none) and (max-width: 1180px) {
  .cmp__tag { font-size: .7rem; letter-spacing: .16em; }
}

/* ============================================================
   ШАПКА — СТЕКЛО
   ------------------------------------------------------------
   Вместо белой полосы — полупрозрачное «стекло» в духе iOS:
   сильное размытие подложки, повышенная насыщенность (сквозь
   стекло видно цвет кадра), блик по верхней кромке и волосяная
   полупрозрачная граница снизу. Раскладка, размеры, шрифты и
   поведение шапки не меняются — только фон.

   Блок стоит в самом конце файла и переопределяет белый фон
   .header выше по порядку. Правило для открытого меню повторено
   здесь же: без повтора стекло и блик остались бы над панелью.
   ============================================================ */
.header {
  background: linear-gradient(to bottom,
              rgba(255,255,255,.46), rgba(255,255,255,.30));
  /* saturate вытягивает цвет кадра, который проходит под шапкой:
     без него сильно размытое стекло сереет */
  -webkit-backdrop-filter: blur(34px) saturate(200%);
          backdrop-filter: blur(34px) saturate(200%);
  /* вместо border-bottom: рамка добавила бы шапке лишний пиксель
     высоты, а она задана переменной и анимируется */
  box-shadow: inset 0  1px 0 rgba(255,255,255,.75),
              inset 0 -1px 0 rgba(255,255,255,.38),
              inset 0 -1px 0 rgba(11,30,42,.05),
              0 1px 26px -16px rgba(11,30,42,.4);
  transition: height .45s var(--ease), background-color .55s var(--ease),
              box-shadow .45s var(--ease),
              -webkit-backdrop-filter .55s var(--ease),
              backdrop-filter .55s var(--ease);
}

/* Блик. Отдельным слоем, а не в фоне: фон отдан заливке, которая
   переключается по .is-scrolled, и блик пережил бы не каждое
   переключение. z-index -1 у шапки уже свой контекст наложения
   (position: fixed + z-index 900), поэтому слой ложится поверх
   стекла, но под логотипом и кнопками. */
.header::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(255,255,255,.5) 0, rgba(255,255,255,.13) 38%, transparent 62%),
    linear-gradient(105deg,
      transparent 18%, rgba(255,255,255,.16) 46%, transparent 72%);
  opacity: .9;
  transition: opacity .55s var(--ease);
}

/* Сжатая шапка лежит уже поверх контента — стекло чуть плотнее и
   размытие сильнее, чтобы текст под ней не читался как строка,
   плюс мягкая тень-подложка. */
.header.is-scrolled {
  background: linear-gradient(to bottom,
              rgba(255,255,255,.64), rgba(255,255,255,.50));
  -webkit-backdrop-filter: blur(44px) saturate(210%);
          backdrop-filter: blur(44px) saturate(210%);
  box-shadow: inset 0  1px 0 rgba(255,255,255,.8),
              inset 0 -1px 0 rgba(255,255,255,.42),
              inset 0 -1px 0 rgba(11,30,42,.07),
              0 12px 36px -24px rgba(11,30,42,.8);
}

/* Над открытым меню шапка по-прежнему полностью прозрачна:
   размытие и блик снимаем, иначе тёмная панель ушла бы в муть. */
body.menu-open .header {
  background: transparent;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow: none;
}
body.menu-open .header::after { opacity: 0; }

/* Где размытия нет (старый Firefox, режим экономии) — стекло
   становится почти непрозрачным, чтобы текст не терял контраст. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header { background: rgba(255,255,255,.94); }
  .header.is-scrolled { background: rgba(255,255,255,.96); }
  body.menu-open .header { background: transparent; }
}
