/* ============================================================
   MIST / МІСТ — стилі односторінника
   Палітра з концепт/brand.md: теплий білий + графіт,
   акцент туман-блакить, підтримка сосна (дозовано)
   ============================================================ */

/* --- Шрифти: Fixel (MacPaw, OFL, повна українська кирилиця) --- */
@font-face {
  font-family: 'Fixel Display';
  src: url('../fonts/FixelDisplay-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Fixel Display';
  src: url('../fonts/FixelDisplay-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Fixel Text';
  src: url('../fonts/FixelText-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Fixel Text';
  src: url('../fonts/FixelText-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Fixel Text';
  src: url('../fonts/FixelText-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --c-light: #F7F5F2;   /* білий теплий: фасади, льон, «чистий аркуш» */
  --c-dark: #1E2124;    /* графіт: темні вставки будівлі, брама */
  --c-graphite: #26292d;
  /* Контраст ≥4.5:1 для дрібного тексту на обох темах */
  --c-muted-light: rgba(30, 33, 36, .7);
  --c-muted-dark: rgba(247, 245, 242, .66);
  --c-accent: #A8BFC9;  /* туман-блакить: ранковий серпанок */
  --c-pine: #4A5D4E;    /* сосна: дозовано */

  --font-display: 'Fixel Display', 'Segoe UI', sans-serif;
  --font-body: 'Fixel Text', 'Segoe UI', sans-serif;

  --container: 1440px;
  --pad: clamp(20px, 4vw, 64px);

  /* Шкала відступів (раунд 2, правка 6) — жодних магічних чисел у ритмі */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;
  --s7: 140px;

  --dur-theme: 1.7s; /* туман не буває швидким (правка 7) */
}

/* --- Скидання --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* Видимий фокус для клавіатурної навігації (WCAG 2.4.7) */
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

/* --- Тема сторінки: фон/колір міняються плавно при скролі --- */
body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-color: var(--c-light);
  color: var(--c-dark);
  transition: background-color var(--dur-theme) ease, color var(--dur-theme) ease;
  overflow-x: hidden;
}
body.theme-dark {
  background-color: var(--c-dark);
  color: var(--c-light);
}
body.no-scroll { overflow: hidden; }

body { --muted: var(--c-muted-light); --line: rgba(30,33,36,.18); --card-bg: rgba(30,33,36,.04); }
body.theme-dark { --muted: var(--c-muted-dark); --line: rgba(247,245,242,.18); --card-bg: rgba(247,245,242,.05); }

/* --- Типографіка --- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; text-wrap: balance; }
p, li { text-wrap: pretty; }
h1 { font-size: clamp(64px, 13vw, 200px); letter-spacing: .02em; }
h2 { font-size: clamp(32px, 4.8vw, 68px); letter-spacing: -.015em; max-width: 18ch; }
/* Заголовки одним рядком за макетом (раунд 4, правка 8):
   без обмеження ширини, трохи менший кегль */
.h2--solid { max-width: none; font-size: clamp(30px, 4.2vw, 60px); }
h3 { font-size: clamp(22px, 2.6vw, 34px); }
.lead { font-size: clamp(19px, 1.9vw, 26px); line-height: 1.45; font-weight: 300; max-width: 60ch; }
p { font-size: clamp(15px, 1.15vw, 18px); }

.container { max-width: var(--container); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
/* Нерозривні звʼязки на кшталт «Львів — Шегині», «Шегині‑Медика» */
.nowrap { white-space: nowrap; }
@media (max-width: 640px) { h2 .nowrap { white-space: normal; } }

/* КУЛЕНЕПРОБИВНЕ (13.07): вміст карток розвилки НІКОЛИ не буває
   напівпрозорим — жоден JS-стан (старий stagger у кеші, обірваний
   scrub) не може сховати текст. Анімується лише сама картка. */
.fork__card > * {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
}
.section { padding: var(--s7) 0; position: relative; }
/* Віньєтку .section::before видалено (раунд 4): обрізаний градієнт
   давав «світлу смугу» на темному. Межі тем веде canvas-veil. */
/* Контент секцій — над fog-canvas */
.section > .container { position: relative; z-index: 1; }

/* Живий canvas-туман (раунд 4, правка 1) */
.fog-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* Глобальний veil для переходу тем «крізь туман» (правка 2).
   mix-blend screen: білі блоби на світлому тлі зникають самі,
   на графітовому — мʼяко світяться. Жодних меж: canvas = вʼюпорт. */
.fog-veil {
  position: fixed; inset: 0; z-index: 45;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Фотозерно — плівкова фактура поверх сторінки (фішка бренду,
   та сама, що в презентаціях). Статичне, дешеве, преміальне. */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='z'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23z)'/%3E%3C/svg%3E");
}

/* --- Девелопер: ВИГОДА (системний девелопмент) --- */
.developer__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s5); align-items: center; }
.developer__text p + p { margin-top: 1.4em; }
.developer__brand { text-align: center; padding: var(--s5) var(--s4); border: 1px solid var(--line); border-radius: 4px; }
/* Справжнє лого Вигоди: пара під теми (primary = темне на світлому,
   black = світле на темному), перемикається класом теми body */
.developer__logo { height: clamp(64px, 7vw, 96px); width: auto; margin: 0 auto; }
.developer__logo--ondark { display: none; }
body.theme-dark .developer__logo--onlight { display: none; }
body.theme-dark .developer__logo--ondark { display: block; }
.developer__link { margin-top: var(--s4); }
@media (max-width: 900px) { .developer__grid { grid-template-columns: 1fr; } }

/* Фішка девелопера «системний девелопмент» — нумерація секцій //01 */
.section__num::before { content: "//"; opacity: .55; margin-right: 2px; }

/* Волосяна лінія прогресу скролу — туман-блакить по верхньому краю */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--c-accent);
  transform-origin: left center; transform: scaleX(0);
  z-index: 90; pointer-events: none;
}

