/* ONCE Wongamat — HERITAGE.
   Палитра и шрифты — HERITAGE Brand System 1.0 (limestone, forest, teak, charcoal, sage; Cormorant Garamond 500 и Onest).
   Страница тёмная, как кинозал: фон — глубокий оттенок charcoal, все углы прямые. */

@font-face { font-family: 'Onest'; src: url(../fonts/onest-var.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url(../fonts/cormorant-var.woff2) format('woff2'); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --night: #111513;
  --ink: #171c19;
  --char: #252B28;
  --forest: #173C32;
  --lime: #EEE9DE;
  --sage: #ABB8A4;
  --teak: #765A43;
  --teak-hi: #866850;
  --paper: #F3F0E8;
  --line: rgba(238, 233, 222, .14);
  --line-2: rgba(238, 233, 222, .28);
  --mute: rgba(238, 233, 222, .66);

  --f-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-head: 'Cormorant Garamond', 'Times New Roman', serif;

  --pad: clamp(16px, 4.4vw, 72px);
  --max: 1520px;
  --sec: clamp(96px, 12vw, 184px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--night); overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--night); color: var(--lime);
  font: 400 16px/1.6 var(--f-body); letter-spacing: -.004em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
b, strong { font-weight: 500; }
::selection { background: var(--teak); color: var(--lime); }
:focus-visible { outline: 1.5px solid var(--sage); outline-offset: 3px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--lime); color: var(--night); padding: 10px 14px; }
.skip:focus { top: 12px; }

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

