/* ЗОЛОТОЙ — архитектурное досье. Бумага и тушь, Bodoni Moda + Spectral + Space Mono.
   Без градиентов, без свечения, без «золотой пыли» — редактура, не реклама. */

:root {
  /* День (бумага) — значения по умолчанию */
  --bg: #e7e0d0;
  --bg-soft: #ded5c1;
  --bg-card: #f2ede1;
  --line: rgba(28, 24, 16, 0.22);
  --line-soft: rgba(28, 24, 16, 0.11);
  --gold: #8a6a36;
  --gold-bright: #6f5526;
  --text: #1b1810;
  --text-muted: #6c6352;

  /* Тушь — для инвертированной секции «План» */
  --ink: #15130c;
  --ink-paper: #ece4d2;

  --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --body: "Spectral", "Georgia", serif;
  --mono: "Space Mono", "Courier New", monospace;

  /* Авторские кривые движения — единый ритм анимаций */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);    /* благородное «оседание» */
  --ease-soft: cubic-bezier(0.33, 0, 0.1, 1);    /* мягкий разгон/торможение */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Общий масштаб страницы — как «уменьшить» в браузере (всё отдаляется) */
html { zoom: 0.8; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: transparent;
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { width: min(1280px, 90vw); margin: 0 auto; }

/* ---------- Типографика ---------- */

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-muted);
}

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
}

.fact-num, .spec-num, .hero-price, .contact-price,
.room-list .sqm, .room-list li.total .sqm {
  font-feature-settings: "lnum" 1, "tnum" 1;
}

h2 {
  font-size: clamp(36px, 5vw, 70px);
  color: var(--text);
  text-wrap: balance;
  font-weight: 500;
}