/* Елементи reveal ховаємо до ініціалізації JS (анти-FOUC).
   Маску-вайп замінено на «проявлення з туману» (blur→sharp),
   тому overflow не обрізаємо. */
[data-scroll-reveal="h"], [data-scroll-reveal="p"],
[data-scroll-reveal="mask"], [data-scroll-reveal="ctn"],
[data-scroll-reveal="line"], [data-scroll-reveal="card"] { visibility: hidden; }
/* will-change для reveal-елементів ставить JS лише на час твіну
   (clearProps знімає) — постійних композитних шарів немає */

/* Лічильники цифр: табулярні цифри — без «тремтіння» ширини під час відліку;
   inline-block, щоб спрацьовував min-width на час відліку */
[data-count] { font-variant-numeric: tabular-nums; display: inline-block; white-space: nowrap; }
.hero__stats strong, .asset__nums strong { white-space: nowrap; }

/* --- Кнопки ---
   Ховер (правка 2): підкладка заливає кнопку знизу вгору (scaleY),
   текст інвертується, стрілка зсувається. Кольори заливки — через
   змінні теми, щоб не залежати від currentColor. */
body { --btn-fill: var(--c-dark); --btn-text-hover: var(--c-light); }
body.theme-dark { --btn-fill: var(--c-light); --btn-text-hover: var(--c-dark); }

.btn {
  display: inline-block;
  padding: 16px 36px;
  border: 1px solid currentColor;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: color .45s cubic-bezier(.25, 1, .5, 1), border-color .45s ease;
}
.btn::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: var(--btn-fill);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .45s cubic-bezier(.25, 1, .5, 1);
  z-index: -1;
}
.btn:hover { color: var(--btn-text-hover); }
.btn:hover::before { transform: scaleY(1); }
.btn__arr {
  display: inline-block;
  transition: transform .45s cubic-bezier(.25, 1, .5, 1);
}
.btn:hover .btn__arr { transform: translateX(4px); }
.btn:hover .btn__arr--down { transform: translateY(4px); }
.btn--small { padding: 10px 24px; font-size: 12px; }
.btn--ghost { border-color: var(--line); opacity: .85; }

/* ============================================================
   ПРЕЛОАДЕР: MIST проступає крізь серпанок
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-light);
  overflow: hidden;
  /* фон несуть панелі-завіса, не сам контейнер;
     pointer-events знімає JS на старті завіси */
  background: transparent;
}
.preloader__panel {
  position: absolute; left: 0; right: 0;
  height: 50.5%; /* перекриття пів-відсотка — без шва між панелями */
  background: var(--c-dark);
}
.preloader__panel--top { top: 0; }
.preloader__panel--bottom { bottom: 0; }
.preloader__mist {
  position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 60% 40% at 30% 60%, rgba(168,191,201,.16), transparent 70%),
    radial-gradient(ellipse 50% 35% at 70% 40%, rgba(247,245,242,.08), transparent 70%);
  filter: blur(40px);
}
/* Шари щільного туману над логотипом — «розвиднення» веде JS.
   screen-blend: сірі краї текстури не читаються на графіті */