/* ---------- Типографика ---------- */
.title {
  font: 500 clamp(40px, 5.4vw, 88px)/1 var(--f-head); letter-spacing: -.01em;
  text-wrap: balance;
}
.title--sm { font-size: clamp(36px, 4.2vw, 68px); }
.title--xl { font-size: clamp(56px, 9vw, 152px); line-height: .92; }
.title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.title .w > span { display: inline-block; }
.lead { font-size: clamp(17px, 1.3vw, 20px); line-height: 1.55; max-width: 36em; color: var(--mute); text-wrap: pretty; }
.cap { font-size: 12px; letter-spacing: .02em; color: rgba(238, 233, 222, .55); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; white-space: nowrap;
  font: 500 15px/1 var(--f-body); letter-spacing: .01em;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--teak { background: var(--teak); color: var(--lime); }
.btn--teak:hover { background: var(--teak-hi); }
.btn--line { border: 1px solid var(--line-2); color: var(--lime); background: rgba(17, 21, 19, .25); }
.btn--line:hover { border-color: var(--lime); }

/* ---------- Титры ---------- */
.titles { display: none; }
.motion .titles {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 250;
  background: #0c0f0e; color: var(--lime);
}
.titles__bar { position: absolute; left: 0; right: 0; height: 13vh; background: #060807; z-index: 2; }
.titles__bar--t { top: 0; }
.titles__bar--b { bottom: 0; }
.titles__card { grid-area: 1 / 1; text-align: center; opacity: 0; }
.titles__card--1 img { width: clamp(170px, 18vw, 240px); height: auto; margin: 0 auto 18px; }
.titles__card--1 p { font: 300 13px/1 var(--f-body); letter-spacing: .42em; text-transform: lowercase; padding-left: .42em; color: var(--sage); }
.titles__name { font: 500 clamp(54px, 9vw, 148px)/.9 var(--f-head); letter-spacing: .02em; }
.titles__name span { display: block; font-size: .5em; letter-spacing: .3em; padding-left: .3em; margin-top: .3em; }
.titles__place { margin-top: 26px; font: 400 12px/1 var(--f-body); letter-spacing: .32em; text-transform: uppercase; color: var(--sage); }
.titles__skip {
  position: absolute; right: var(--pad); bottom: calc(13vh + 18px); z-index: 3;
  font-size: 13px; color: rgba(238, 233, 222, .6); border-bottom: 1px solid rgba(238, 233, 222, .3); padding-bottom: 2px;
}
.titles__skip:hover { color: var(--lime); }

/* зерно плёнки: только фиксированный слой, без перерисовки при прокрутке */
.grain {
  position: fixed; inset: 0; z-index: 240; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Шапка ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: var(--header-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--pad);
  transition: background-color .5s var(--ease), border-color .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-solid { background: rgba(17, 21, 19, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.header__logo img { width: 150px; height: auto; }
.header__project { display: flex; gap: 10px; align-items: baseline; padding-left: 24px; border-left: 1px solid var(--line-2); font: 500 13px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.header__project-sub { color: var(--sage); letter-spacing: .14em; }
.header__nav { display: flex; gap: clamp(16px, 1.8vw, 30px); margin-left: auto; font-size: 14.5px; }
.header__nav a { position: relative; padding: 6px 0; color: rgba(238, 233, 222, .82); transition: color .3s; }
.header__nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.header__nav a:hover, .header__nav a.is-active { color: var(--lime); }
.header__nav a:hover::after, .header__nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__cta { min-height: 44px; padding: 0 20px; font-size: 14px; }
.header__burger { display: none; width: 44px; height: 44px; margin-left: auto; position: relative; }
.header__burger i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--lime); transition: transform .4s var(--ease), top .4s var(--ease); }
.header__burger i:first-child { top: 17px; }
.header__burger i:last-child { top: 26px; }
.header__burger[aria-expanded="true"] i:first-child { top: 21.5px; transform: rotate(45deg); }
.header__burger[aria-expanded="true"] i:last-child { top: 21.5px; transform: rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 190; background: var(--night); padding: calc(var(--header-h) + 24px) var(--pad) 32px; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; }
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 6px; }
.menu nav a { font: 500 clamp(30px, 8vw, 44px)/1.15 var(--f-head); }
.menu__foot { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 32px; color: var(--sage); font-size: 15px; }

@media (max-width: 1180px) {
  .header__nav { display: none; }
  .header__cta { margin-left: auto; }
  .header__burger { display: block; margin-left: 0; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .header { gap: 12px; }
  .header__logo img { width: 116px; }
  .header__project { padding-left: 12px; font-size: 11px; letter-spacing: .1em; }
  .header__project-sub { display: none; }
  .header__cta { display: none; }
  .header__burger { margin-left: auto; }
}

/* ---------- Первый кадр ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #060807; }
.hero__frame { position: absolute; inset: 0; clip-path: inset(0% 0% 0% 0%); will-change: clip-path; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 40%; transform-origin: 60% 55%; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 13, 12, .55) 0%, rgba(10, 13, 12, 0) 22%),
    linear-gradient(0deg, rgba(10, 13, 12, .88) 0%, rgba(10, 13, 12, .35) 38%, rgba(10, 13, 12, 0) 62%),
    linear-gradient(90deg, rgba(10, 13, 12, .55) 0%, rgba(10, 13, 12, 0) 55%);
}
.hero__body { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; padding-bottom: clamp(36px, 8vh, 88px); }
.hero__eyebrow { font: 500 12px/1.3 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: rgba(238, 233, 222, .78); text-shadow: 0 1px 12px rgba(10, 13, 12, .5); margin-bottom: clamp(14px, 2vh, 22px); }
.hero__title { font: 500 clamp(68px, 11.5vw, 196px)/.84 var(--f-head); letter-spacing: -.012em; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line + .line { padding-left: .55em; }
.hero__lead { margin-top: clamp(18px, 3vh, 30px); max-width: 30em; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: rgba(238, 233, 222, .86); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 3.4vh, 34px); }
.hero__cap { position: absolute; right: var(--pad); bottom: clamp(36px, 8vh, 88px); }
@media (max-width: 700px) {
  .hero__img { object-position: 30% 50%; }
  .hero__title .line + .line { padding-left: 0; }
  .hero__cap { bottom: auto; top: calc(var(--header-h) + 10px); }
  .hero__cta .btn { flex: 1 1 auto; }
}

/* ---------- Место ---------- */
.place { padding: var(--sec) 0; }
.place__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 112px); align-items: center; }
.place__media { position: relative; }
.place__media img { width: 100%; height: auto; aspect-ratio: 1500 / 1612; object-fit: cover; }
.place__media .cap { margin-top: 12px; }
.place__text .lead { margin-top: 26px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 28px; margin-top: clamp(36px, 5vw, 64px); }
.facts dt { font: 200 clamp(46px, 5vw, 78px)/1 var(--f-body); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.facts dt small { font-size: .36em; font-weight: 300; margin-left: .2em; letter-spacing: 0; }
.facts dd { margin-top: 10px; font-size: 14.5px; color: var(--mute); max-width: 17em; }
.place__notes { margin-top: clamp(32px, 4vw, 52px); display: grid; gap: 12px; font-size: 15px; color: var(--mute); }
.place__notes b { color: var(--lime); }
@media (max-width: 900px) {
  .place__grid { grid-template-columns: 1fr; }
  .place__media { max-width: 520px; }
}

/* ---------- Природа ---------- */
.nature { background: var(--ink); }
.nature__pin { min-height: 100vh; padding: calc(var(--header-h) + clamp(24px, 4vh, 48px)) 0 clamp(32px, 5vh, 56px); display: flex; flex-direction: column; }
.nature__head { display: grid; grid-template-columns: auto 1fr; gap: 16px 56px; align-items: end; }
.nature__head .lead { max-width: 28em; }
.nature__stage { flex: 1; display: grid; grid-template-columns: 4fr 7fr; gap: clamp(24px, 4vw, 72px); align-items: stretch; width: 100%; max-width: var(--max); margin: clamp(28px, 4vh, 48px) auto 0; padding: 0 var(--pad); }
.nature__frames { position: relative; order: 2; min-height: 52vh; overflow: hidden; background: var(--night); }
.nature__frame { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); }
.nature__frame.is-on { opacity: 1; }
.nature__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 2.4s var(--ease); }
.nature__frame.is-on img { transform: scale(1); }
.nature__words { order: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(6px, 1.4vh, 16px); }
.nature__words button { display: block; width: 100%; text-align: left; padding: 6px 0; }
.nature__word { display: block; font: 500 clamp(44px, 5.6vw, 96px)/1 var(--f-head); color: rgba(238, 233, 222, .22); transition: color .6s var(--ease); }
.nature__note { display: block; max-width: 22em; font-size: 15px; line-height: 1.5; color: var(--mute); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .7s var(--ease), opacity .5s var(--ease), margin .7s var(--ease); }
.nature__words li.is-on .nature__word { color: var(--lime); }
.nature__words li.is-on .nature__note { max-height: 6em; opacity: 1; margin: 10px 0 8px; }
@media (max-width: 900px) {
  .nature__head { grid-template-columns: 1fr; }
  .nature__stage { grid-template-columns: 1fr; }
  .nature__frames { order: 1; min-height: 0; aspect-ratio: 4 / 3; }
  .nature__words { order: 2; }
}

/* ---------- Клуб ---------- */
.club { background: var(--night); overflow: hidden; }
.club__pin { padding: calc(var(--header-h) + clamp(24px, 4vh, 44px)) 0 clamp(28px, 5vh, 56px); min-height: 100vh; display: flex; flex-direction: column; }
.club__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.club__hint { font-size: 14px; color: var(--sage); }
.club__track { display: flex; gap: clamp(20px, 3vw, 48px); margin-top: clamp(24px, 4vh, 44px); padding: 0 var(--pad); flex: 1; align-items: stretch; will-change: transform; }
.scene { flex: 0 0 auto; width: min(58vw, 820px); display: flex; flex-direction: column; }
.scene--wide { width: min(84vw, 1240px); }
.scene__img { position: relative; overflow: hidden; height: 54vh; min-height: 280px; background: var(--ink); }
.scene__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.scene__text { display: grid; grid-template-columns: auto 1fr; gap: 4px 28px; padding-top: 22px; align-items: start; }
.scene__floor { grid-row: span 3; font: 200 clamp(44px, 4.4vw, 72px)/.9 var(--f-body); letter-spacing: -.03em; min-width: 2.2em; }
.scene__floor small { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); margin-top: 10px; font-weight: 400; }
.scene h3 { font: 500 clamp(26px, 2.2vw, 36px)/1.05 var(--f-head); }
.scene__text > p:not(.scene__floor) { font-size: 15px; color: var(--mute); max-width: 34em; margin-top: 8px; }
.scene__thumbs { display: flex; gap: 10px; grid-column: 3; grid-row: 1 / span 3; align-self: start; }
.scene--wide .scene__text { grid-template-columns: auto 1fr auto; }
.scene__thumbs li { width: 132px; aspect-ratio: 4 / 3; overflow: hidden; }
.scene__thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .club__track { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 6px; }
  .club__track::after { content: ''; flex: 0 0 1px; }
  .club__track::-webkit-scrollbar { display: none; }
  .scene, .scene--wide { width: 84vw; scroll-snap-align: start; }
  .scene__img { height: auto; aspect-ratio: 4 / 3; min-height: 0; }
  .scene__img img { transform: none; }
  .scene__text { grid-template-columns: 1fr; }
  .scene__floor { grid-row: auto; font-size: 40px; }
  .scene__floor small { display: inline; margin: 0 0 0 8px; }
  .scene--wide .scene__text { grid-template-columns: 1fr; }
  .scene__thumbs { grid-column: auto; grid-row: auto; margin-top: 14px; }
  .scene__thumbs li { width: calc(50% - 5px); }
}