.section-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  column-gap: 16px;
  row-gap: 2px;
  align-items: baseline;
  margin-bottom: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--text);
}
.section-head .sec-no {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.section-head .label { grid-column: 2; }
.section-head h2 { grid-column: 1 / -1; margin-top: 12px; }

/* ---------- Навигация / масштхед ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav:not(.scrolled)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(17, 15, 9, 0.62) 0%, rgba(17, 15, 9, 0.34) 100%);
  pointer-events: none;
}
.nav:not(.scrolled) .nav-inner { text-shadow: 0 1px 12px rgba(17, 15, 9, 0.5); }
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--text);
}

.nav-inner {
  width: min(1480px, 94vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 16px 0 13px;
}
.nav-inner > .logo { justify-self: start; }
.nav-inner > .nav-right { justify-self: center; }
.nav-inner > .nav-end { justify-self: end; }

.logo { display: flex; flex-direction: column; line-height: 1; gap: 6px; }
.logo-main { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: 0.4em; color: var(--text); }
.logo-sub { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--text-muted); }
/* Над фото (шапка прозрачна) логотип — светлый с чёткой тенью для читаемости на тёмном градиенте */
.nav:not(.scrolled) .logo-main { color: #f6efdd; text-shadow: 0 1px 16px rgba(17, 15, 9, 0.7), 0 0 1px rgba(17, 15, 9, 0.5); }
.nav:not(.scrolled) .logo-sub { color: rgba(240, 232, 214, 0.86); text-shadow: 0 1px 12px rgba(17, 15, 9, 0.65); }

.nav-links { display: flex; flex-direction: column; gap: 0; margin-bottom: 2px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 232, 214, 0.96);
  transition: color 0.3s ease, padding-left 0.3s ease;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(240, 232, 214, 0.1);
}
.nav-links a::after { display: none; }
.nav-links a:hover { color: #f8f1df; padding-left: 9px; }
.nav-links a.active { color: var(--gold-bright); }

.nav-right { display: flex; align-items: center; gap: 12px; flex: none; }
.nav-end { display: flex; align-items: center; gap: 12px; flex: none; }

/* Кластер контролов в верхней строке (десктоп): тема · язык · палитра */
.nav-desk-ctl { display: flex; align-items: center; gap: 9px; }

/* Вторая строка шапки — разделы (десктоп) */
.nav-rail {
  width: min(1480px, 94vw);
  margin: 0 auto;
  padding: 0 0 14px;
  display: flex;
  justify-content: center;
}
.nav-rail .nav-links {
  flex-direction: row;
  align-items: center;
  gap: clamp(16px, 2.3vw, 40px);
  margin-bottom: 0;
}
.nav-rail .nav-links a {
  position: relative;
  padding: 5px 0;
  border-bottom: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(240, 232, 214, 0.96);
}
.nav-rail .nav-links a:hover { padding-left: 0; color: #f8f1df; }
.nav-rail .nav-links a::after {
  display: block;
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--gold-bright);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.21, 1);
}
.nav-rail .nav-links a:hover::after,
.nav-rail .nav-links a.active::after { transform: scaleX(1); }
.nav-rail .nav-links a.active { color: var(--gold-bright); }

/* Над фото вторая строка светлая; после прокрутки — тёмный текст на светлом фоне */
.nav.scrolled .nav-rail .nav-links a { color: var(--text); }
.nav.scrolled .nav-rail .nav-links a:hover { color: var(--text); }
.nav.scrolled .nav-rail .nav-links a.active { color: var(--gold-bright); }

/* Выпадающий ящик: разделы · тема · язык · палитра · телефон */
.nav-collapse {
  position: absolute;
  top: calc(100% + 12px);
  right: max(22px, 3vw);
  width: min(366px, calc(100vw - 30px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  --text: #f0e8d6;
  --text-muted: rgba(240, 232, 214, 0.66);
  --line: rgba(240, 232, 214, 0.34);
  --bg: #1c1910;
  background: #1c1910;
  color: #f0e8d6;
  border: 1px solid rgba(240, 232, 214, 0.18);
  border-radius: 16px;
  box-shadow: 0 30px 64px rgba(10, 8, 4, 0.55);
  padding: 8px max(22px, 3vw) 24px;
  max-height: min(82vh, 760px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.99);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.32s ease,
              transform 0.42s cubic-bezier(0.22, 0.61, 0.21, 1),
              visibility 0.32s linear;
  z-index: 60;
}
.nav-collapse.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.nav-controls { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.ctl-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(240, 232, 214, 0.1);
}
.ctl-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240, 232, 214, 0.62);
}

/* Правый кластер действий (звонок + меню) — только на мобильном */
.nav-actions { display: none; align-items: center; gap: 8px; }

/* Кнопка-гамбургер */
.nav-menu-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 26%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  flex: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.3s ease;
}
.nav-menu-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
}
.nav-menu-btn .bar-wrap {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-menu-btn .bar,
.nav-menu-btn .bar::before,
.nav-menu-btn .bar::after {
  display: block;
  width: 16px; height: 1.4px;
  background: currentColor;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
.nav-menu-btn .bar { position: relative; }
.nav-menu-btn .bar::before,
.nav-menu-btn .bar::after { content: ""; position: absolute; left: 0; }
.nav-menu-btn .bar::before { top: -5px; }
.nav-menu-btn .bar::after { top: 5px; }
.nav-menu-btn.is-open .bar { background: transparent; }
.nav-menu-btn.is-open .bar::before { top: 0; transform: rotate(45deg); }
.nav-menu-btn.is-open .bar::after { top: 0; transform: rotate(-45deg); }
.nav:not(.scrolled) .nav-menu-btn {
  background: rgba(17, 15, 9, 0.42);
  border-color: rgba(236, 228, 210, 0.5);
}

/* ---- Единый кластер контролов: тема · язык · палитра ---- */
.theme-toggle,
.lang-toggle,
.palette-toggle {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 26%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.5s ease, border-color 0.5s ease;
}

.theme-toggle button,
.lang-toggle button {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.14em;
  border-radius: 999px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-toggle button { width: 30px; height: 30px; }
.theme-toggle button svg { width: 16px; height: 16px; display: block; transition: transform 0.55s cubic-bezier(0.34, 1.4, 0.5, 1); }
.lang-toggle button { padding: 0 11px; height: 30px; }
/* Нелатинские глифы имеют другие метрики — нормализуем размер и вертикальный центр */
.lang-toggle button[data-lang="zh"] { font-family: "Noto Serif SC", var(--mono); font-size: 13px; letter-spacing: 0; }
.lang-toggle button[data-lang="zh"] span,
.lang-toggle button[data-lang="ar"] span { display: block; line-height: 1; }
.lang-toggle button[data-lang="ar"] { font-family: "Noto Naskh Arabic", var(--mono); font-size: 15px; letter-spacing: 0; }
.lang-toggle button[data-lang="ar"] span { transform: translateY(-0.06em); }

.theme-toggle button:hover,
.lang-toggle button:hover { color: var(--text); }
.theme-toggle button:hover svg { transform: rotate(-12deg) scale(1.08); }
.theme-toggle button[data-theme="dark"]:hover svg { transform: rotate(12deg) scale(1.08); }
.theme-toggle button:active,
.lang-toggle button:active { transform: scale(0.9); }

.theme-toggle button.active,
.lang-toggle button.active {
  background: var(--text);
  color: var(--bg);
}
.theme-toggle button.active svg { transform: scale(1.06); }

/* ---- Палитра: круглые образцы accent ---- */
.palette-toggle { gap: 2px; padding: 0 6px; }
.palette-toggle button {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 26px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.palette-toggle .sw {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--sw, #c9a86e);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 35%, transparent) inset,
              0 0 0 0 var(--sw, #c9a86e);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.palette-toggle button[data-palette="paper"]      { --sw: #c9a86e; }
.palette-toggle button[data-palette="travertine"] { --sw: #cdb78d; }
.palette-toggle button[data-palette="graphite"]   { --sw: #bcc3c9; }
.palette-toggle button[data-palette="bordeaux"]    { --sw: #cf9089; }
.palette-toggle button:hover .sw { transform: scale(1.22); }
.palette-toggle button:active .sw { transform: scale(0.86); }
.palette-toggle button.active .sw {
  transform: scale(1.12);
  box-shadow: 0 0 0 1.5px var(--bg),
              0 0 0 3px var(--sw, #c9a86e);
}

/* Над фото шапка прозрачна — даём контролам тёмную подложку для читаемости */
.nav:not(.scrolled) .theme-toggle,
.nav:not(.scrolled) .lang-toggle,
.nav:not(.scrolled) .palette-toggle {
  background: rgba(17, 15, 9, 0.42);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-color: rgba(236, 228, 210, 0.5);
}
.nav:not(.scrolled) .theme-toggle button.active,
.nav:not(.scrolled) .lang-toggle button.active { background: #f1ece0; color: #1b1810; }
.nav:not(.scrolled) .palette-toggle button.active .sw {
  box-shadow: 0 0 0 1.5px rgba(17, 15, 9, 0.85),
              0 0 0 3px var(--sw, #c9a86e);
}

.nav-phone-bar { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--text); white-space: nowrap; transition: color 0.3s; }
.nav-phone-bar:hover { color: var(--gold-bright); }
.nav:not(.scrolled) .nav-phone-bar { color: #f4efdf; }

.nav-phone {
  display: block;
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.01em;
  color: #f8f1df;
  white-space: nowrap;
  transition: color 0.3s;
}
.nav-phone:hover { color: var(--gold-bright); }

/* Компактная кнопка-звонок — только на мобильном */
.nav-call {
  display: inline-flex;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 26%, transparent);
  color: var(--text);
  flex: none;
}
.nav-call svg { width: 17px; height: 17px; }
.nav:not(.scrolled) .nav-call {
  background: rgba(17, 15, 9, 0.42);
  border-color: rgba(236, 228, 210, 0.5);
}

/* ---- Аудио-переключатель: тишина · звук · следующая композиция ---- */
.audio-ctl {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 5px 0 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 26%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex: none;
  transition: background 0.5s ease, border-color 0.5s ease;
}
.audio-ctl button {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  padding: 0;
  transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.audio-ctl button:hover { color: var(--text); }
.audio-ctl button:active { transform: scale(0.9); }
.audio-next svg { width: 15px; height: 15px; display: block; }
.audio-next:hover svg { transform: translateX(1px); transition: transform 0.35s ease; }

.audio-toggle { position: relative; }
.audio-ico { width: 17px; height: 17px; display: block; }
.audio-eq {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 16px;
  height: 13px;
}
.audio-eq i {
  width: 2px;
  height: 30%;
  background: currentColor;
  border-radius: 1px;
}
.audio-ctl[data-on="true"] .audio-toggle { color: var(--gold-bright); }
.audio-ctl[data-on="true"] .audio-ico { display: none; }
.audio-ctl[data-on="true"] .audio-eq { display: flex; }
.audio-ctl[data-on="true"] .audio-eq i { animation: audioEq 0.95s ease-in-out infinite; }
.audio-eq i:nth-child(1) { animation-delay: -0.5s; }
.audio-eq i:nth-child(2) { animation-delay: -0.15s; }
.audio-eq i:nth-child(3) { animation-delay: -0.32s; }
.audio-eq i:nth-child(4) { animation-delay: -0.05s; }
@keyframes audioEq {
  0%, 100% { height: 26%; }
  50% { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .audio-ctl[data-on="true"] .audio-eq i { animation: none; height: 62%; }
}

.audio-track {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
  transition: color 0.4s ease;
}
.audio-ctl[data-on="true"] .audio-track { color: var(--text); }
.audio-track.is-switch { animation: audioSwap 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes audioSwap {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Над фото (шапка прозрачна) — тёмная подложка, как у остальных контролов */
.nav:not(.scrolled) .audio-ctl {
  background: rgba(17, 15, 9, 0.42);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-color: rgba(236, 228, 210, 0.5);
}
.nav:not(.scrolled) .audio-ctl button { color: rgba(236, 228, 210, 0.78); }
.nav:not(.scrolled) .audio-ctl button:hover { color: #f1ece0; }
.nav:not(.scrolled) .audio-track { color: rgba(236, 228, 210, 0.7); }
.nav:not(.scrolled) .audio-ctl[data-on="true"] .audio-toggle,
.nav:not(.scrolled) .audio-ctl[data-on="true"] .audio-track { color: #f1ece0; }

/* ============================================================
   ПЛАВНЫЕ ПЕРЕХОДЫ ЦВЕТА (палитра / тема) + вуаль-эффект
   ============================================================ */

/* На время переключения мягко кросс-фейдим все цвета сразу */
html.zl-anim,
html.zl-anim .nav,
html.zl-anim body,
html.zl-anim *:not(.hero-media img):not(.contact-bg img):not(.plan-img img) {
  transition: background-color 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              fill 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.85s cubic-bezier(0.4, 0, 0.2, 1),
              -webkit-text-stroke-color 0.85s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Вуаль: лёгкая волна нового акцента проходит по экрану */
#zl-color-veil {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(120% 80% at 50% 0%, var(--veil, #c9a86e) 0%, transparent 60%),
    radial-gradient(120% 80% at 50% 100%, var(--veil, #c9a86e) 0%, transparent 60%);
}
#zl-color-veil.on { animation: zlVeil 0.95s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes zlVeil {
  0%   { opacity: 0; }
  40%  { opacity: 0.6; }
  100% { opacity: 0; }
}

/* Плавная смена языка: текст растворяется и собирается заново */
html.zl-lang-anim [data-i18n] {
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
html.zl-lang-anim.zl-lang-out [data-i18n] {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(7px);
}

@media (prefers-reduced-motion: reduce) {
  html.zl-anim, html.zl-anim * { transition: none !important; }
  #zl-color-veil.on { animation: none; }
  html.zl-lang-anim [data-i18n] { transition: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-top: 124px;
}

.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: heroZoom 16s ease-out forwards;
  will-change: transform;
}
@keyframes heroZoom { to { transform: scale(1); } }

/* плита-рамка как на типографском оттиске */
.hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: 2;
  border: 1px solid rgba(236, 228, 210, 0.42);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(17,15,9,0.5) 0%, rgba(17,15,9,0.28) 30%, rgba(17,15,9,0.5) 60%, rgba(17,15,9,0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1480px, 94vw);
  margin: 0 auto;
  padding: 0 40px 64px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.hero-kicker::before { content: ""; width: 44px; height: 1px; background: currentColor; opacity: 0.7; }
.hero-kicker .label { color: rgba(236, 228, 210, 0.92); text-shadow: 0 1px 12px rgba(17, 15, 9, 0.5); }

.hero h1 {
  font-size: clamp(46px, 7.2vw, 108px);
  color: #f6efdd;
  max-width: 15ch;
  text-wrap: balance;
  margin-bottom: 40px;
  font-weight: 500;
  text-shadow: 0 2px 34px rgba(17, 15, 9, 0.5), 0 1px 3px rgba(17, 15, 9, 0.32);
}

.hero-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  border-top: 1px solid rgba(236, 228, 210, 0.4);
  padding-top: 26px;
}

.hero-facts { display: flex; gap: clamp(26px, 4vw, 70px); flex-wrap: wrap; }
.fact { display: flex; flex-direction: column; gap: 8px; }
.fact-num { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 2.8vw, 42px); color: #f6efdd; line-height: 1; }
.fact-num small { font-size: 0.5em; opacity: 0.7; }
.fact-cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(236,228,210,0.66); }

.hero-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.hero-price { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3vw, 46px); color: #f6efdd; line-height: 1; white-space: nowrap; }

/* кнопки — авторские: заливка волной снизу, дыхание трекинга, живая стрелка */
.btn {
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 28px;
  border-radius: 0;
  border: 1px solid currentColor;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.5s var(--ease-soft),
              letter-spacing 0.6s var(--ease-expo),
              border-color 0.5s var(--ease-soft);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.58s var(--ease-expo);
}
.btn::after {
  content: "\2192";
  font-family: var(--body);
  font-size: 1.15em;
  transition: transform 0.5s var(--ease-expo);
}
.btn:hover { color: var(--bg); letter-spacing: 0.26em; }
.btn:hover::before { transform: scaleY(1); }
.btn:hover::after { transform: translateX(7px); }
.btn:active::before { transform: scaleY(1) scaleX(0.985); }
.btn.ghost { opacity: 0.92; }

/* На фото-секциях — светлая рамка, инверсия в бумагу */
.hero .btn, .contact .btn { color: #f6efdd; }
.hero .btn::before, .contact .btn::before { background: #f1ece0; }
.hero .btn:hover, .contact .btn:hover { color: #1b1810; }

/* ---------- Манифест ---------- */

.statement { padding: clamp(64px, 8vh, 104px) 0; }

.statement-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(48px, 6vw, 120px);
  align-items: end;
}

.statement-text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1.18;
  max-width: 18ch;
  color: var(--text);
  text-wrap: pretty;
}
.statement-text em { font-style: italic; color: var(--gold-bright); }

.statement-side { display: flex; flex-direction: column; gap: 22px; color: var(--text-muted); font-size: 16px; max-width: 42ch; line-height: 1.7; }
.statement-side p { text-wrap: pretty; }

/* ---------- Характеристики — спецификация ---------- */

.specs { padding-bottom: clamp(56px, 7vh, 92px); }

.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--text);
}
.spec {
  border-bottom: 1px solid var(--line-soft);
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 138px;
  justify-content: space-between;
  position: relative;
}
.spec:not(:nth-child(4n)) { border-right: 1px solid var(--line-soft); }
.spec-num { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 3vw, 50px); color: var(--text); line-height: 0.95; }
.spec-num small { font-size: 0.42em; color: var(--gold); letter-spacing: 0.02em; }
.spec-cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); }

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

.gallery { padding-bottom: clamp(28px, 4vh, 56px); }

.g-row {
  display: grid;
  gap: clamp(22px, 2.8vw, 46px);
  margin-bottom: clamp(52px, 6.5vh, 96px);
  align-items: center;
}
.g-row.r-6040 { grid-template-columns: 1.3fr 1fr; }
.g-row.r-4060 { grid-template-columns: 1fr 1.3fr; }
.g-row.r-full { grid-template-columns: 1fr; }

.g-item { position: relative; }

.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  transition: box-shadow 0.55s ease, transform 0.55s ease;
}
.img-frame::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04) translateY(var(--py, 0px));
  will-change: transform;
  transition: filter 0.5s ease;
}
.img-frame:hover { box-shadow: 0 28px 60px rgba(20, 16, 8, 0.30); }
html[data-theme="dark"] .img-frame:hover,
html[data-theme="dusk"] .img-frame:hover { box-shadow: 0 30px 66px rgba(0, 0, 0, 0.55); }

.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-45 { aspect-ratio: 4 / 4.2; }
.ratio-219 { aspect-ratio: 16 / 9; }

.g-caption {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-top: 20px;
}
.g-caption .num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  text-stroke: 1px var(--gold);
}
.g-caption .name { font-family: var(--serif); font-weight: 500; font-size: clamp(20px, 1.9vw, 28px); color: var(--text); }
.g-caption .area { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-inline-start: auto; white-space: nowrap; align-self: center; }

.g-text {
  max-width: 38ch;
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.7;
  text-wrap: pretty;
}
.g-text .serif { font-size: clamp(25px, 2.4vw, 36px); color: var(--text); margin-bottom: 16px; line-height: 1.1; }

.g-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 2.8vw, 46px); }

/* ---------- Планировка — инвертированный «чертёж» ---------- */

.plan {
  background: var(--ink);
  color: var(--ink-paper);
  padding: clamp(60px, 8vh, 100px) 0;
}
.plan .label { color: rgba(236, 228, 210, 0.6); }
.plan h2 { color: var(--ink-paper); }
.plan .section-head { border-top-color: rgba(236, 228, 210, 0.5); }

.plan-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(48px, 6vw, 100px);
  align-items: center;
}

.plan-img {
  background: #f4efe4;
  padding: clamp(24px, 3vw, 50px);
  border: 1px solid rgba(236, 228, 210, 0.16);
}
.plan-img img { width: 100%; mix-blend-mode: multiply; }

.room-list { list-style: none; }
.room-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(236, 228, 210, 0.16);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.room-list li:first-child { border-top: 1px solid rgba(236, 228, 210, 0.16); }
.room-list .room-name { color: rgba(236, 228, 210, 0.82); }
.room-list .dots { flex: 1; border-bottom: 1px dotted rgba(236, 228, 210, 0.32); transform: translateY(-4px); }
.room-list .sqm { font-family: var(--serif); font-size: 19px; letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--ink-paper); }
.room-list .sqm small { font-size: 12px; color: var(--gold-bright); }
.room-list li.total { border-bottom: none; padding-top: 22px; }
.room-list li.total .room-name { font-family: var(--serif); font-size: 18px; letter-spacing: 0; text-transform: none; color: var(--ink-paper); }
.room-list li.total .sqm { font-size: 28px; }

.plan-note { margin-top: 28px; font-size: 15px; line-height: 1.7; color: rgba(236, 228, 210, 0.58); max-width: 40ch; text-wrap: pretty; }

/* ---------- Локация ---------- */

.location { padding: clamp(60px, 8vh, 100px) 0 clamp(52px, 6.5vh, 84px); }

.loc-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(48px, 6vw, 110px);
  align-items: start;
}

.loc-address { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 3.4vw, 52px); color: var(--text); margin-bottom: 16px; text-wrap: balance; line-height: 1.05; }
.loc-sub { color: var(--text-muted); max-width: 38ch; line-height: 1.7; text-wrap: pretty; }

.loc-map-embed {
  margin-top: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.loc-map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.metro-list { list-style: none; margin-top: 8px; }
.metro-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line-soft);
}
.metro-list li:first-child { border-top: 1px solid var(--text); }
.metro-dot { width: 7px; height: 7px; background: var(--gold); flex: none; transition: transform 0.35s ease; }
.metro-name { font-family: var(--serif); font-size: 19px; color: var(--text); }
.metro-time { font-family: var(--mono); margin-inline-start: auto; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }

/* Станции отдельной горизонтальной строкой под сеткой */
.metro-row {
  margin-top: clamp(44px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--text);
}
.metro-row li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "dot name" ". time";
  column-gap: 14px;
  row-gap: 9px;
  align-items: center;
  padding: 24px clamp(20px, 2.4vw, 40px);
  border-bottom: none;
  border-right: 1px solid var(--line-soft);
}
.metro-row li:first-child { border-top: none; padding-left: 0; }
.metro-row li:last-child { border-right: none; }
.metro-row .metro-dot { grid-area: dot; }
.metro-row .metro-name { grid-area: name; font-size: clamp(20px, 1.5vw, 24px); }
.metro-row .metro-time { grid-area: time; margin-inline-start: 0; }

.poi-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.poi {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--line);
  padding: 9px 15px;
  white-space: nowrap;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.poi:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.map-btn { margin-top: 30px; }

/* ---------- Квартал / сервис ---------- */

.quarter { padding-bottom: clamp(60px, 8vh, 100px); }
.quarter-hero { margin-bottom: clamp(38px, 4.5vh, 60px); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3vw, 52px);
  margin-top: 40px;
}
.service {
  border-top: 1px solid var(--text);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service .num { font-family: var(--mono); color: var(--gold); font-size: 12px; letter-spacing: 0.2em; }
.service h3 { font-size: 25px; color: var(--text); font-weight: 500; }
.service p { font-size: 15.5px; color: var(--text-muted); line-height: 1.7; text-wrap: pretty; }

/* ---------- Контакты ---------- */

.contact {
  position: relative;
  padding: clamp(68px, 9vh, 116px) 0;
  overflow: hidden;
}
.contact-bg { position: absolute; inset: 0; z-index: 0; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); will-change: transform; }
.contact::before {
  content: "";
  position: absolute; inset: 22px; z-index: 2;
  border: 1px solid rgba(236, 228, 210, 0.4);
  pointer-events: none;
}
.contact::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(17,15,9,0.94) 0%, rgba(17,15,9,0.84) 44%, rgba(17,15,9,0.45) 100%);
}
.contact .container { position: relative; z-index: 3; }