.preloader__fog {
  position: absolute; inset: -12%;
  width: 124%; height: 124%;
  object-fit: cover;
  mix-blend-mode: screen;
  z-index: 3;
  pointer-events: none;
}
.preloader__inner { text-align: center; position: relative; z-index: 2; }
.preloader__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(56px, 10vw, 140px);
  letter-spacing: .08em;
}
.preloader__sub {
  margin-top: 14px;
  font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--c-muted-dark);
}
.preloader__percent {
  position: absolute; bottom: 32px; right: var(--pad); z-index: 2;
  font-size: 14px; letter-spacing: .1em;
  color: var(--c-muted-dark);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   ХЕДЕР
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: color var(--dur-theme) ease;
}
.header__bg {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(30,33,36,.65), rgba(30,33,36,0));
  opacity: 0; pointer-events: none;
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding-top: 22px; padding-bottom: 22px;
  position: relative;
}
.header__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px; letter-spacing: .12em;
}
.header__nav { display: flex; gap: clamp(14px, 2vw, 32px); }
.header__nav a {
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  opacity: .75; transition: opacity .3s ease, text-shadow .3s ease;
  position: relative;
}
.header__nav a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0);
  /* сцена 8: JS підставляє бік входу/виходу курсора */
  transform-origin: var(--u-out, right);
  transition: transform .4s cubic-bezier(.76, 0, .24, 1);
}
.header__nav a:hover { opacity: 1; }
.header__nav a:hover::after { transform: scaleX(1); transform-origin: var(--u-in, left); }

.header.theme_on-dark { color: var(--c-light); }
.header.theme_on-light { color: var(--c-dark); }

.header__burger { display: none; flex-direction: column; gap: 6px; padding: 8px; }
.header__burger span {
  display: block; width: 26px; height: 1.5px;
  background: currentColor;
  transition: transform .4s ease, opacity .4s ease;
}
.header__burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.header__burger.is-open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* --- Мобільне меню --- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--c-graphite); color: var(--c-light);
  display: flex; align-items: center; justify-content: center;
  visibility: hidden;
}
.mobile-menu__nav { display: flex; flex-direction: column; gap: 20px; text-align: center; }
.mobile-menu__nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 6vw, 44px);
}

/* ============================================================
   HERO: фото/відео + шари туману
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--c-light);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; overflow: hidden; /* обрізає радіус «кадру» в pin-сцені */ }
.hero__img, .hero__video {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
.hero__mist {
  position: absolute; inset: -30% -10%;
  pointer-events: none;
}
/* Композитні шари — лише коли анімації реально працюють */
@media (prefers-reduced-motion: no-preference) {
  .hero__img, .hero__video, .hero__mist, [data-parallax="img"] { will-change: transform; }
}
.hero__mist--1 {
  background: radial-gradient(ellipse 70% 30% at 25% 75%, rgba(168,191,201,.28), transparent 65%);
  filter: blur(30px);
}
.hero__mist--2 {
  background: radial-gradient(ellipse 60% 25% at 75% 65%, rgba(247,245,242,.18), transparent 65%);
  filter: blur(40px);
}
.hero__mist--3 {
  background: linear-gradient(to top, rgba(168,191,201,.22), transparent 40%);
  filter: blur(24px);
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(30,33,36,.4) 0%, rgba(30,33,36,.12) 45%, rgba(30,33,36,.72) 100%);
}
/* «Затуманення» країв кадру: нижня третина, біле→прозоре (правка 4) */
.hero__fog-edge {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 33%;
  background: linear-gradient(to top, rgba(247, 245, 242, .2), transparent);
  pointer-events: none;
}
/* Статичний .hero__fog видалено (раунд 4): на темному лише canvas-туман */
.hero__content {
  position: relative; width: 100%;
  padding-bottom: clamp(40px, 7vh, 88px);
}
.hero__kicker {
  font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  margin-bottom: 16px; color: rgba(247,245,242,.8);
}
.hero__title { margin-left: -.02em; }
.hero__lead {
  max-width: 640px; margin-top: 20px;
  font-size: clamp(18px, 2vw, 27px); font-weight: 300; line-height: 1.4;
  color: rgba(247,245,242,.88);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(24px, 4vh, 40px); }