/* ---------- Вид с высоты ---------- */
.view { padding: var(--sec) 0 0; background: var(--ink); }
.view__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; }
.viewer { margin-top: clamp(32px, 5vw, 64px); }
.viewer__screen { position: relative; overflow: hidden; background: #0b0e0d; height: min(41vw, 76vh); cursor: grab; }
.viewer__screen:active { cursor: grabbing; }
.viewer__pan { position: absolute; inset: 0 -4%; will-change: transform; }
.viewer__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); }
.viewer__img.is-on { opacity: 1; }
.viewer__alt { position: absolute; left: var(--pad); bottom: 22px; display: flex; gap: 14px; align-items: baseline; padding: 10px 16px; background: rgba(11, 14, 13, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.viewer__alt b { font: 300 28px/1 var(--f-body); letter-spacing: -.02em; }
.viewer__alt span { font-size: 13px; color: var(--sage); }
.viewer__ui { display: grid; grid-template-columns: auto 1fr; gap: 20px 48px; padding-top: 28px; padding-bottom: var(--sec); align-items: start; }
.viewer__heights { display: flex; border: 1px solid var(--line); }
.viewer__heights button { padding: 14px 20px; text-align: left; border-right: 1px solid var(--line); transition: background-color .35s var(--ease); }
.viewer__heights button:last-child { border-right: 0; }
.viewer__heights b { display: block; font: 300 22px/1 var(--f-body); letter-spacing: -.02em; }
.viewer__heights span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--sage); white-space: nowrap; }
.viewer__heights button[aria-pressed="true"] { background: var(--lime); color: var(--night); }
.viewer__heights button[aria-pressed="true"] span { color: var(--forest); }
.viewer__dirs { display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }
.viewer__dirs button { padding: 10px 16px; border: 1px solid var(--line-2); font-size: 14px; transition: background-color .3s, color .3s, opacity .3s; }
.viewer__dirs button[aria-pressed="true"] { background: var(--lime); color: var(--night); border-color: var(--lime); }
.viewer__dirs button:disabled { opacity: .3; cursor: not-allowed; }
.viewer__note { grid-column: 1 / -1; font-size: 13px; color: rgba(238, 233, 222, .5); }
@media (max-width: 900px) {
  .view__head { grid-template-columns: 1fr; }
  .viewer__screen { height: 62vh; max-height: 520px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; cursor: auto; }
  .viewer__screen::-webkit-scrollbar { display: none; }
  .viewer__pan { position: relative; inset: auto; height: 100%; width: calc(62vh * 2.63); max-width: calc(520px * 2.63); transform: none !important; }
  .viewer__alt { position: sticky; left: 12px; bottom: 12px; top: auto; margin-top: -60px; width: max-content; }
  .viewer__ui { grid-template-columns: 1fr; }
  .viewer__heights { width: 100%; }
  .viewer__heights button { flex: 1; padding: 12px 10px; }
  .viewer__heights span { white-space: normal; font-size: 11.5px; }
}

