/* ════════════════════════════════════════════
   THE YARD — editorial landing · 2026
   ════════════════════════════════════════════ */

:root {
  --bg: #0d0d0b;
  --green: #14281f;
  --green-deep: #0f1f18;
  --cream: #ede8d9;
  --cream-dim: rgba(237, 232, 217, 0.62);
  --cream-faint: rgba(237, 232, 217, 0.18);
  --cream-bg: #e9e4d6;
  --ink: #14281f;
  --ink-dim: rgba(20, 40, 31, 0.64);
  --ink-faint: rgba(20, 40, 31, 0.18);
  --gold: #d4af37;
  --gold-dim: rgba(212, 175, 55, 0.35);
  --serif: "Oranienbaum", "Playfair Display", Georgia, serif;
  --serif-brand: "Prata", "Playfair Display", Georgia, serif; /* рима до Y в лого: дідонівські тонкі засічки */
  --serif-i: "Playfair Display", Georgia, serif;
  --body: "Golos Text", -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --script: "Great Vibes", cursive;
  --pad: clamp(20px, 4vw, 64px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: no-preference) {
  /* class must NOT contain the substring "lenis" — Lenis's own className
     cleanup regex would split it and the rule would never match */
  html.smooth-on { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* grain */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='300'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='2'/%3E%3C/filter%3E%3Crect%20width='300'%20height='300'%20filter='url(%23n)'%20opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
}

::selection { background: var(--gold); color: var(--bg); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.serif { font-family: var(--serif); font-weight: 400; }
.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.giant {
  font-size: clamp(52px, 9.5vw, 148px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

/* motion guard: hide intro-animated elements until GSAP takes over (anti-FOUC).
   main.js removes .motion in the reduced/no-gsap branch. */
html.motion .nav,
html.motion .hero__meta,
html.motion .hero__cta .btn,
html.motion .hero__script,
html.motion .hero__tagline,
html.motion .hero__title { opacity: 0; }

/* no-motion: static fallback state — must always win over the motion guard */
html.no-motion .nav,
html.no-motion .hero__meta,
html.no-motion .hero__cta .btn,
html.no-motion .hero__script,
html.no-motion .hero__tagline,
html.no-motion .hero__title { opacity: 1; }
html.no-motion .hero__video,
html.no-motion .hero__story,
html.no-motion .hero__veil { display: none; }
html.no-motion .marquee__track { transform: translateX(-2%); }

/* split-word masking */
.w-mask { display: inline-block; overflow: clip; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.w-mask > .w { display: inline-block; will-change: transform; }

/* ════════ buttons ════════ */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 17px 30px;
  border: 1px solid var(--cream-faint);
  color: var(--cream);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.35s ease, border-color 0.35s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: -1;
}
.btn:hover { color: var(--bg); border-color: var(--gold); }
.btn:hover::before { transform: scaleY(1); }
.btn--solid { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.btn--solid::before { background: var(--cream); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ════════ nav ════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px var(--pad);
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}
.nav.scrolled {
  background: rgba(13, 13, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(237, 232, 217, 0.07);
}
.nav__logo { display: flex; align-items: center; gap: 12px; }
.nav__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  padding-top: 2px;
}
.nav__word {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a {
  font-size: 13.5px;
  color: var(--cream-dim);
  transition: color 0.25s ease;
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.nav__links a:hover { color: var(--cream); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__phone { color: var(--gold); letter-spacing: 0.06em; transition: color 0.25s ease; }
.nav__phone:hover { color: var(--cream); }

.nav__burger {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--cream-faint);
  cursor: pointer;
  position: relative;
  z-index: 120;
}
.nav__burger span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1px;
  background: var(--cream);
  transition: transform 0.35s ease, top 0.35s ease;
}
.nav__burger span:nth-child(1) { top: 15px; }
.nav__burger span:nth-child(2) { top: 23px; }
body.menu-open .nav__burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

body.menu-open .nav {
  z-index: 130;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

/* fullscreen menu (mobile) */
.menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--green-deep);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
body.menu-open .menu { opacity: 1; visibility: visible; }
.menu__links { display: flex; flex-direction: column; gap: 6px; }
.menu__links a {
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.25;
  display: flex;
  align-items: baseline;
  gap: 16px;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.5s ease, color 0.25s ease;
}
.menu__links a:hover { color: var(--gold); }
.menu__links a em { font-size: 12px; color: var(--gold); font-style: normal; }
body.menu-open .menu__links a { transform: translateY(0); opacity: 1; }
body.menu-open .menu__links a:nth-child(1) { transition-delay: 0.06s; }
body.menu-open .menu__links a:nth-child(2) { transition-delay: 0.1s; }
body.menu-open .menu__links a:nth-child(3) { transition-delay: 0.14s; }
body.menu-open .menu__links a:nth-child(4) { transition-delay: 0.18s; }
body.menu-open .menu__links a:nth-child(5) { transition-delay: 0.22s; }
body.menu-open .menu__links a:nth-child(6) { transition-delay: 0.26s; }
.menu__phone { font-family: var(--serif); font-size: 26px; color: var(--gold); }

/* ════════ sections common ════════ */
section { position: relative; }
.sec-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 var(--pad);
  margin-bottom: clamp(36px, 6vw, 80px);
}
.sec-no { color: var(--gold); }
.sec-line { flex: 0 1 120px; height: 1px; background: var(--cream-faint); }
.sec-name { color: var(--cream-dim); }
.sec-head--dark .sec-line { background: var(--ink-faint); }
.sec-head--dark .sec-name { color: var(--ink-dim); }
.sec-head--dark .sec-no { color: #a2801a; }

/* ════════ hero ════════ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: clip;
  display: flex;
  flex-direction: column;
}
.hero__bg { position: absolute; inset: 0; will-change: transform; }
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
.hero__bg picture { position: absolute; inset: 0; }
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; /* JS плавно проявляє, коли відео реально грає */
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13,13,11,0.62) 0%, rgba(13,13,11,0.18) 34%, rgba(13,13,11,0.16) 60%, rgba(13,13,11,0.78) 100%);
}
.hero__center {
  position: absolute;
  left: 0; right: 0;
  top: 46%;
  transform: translateY(-50%);
  text-align: center;
}
.hero__title {
  display: inline-block; /* so JS fit can measure real text width */
  font-family: var(--serif-brand);
  font-weight: 400;
  font-size: 20vw; /* refined by JS fit */
  line-height: 0.86;
  letter-spacing: 0.005em;
  white-space: nowrap;
  color: var(--cream);
  margin-left: 0.031em; /* optical centering: compensates T/D side bearings */
}
.hero__title .ch { display: inline-block; will-change: transform; }
.hero__tagline {
  margin-top: clamp(16px, 2.4vh, 26px);
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(11px, 0.95vw, 14px);
  line-height: 1;
  letter-spacing: 0.38em;
  text-indent: 0.38em; /* компенсація трекінгу для оптичного центру */
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.hero__tagline::before,
.hero__tagline::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: clamp(28px, 4vw, 56px);
  height: 1px;
  background: var(--gold-dim);
  transform: translateY(-2px);
}
.hero__tagline::before { margin-right: 22px; }
.hero__tagline::after { margin-left: calc(22px - 0.38em); }
.hero__script {
  position: absolute;
  right: 6.5vw;
  bottom: -1.05em;
  font-family: var(--script);
  font-size: clamp(44px, 6.4vw, 104px);
  line-height: 1;
  color: var(--gold);
  transform: rotate(-5deg);
  text-shadow: 0 2px 30px rgba(13, 13, 11, 0.55);
  pointer-events: none;
}
/* скрол-сторітелінг: меседжі поверх відео */
.hero__story {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: grid;
  place-items: center;
  padding: 0 var(--pad);
}
.hero__msg {
  grid-area: 1 / 1;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(34px, 4.6vw, 72px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--cream);
  max-width: 16ch;
  text-wrap: balance;
  opacity: 0;
  text-shadow: 0 2px 40px rgba(13, 13, 11, 0.45);
}
.hero__msg em { font-style: normal; color: var(--gold); }
.hero__msg .w--gold { color: var(--gold); }
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
}
.hero__meta {
  position: absolute;
  z-index: 3;
  color: var(--cream-dim);
  line-height: 1.8;
}
.hero__meta--tl { top: 92px; left: var(--pad); }
.hero__meta--tr { top: 92px; right: var(--pad); text-align: right; }
.hero__bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  padding: 0 var(--pad) clamp(28px, 4vh, 48px);
}
.hero__bottom .hero__meta { position: static; }
.hero__meta--right { text-align: right; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ════════ stats ════════ */
.stats {
  border-top: 1px solid var(--cream-faint);
  border-bottom: 1px solid var(--cream-faint);
  background: var(--bg);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: clamp(32px, 4vw, 56px) clamp(18px, 2.5vw, 40px);
  border-left: 1px solid var(--cream-faint);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stat:first-child { border-left: none; }
.stat__num {
  font-size: clamp(56px, 6.5vw, 104px);
  line-height: 0.9;
  color: var(--cream);
}
.stat__num i { font-style: normal; color: var(--gold); font-size: 0.55em; vertical-align: 0.28em; margin-right: 0.05em; }
.stat__num em { font-style: normal; color: var(--gold); font-size: 0.34em; margin-left: 0.12em; }
.stat__num--amp { color: var(--gold); } /* плитка без числа: серіфний амперсанд — «майданчик & сквер» */
.stat__label { color: var(--cream-dim); line-height: 1.75; }

/* ════════ philosophy ════════ */
.phil {
  background: var(--green);
  padding: clamp(90px, 12vw, 170px) 0 clamp(90px, 11vw, 150px);
  overflow: clip;
}
.phil__title { padding: 0 var(--pad); max-width: 12ch; }
.phil__body {
  padding: 0 var(--pad);
  margin-top: clamp(28px, 4vw, 56px);
  display: flex;
  justify-content: flex-end;
}
.phil__lead {
  max-width: 560px;
  font-size: clamp(16px, 1.35vw, 20px);
  color: var(--cream-dim);
}
.phil__photo {
  width: min(560px, 78vw);
  margin: clamp(56px, 8vw, 110px) auto 0;
  position: relative;
}
.phil__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.phil__photo figcaption {
  margin-top: 14px;
  color: var(--cream-dim);
  text-align: center;
}
.phil__quote {
  margin: clamp(56px, 8vw, 110px) auto 0;
  padding: 0 var(--pad);
  max-width: 860px;
  text-align: center;
}
.phil__quote p {
  font-family: var(--serif-i);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.45;
  color: var(--cream);
}
.phil__lead-col { max-width: 560px; }
.phil__more-row { margin-top: 30px; }
.phil__more {
  background: none;
  border: none;
  border-bottom: 1px solid var(--gold-dim);
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 2px 12px 0;
  color: var(--cream);
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.phil__more em { font-style: normal; color: var(--gold); transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); }
.phil__more:hover { color: var(--gold); border-color: var(--gold); }
.phil__more:hover em { transform: translateX(6px); }
.phil__more:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* 5 цінностей: асиметрична розкладка 2+3 на 6-колонковій сітці */
.phil__values {
  margin-top: clamp(64px, 9vw, 130px);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(40px, 6vw, 84px) clamp(24px, 3.5vw, 56px);
  align-items: start;
}
.value {
  border-top: 1px solid var(--cream-faint);
  padding-top: 26px;
}
.value:nth-child(1) { grid-column: 1 / span 3; }
.value:nth-child(2) { grid-column: 4 / span 3; margin-top: clamp(44px, 6vw, 96px); }
.value:nth-child(3) { grid-column: 1 / span 2; }
.value:nth-child(4) { grid-column: 3 / span 2; margin-top: clamp(32px, 4.5vw, 72px); }
.value:nth-child(5) { grid-column: 5 / span 2; }
.value__no { color: var(--gold); display: block; margin-bottom: 20px; }
.value h3 { font-size: clamp(24px, 2.1vw, 32px); margin-bottom: 12px; text-wrap: balance; }
.value:nth-child(1) h3,
.value:nth-child(2) h3 { font-size: clamp(26px, 2.6vw, 40px); }
.value p { color: var(--cream-dim); font-size: 15px; max-width: 44ch; }
.value--brand h3 {
  font-family: var(--serif-i);
  font-style: italic;
  color: var(--gold);
}

/* ════════ marquee ════════ */
.marquee {
  background: var(--bg);
  overflow: clip;
  padding: clamp(60px, 9vw, 130px) 0;
  border-bottom: 1px solid var(--cream-faint);
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  font-size: clamp(90px, 16vw, 260px);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--cream-dim);
  will-change: transform;
}
.marquee__track i { font-style: normal; color: var(--gold); -webkit-text-stroke: 0; }

/* ════════ gallery ════════ */
.gallery {
  background: var(--bg);
  padding: clamp(90px, 12vw, 170px) 0 clamp(70px, 9vw, 130px);
}
.gallery__title { padding: 0 var(--pad); margin-bottom: clamp(48px, 6vw, 90px); }
/* solid cream by default; JS plays a one-time «контур → заливка» reveal,
   so the outline is a moment, not a state (outline stays exclusive to the marquee) */
.g-item { position: relative; margin: 0 var(--pad) clamp(28px, 4vw, 56px); }
.g-item__frame {
  overflow: clip;
  position: relative;
  aspect-ratio: 16 / 9;
}
.g-item--wide .g-item__frame { aspect-ratio: 21 / 10; }
.g-item__frame img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}
.g-item figcaption {
  margin-top: 14px;
  color: var(--cream-dim);
}
.gallery__row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(20px, 3vw, 48px);
  margin: 0 var(--pad) clamp(28px, 4vw, 56px);
}
.gallery__row { align-items: start; }
.gallery__row .g-item { margin: 0; }
.gallery__row .g-item__frame { aspect-ratio: 4 / 3; width: 100%; height: auto; }

/* detail crops — «фрагменти» з наявних рендерів */
.g-item__frame--crop img {
  position: absolute;
  object-fit: cover;
  max-width: none;
}
.crop-facade img  { width: 150%; height: 177%; left: -35%; top: 0%; }
.crop-terrace img { width: 235%; height: 176%; left: -62%; top: -58%; }
.crop-brick img   { width: 300%; height: 225%; left: -196%; top: -30%; }

/* genplan — compact typographic strip замість смугастої заглушки */
.gallery__genplan {
  margin: clamp(40px, 6vw, 72px) var(--pad) 0;
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--cream-faint);
  border-bottom: 1px solid var(--cream-faint);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  flex-wrap: wrap;
}
.gallery__genplan span { color: var(--cream-dim); }
.gallery__genplan-note { color: var(--cream-faint); }