.contact-inner { max-width: 640px; display: flex; flex-direction: column; gap: 30px; }
.contact h2 { color: #f6efdd; }
.contact .label { color: rgba(236, 228, 210, 0.7); }

.contact-price-row { display: flex; flex-direction: column; gap: 8px; }
.contact-price { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 5vw, 72px); color: #f6efdd; line-height: 1.02; }

.agent { display: flex; flex-direction: column; gap: 5px; }
.agent-name { font-family: var(--serif); font-size: 26px; color: #f6efdd; }
.agent-phone {
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 42px);
  color: #ece4d2;
  transition: color 0.3s ease;
  width: fit-content;
}
.agent-phone:hover { color: var(--gold-bright); }

.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.deadline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(236, 228, 210, 0.62);
}
.deadline::before { content: ""; width: 30px; height: 1px; background: var(--gold); }

/* ---------- Футер ---------- */

footer { border-top: 1px solid var(--text); padding: 32px 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Reveal-анимации ---------- */

.reveal {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 1.15s var(--ease-soft),
              transform 1.3s var(--ease-expo);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .hero-media img { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Языки: CJK / арабский + RTL ---------- */
html[lang="zh"] {
  --serif: "Noto Serif SC", "Bodoni Moda", serif;
  --body: "Noto Serif SC", "Spectral", serif;
  --mono: "Noto Serif SC", "Space Mono", sans-serif;
}
html[lang="ar"] {
  --serif: "Noto Naskh Arabic", "Bodoni Moda", serif;
  --body: "Noto Naskh Arabic", "Spectral", serif;
  --mono: "Noto Naskh Arabic", "Space Mono", sans-serif;
}
/* Арабская вязь: убираем разрядку и капитель у моно-подписей */
html[lang="ar"] .label,
html[lang="ar"] .logo-sub,
html[lang="ar"] .nav-links a,
html[lang="ar"] .ctl-label,
html[lang="ar"] .fact-cap,
html[lang="ar"] .spec-cap,
html[lang="ar"] .g-caption .area,
html[lang="ar"] .poi,
html[lang="ar"] .metro-time,
html[lang="ar"] .deadline,
html[lang="ar"] .btn,
html[lang="ar"] .service .num,
html[lang="ar"] .room-list li,
html[lang="ar"] .footer-inner {
  letter-spacing: 0;
  text-transform: none;
}
/* Зеркалим стрелки в RTL */
html[dir="rtl"] .btn::after { content: "←"; }
html[dir="rtl"] .btn:hover::after { transform: translateX(-4px); }

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

/* Десктоп: всё в шапке — гамбургер и ящик скрыты */
@media (min-width: 1101px) {
  .nav-menu-btn { display: none; }
  .nav-collapse { display: none; }
}

/* Планшет и уже: сворачиваем разделы и контролы в ящик */
@media (max-width: 1100px) {
  .nav-rail { display: none; }
  .nav-desk-ctl { display: none; }
  .nav-menu-btn { display: inline-flex; }
  .nav-inner { display: flex; justify-content: space-between; padding: 16px 0; }
}

@media (max-width: 1080px) {
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .spec:nth-child(2n) { border-right: none; }
  .spec:not(:nth-child(4n)) { border-right: 1px solid var(--line-soft); }
  .spec:nth-child(2n) { border-right: none; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .statement-grid, .plan-grid, .loc-grid { grid-template-columns: 1fr; }
  .metro-row { grid-template-columns: 1fr; }
  .metro-row li { border-right: none; border-bottom: 1px solid var(--line-soft); padding-left: 0; }
  .metro-row li:last-child { border-bottom: none; }
  .hero-content { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-inner { padding: 14px 0; gap: 10px; }

  /* Ящик на всю ширину экрана */
  .nav-collapse {
    right: 12px;
    left: 12px;
    width: auto;
  }
  .nav-menu-label { display: none; }
  .nav-menu-btn { padding: 0; width: 38px; justify-content: center; }

  /* Hero компактнее */
  .hero::before { inset: 12px; }
  .hero { padding-top: 92px; }
  .hero-content { padding: 0 22px 40px; }
  .hero-kicker { margin-bottom: 14px; gap: 12px; }
  .hero-kicker::before { width: 28px; }
  .hero h1 { font-size: clamp(38px, 10vw, 60px); margin-bottom: 26px; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 24px; padding-top: 22px; }
  .hero-cta { align-items: flex-start; flex-direction: row; align-items: center; gap: 20px; flex-wrap: wrap; }
  .hero-facts { gap: 22px 30px; }

  /* Манифест / тексты */
  .statement-text { font-size: clamp(26px, 6.6vw, 34px); }

  /* Галерея */
  .g-row.r-6040, .g-row.r-4060, .g-pair { grid-template-columns: 1fr; }
  .g-caption { gap: 14px; margin-top: 16px; }
  .g-caption .num { font-size: 40px; }

  /* Характеристики — 2 колонки */
  .service-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: 1fr 1fr; }
  .spec { padding: 22px 16px 18px; min-height: 124px; }
  .spec:nth-child(2n) { border-right: none; }

  /* Контакты — затемняем фон вертикально для читаемости */
  .contact::before { inset: 12px; }
  .contact::after {
    background: linear-gradient(180deg, rgba(17,15,9,0.86) 0%, rgba(17,15,9,0.7) 50%, rgba(17,15,9,0.9) 100%);
  }
  .contact-inner { gap: 24px; }

  footer { padding: 26px 0; }
}

/* Узкие телефоны */
@media (max-width: 780px) {
  .nav-phone-bar { display: none; }
}

@media (max-width: 600px) {
  .logo-main { font-size: 18px; letter-spacing: 0.3em; }
  .logo-sub { font-size: 7.5px; letter-spacing: 0.34em; }
  .audio-ctl .audio-track { display: none; }
  .audio-ctl { gap: 2px; padding: 0 3px; }
  .hero-facts { gap: 18px 26px; }
  .fact-num { font-size: 26px; }
  .specs-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   ТЕМЫ — переключаются шапкой и панелью Tweaks
   ============================================================ */

/* День = :root (бумага). Ниже — вечер и ночь. */

html[data-theme="dusk"] {
  --bg: #4a3729;
  --bg-soft: #553f2e;
  --bg-card: #614836;
  --line: rgba(245, 230, 208, 0.24);
  --line-soft: rgba(245, 230, 208, 0.12);
  --gold: #e6b87e;
  --gold-bright: #f6d4a0;
  --text: #f7ecd9;
  --text-muted: #cbb49a;
}

html[data-theme="dark"] {
  --bg: #0e1119;
  --bg-soft: #141824;
  --bg-card: #1b2030;
  --line: rgba(214, 224, 245, 0.16);
  --line-soft: rgba(214, 224, 245, 0.08);
  --gold: #cda873;
  --gold-bright: #e7cd9c;
  --text: #e9edf6;
  --text-muted: #99a1b6;
}

/* Фото-секции (hero, контакты) и шапка поверх фото — всегда «вечерние» */
.hero, .contact, .nav:not(.scrolled) {
  --gold: var(--gold-photo, #c9a86e);
  --gold-bright: var(--gold-photo-bright, #e3c995);
  --text: #ece4d2;
  --text-muted: rgba(236, 228, 210, 0.66);
  --line: rgba(236, 228, 210, 0.4);
}

/* ---------- Слоты для фото (drag-and-drop, если используются) ---------- */
.slot-frame { position: relative; overflow: hidden; background: var(--bg-soft); }
.slot-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; z-index: 2; }
.slot-frame image-slot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.credits-note { margin-top: 40px; }
.amenities-head { margin: 40px 0 20px; border-top: 1px solid var(--text); padding-top: 22px; }

/* ============================================================
   ЭФФЕКТЫ
   ============================================================ */

/* Прогресс-бар чтения — тонкая линия туши */
#zl-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  z-index: 300;
  background: var(--gold-photo, #c9a86e);
  pointer-events: none;
}

/* Линия над заголовком секции «дорисовывается» — здесь это верхняя граница */
.section-head { position: relative; }

/* Пословное появление заголовка hero — чистый подъём из-под строки */
.hero h1 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.92em);
  animation: wRise 1.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--wd, 0s);
}
@keyframes wRise {
  to { opacity: 1; transform: none; }
}

/* Hover-эффекты (включаются классом fx-hover на <html>) */
.fx-hover .img-frame img { transition: transform 0.85s cubic-bezier(0.22, 0.61, 0.21, 1), filter 0.5s ease; }
.fx-hover .img-frame:hover img { transform: scale(1.07) translateY(var(--py, 0px)); filter: brightness(1.03); }

.fx-hover .metro-list li:hover .metro-dot { transform: scale(2); }

/* Заголовки: золотая волна по буквам при наведении */
.zl-word { display: inline-block; white-space: nowrap; }
.zl-hx {
  display: inline-block;
  transition:
    transform 0.55s cubic-bezier(0.22, 0.61, 0.21, 1),
    color 0.45s ease,
    text-shadow 0.45s ease;
  transition-delay: calc(var(--ci, 0) * 0.022s);
}
.fx-hover .zl-split:hover .zl-hx {
  transform: translateY(-0.07em);
  color: var(--gold-bright);
  text-shadow: 0 6px 18px rgba(201, 168, 110, 0.22);
}

/* Лейблы секций: расширение трекинга при наведении */
.section-head .label,
.loc-head .label { transition: letter-spacing 0.55s ease, color 0.4s ease; }
.fx-hover .section-head:hover .label,
.fx-hover .loc-head:hover .label { letter-spacing: 0.34em; color: var(--gold-bright); }

@media (prefers-reduced-motion: reduce) {
  .zl-hx { transition: none; }
}

/* 3D-наклон карточек (управляется effects.js) */
.fx-hover .img-frame { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .hero h1 .w { animation: none; opacity: 1; transform: none; }
}

/* ============================================================
   ПОЯВЛЕНИЕ ГАЛЕРЕИ
   ============================================================ */

.g-row.r-full .g-item { width: min(100%, 1040px); margin-inline: auto; }
.quarter-hero { width: min(100%, 1040px); margin-inline: auto; }

/* Появление карточек: лёгкий подъём + «шторка» на фото */
.g-item.reveal { transform: translateY(48px) scale(0.96); }
.g-item.reveal.in { transform: none; }

/* Фото раскрывается снизу вверх как штора */
.reveal .img-frame {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.15s cubic-bezier(0.22, 0.61, 0.21, 1) var(--imgd, 0.08s),
              box-shadow 0.55s ease, transform 0.55s ease;
}
.reveal.in .img-frame { clip-path: inset(0 0 0 0); }

.plan-img.reveal img {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.25s cubic-bezier(0.22, 0.61, 0.21, 1) 0.1s;
}
.plan-img.reveal.in img { clip-path: inset(0 0 0 0); }

/* Подпись под фото поднимается со ступенчатой задержкой */
.g-item.reveal .g-caption > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.21, 1);
}
.g-item.reveal.in .g-caption > * { opacity: 1; transform: none; }
.g-item.reveal.in .g-caption > *:nth-child(1) { transition-delay: 0.42s; }
.g-item.reveal.in .g-caption > *:nth-child(2) { transition-delay: 0.5s; }
.g-item.reveal.in .g-caption > *:nth-child(3) { transition-delay: 0.58s; }

/* Заголовок раздела «выезжает» из-за линейки с акцентной задержкой */
.section-head h2 {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.95s ease 0.12s,
              transform 0.95s cubic-bezier(0.22, 0.61, 0.21, 1) 0.12s;
}
.section-head.reveal.in h2,
.section-head:not(.reveal) h2 { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal .img-frame,
  .plan-img.reveal img { clip-path: none; }
  .g-item.reveal .g-caption > *,
  .section-head h2 { opacity: 1; transform: none; transition: none; }
}

/* Каскад чипов локации */
.poi-row.reveal .poi { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.poi-row.reveal.in .poi { opacity: 1; transform: none; }
.poi-row.reveal.in .poi:nth-child(1) { transition-delay: 0.04s; }
.poi-row.reveal.in .poi:nth-child(2) { transition-delay: 0.10s; }
.poi-row.reveal.in .poi:nth-child(3) { transition-delay: 0.16s; }
.poi-row.reveal.in .poi:nth-child(4) { transition-delay: 0.22s; }
.poi-row.reveal.in .poi:nth-child(5) { transition-delay: 0.28s; }
.poi-row.reveal.in .poi:nth-child(6) { transition-delay: 0.34s; }
.poi-row.reveal.in .poi:nth-child(7) { transition-delay: 0.40s; }
.poi-row.reveal.in .poi:nth-child(8) { transition-delay: 0.46s; }

/* ============================================================
   ДЕТАЛИ HERO: координатный штамп + указатель прокрутки
   ============================================================ */

.hero-stamp {
  position: absolute;
  z-index: 3;
  top: clamp(88px, 12vh, 134px);
  left: clamp(46px, 6vw, 100px);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--mono);
  text-transform: uppercase;
  color: rgba(236, 228, 210, 0.9);
  text-shadow: 0 1px 12px rgba(17, 15, 9, 0.55);
}
.hero-stamp-coord { font-size: 11px; letter-spacing: 0.14em; }
.hero-stamp-loc { font-size: 9.5px; letter-spacing: 0.24em; color: rgba(236, 228, 210, 0.6); }

.hero-scroll {
  position: absolute;
  z-index: 3;
  right: clamp(36px, 5vw, 84px);
  bottom: clamp(44px, 6vh, 88px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(236, 228, 210, 0.84);
  text-shadow: 0 1px 12px rgba(17, 15, 9, 0.55);
}
.hero-scroll-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero-scroll-line {
  width: 1px;
  height: 56px;
  background: rgba(236, 228, 210, 0.3);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 42%;
  background: rgba(236, 228, 210, 0.95);
  animation: scrollCue 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes scrollCue {
  0% { transform: translateY(-110%); }
  55%, 100% { transform: translateY(260%); }
}

/* Номер раздела в контактах (фото-секция, flex-колонка) */
.contact .sec-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  margin-bottom: -20px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line::after { animation: none; }
}

@media (max-width: 720px) {
  .hero-scroll { display: none; }
  .hero-stamp { top: 78px; left: 26px; }
}

/* ============================================================
   3D-ФОН: золотое поле в перспективе (canvas под контентом)
   ============================================================ */
#zl-bg3d {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
#zl-bg3d canvas { display: block; }
/* инвертированная и фото-секции перекрывают фон — задаём им собственную подложку */
.plan { position: relative; isolation: isolate; }

@media (prefers-reduced-motion: reduce) {
  #zl-bg3d { display: none; }
}

/* ---------- Усиленные hover-состояния ---------- */
.img-frame { transition: box-shadow 0.55s ease, transform 0.5s cubic-bezier(0.16, 0.84, 0.24, 1); }
.fx-hover .img-frame:hover {
  box-shadow: 0 40px 90px -24px rgba(20, 16, 8, 0.5), 0 0 0 1px var(--line-soft);
}
.fx-hover .img-frame::after {
  transition: opacity 0.5s ease;
}

/* Карточки-сервисы и спецификации слегка «отзываются» */
.fx-hover .service,
.fx-hover .spec {
  transition: transform 0.5s cubic-bezier(0.16, 0.84, 0.24, 1);
  will-change: transform;
}

/* Метро-точка и чипы — заметнее на наведении */
.fx-hover .metro-list li:hover .metro-dot { transform: scale(2.1); }
.metro-list li { transition: transform 0.4s cubic-bezier(0.16, 0.84, 0.24, 1); }
.fx-hover .metro-list li:hover { transform: translateX(6px); }