.hero__stats {
  display: grid; grid-template-columns: repeat(4, auto);
  justify-content: start; gap: clamp(24px, 5vw, 80px);
  margin-top: clamp(32px, 6vh, 64px);
  padding-top: clamp(20px, 3vh, 32px);
  border-top: 1px solid rgba(247,245,242,.22);
}
.hero__stats li { display: flex; flex-direction: column; gap: 4px; }
.hero__stats strong {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 52px); line-height: 1;
  letter-spacing: -.01em;
}
.hero__stats span { font-size: 13px; letter-spacing: .06em; color: rgba(247,245,242,.78); }

/* ============================================================
   СПІЛЬНЕ ДЛЯ СЕКЦІЙ
   ============================================================ */
.section__head {
  display: flex; align-items: baseline; gap: clamp(16px, 3vw, 40px);
  margin-bottom: var(--s4); /* заголовок → лід */
}
.section__num {
  font-size: 13px; letter-spacing: .2em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.section__line { flex: 0 0 clamp(40px, 8vw, 120px); height: 1px; background: var(--line); align-self: center; }

.img-w { overflow: hidden; border-radius: 4px; position: relative; }
.img-w img { width: 100%; height: 100%; object-fit: cover; }
.ratio-3x4 { aspect-ratio: 3 / 4; }

/* Full-bleed цитата-роздільник (правка 14) */
.quote-break {
  position: relative; overflow: hidden;
  height: clamp(380px, 62vh, 660px);
  margin-top: var(--s6);
  display: flex; align-items: center; justify-content: center;
}
.quote-break img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.quote-break::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(30, 33, 36, .38);
}
/* fog-2 повільно пливе поверх фото; oversize + screen — без видимих країв */
.quote-break__fog {
  position: absolute; inset: -25%;
  width: 150%; height: 150%;
  object-fit: cover;
  opacity: .35;
  mix-blend-mode: screen;
  pointer-events: none;
}
.quote-break__text {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 5vw, 72px);
  letter-spacing: .02em;
  color: var(--c-light);
  text-align: center;
  padding: 0 var(--pad);
}

/* Підпис-слоган секцій сценаріїв */
.scenario__slogan {
  margin-top: clamp(64px, 9vw, 128px);
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(26px, 4vw, 54px);
  letter-spacing: .01em;
  text-align: center;
  color: var(--c-accent);
}

/* ============================================================
   02 · МАНІФЕСТ
   ============================================================ */
.manifest__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.manifest__text p + p { margin-top: 1.5em; }
/* Манифест — темна секція: зелений тут заборонений (правило одного
   акценту), лише туман-блакить */
.manifest__text em { font-style: italic; color: var(--c-accent); }
.manifest__final {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(20px, 2.4vw, 34px); line-height: 1.25;
  color: var(--c-accent);
  /* Один рядок на всю ширину контейнера, під сіткою тексту і фото */
  white-space: nowrap;
  margin-top: var(--s5);
}
@media (max-width: 700px) { .manifest__final { white-space: normal; } }
.manifest__imgs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 32px);
}
.manifest__img-offset { margin-top: clamp(40px, 6vw, 96px); }

/* ============================================================
   03 · ЛОКАЦІЯ
   ============================================================ */