/* striped placeholder */
.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(237, 232, 217, 0.05) 0 14px,
    transparent 14px 28px
  );
  border: 1px solid var(--cream-faint);
}
.placeholder span { color: var(--cream-dim); line-height: 2; padding: 20px; }
.placeholder--low { aspect-ratio: 21 / 7; }

/* ════════ plans ════════ */
.plans {
  background: var(--cream-bg);
  color: var(--ink);
  padding: clamp(90px, 12vw, 170px) 0 clamp(90px, 11vw, 150px);
}
.plans ::selection { background: var(--ink); color: var(--cream-bg); }
.plans__title { padding: 0 var(--pad); }
.plans__sub {
  padding: 0 var(--pad);
  margin-top: 22px;
  color: var(--ink-dim);
  max-width: 52ch;
}
.plans__grid {
  margin-top: clamp(48px, 6vw, 90px);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr; /* corner type C = feature card */
  gap: clamp(20px, 2.5vw, 40px);
  align-items: start;
}
.plan:nth-child(2) { margin-top: 48px; }
.plan {
  border: 1px solid var(--ink-faint);
  padding: clamp(20px, 2vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.plan:hover { background: #fffdf4; border-color: rgba(20, 40, 31, 0.4); transform: translateY(-6px); }
.plan__ph {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(
    -45deg,
    rgba(20, 40, 31, 0.06) 0 14px,
    transparent 14px 28px
  );
  border: 1px solid var(--ink-faint);
}
.plan__ph span { color: var(--ink-dim); }
.plan__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 6px; }
.plan__head h3 { font-size: clamp(26px, 2.2vw, 34px); }
.plan__tag { color: #a2801a; white-space: nowrap; }
.plan__desc { color: var(--ink-dim); font-size: 15px; }
.plan__area { color: var(--ink-dim); }
.plan__link {
  margin-top: auto;
  align-self: flex-start;
  color: var(--ink);
  position: relative;
  transition: color 0.25s ease, transform 0.3s ease;
}
.plan__link::after { content: ""; position: absolute; inset: -14px -8px; }
.plan__link:hover { color: #a2801a; transform: translateX(6px); }
.plans__cta {
  margin-top: clamp(36px, 5vw, 64px);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  flex-wrap: wrap;
}
.plans__cta .btn {
  border-color: rgba(20, 40, 31, 0.35);
  color: var(--ink);
}
.plans__cta .btn:hover { color: var(--bg); border-color: var(--gold); }
.plans__spec-link {
  color: var(--ink);
  position: relative;
  transition: color 0.25s ease, transform 0.3s ease;
}
.plans__spec-link::after { content: ""; position: absolute; inset: -14px -8px; } /* 44px+ tap target */
.plans__spec-link:hover { color: #a2801a; transform: translateY(4px); }

/* ════════ specs — специфікація архітектурного буклета ════════ */
.specs {
  background: var(--bg);
  padding: clamp(90px, 12vw, 170px) 0 clamp(80px, 10vw, 140px);
  border-bottom: 1px solid var(--cream-faint);
}
.specs__title { padding: 0 var(--pad); max-width: 12ch; }
.specs__lead {
  padding: 0 var(--pad);
  margin-top: 22px;
  color: var(--cream-dim);
  max-width: 54ch;
}
.specs__book {
  margin: clamp(48px, 6vw, 90px) var(--pad) 0;
}
.spec-cat {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 20px clamp(32px, 6vw, 110px);
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--cream-faint);
  align-items: start;
}
.spec-cat:last-child { border-bottom: 1px solid var(--cream-faint); }
.spec-cat__label {
  color: var(--gold);
  line-height: 2;
  font-weight: 400;
  padding-top: 14px;
}
.spec-cat__rows { display: flex; flex-direction: column; }
.spec-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 15px 12px;
  margin: 0 -12px;
  border-bottom: 1px solid rgba(237, 232, 217, 0.09);
  transition: background-color 0.3s ease;
}
.spec-row:last-child { border-bottom: none; }
.spec-row__name {
  font-size: clamp(19px, 1.55vw, 24px);
  line-height: 1.3;
  transition: color 0.3s ease;
}
.spec-row__leader {
  flex: 1;
  min-width: 40px;
  border-bottom: 1px dotted rgba(237, 232, 217, 0.2);
  transform: translateY(-4px);
  transition: border-color 0.3s ease;
}
.spec-row__val {
  color: var(--cream-dim);
  font-size: 15px;
  line-height: 1.6;
  text-align: right;
  max-width: 46ch;
  transition: color 0.3s ease;
}
.spec-row:hover { background: rgba(212, 175, 55, 0.05); }
.spec-row:hover .spec-row__name { color: var(--gold); }
.spec-row:hover .spec-row__leader { border-color: var(--gold-dim); }
.spec-row:hover .spec-row__val { color: var(--cream); }

/* ════════ availability ════════ */
.avail {
  background: var(--bg);
  padding: clamp(90px, 12vw, 170px) 0 clamp(80px, 10vw, 140px);
}
/* «14 резиденцій» — the one heading that breaks the uniform 136px pulse:
   one full-bleed line (JS fit-to-width, like the hero), fully readable;
   only the descender serifs kiss the top of the grid */
.avail__title {
  padding: 0 var(--pad);
  display: inline-block; /* so JS fit can measure real text width */
  white-space: nowrap;
  font-size: clamp(64px, 11vw, 236px); /* refined by JS fit */
  margin-bottom: -0.07em;
  position: relative;
  z-index: 0;
}
.avail__legend {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 0 var(--pad);
  margin-top: clamp(28px, 4vw, 48px);
  color: var(--cream-dim);
}
.avail__legend li { display: flex; align-items: center; gap: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--free { background: var(--cream); }
.dot--hold { background: transparent; border: 1px solid var(--gold); }
.dot--sold { background: rgba(237, 232, 217, 0.25); }
/* 14 вузьких вертикальних «клавіш» в один ряд (Eleos linework):
   прозорі, лише тонкі рамки; жодного backdrop-filter — нуль артефактів */
.avail__grid {
  margin-top: 0;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 8px;
  position: relative;
  z-index: 1;
}
.unit {
  position: relative;
  height: clamp(240px, 23vw, 330px);
  border: 1px solid var(--cream-faint);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 14px;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.unit__no { font-size: clamp(20px, 1.9vw, 30px); line-height: 1; }
.unit__st {
  font-size: 10px;
  color: var(--cream-dim);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.16em;
}
/* вільно — найпомітніші: найясніша рамка + повний контраст номера */
.unit--free { border-color: rgba(237, 232, 217, 0.45); }
.unit--free .unit__no { color: var(--cream); transition: color 0.3s ease; }
.unit--free:hover { transform: translateY(-10px); border-color: var(--gold); }
.unit--free:hover .unit__no { color: var(--gold); }
/* резерв — пунктир + рідкісна золота риска зверху (єдине золото у спокої) */
.unit--hold { border-style: dashed; }
.unit--hold .unit__no { color: var(--cream-dim); }
.unit--hold::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  width: 22px; height: 2px;
  transform: translateX(-50%);
  background: var(--gold);
}
.unit--hold:hover { transform: translateY(-5px); }
/* продано — пригашені, перекреслений номер */
.unit--sold { background: rgba(237, 232, 217, 0.05); border-color: transparent; }
.unit--sold .unit__no { color: var(--cream-faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.unit--sold .unit__st { color: var(--cream-faint); }
.avail__note {
  padding: 0 var(--pad);
  margin-top: 18px;
  color: rgba(237, 232, 217, 0.5);
}

/* ════════ route ════════ */
.route { background: var(--green-deep); }
.route__pin {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(80px, 10vh, 120px) 0 40px;
  overflow: clip;
}
/* park mood photo — dimmed parallax backdrop */
.route__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.route__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  will-change: transform;
}
.route__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 31, 24, 0.94) 0%,
    rgba(15, 31, 24, 0.74) 40%,
    rgba(15, 31, 24, 0.8) 72%,
    rgba(13, 13, 11, 0.95) 100%
  );
}
.route__pin > *:not(.route__bg) { position: relative; z-index: 1; }
.route__headrow {
  padding: 0 var(--pad);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.route__title {
  font-size: clamp(30px, 3.6vw, 56px);
  line-height: 1.12;
  max-width: 15em;
}
.route__time {
  font-size: clamp(80px, 11vw, 190px);
  line-height: 0.8;
  color: var(--gold);
  white-space: nowrap;
}
.route__time em { font-style: normal; font-size: 0.32em; color: var(--cream-dim); margin-left: 0.1em; }
.route__map {
  position: relative;
  margin: clamp(20px, 4vh, 56px) var(--pad) 0;
  flex: 1;
  min-height: 300px;
}
.route__map svg { width: 100%; height: 100%; position: absolute; inset: 0; overflow: visible; }
#routeShadow { stroke: rgba(237, 232, 217, 0.12); stroke-width: 1; stroke-dasharray: 3 7; }
#routePath { stroke: var(--gold); stroke-width: 2; }
.route__dot {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 10px rgba(212, 175, 55, 0.15), 0 0 30px rgba(212, 175, 55, 0.5);
  top: 0; left: 0;
}
.stop {
  position: absolute;
  transform: translate(-50%, -50%);
}
.stop i {
  display: block;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--cream-dim);
  background: var(--green-deep);
  margin: 0 auto;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.stop span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #efe9dc;
  text-shadow: 0 1px 8px rgba(13, 13, 11, 0.9), 0 0 18px rgba(13, 13, 11, 0.8);
  transition: color 0.4s ease;
  font-size: 11px;
}
.stop[data-lab="above"] span { bottom: 18px; }
.stop[data-lab="below"] span { top: 18px; }
.stop.is-passed i { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 14px rgba(212, 175, 55, 0.6); }
.stop.is-passed span { color: var(--gold); }
.stop--final i { width: 13px; height: 13px; }
.stop--final.is-passed i { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.18), 0 0 24px rgba(212, 175, 55, 0.7); }
.route__list { display: none; }
.route__note {
  padding: 26px var(--pad) 0;
  color: rgba(237, 232, 217, 0.5);
}

/* ════════ news ════════ */
.news {
  background: var(--bg);
  padding: clamp(90px, 12vw, 160px) 0;
  border-bottom: 1px solid var(--cream-faint);
}
/* journal ledger: full-width rows, hairline dividers, giant ordinal left */
.news__grid {
  padding: 0 var(--pad);
}
.news-card {
  border-top: 1px solid var(--cream-faint);
  padding: clamp(32px, 4vw, 60px) 0;
  display: grid;
  grid-template-columns: clamp(90px, 15vw, 240px) 1fr;
  gap: clamp(20px, 4vw, 64px);
  align-items: start;
  transition: background-color 0.35s ease;
}
.news-card:last-child { border-bottom: 1px solid var(--cream-faint); }
.news-card:hover { background: rgba(212, 175, 55, 0.03); }
.news-card__no {
  font-size: clamp(64px, 9vw, 150px);
  line-height: 0.8;
  color: rgba(237, 232, 217, 0.3);
}
.news-card__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 62ch;
}
.news-card__tag { color: var(--gold); }
.news-card h3 { font-size: clamp(26px, 2.4vw, 38px); line-height: 1.15; }
.news-card p { color: var(--cream-dim); font-size: 15px; max-width: 44ch; }
.news-card__link { color: var(--cream); margin-top: auto; transition: color 0.25s ease, transform 0.3s ease; align-self: flex-start; position: relative; }
.news-card__link::after { content: ""; position: absolute; inset: -14px -8px; } /* 44px+ tap target */
.news-card__link:hover { color: var(--gold); transform: translateX(6px); }