/* ---------- Квартиры ---------- */
.res { padding: var(--sec) 0; }
.res__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; }
.res__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(32px, 4vw, 56px); padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.res__tabs button, .res__ph-link { padding: 11px 20px; border: 1px solid var(--line-2); font-size: 15px; transition: background-color .3s, color .3s, border-color .3s; }
.res__tabs button[aria-selected="true"] { background: var(--lime); color: var(--night); border-color: var(--lime); }
.res__ph-link { margin-left: auto; border-color: transparent; color: var(--sage); }
.res__ph-link:hover { color: var(--lime); }
.res__body { display: grid; grid-template-columns: minmax(220px, 3fr) minmax(0, 9fr); gap: clamp(24px, 3.4vw, 56px); margin-top: 28px; }
.res__list { display: flex; flex-direction: column; gap: 4px; }
.res__list button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 16px 18px; text-align: left; border-left: 2px solid transparent; transition: background-color .3s, border-color .3s; }
.res__list button:hover { background: rgba(238, 233, 222, .04); }
.res__list button[aria-pressed="true"] { background: rgba(238, 233, 222, .07); border-left-color: var(--teak); }
.res__list .n { font-size: 15.5px; }
.res__list .a { font: 300 15px/1.4 var(--f-body); color: var(--sage); }
.res__list .s { grid-column: 1 / -1; font-size: 12.5px; color: rgba(238, 233, 222, .5); }
.res__panel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 3vw, 48px); transition: opacity .35s var(--ease); }
.res__panel.is-swap { opacity: 0; }
.res__visual { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; min-width: 0; }
.res__visual > * { min-width: 0; }
.res__info, .res__body > *, .ph__body > *, .dev__grid > *, .contact__grid > *, .place__grid > * { min-width: 0; }
.res__plan { background: var(--paper); padding: clamp(18px, 2.4vw, 36px); display: grid; place-items: center; aspect-ratio: 5 / 4; }
.res__plan img { width: 100%; height: 100%; mix-blend-mode: multiply; object-fit: contain; }
.res__photo { aspect-ratio: 16 / 7; overflow: hidden; background: var(--ink); }
.res__photo img { width: 100%; height: 100%; object-fit: cover; }
.res__photo[hidden] { display: none; }
.res__en { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--sage); }
.res__name { font: 500 clamp(30px, 2.8vw, 44px)/1.05 var(--f-head); margin-top: 10px; }
.res__text { margin-top: 14px; font-size: 15px; color: var(--mute); }
.res__specs { margin-top: 22px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.res__specs div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.res__specs dt { color: var(--sage); }
.res__specs dd.is-sold { color: rgba(238, 233, 222, .55); }
.floor { margin-top: 24px; }
.floor__svg { width: 100%; height: auto; }
.floor__cap { margin-top: 8px; font-size: 12.5px; color: rgba(238, 233, 222, .55); }
.res__cta { margin-top: 24px; }
.res__foot { margin-top: 28px; font-size: 13px; color: rgba(238, 233, 222, .5); }
.floor-cell { fill: rgba(238, 233, 222, .05); stroke: rgba(238, 233, 222, .22); stroke-width: 1; transition: fill .45s var(--ease); }
.floor-cell.is-on { fill: var(--teak); stroke: #a07d61; }
.floor-core { fill: rgba(238, 233, 222, .12); }
.floor-lbl { fill: var(--sage); font: 400 11px var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.floor-num { fill: rgba(238, 233, 222, .5); font: 400 10px var(--f-body); }
.floor-cell.is-on + .floor-num { fill: var(--lime); }
@media (max-width: 1100px) {
  .res__panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .res__head { grid-template-columns: 1fr; }
  .res__body { grid-template-columns: minmax(0, 1fr); }
  .res__list { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
  .res__list::-webkit-scrollbar { display: none; }
  .res__list li { flex: 0 0 auto; }
  .res__list button { border-left: 0; border-bottom: 2px solid transparent; padding: 12px 14px; }
  .res__list button[aria-pressed="true"] { border-bottom-color: var(--teak); }
  .res__list .s { display: none; }
  .res__ph-link { margin-left: 0; }
}

/* ---------- Пентхаусы ---------- */
.ph__hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #060807; }
.ph__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.ph__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 13, 12, .92) 0%, rgba(10, 13, 12, .3) 45%, rgba(10, 13, 12, 0) 70%); }
.ph__intro { position: absolute; left: 0; right: 0; bottom: clamp(40px, 9vh, 96px); margin: 0 auto; }
.ph__intro .lead { margin-top: 22px; color: rgba(238, 233, 222, .84); max-width: 30em; }
.ph__cap { position: absolute; right: var(--pad); top: calc(var(--header-h) + 14px); }
.ph__body { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 88px); padding-top: clamp(56px, 7vw, 96px); padding-bottom: var(--sec); align-items: start; }
.ph__list { border-top: 1px solid var(--line); }
.ph__list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.ph__list .n { font: 500 clamp(22px, 1.9vw, 30px)/1.1 var(--f-head); }
.ph__list .a { font: 300 clamp(22px, 1.9vw, 30px)/1.1 var(--f-body); letter-spacing: -.02em; text-align: right; }
.ph__list .f { font-size: 13.5px; color: var(--sage); }
.ph__list .p { font-size: 14.5px; text-align: right; }
.ph__list .p.is-sold { color: rgba(238, 233, 222, .5); }
.ph__plan-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ph__plan-tabs button { padding: 10px 16px; border: 1px solid var(--line-2); font-size: 14px; transition: background-color .3s, color .3s; }
.ph__plan-tabs button[aria-pressed="true"] { background: var(--lime); color: var(--night); border-color: var(--lime); }
.ph__sheet { background: var(--paper); padding: clamp(14px, 2vw, 28px); }
.ph__sheet img { width: 100%; height: auto; mix-blend-mode: multiply; }
.ph__plan .cap { margin-top: 12px; }
@media (max-width: 900px) { .ph__body { grid-template-columns: 1fr; } }