.location__grid {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: stretch;
}
.location__text p + p { margin-top: .9em; }
.location__text p:last-child { margin-top: clamp(24px, 3vw, 40px); }
.location__list { margin-top: var(--s4); }
.location__list li {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(15px, 1.15vw, 18px);
}
.location__list span {
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.location__map {
  min-height: 420px; border-radius: 4px; overflow: hidden;
  position: relative;
}
/* фільтр на iframe, а не контейнері — інакше знебарвить маршрут-оверлей.
   pointer-events:none — мапа СТАТИЧНА схема: маршрут-оверлей не може
   їхати разом із embed-вʼюпортом Google, тому зум/пан вимкнені;
   інтерактив — кнопкою «Відкрити в Google Maps» */
.location__map iframe {
  width: 100%; height: 100%; min-height: 420px;
  filter: grayscale(1) contrast(1.05);
  pointer-events: none;
}
.location__open {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 18px; border-radius: 100px;
  background: rgba(30, 33, 36, .82); color: var(--c-light);
  transition: background-color .3s ease;
}
.location__open:hover { background: var(--c-dark); }
.location__val { font-style: normal; }

/* --- Сцена 5: маршрут і піни поверх мапи --- */
.location__route {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
}
/* Локація — темна секція: акцент лише туман-блакить (раунд 2, правка 5) */
.location__route path {
  stroke: var(--c-accent); stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-dasharray: 4 7; /* пунктир дороги; поверх нього JS малює прогрес */
  vector-effect: non-scaling-stroke;
}
.location__pin {
  position: absolute; z-index: 3;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.location__pin::before {
  content: '';
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(168, 191, 201, .28);
  flex-shrink: 0;
}
.location__pin span {
  padding: 4px 10px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-light); background: var(--c-dark);
  border-radius: 100px; white-space: nowrap;
}
.location__pin--main::before {
  background: var(--c-dark);
  box-shadow: 0 0 0 5px rgba(30, 33, 36, .2);
}
.location__pin--main span { background: var(--c-accent); color: var(--c-dark); }
.location__pano { margin-top: var(--s5); }
.location__pano img { aspect-ratio: 1920 / 684; }

/* ============================================================
   04 · АКТИВ СЬОГОДНІ
   ============================================================ */
.asset { position: relative; }
.asset .container { position: relative; z-index: 1; }
/* Фонове фото верхньої частини секції — прибирає «пустку» (правка 6) */
.asset__bg {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 55%;
  object-fit: cover; object-position: center 30%;
  opacity: .07;
  pointer-events: none;
}
.asset__intro { max-width: 880px; }

/* Ghost-цифра позаду блоку цифр, з паралаксом */
.asset__nums-w { position: relative; }
.asset__ghost {
  position: absolute; right: -2%; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(160px, 24vw, 380px); line-height: 1;
  letter-spacing: -.03em;
  color: var(--c-dark); opacity: .045;
  pointer-events: none; white-space: nowrap;
  z-index: 0;
}
.asset__nums { position: relative; z-index: 1; }

/* Великі дисплейні цифри без рамок, розділені тонкими лініями (правка 6) */
.asset__nums {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: var(--s5); /* лід → контент */
}
.asset__nums li {
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(8px, 1vw, 16px) clamp(16px, 2vw, 32px);
}
.asset__nums li + li { border-left: 1px solid var(--line); }
.asset__nums strong {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 5.4vw, 88px); line-height: 1;
  letter-spacing: -.015em;
}
.asset__nums span { font-size: 15.5px; color: var(--muted); line-height: 1.5; }

/* Факти-чекліст двома колонками */
.asset__checklist {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: var(--s5);
  margin-top: var(--s5);
  max-width: 1100px;
}
.asset__checklist li {
  padding: 13px 0 13px 32px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: clamp(15px, 1.15vw, 18px);
}
/* Маркер-«місток»: SVG-дуга кольором акценту теми (раунд 3, правка 2) */
.asset__checklist li::before {
  content: '';
  position: absolute; left: 2px; top: 22px;
  width: 14px; height: 6px;
  background: var(--c-pine);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 6'%3E%3Cpath d='M1 5 Q7 -1.5 13 5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 6'%3E%3Cpath d='M1 5 Q7 -1.5 13 5' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
body.theme-dark .asset__checklist li::before { background: var(--c-accent); }
.asset__punch { margin-top: var(--s4); max-width: 820px; }
.asset .gallery__slider { margin-top: var(--s6); }

/* --- Галерея (Swiper, у складі Активу) --- */
.gallery__slider { padding-left: var(--pad); overflow: hidden; }
.gallery__slider .swiper-slide {
  width: auto; height: clamp(340px, 62vh, 640px);
}
.gallery__slider .swiper-slide img {
  height: 100%; width: auto;
  border-radius: 4px;
}
.gallery__controls {
  display: flex; gap: 12px; justify-content: flex-end;
  margin-top: var(--s3);
}

/* --- Сцена 6: топоніми-підписи і desktop-scrub-режим --- */
.gallery__slider .swiper-slide { position: relative; }
.gallery__cap {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  padding: 6px 14px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-light);
  background: rgba(30, 33, 36, .55);
  border-radius: 100px;
  pointer-events: none;
}
.gallery--scrub .swiper-wrapper { display: flex; gap: 24px; }
.gallery--scrub .swiper-slide { overflow: hidden; border-radius: 4px; flex-shrink: 0; }
.gallery--scrub .gallery__controls { display: none; }
.gallery__btn {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: color .45s cubic-bezier(.25, 1, .5, 1), opacity .35s ease;
}
.gallery__btn::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: var(--btn-fill);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .45s cubic-bezier(.25, 1, .5, 1);
  z-index: -1;
}
.gallery__btn:hover { color: var(--btn-text-hover); }
.gallery__btn:hover::before { transform: scaleY(1); }
.gallery__btn.swiper-button-disabled { opacity: .3; pointer-events: none; }

/* ============================================================
   05 · РОЗВИЛКА
   ============================================================ */