/* ════════ contacts ════════ */
.contacts {
  background: var(--green);
  padding: clamp(90px, 12vw, 170px) 0 clamp(80px, 10vw, 140px);
}
.contacts__title { padding: 0 var(--pad); }
.contacts__phone {
  display: block;
  padding: 0 var(--pad);
  margin-top: clamp(40px, 6vw, 80px);
  font-size: clamp(38px, 6.8vw, 110px);
  line-height: 1;
  color: var(--cream);
  transition: color 0.3s ease;
  width: fit-content;
}
.contacts__phone:hover { color: var(--gold); }
.contacts__grid {
  margin-top: clamp(48px, 6vw, 90px);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.contacts__info dl { display: flex; flex-direction: column; gap: 26px; }
.contacts__info dt { color: var(--gold); margin-bottom: 6px; }
.contacts__info dd { font-size: clamp(17px, 1.4vw, 21px); }
.contacts__info dd a {
  border-bottom: 1px solid var(--cream-faint);
  transition: color 0.25s ease, border-color 0.25s ease;
  position: relative;
}
.contacts__info dd a::after { content: ""; position: absolute; inset: -12px -8px; } /* 44px+ tap target */
.contacts__info dd a:hover { color: var(--gold); border-color: var(--gold); }
.contacts__btn { margin-top: 40px; }
.contacts__map { aspect-ratio: 16 / 10; }

/* ════════ footer ════════ */
.footer {
  background: var(--bg);
  padding: clamp(40px, 5vw, 64px) var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__logo { display: flex; align-items: center; gap: 14px; }
.footer__word { font-size: 22px; letter-spacing: 0.06em; }
.footer__line { color: var(--cream-faint); }

/* ════════ manifesto — повноекранна editorial-модалка філософії ════════ */
body.manifesto-open { overflow: hidden; } /* лок фонового скролу (плюс lenis.stop() у JS) */
.manifesto {
  position: fixed;
  inset: 0;
  z-index: 140;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.7s;
}
body.manifesto-open .manifesto {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.manifesto__panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(212, 175, 55, 0.06), transparent 60%),
    var(--green-deep);
  opacity: 0;
  transform: translateY(5vh);
  transition: opacity 0.55s ease, transform 0.75s cubic-bezier(0.23, 1, 0.32, 1);
}
body.manifesto-open .manifesto__panel { opacity: 1; transform: translateY(0); }
.manifesto__close {
  position: absolute;
  top: 22px;
  right: var(--pad);
  z-index: 2;
  width: 52px;
  height: 52px;
  background: rgba(15, 31, 24, 0.6);
  border: 1px solid var(--cream-faint);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease 0.25s, border-color 0.3s ease, transform 0.3s ease;
}
body.manifesto-open .manifesto__close { opacity: 1; }
.manifesto__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 1px;
  background: var(--cream);
  transition: background-color 0.3s ease;
}
.manifesto__close span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.manifesto__close span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }
.manifesto__close:hover { border-color: var(--gold); transform: rotate(90deg); }
.manifesto__close:hover span { background: var(--gold); }
.manifesto__close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.manifesto__inner {
  max-width: 760px; /* ≈65ch колонка тексту */
  margin: 0 auto;
  padding: clamp(90px, 13vh, 150px) var(--pad) clamp(70px, 9vh, 110px);
}
.manifesto__kicker { color: var(--gold); }
.manifesto__title {
  margin-top: 26px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.manifesto__title em {
  display: block;
  margin-top: 18px;
  font-family: var(--serif-i);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 30px);
  line-height: 1.2;
  color: var(--gold);
}
.manifesto__rule {
  display: block;
  width: 72px;
  height: 1px;
  background: var(--gold-dim);
  margin: clamp(32px, 4.5vh, 52px) 0;
}
.manifesto__pull { margin: 0 0 clamp(36px, 5vh, 56px); }
.manifesto__pull--mid { margin: clamp(44px, 6vh, 68px) 0; }
.manifesto__pull p {
  font-family: var(--serif-i);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(23px, 2.8vw, 34px);
  line-height: 1.45;
  color: var(--gold);
  text-wrap: balance;
}
.manifesto__pull--mid p { font-size: clamp(21px, 2.4vw, 30px); }
.manifesto__body p {
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.85;
  color: rgba(237, 232, 217, 0.84);
}
.manifesto__body p + p,
.manifesto__body blockquote + p { margin-top: 1.5em; }
.manifesto__dropcap::first-letter {
  font-family: var(--serif);
  font-size: 4.6em;
  line-height: 0.78;
  float: left;
  color: var(--gold);
  padding: 0.08em 0.16em 0 0;
}
.manifesto__foot {
  margin-top: clamp(56px, 8vh, 88px);
  padding-top: clamp(28px, 4vh, 40px);
  border-top: 1px solid var(--cream-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
}
.manifesto__foot-line { color: var(--cream-dim); }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

/* 8 пунктів нава (з довгим «Технічні характеристики») — бургер уже з 1280px */
@media (max-width: 1280px) {
  .nav__links { display: none; }
  .nav__phone { display: none; }
  .nav__burger { display: block; margin-left: auto; }
}

@media (max-width: 1100px) {
  .avail__grid { gap: 6px; }
}

@media (max-width: 900px) {
  .phil__values { grid-template-columns: 1fr; gap: 40px; }
  .phil__values > .value { grid-column: auto; margin-top: 0; }
  .spec-cat { grid-template-columns: 1fr; gap: 4px; }
  .spec-cat__label { padding-top: 0; }
  .plans__grid { grid-template-columns: 1fr; }
  .plan:nth-child(2) { margin-top: 0; }
  .gallery__row { grid-template-columns: 1fr; }
  .contacts__grid { grid-template-columns: 1fr; }
  /* «Наявність» ≤900: тонкі рядки-таблиця замість клавіш */
  .avail__grid { grid-template-columns: 1fr; gap: 0; }
  .unit {
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 13px 2px;
    border: none;
    border-bottom: 1px solid var(--cream-faint);
    background: transparent;
  }
  .unit:first-child { border-top: 1px solid var(--cream-faint); }
  .unit::after {
    content: "";
    flex: 1;
    order: 1;
    border-bottom: 1px dotted rgba(237, 232, 217, 0.16);
    margin: 0 16px;
  }
  .unit__no { font-size: 24px; min-width: 42px; order: 0; }
  .unit__st { writing-mode: horizontal-tb; transform: none; order: 2; letter-spacing: 0.12em; }
  .unit--free { border-color: var(--cream-faint); }
  .unit--free:hover { transform: none; border-color: var(--cream-faint); background: rgba(237, 232, 217, 0.04); }
  .unit--hold { border: none; border-bottom: 1px solid var(--cream-faint); }
  .unit--hold::before { display: none; }
  .unit--hold:hover { transform: none; }
  .unit--hold .unit__st { color: var(--gold); opacity: 0.85; }
  .unit--sold { background: transparent; border-color: var(--cream-faint); }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--cream-faint); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: none; }
  .stat:nth-child(even) { border-left: 1px solid var(--cream-faint); }

  /* route: hide inline labels, show list */
  .stop span { display: none; }
  .route__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px var(--pad) 0;
    color: var(--cream-dim);
    counter-reset: rstop;
  }
  .route__list li { transition: color 0.4s ease; display: flex; gap: 12px; align-items: baseline; }
  .route__list li::before {
    counter-increment: rstop;
    content: "0" counter(rstop);
    color: var(--cream-faint);
    transition: color 0.4s ease;
  }
  .route__list li.is-passed { color: var(--gold); }
  .route__list li.is-passed::before { color: var(--gold); }
  .route__map { min-height: 200px; flex: 0 0 auto; height: 34vh; }
  .route__pin { min-height: 100svh; }
}