/* ---------- Детали ---------- */
.details { padding: var(--sec) 0; background: var(--ink); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); margin-top: clamp(36px, 5vw, 64px); }
.bento__cell { background: var(--night); padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; }
.bento__cell h3 { font: 500 clamp(24px, 2vw, 32px)/1.1 var(--f-head); margin-top: 18px; }
.bento__cell p { margin-top: 8px; font-size: 15px; color: var(--mute); max-width: 32em; }
.bento__media { position: relative; overflow: hidden; background: var(--paper); }
.bento__media img { width: 100%; height: 100%; object-fit: cover; }
.bento__cell--cabinet { grid-column: 1 / 7; grid-row: 1 / 3; }
.bento__cell--cabinet .bento__media { flex: 1; min-height: 360px; }
.bento__cell--cabinet .cabinet img { object-fit: cover; object-position: 34% 50%; }
.bento__cell--air { grid-column: 7 / 13; }
.bento__cell--air .bento__media { aspect-ratio: 1600 / 748; }
.bento__cell--air .bento__media img { object-fit: contain; }
.bento__cell--lift { grid-column: 7 / 10; }
.bento__cell--lift .bento__media { aspect-ratio: 4 / 3; background: var(--ink); }
.bento__cell--lift .bento__media img { object-position: 50% 40%; }
.bento__cell--service { grid-column: 10 / 13; background: var(--forest); justify-content: flex-end; }
.bento__cell--service h3 { margin-top: 0; }
.bento__facts { margin-top: 22px; display: grid; gap: 10px; font-size: 14px; color: var(--mute); }
.bento__facts b { font: 300 28px/1 var(--f-body); color: var(--lime); margin-right: 8px; letter-spacing: -.02em; }
.cabinet img { position: absolute; inset: 0; transition: opacity .8s var(--ease); object-fit: contain; }
.cabinet__open { opacity: 0; }
.cabinet.is-open .cabinet__open { opacity: 1; }
.cabinet.is-open .cabinet__closed { opacity: 0; }
.cabinet__btn { position: absolute; right: 14px; bottom: 14px; z-index: 2; padding: 10px 16px; background: var(--night); color: var(--lime); font-size: 14px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento__cell--cabinet, .bento__cell--air { grid-column: 1 / -1; grid-row: auto; }
  .bento__cell--cabinet .bento__media { min-height: 0; aspect-ratio: 4 / 3; }
  .bento__cell--lift, .bento__cell--service { grid-column: auto; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
}

/* ---------- Цены ---------- */
.prices { padding: var(--sec) 0; }
.prices__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.quota { display: inline-flex; border: 1px solid var(--line-2); }
.quota button { padding: 12px 18px; font-size: 14.5px; transition: background-color .3s, color .3s; }
.quota button small { font-size: 11px; letter-spacing: .1em; margin-left: 6px; color: var(--sage); }
.quota button[aria-pressed="true"] { background: var(--lime); color: var(--night); }
.quota button[aria-pressed="true"] small { color: var(--forest); }
.prices__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); margin-top: clamp(36px, 5vw, 64px); }
.pgroup h3 { font: 500 26px/1 var(--f-head); padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.pgroup ul { margin-top: 6px; }
.pgroup li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; }
.pgroup li + li { border-top: 1px solid var(--line); }
.pgroup .n { font-size: 14.5px; }
.pgroup .a { font-size: 13px; color: var(--sage); }
.pgroup .n { grid-column: 1; grid-row: 1; }
.pgroup .a { grid-column: 1; grid-row: 2; }
.pgroup .p { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; font: 300 19px/1.2 var(--f-body); letter-spacing: -.01em; white-space: nowrap; }
.pgroup .p.is-sold { font: 400 13px/1.2 var(--f-body); color: rgba(238, 233, 222, .5); }
.prices__note { margin-top: 26px; font-size: 13.5px; color: rgba(238, 233, 222, .55); max-width: 60em; }
@media (max-width: 1100px) { .prices__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .prices__grid { grid-template-columns: 1fr; } }