.fork__lead { max-width: 820px; }
.fork__cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-top: var(--s5);
  position: relative;
}
/* Сцена 4: вертикальна лінія-«міст» між половинами (малює pin-сцена) */
.fork__divider {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; margin-left: -0.5px;
  background: var(--c-accent);
  transform-origin: top center;
  z-index: 1;
  display: none;
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .fork__divider { display: block; }
}
.fork__card {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(28px, 3.5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
  transition: border-color .4s ease, background-color .4s ease, transform .4s ease;
}
/* Світла/графітова половини розвилки: КОЖНА носить власні кольори,
   незалежні від теми body. ВАЖЛИВО: ці правила стоять ПІСЛЯ базового
   .fork__card — інакше var(--card-bg) теми перебивав фони половин,
   і титули «сліпли» (темне-на-темному / біле-на-білому). */
.fork__card--a { background: var(--c-light); color: var(--c-dark); }
.fork__card--a p { color: rgba(30, 33, 36, .75); }
.fork__card--a .fork__label, .fork__card--a .fork__arrow { color: var(--c-pine); }
.fork__card--b { background: var(--c-graphite); color: var(--c-light); }
.fork__card--b p { color: rgba(247, 245, 242, .75); }
.fork__card--b .fork__label, .fork__card--b .fork__arrow { color: var(--c-accent); }
/* Титули — суцільним кольором СВОЄЇ половини, без opacity-модифікаторів */
.fork__card--a h3 { color: var(--c-dark); opacity: 1; }
.fork__card--b h3 { color: var(--c-light); opacity: 1; }
.fork__card:hover { border-color: var(--c-accent); transform: translateY(-4px); }
.fork__label {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--c-accent);
}
.fork__card h3 { font-size: clamp(24px, 2.8vw, 40px); }
/* Колір абзаців задають ЛИШЕ правила половин (--a/--b) вище.
   УВАГА: .fork__card--b p має ТАКУ САМУ специфічність, як
   .fork__card p (один клас + елемент) — тому тут кольору
   бути не може, інакше він переміг би порядком у файлі. */
.fork__card p { max-width: 46ch; }
.fork__arrow {
  margin-top: auto; padding-top: 16px;
  font-size: 22px; color: var(--c-accent);
  transition: transform .4s cubic-bezier(.76, 0, .24, 1);
}
.fork__card:hover .fork__arrow { transform: translateX(8px); }
.fork__closing {
  margin-top: var(--s5);
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 2.6vw, 38px);
  text-align: center;
}

/* Pull-quote «цвях» сценарію Б (правка 15) */
.pull-quote {
  margin: clamp(28px, 4vw, 48px) 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 2.6vw, 40px); line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--c-accent);
  text-wrap: balance;
}

/* ============================================================
   06–07 · СЦЕНАРІЇ
   ============================================================ */
.scenario__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 112px);
  align-items: center;
}
/* Сценарій А: фото 55 % / текст 45 %, текст по верху фото (раунд 2, правка 7) */
.scenario__grid--media55 {
  grid-template-columns: 55fr 45fr;
  align-items: start;
}
.scenario__grid--media55 .scenario__text { padding-top: clamp(4px, 1vw, 16px); }
.scenario__text p + p { margin-top: 1.4em; }
.scenario__features { margin-top: var(--s4); }
.scenario__features li {
  max-width: 48ch;
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: clamp(15px, 1.15vw, 18px);
}
.scenario__features li::before {
  content: ''; position: absolute; left: 4px; top: 24px;
  width: 8px; height: 1.5px; background: var(--c-accent);
}

/* --- Зони комплексу: редакторський лейаут (правки 12–13) --- */
.zones { margin-top: var(--s6); }
.zones__title, .programs__title {
  font-size: clamp(22px, 2.6vw, 34px);
  margin-bottom: var(--s4);
}

/* Три головні зони: смуги «фото 60 / текст 40», чергування сторін */
.zones__featured {
  display: flex; flex-direction: column;
  gap: var(--s5);
  margin-bottom: var(--s6);
}
.zone-row {
  display: grid; grid-template-columns: 60fr 40fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.zone-row--reverse .zone-row__img { order: 2; }
.zone-row--reverse .zone-row__text { order: 1; }
.zone-row__img { aspect-ratio: 16 / 10; }
.zone-row__text { padding-top: clamp(8px, 1.5vw, 24px); }
.zone-row__text h4 { font-size: clamp(24px, 2.6vw, 40px); margin-bottom: 14px; }
.zone-row__text p {
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 19px);
  max-width: 44ch;
}