@media (max-width: 560px) {
  .hero__meta--tr { display: none; }
  .hero__meta--tl { top: 84px; }
  .hero__bottom {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 26px;
  }
  .hero__meta--right { display: none; }
  .hero__cta { justify-content: flex-start; }
  .btn { padding: 15px 24px; }
  .hero__script { right: 4vw; bottom: -1.15em; }
  .hero__tagline { font-size: 10px; letter-spacing: 0.32em; text-indent: 0.32em; }
  .hero__tagline::before { margin-right: 14px; }
  .hero__tagline::after { margin-left: calc(14px - 0.32em); }
  .hero__msg { font-size: clamp(30px, 8.6vw, 44px); max-width: 14ch; }

  .unit__no { font-size: 21px; }
  .spec-row { flex-direction: column; gap: 5px; padding: 14px 12px; }
  .spec-row__leader { display: none; }
  .spec-row__val { text-align: left; max-width: none; }
  .manifesto__close { top: 14px; width: 46px; height: 46px; }
  .manifesto__foot .btn { width: 100%; text-align: center; }
  .news-card { grid-template-columns: 1fr; gap: 14px; }
  .news-card__no { font-size: 48px; }
  .giant { font-size: clamp(44px, 12.5vw, 64px); }
  .g-item__frame { aspect-ratio: 4 / 3; }
  .g-item--wide .g-item__frame { aspect-ratio: 4 / 3; }
  .placeholder--low { aspect-ratio: 16 / 9; }
  .contacts__phone { font-size: clamp(30px, 9vw, 44px); }
  .footer { flex-direction: column; align-items: flex-start; }
  .avail__title { display: block; white-space: normal; font-size: clamp(56px, 17vw, 84px); margin-bottom: 28px; }
}

/* ════════ additions: новини → блог ════════ */
body.menu-open .menu__links a:nth-child(7) { transition-delay: 0.3s; }
.news__all-row { padding: 0 var(--pad); margin-top: clamp(28px, 4vw, 44px); }
.news__all {
  color: var(--cream);
  display: inline-block;
  position: relative;
  transition: color 0.25s ease, transform 0.3s ease;
}
.news__all::after { content: ""; position: absolute; inset: -14px -8px; } /* 44px+ tap target */
.news__all:hover { color: var(--gold); transform: translateX(6px); }

/* ════════ reduced motion ════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