.pay { margin-top: clamp(64px, 8vw, 112px); display: grid; grid-template-columns: 4fr 8fr; gap: 28px clamp(32px, 5vw, 88px); align-items: start; }
.pay__out { display: grid; gap: 22px; min-width: 0; }
.pay__title { font: 500 clamp(32px, 3vw, 48px)/1 var(--f-head); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips button, .chips--form span { display: inline-block; padding: 10px 16px; border: 1px solid var(--line-2); font-size: 14px; transition: background-color .3s, color .3s, border-color .3s; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--lime); color: var(--night); border-color: var(--lime); }
.pay__field { display: grid; gap: 8px; margin-top: 24px; font-size: 13.5px; color: var(--sage); }
.pay__field input { height: 52px; padding: 0 16px; background: transparent; border: 1px solid var(--line-2); font: 300 22px/1 var(--f-body); color: var(--lime); letter-spacing: -.01em; }
.pay__field input:focus { outline: none; border-color: var(--lime); }
.pay__hint { margin-top: 10px; font-size: 13px; color: rgba(238, 233, 222, .55); }
.pay__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2); align-self: start; }
.pay__steps li { padding: 20px 18px 0 0; display: grid; gap: 8px; align-content: start; }
.pay__steps li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.pay__when { font-size: 13px; color: var(--sage); min-height: 2.6em; }
.pay__steps b { font: 300 clamp(22px, 2vw, 30px)/1.1 var(--f-body); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pay__steps small { font-size: 13px; color: rgba(238, 233, 222, .55); }
.pay__bar { display: flex; height: 6px; gap: 3px; }
.pay__bar i { display: block; height: 100%; background: var(--lime); flex: var(--w, 1) 1 0; transition: flex-grow .8s var(--ease); }
.pay__bar i:nth-child(1) { background: var(--teak); }
.pay__bar i:nth-child(2) { background: var(--sage); }
.pay__bar i:nth-child(3) { background: rgba(238, 233, 222, .5); }
.pay__foot { font-size: 13px; color: rgba(238, 233, 222, .55); }
@media (max-width: 1000px) {
  .pay { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pay__steps { grid-template-columns: 1fr 1fr; }
  .pay__steps li { padding: 18px 12px 18px 0; }
  .pay__steps li + li { padding-left: 0; border-left: 0; }
  .pay__steps li:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .pay__steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Локация ---------- */
.loc { padding: var(--sec) 0; background: var(--ink); }
.loc .lead { margin-top: 20px; }
.dist { position: relative; margin: clamp(88px, 9vw, 128px) 0 clamp(24px, 3vw, 48px); padding: 0 6px; }
.dist__line { position: relative; height: 1px; background: var(--line); }
.dist__line i { position: absolute; inset: 0; background: var(--lime); transform-origin: left; }
.dist__list { position: relative; height: 96px; }
.dist__list li { position: absolute; left: calc(var(--x) * 100%); top: -5px; width: 0; }
.dist__list li::before { content: ''; position: absolute; left: -4.5px; top: 0; width: 9px; height: 9px; background: var(--night); border: 1px solid var(--lime); border-radius: 50%; }
.dist__list li b, .dist__list li span { position: absolute; left: 0; white-space: nowrap; }
.dist__list li b { top: 22px; font: 300 22px/1 var(--f-body); letter-spacing: -.02em; }
.dist__list li span { top: 52px; font-size: 12.5px; color: var(--mute); }
.dist__list li:nth-child(even) b { top: -52px; }
.dist__list li:nth-child(even) span { top: -26px; }
.dist__list li:last-child b, .dist__list li:last-child span { left: auto; right: 0; text-align: right; }
.dist__list li:nth-child(even)::after { content: ''; position: absolute; left: 0; top: -12px; height: 12px; width: 1px; background: var(--line-2); }
.loc__grid { display: grid; grid-template-columns: 3fr 3fr 6fr; gap: clamp(24px, 3.4vw, 56px); align-items: start; }
.loc__col h3 { font: 500 24px/1.1 var(--f-head); padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.loc__col li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; font-size: 14.5px; }
.loc__col li + li { border-top: 1px solid var(--line); }
.loc__col li b { font-weight: 300; white-space: nowrap; color: var(--sage); }
.loc__img img { width: 100%; height: auto; aspect-ratio: 2400 / 1032; object-fit: cover; }
.loc__img .cap { margin-top: 10px; }
.loc__map { margin-top: clamp(32px, 4vw, 48px); }
@media (max-width: 1000px) {
  .loc__grid { grid-template-columns: 1fr 1fr; }
  .loc__img { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 760px) {
  .dist { margin: 40px 0; padding: 0; }
  .dist__line { position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; height: auto; }
  .dist__line i { transform-origin: top; }
  .dist__list { height: auto; display: grid; gap: 18px; padding-left: 28px; }
  .dist__list li, .dist__list li:nth-child(n) { position: relative; left: 0; top: 0; width: auto; display: flex; gap: 14px; align-items: baseline; }
  .dist__list li::before { left: -28px; top: 7px; }
  .dist__list li::after { display: none; }
  .dist__list li b, .dist__list li span, .dist__list li:nth-child(n) b, .dist__list li:nth-child(n) span { position: static; text-align: left; white-space: normal; }
  .dist__list li b { min-width: 4.4em; font-size: 19px; }
  .loc__grid { grid-template-columns: 1fr; }
}

/* ---------- Застройщик и титры ---------- */
.dev { padding: var(--sec) 0; }
.dev__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 112px); align-items: stretch; }
.dev__text .lead { margin-top: 24px; }
.dev__years { margin-top: clamp(32px, 4vw, 48px); display: grid; gap: 0; border-top: 1px solid var(--line); }
.dev__years li { display: grid; grid-template-columns: 5em 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.dev__years b { font-weight: 300; color: var(--sage); font-variant-numeric: tabular-nums; }
.dev__legal { margin-top: 28px; font-size: 14px; color: rgba(238, 233, 222, .58); max-width: 44em; }
.credits { position: relative; overflow: hidden; min-height: 520px; background: #0b0e0d; text-align: center; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; }
.credits::before, .credits::after { content: ''; position: absolute; left: 0; right: 0; height: 30%; z-index: 2; pointer-events: none; }
.credits::before { top: 0; background: linear-gradient(#0b0e0d 25%, rgba(11, 14, 13, 0)); }
.credits::after { bottom: 0; background: linear-gradient(0deg, #0b0e0d 25%, rgba(11, 14, 13, 0)); }
.credits__title { position: relative; z-index: 3; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--sage); }
.credits__roll { display: grid; gap: 26px; margin-top: 44px; }
.credits__roll li { font: 400 15px/1.3 var(--f-body); letter-spacing: .22em; text-transform: uppercase; }
@media (max-width: 900px) {
  .dev__grid { grid-template-columns: 1fr; }
  .credits { min-height: 0; }
  .credits::before, .credits::after { display: none; }
  .credits__roll { gap: 16px; margin-top: 24px; }
  .credits__roll li { font-size: 13px; }
}

/* ---------- HERITAGE и заявка ---------- */
.contact { position: relative; padding: var(--sec) 0; overflow: hidden; }
.contact__bg { position: absolute; inset: 0; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.contact__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night) 18%, rgba(17, 21, 19, .55) 100%), linear-gradient(0deg, var(--night) 0%, rgba(17, 21, 19, 0) 40%); }
.contact__grid { position: relative; display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 6vw, 112px); align-items: start; }
.contact__logo { width: 200px; height: auto; margin-bottom: clamp(28px, 4vw, 48px); }
.contact__text .lead { margin-top: 24px; }
.contact__link { display: inline-block; margin-top: 18px; font-size: 15px; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; color: var(--sage); }
.contact__link:hover { color: var(--lime); border-color: var(--lime); }
.contact__list { margin-top: clamp(32px, 4vw, 48px); display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 520px; }
.contact__list li { display: grid; grid-template-columns: 7em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.contact__list span { color: var(--sage); }
.contact__list a:hover { color: var(--sage); }
.form { background: rgba(23, 28, 25, .94); padding: clamp(22px, 3vw, 44px); display: grid; gap: 18px; border: 1px solid var(--line); }
.form__title { font: 500 clamp(26px, 2.2vw, 34px)/1.1 var(--f-head); }
.form__field { display: grid; gap: 8px; font-size: 13.5px; color: var(--sage); }
.form__field small { color: rgba(238, 233, 222, .5); }
.form__field input { height: 52px; padding: 0 14px; background: var(--night); border: 1px solid var(--line-2); color: var(--lime); font-size: 16px; }
.form__field input::placeholder { color: rgba(238, 233, 222, .45); }
.form__field input:focus { outline: none; border-color: var(--lime); }
.form__field input[aria-invalid="true"] { border-color: #d39a7a; }
.form__set legend { font-size: 13.5px; color: var(--sage); margin-bottom: 0; }
.chips--form { margin-top: 10px; }
.chips--form label { position: relative; }
.chips--form input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips--form input:checked + span { background: var(--lime); color: var(--night); border-color: var(--lime); }
.chips--form input:focus-visible + span { outline: 1.5px solid var(--sage); outline-offset: 2px; }
.form__submit { width: 100%; margin-top: 4px; }
.form__error { color: #e2b49b; font-size: 14px; }
.form__note { font-size: 12.5px; color: rgba(238, 233, 222, .5); }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }

/* ---------- Подвал ---------- */
.footer { padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--night); }
.footer__grid { display: grid; grid-template-columns: auto 1fr auto; gap: 18px 40px; align-items: center; }
.footer__grid > img { width: 140px; height: auto; }
.footer__about, .footer__contacts { font-size: 14px; color: var(--mute); }
.footer__about a { border-bottom: 1px solid var(--line-2); }
.footer__contacts { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__legal { grid-column: 1 / -1; font-size: 12px; color: rgba(238, 233, 222, .45); max-width: 70em; }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr; } }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 260; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; background: var(--lime); color: var(--night); padding: 14px 20px; font-size: 14.5px; max-width: calc(100vw - 32px); transition: transform .5s var(--ease), visibility 0s .5s; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .5s var(--ease), visibility 0s; }

/* ---------- Анимации: исходные состояния только при включённом движении ---------- */
.motion [data-reveal] { opacity: 0; transform: translateY(28px); }
.motion [data-hero] { opacity: 0; }
.motion .title[data-split] { visibility: hidden; }
.motion .title[data-split].is-split { visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .grain { display: none; }
}