/* Топонім виїжджає з маски фото на ховері (обрізає .img-w) */
.zone__cap {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  padding: 6px 14px;
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-light);
  background: rgba(30, 33, 36, .55);
  border-radius: 100px;
  pointer-events: none;
  transform: translateY(180%);
  transition: transform .6s cubic-bezier(.25, 1, .5, 1);
}
.zone-row:hover .zone__cap,
.zone:hover .zone__cap { transform: translateY(0); }

.zones__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}
.zone {
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(16px, 1.8vw, 24px);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color .4s ease;
}
.zone:hover { border-color: var(--c-accent); }
.zone__img { aspect-ratio: 16 / 10; }
.zone__img img { transition: transform .6s cubic-bezier(.25, 1, .5, 1), filter .6s ease; }
.zone:hover .zone__img img { transform: scale(1.06); }
.zone h4 { font-size: clamp(19px, 1.7vw, 26px); margin-top: 6px; }
.zone p { font-size: 15.5px; color: var(--muted); line-height: 1.5; }

/* --- Чому саме тут (сценарій Б): без рамок, великі дисплейні
   ключі + текст, розділені лініями (правка 16) --- */
.why { margin-top: var(--s6); }
.why__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(32px, 5vw, 88px);
}
.why__card {
  padding: clamp(24px, 3vw, 40px) 0;
  border-top: 1px solid var(--line);
}
.why__card h4 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(24px, 2.8vw, 44px); line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}
.why__card p { color: var(--muted); max-width: 46ch; }

/* --- Програми / фінансування --- */
.programs__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s5);
  margin-top: var(--s6);
}

/* ============================================================
   08 · ЕТАПНІСТЬ
   ============================================================ */
.phases__lead { max-width: 860px; }
.phases__lead + .phases__lead { margin-top: .9em; }

/* Горизонтальний таймлайн (правка 17): лінію малює JS по скролу */
.phases__track { position: relative; margin-top: var(--s5); }
.phases__line {
  position: absolute; top: 6px; left: 0; right: 0;
  height: 2px;
  background: var(--c-pine);
  transform-origin: left center;
}
.phases__nodes {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
}
.phases__node { position: relative; padding-top: 38px; }
.phases__node::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--c-pine);
}
/* Планова секція: порожнистий маркер = ще не затверджена черга ДПТ */
.phases__node--plan::before {
  background: var(--c-light);
  border: 2px solid var(--c-pine);
  box-sizing: border-box;
}
.phases__node--plan .phases__label { opacity: .85; }
.phases__label {
  display: block;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--c-pine);
  margin-bottom: 12px;
}
.phases__node p, .phases__extra p { color: var(--muted); }
.phases__extra {
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: clamp(20px, 3vw, 32px);
  border-top: 1px dashed var(--line);
  max-width: 640px;
}

/* ============================================================
   MARQUEE: стрічка-передих перед інвест-блоком
   ============================================================ */
.marquee {
  overflow: hidden;
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.marquee__track { display: flex; width: max-content; }
.marquee__list {
  display: flex; align-items: center; flex-shrink: 0;
  gap: clamp(28px, 4vw, 64px);
  padding-right: clamp(28px, 4vw, 64px);
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 5vw, 72px);
  letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}
.marquee__dot {
  width: .14em; height: .14em; border-radius: 50%;
  background: var(--c-accent); flex-shrink: 0;
}

/* ============================================================
   09 · ІНВЕСТИЦІЙНА ПРОПОЗИЦІЯ
   ============================================================ */
.invest__grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 112px);
  align-items: start;
}
.invest__text .btn { margin-top: var(--s4); }
.invest__points li {
  padding: 20px 0 20px 28px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: clamp(16px, 1.3vw, 20px);
}
.invest__points li::before {
  content: ''; position: absolute; left: 4px; top: 31px;
  width: 8px; height: 1.5px; background: var(--c-accent);
}

/* ============================================================
   10 · FAQ (акордеон)
   ============================================================ */
/* FAQ (раунд 4, правка 7): номер-лейбл ліворуч, питання дисплейним,
   маркер «+»→«×» поворотом 45°, щедрі відступи */
.faq__list { max-width: 880px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__btn {
  width: 100%;
  display: grid; grid-template-columns: 56px 1fr auto;
  align-items: baseline; gap: var(--s2);
  padding: var(--s3) 0;
  text-align: left;
  transition: color .3s ease;
}
.faq__num {
  font-size: 13px; letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.faq__q {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(21px, 1.9vw, 30px); line-height: 1.2;
}
.faq__btn:hover { color: var(--c-pine); }
.faq__icon {
  align-self: center;
  flex: 0 0 auto; width: 18px; height: 18px; position: relative;
  transition: transform .4s cubic-bezier(.25, 1, .5, 1);
}
.faq__icon::before, .faq__icon::after {
  content: ''; position: absolute; background: currentColor;
}
.faq__icon::before { left: 0; top: 8px; width: 18px; height: 1.5px; }
.faq__icon::after { left: 8px; top: 0; width: 1.5px; height: 18px; }
.faq__item.is-open .faq__icon { transform: rotate(45deg); }
.faq__desc { height: 0; overflow: hidden; }
.faq__desc p {
  padding: 0 0 var(--s4) 56px; /* у колонку питання */
  max-width: 65ch; color: var(--muted);
}

/* ============================================================
   11 · КОНТАКТИ
   ============================================================ */
/* Без форми (раунд 3): великі клікабельні контакти + одна CTA */
.contact__body { max-width: 1000px; }
.contact__lead { max-width: 760px; }
.contact__list { margin-top: var(--s5); }
.contact__list li {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  align-items: baseline;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
}
.contact__list span {
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.contact__list--big li,
.contact__list--big a {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 3vw, 44px); line-height: 1.15;
  letter-spacing: -.01em;
}
.contact__list--big span { font-family: var(--font-body); font-weight: 400; }
.contact__list a { transition: color .3s ease; }
.contact__list a:hover { color: var(--c-accent); }
.contact__cta { margin-top: var(--s5); }

/* «Подих туману» (.mist-breath) замінено canvas-veil (раунд 4, правка 2) */

/* ============================================================
   ФУТЕР
   ============================================================ */
.footer { padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.footer__inner { text-align: center; }
.footer__logo {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 3vw, 44px); letter-spacing: .12em;
}
.footer__text { margin-top: 12px; color: var(--muted); font-size: 14px; }
.footer__copy { margin-top: 24px; color: var(--muted); font-size: 12.5px; }
.footer__link { text-decoration: underline; text-underline-offset: 3px; }
.footer__link:hover { color: var(--c-accent); }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1023px) {
  .section { padding: var(--s5) 0; }
  .header__nav, .header__cta { display: none; }
  .header__burger { display: flex; }

  .manifest__grid, .location__grid, .scenario__grid,
  .invest__grid, .programs__grid { grid-template-columns: 1fr; }

  .scenario__grid--reverse .scenario__text { order: 1; }
  .scenario__grid--reverse .scenario__img { order: 2; }

  .zone-row { grid-template-columns: 1fr; }
  .zone-row--reverse .zone-row__img { order: 1; }
  .zone-row--reverse .zone-row__text { order: 2; }

  .zones__grid { grid-template-columns: repeat(2, 1fr); }

  /* Локація: nowrap лічильників роздуває сітку за екран — на тачі
     значення мусять переноситись (корінь бага «мапа прилипла вбік») */
  .location__list [data-count] { white-space: normal; }
  .location__list li { grid-template-columns: 104px 1fr; }

  /* Етапність: вузли в стовпчик — горизонтальна лінія-прогрес безглузда;
     замість неї вертикальна рейка крізь маркери (як таймлайн) */
  .phases__nodes { grid-template-columns: 1fr; gap: 32px; position: relative; }
  .phases__nodes::before {
    content: '';
    position: absolute; left: 6px; top: 10px; bottom: 10px;
    width: 2px;
    background: var(--c-pine);
    opacity: .3;
  }
  .phases__line { display: none; }
  .phases__track { margin-top: var(--s4); }
  .phases__node { padding-top: 0; padding-left: 30px; }
  .phases__node::before { top: 7px; }

  /* Чекліст активу: рядкам більше повітря, дуга по центру рядка */
  .asset__checklist li { padding: 16px 0 16px 34px; }
  .asset__checklist li::before { top: 25px; }
  .asset__nums { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .asset__nums li + li { border-left: none; }
  .asset__nums li:nth-child(even) { border-left: 1px solid var(--line); }
  .asset__checklist { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .fork__cards { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(2, auto); row-gap: 20px; }
  .location__map { min-height: 340px; }
}

@media (max-width: 560px) {
  .gallery__slider .swiper-slide { height: clamp(280px, 46vh, 420px); }
  .zones__grid { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .asset__nums { grid-template-columns: 1fr; }
  .asset__nums li:nth-child(even) { border-left: none; }
  .asset__nums li + li { border-top: 1px solid var(--line); }
  .location__list li, .contact__list li { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
