/* =========================================================
   Андреевский собор · Кронштадт
   Дизайн-система: editorial luxury (как лендинг премиум-ЖК)
   ========================================================= */

:root {
  /* Палитра */
  --ink:        #0d0f13;   /* почти чёрный, прохладный */
  --ink-2:      #14171d;
  --ink-3:      #1b1f27;
  --stone:      #f5f0e6;   /* тёплая слоновая кость (камень) */
  --stone-2:    #ebe3d3;
  --stone-3:    #ded3bd;
  --gold:       #c2a14d;   /* основной акцент */
  --gold-soft:  #ddc488;
  --gold-deep:  #9c7e3a;
  --blue:       #1c2b45;   /* глубокий церковный синий */

  --text-dark:  #2a2722;   /* текст на светлом */
  --text-muted: #6b6253;   /* приглушённый на светлом */
  --on-dark:    #f3eee4;   /* текст на тёмном */
  --on-dark-mut: rgba(243,238,228,.62);
  --line-dark:  rgba(243,238,228,.14);
  --line-light: rgba(42,39,34,.14);

  /* Типографика */
  /* Единый гротеск как на референсе (Aurus) — без засечек */
  --serif: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script:"Manrope", system-ui, sans-serif;

  /* Раскладка */
  --wrap: 1240px;
  --pad: clamp(20px, 5vw, 80px);
  --radius: 4px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--stone);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--gold); color: var(--ink); }

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

/* ---------- Typography helpers ---------- */
.kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1.2rem;
}
.section--dark .kicker { color: var(--gold-soft); }
.kicker--center { display: block; text-align: center; }

.sec-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -.01em;
}
.sec-desc {
  margin-top: 1.1rem;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 1.06rem;
}
.section--dark .sec-desc { color: var(--on-dark-mut); }

.sec-head { margin-bottom: clamp(2.4rem, 5vw, 4rem); max-width: 60ch; }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center .sec-desc { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .92em 1.7em;
  font-size: .92rem; font-weight: 600;
  letter-spacing: .02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  will-change: transform;
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  color: #20180a;
  box-shadow: 0 10px 30px -12px rgba(194,161,77,.6);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(194,161,77,.75); }
.btn--ghost {
  background: transparent; color: currentColor;
  border-color: var(--line-light);
}
.section--dark .btn--ghost, .hero .btn--ghost { border-color: var(--line-dark); color: var(--on-dark); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-deep); }
.section--dark .btn--ghost:hover, .hero .btn--ghost:hover { color: var(--gold-soft); border-color: var(--gold-soft); }
.btn--lg { padding: 1.05em 2.2em; font-size: 1rem; }
.btn--sm { padding: .6em 1.1em; font-size: .82rem; }

/* =========================================================
   NAV
   ========================================================= */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
}

.nav {
  position: fixed; z-index: 50;
  top: clamp(10px, 2vw, 18px); left: clamp(10px, 2vw, 18px); right: clamp(10px, 2vw, 18px);
  transition: transform .4s var(--ease);
}
.nav__inner {
  display: flex; align-items: center; gap: 1.5rem;
  max-width: var(--wrap); margin-inline: auto;
  padding: .7rem .8rem .7rem 1.1rem;
  border-radius: 999px;
  background: rgba(13,15,19,.42);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(243,238,228,.12);
  color: var(--on-dark);
  transition: background .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease);
}
.nav.is-solid .nav__inner {
  background: rgba(13,15,19,.86);
  border-color: rgba(243,238,228,.1);
}
.nav__brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.nav__mark { width: 26px; height: 32px; color: var(--gold-soft); flex: none; }
.nav__brandtext { display: flex; flex-direction: column; line-height: 1.05; }
.nav__brandtext strong { font-family: var(--serif); font-size: 1.04rem; font-weight: 600; letter-spacing: .01em; }
.nav__brandtext em { font-style: normal; font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--on-dark-mut); }

.nav__links { display: flex; gap: 1.7rem; }
.nav__links a {
  position: relative; font-size: .88rem; font-weight: 500; color: var(--on-dark-mut);
  transition: color .2s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 1.5px;
  background: var(--gold-soft); transition: width .28s var(--ease);
}
.nav__links a:hover { color: var(--on-dark); }
.nav__links a:hover::after { width: 100%; }
.nav__cta { flex: none; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav__burger span { width: 22px; height: 2px; background: var(--on-dark); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--pad) clamp(3rem, 7vh, 6rem);
  background: radial-gradient(120% 90% at 70% 0%, #1d232f 0%, var(--ink) 60%);
  color: var(--on-dark);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 22s ease-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.14); } }
.hero__illustration {
  position: absolute; inset: 0; display: grid; place-items: end center;
  opacity: .9; pointer-events: none;
}
.hero__illustration svg { width: min(46vw, 460px); height: auto; transform: translateY(6%); animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(6%); } 50% { transform: translateY(3.4%); } }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--ink) 2%, rgba(13,15,19,.35) 45%, rgba(13,15,19,.55) 100%),
    radial-gradient(80% 60% at 20% 90%, rgba(13,15,19,.7), transparent 70%);
}
.hero__grain {
  position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.hero__content { position: relative; z-index: 2; max-width: 900px; }
.hero__eyebrow {
  display: flex; align-items: center; gap: .9rem;
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--on-dark-mut); margin-bottom: 1.4rem;
}
.hero__eyebrow .line { width: 46px; height: 1px; background: var(--gold-soft); display: inline-block; }

.hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3.2rem, 12vw, 9.5rem);
  line-height: .92;
  letter-spacing: -.025em;
}
.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: block; transform: translateY(110%); }
.hero.is-in .hero__line:nth-child(1) > span { animation: lineUp 1s var(--ease-out) .15s forwards; }
.hero.is-in .hero__line:nth-child(2) > span { animation: lineUp 1s var(--ease-out) .3s forwards; color: var(--gold-soft); font-style: italic; font-weight: 500; }
@keyframes lineUp { to { transform: translateY(0); } }

/* Подпись */
.signature { position: relative; margin: 1.4rem 0 .4rem; height: 3.2em; }
.signature__text {
  font-family: var(--script);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--gold-soft);
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
}
.hero.is-in .signature__text { animation: writeIn 2s var(--ease) 1s forwards; }
@keyframes writeIn { to { clip-path: inset(0 0 0 0); } }
.signature__flourish { position: absolute; left: 0; bottom: -.2em; width: clamp(220px, 34vw, 360px); height: 30px; }
.signature__flourish path { stroke-dasharray: 520; stroke-dashoffset: 520; }
.hero.is-in .signature__flourish path { animation: draw 1.6s var(--ease) 2.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero__sub { margin-top: 1rem; max-width: 46ch; font-size: clamp(1rem, 1.4vw, 1.18rem); color: rgba(243,238,228,.82); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.hero__scroll {
  position: absolute; z-index: 2; right: var(--pad); bottom: clamp(3rem, 7vh, 6rem);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-mut);
}
.hero__scroll svg { width: 20px; height: 20px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* =========================================================
   MANIFESTO
   ========================================================= */
.manifesto { background: var(--ink); color: var(--on-dark); padding: clamp(4rem, 10vw, 9rem) 0; }
.manifesto .kicker--center { text-align: left; }
.manifesto__lead {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.9vw, 1.5rem);
  line-height: 1.55; font-weight: 400;
  max-width: 46ch; margin: 0; text-align: left;
  color: var(--on-dark);
}
.manifesto__lead em { color: var(--gold-soft); font-style: italic; }
.manifesto__meta {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem; margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-dark); padding-top: 3rem;
}
.manifesto__meta > div { display: flex; flex-direction: column; gap: .4rem; text-align: left; align-items: flex-start; }
.manifesto__meta .num { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); color: var(--gold-soft); line-height: 1; }
.manifesto__meta .cap { font-size: .82rem; color: var(--on-dark-mut); letter-spacing: .02em; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: clamp(4.5rem, 10vw, 9rem) 0; }
.section--dark { background: var(--ink-2); color: var(--on-dark); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: clamp(56px, 9vw, 120px); top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(var(--gold-deep), var(--line-dark));
}
.tl { position: relative; display: grid; grid-template-columns: clamp(64px, 10vw, 130px) 1fr; gap: clamp(1.5rem, 4vw, 4rem); padding: 1.6rem 0; }
.tl__year { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 2rem); color: var(--gold-soft); text-align: right; line-height: 1; }
.tl__year small { font-size: .6em; color: var(--on-dark-mut); }
.tl__body { position: relative; padding-left: clamp(1.6rem, 4vw, 3.4rem); }
.tl__body::before {
  content: ""; position: absolute; left: calc(clamp(56px, 9vw, 120px) * 0); top: .55em;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--ink-2); border: 2px solid var(--gold);
  margin-left: calc(-1 * clamp(1.6rem, 4vw, 3.4rem) - 5px + 1px);
}
.tl__body h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; margin-bottom: .4rem; }
.tl__body p { color: var(--on-dark-mut); max-width: 60ch; }
.tl--loss .tl__body::before { background: #2a1414; border-color: #8a4a4a; }
.tl--now .tl__body::before { background: var(--gold); box-shadow: 0 0 0 5px rgba(194,161,77,.18); }
.tl--now .tl__body h3 { color: var(--gold-soft); }

/* ---------- Before / After ---------- */
.beforeafter { background: var(--stone-2); }
.ba { max-width: 1000px; margin-inline: auto; }
.ba__frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; user-select: none; box-shadow: 0 30px 70px -30px rgba(42,39,34,.5);
  background: var(--ink);
}
.ba__layer { position: absolute; inset: 0; }
.ba__layer img { width: 100%; height: 100%; object-fit: cover; }
.ba__after { width: 50%; overflow: hidden; border-right: 2px solid var(--gold); }
.ba__after img { width: 200%; max-width: none; } /* держим кадр на месте при кропе */
.ba__layer.is-empty img { display: none; }
.ba__before { display: grid; place-items: center; background: linear-gradient(160deg, #3a4250, #20262f); }
.ba__after.is-empty, .ba__before.is-empty { display: grid; place-items: center; }
.ba__after { background: linear-gradient(160deg, #2a3550, #c2a14d22); }
.ba__placeholder { font-family: var(--serif); font-size: clamp(1rem,2.4vw,1.6rem); color: rgba(243,238,228,.5); padding: 1rem; text-align: center; }
.ba__after .ba__placeholder { width: 200%; }
.ba__placeholder--gold { color: var(--gold-soft); }
.ba__layer img:not([src=""]) + .ba__placeholder { display: none; }
.ba__layer.is-empty .ba__placeholder { display: block; }
.ba__layer:not(.is-empty) .ba__placeholder { display: none; }
.ba__tag {
  position: absolute; top: 1rem; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  padding: .4em .9em; border-radius: 999px; background: rgba(13,15,19,.6); color: var(--on-dark); backdrop-filter: blur(6px);
}
.ba__tag--l { right: 1rem; }
.ba__tag--r { left: 1rem; color: var(--gold-soft); }
.ba__after .ba__tag--r { left: 1rem; }
.ba__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4;
}
.ba__handle {
  position: absolute; top: 50%; left: 50%; z-index: 3;
  width: 46px; height: 46px; transform: translate(-50%,-50%);
  border-radius: 50%; background: var(--gold); color: var(--ink);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.35); pointer-events: none;
}
.ba__handle svg { width: 22px; height: 22px; }

/* ---------- Ioann ---------- */
.ioann { background: var(--stone); }
.ioann__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.ioann__frame {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--ink-3), var(--blue));
  display: grid; place-items: center;
}
.ioann__frame img { width: 100%; height: 100%; object-fit: cover; }
.ioann__frame.is-empty::after {
  content: "Портрет / икона\A св. Иоанна"; white-space: pre; text-align: center;
  font-family: var(--serif); color: var(--gold-soft); opacity: .7; font-size: 1.1rem;
}
.ioann__frame.is-empty img { display: none; }
.ioann__halo {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
  width: 60%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(221,196,136,.35), transparent 65%);
  pointer-events: none;
}
.ioann__text .lead { font-size: 1.18rem; color: var(--text-dark); margin: 1.3rem 0; }
.ioann__text p { color: var(--text-muted); }
.pull {
  margin-top: 2rem; padding-left: 1.5rem; border-left: 2px solid var(--gold);
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.5; color: var(--text-dark);
}
.pull cite { display: block; margin-top: .6rem; font-size: .9rem; font-style: normal; color: var(--text-muted); }

/* ---------- 3D-карта · полноэкранный оверлей (в духе nicole.ru/map) ---------- */

/* Кнопка-открывашка слева снизу — карточка, появляется после hero */
.mapopen {
  position: fixed; left: clamp(16px, 2.5vw, 28px); bottom: clamp(16px, 2.5vw, 28px); z-index: 90;
  display: inline-flex; align-items: center; overflow: hidden;
  padding: 1.05rem 1.8rem; cursor: pointer; isolation: isolate;
  border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
  background: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 24px 54px -22px rgba(20,15,6,.75);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease-out), box-shadow .35s var(--ease);
}
/* фон — фрагмент 3D-карты, плавно «дышит» туда-сюда */
.mapopen::before {
  content: ""; position: absolute; inset: -14%; z-index: 0;
  background: url('../img/map-cta-bg.jpg') center / cover;
  animation: mapPan 18s ease-in-out infinite;
}
/* затемнение для читаемости текста */
.mapopen::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(115deg, rgba(13,15,19,.82) 0%, rgba(13,15,19,.5) 58%, rgba(13,15,19,.34) 100%);
}
@keyframes mapPan {
  0%, 100% { transform: translate(-3.5%, -2%) scale(1.06); }
  50%      { transform: translate(3.5%, 2%) scale(1.06); }
}
.mapopen.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mapopen:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255,255,255,.16) inset, 0 30px 64px -22px rgba(20,15,6,.82); }
.mapopen:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mapopen__title {
  position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 700; font-size: 1.12rem; letter-spacing: .01em;
  color: #fff; text-shadow: 0 1px 14px rgba(0,0,0,.55);
}

/* Полноэкранный оверлей со сценой */
.mapview {
  position: fixed; inset: 0; z-index: 200;
  background: #e7dfce;                 /* плоский тёплый студийный фон — без градиентов */
  opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s var(--ease);
}
.mapview.is-open { opacity: 1; visibility: visible; }
.mapview[hidden] { display: none; }
.mapview__stage { position: absolute; inset: 0; }
.mapview__stage canvas {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  display: block; outline: none; touch-action: none;
}

/* Верхняя панель: бренд + закрыть */
.mapview__top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(14px, 2.2vw, 24px) clamp(16px, 2.6vw, 30px); pointer-events: none;
}
.mapview__brand { display: grid; gap: 2px; }
.mapview__brand strong { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; color: var(--text-dark); }
.mapview__brand em { font-style: normal; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.mapview__close {
  pointer-events: auto; flex: none; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--text-dark);
  background: rgba(247,242,232,.9); border: 1px solid rgba(42,39,34,.12);
  box-shadow: 0 10px 28px -14px rgba(40,32,18,.6);
  transition: background .2s var(--ease), transform .25s var(--ease);
}
.mapview__close svg { width: 20px; height: 20px; }
.mapview__close:hover { background: #fff; transform: rotate(90deg); }
.mapview__close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Подсказка управления */
.mapview__hint {
  position: absolute; left: 50%; bottom: clamp(16px, 2.4vw, 26px); transform: translateX(-50%); z-index: 5;
  font-size: .76rem; letter-spacing: .03em; color: var(--text-muted); pointer-events: none;
  background: rgba(247,242,232,.72); padding: .4rem .85rem; border-radius: 999px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .5s var(--ease) .3s;
}
.mapview.is-live .mapview__hint { opacity: 1; }

/* Спиннер загрузки */
.mapview__loader {
  position: absolute; inset: 0; z-index: 4; display: none;
  place-items: center; align-content: center; gap: 1rem; pointer-events: none;
}
.mapview__loader.is-on { display: grid; }
.mapview__spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid rgba(156,126,58,.25); border-top-color: var(--gold-deep);
  animation: mapspin .9s linear infinite;
}
@keyframes mapspin { to { transform: rotate(360deg); } }
.mapview__loader span:not(.mapview__spinner) { font-size: .85rem; color: var(--text-muted); }

/* ⚙ dev-ридаут координат камеры — для подгонки CONFIG под здание */
.mapview__gear {
  position: absolute; right: clamp(14px, 2vw, 24px); bottom: clamp(14px, 2vw, 24px); z-index: 6;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: rgba(247,242,232,.8); border: 1px solid rgba(42,39,34,.12); color: var(--text-muted); font-size: 15px;
  box-shadow: 0 8px 24px -12px rgba(40,32,18,.5);
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
}
.mapview.is-live .mapview__gear { opacity: .65; pointer-events: auto; }
.mapview__gear:hover { opacity: 1; }
.mapview__gear:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; opacity: 1; }
.mapview__readout {
  position: absolute; left: clamp(14px, 2vw, 24px); bottom: clamp(58px, 8vw, 70px); z-index: 6;
  font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; line-height: 1.6;
  color: var(--text-dark); background: rgba(247,242,232,.92);
  border: 1px solid rgba(42,39,34,.12); border-radius: 8px; padding: 8px 11px;
  backdrop-filter: blur(4px); box-shadow: 0 8px 24px -12px rgba(40,32,18,.5);
  max-width: min(86vw, 320px);
}
.mapview__readout b { color: var(--gold-deep); }
.mapview__readout[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .mapopen, .mapview, .mapview__hint { transition: opacity .3s; }
  .mapopen, .mapopen.is-visible { transform: none; }
  .mapopen::before { animation: none; }
  .mapview__close:hover { transform: none; }
  .mapview__spinner { animation: none; }
}

/* ---------- Vision / Gallery ---------- */
.vision { background: var(--stone); }
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 230px; gap: clamp(.8rem, 1.5vw, 1.2rem);
}
.gcard {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--ink-3), var(--blue));
  grid-column: span 2;
}
.gcard--xl { grid-column: span 2; grid-row: span 2; }
.gcard--wide { grid-column: span 2; }
.gcard__media { position: absolute; inset: 0; }
.gcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.gcard:hover .gcard__media img { transform: scale(1.06); }
.gcard.is-empty .gcard__media img { display: none; }
.gcard.is-empty .gcard__media::after {
  content: "Место для рендера"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); color: rgba(221,196,136,.45); font-size: .95rem; letter-spacing: .04em; font-style: italic;
}
.gcard.is-empty .gcard__media { background: repeating-linear-gradient(135deg, #1b2030, #1b2030 14px, #1d2333 14px, #1d2333 28px); }
.gcard figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: .6rem;
  padding: 1.4rem 1.2rem 1.1rem; color: var(--on-dark);
  font-size: .92rem; font-weight: 500;
  background: linear-gradient(to top, rgba(13,15,19,.85), transparent);
}
.gcard__no { font-family: var(--serif); color: var(--gold-soft); font-size: 1.05rem; }
.vision__note { margin-top: 1.6rem; font-size: .88rem; color: var(--text-muted); }
.vision__note code, .support__hint code { font-family: ui-monospace, monospace; color: var(--gold-deep); }

/* ---------- Stages ---------- */
.stages__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.stage {
  position: relative; padding: 2rem 1.6rem; border-radius: var(--radius);
  background: var(--ink-3); border: 1px solid var(--line-dark);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.stage:hover { transform: translateY(-4px); border-color: rgba(194,161,77,.5); }
.stage__no { font-family: var(--serif); font-size: 2.4rem; color: var(--gold); display: block; margin-bottom: .8rem; }
.stage h3 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: .5rem; }
.stage p { color: var(--on-dark-mut); font-size: .94rem; }
.stage__state { display: inline-block; margin-top: 1.2rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-mut); padding: .35em .8em; border: 1px solid var(--line-dark); border-radius: 999px; }
.stage__state--done { color: var(--gold-soft); border-color: rgba(194,161,77,.45); }

/* ---------- Support / CTA ---------- */
.support { background: radial-gradient(120% 100% at 50% 0%, var(--blue), var(--ink) 70%); color: var(--on-dark); text-align: center; }
.support__inner { max-width: 660px; margin-inline: auto; }
.support__title { font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.08; margin-bottom: 1.1rem; }
.support__desc { color: var(--on-dark-mut); font-size: 1.05rem; max-width: 50ch; margin-inline: auto; }
.support__form { margin-top: 2.4rem; display: grid; gap: 1rem; max-width: 460px; margin-inline: auto; text-align: left; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .8rem; letter-spacing: .06em; color: var(--on-dark-mut); }
.field input {
  width: 100%; padding: .9em 1.1em; font: inherit; color: var(--on-dark);
  background: rgba(243,238,228,.06); border: 1px solid var(--line-dark); border-radius: var(--radius);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field input::placeholder { color: rgba(243,238,228,.4); }
.field input:focus { outline: none; border-color: var(--gold); background: rgba(243,238,228,.1); }
.support__form .btn { margin-top: .4rem; }
.support__hint { font-size: .85rem; color: var(--gold-soft); min-height: 1.2em; text-align: center; }

/* ---------- Footer ---------- */
/* ---------- 3D-карта · приглашение (CTA) ---------- */
.mapcta { position: relative; overflow: hidden; text-align: left; background: var(--ink-2); padding-bottom: 0; }
/* фон-картинка 3D-карты + затемнение слева под текст */
.mapcta__bg { position: absolute; inset: 0; z-index: 0; background: var(--ink-2); }
.mapcta__bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mapcta__bg.is-empty img { display: none; }
.mapcta__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(13,15,19,.95) 0%, rgba(13,15,19,.80) 38%, rgba(13,15,19,.32) 72%, rgba(13,15,19,.10) 100%),
    linear-gradient(180deg, rgba(13,15,19,.32) 0%, transparent 22%, transparent 48%, rgba(13,15,19,.72) 84%, var(--ink) 100%);
}
.mapcta__inner {
  position: relative; z-index: 1;
  max-width: 600px; margin-inline: 0;
  display: grid; justify-items: start; gap: 1.1rem; text-align: left;
}
.mapcta__badge {
  width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: .02em;
  color: var(--ink); background: linear-gradient(150deg, var(--gold-soft), var(--gold));
  box-shadow: 0 14px 34px -10px rgba(194,161,77,.6); margin-bottom: .3rem;
}
.mapcta .sec-title { color: var(--on-dark); }   /* спокойный off-white, без золота */
#map-cta .footer { margin-top: clamp(3rem, 7vw, 5rem); }   /* нормальный отступ до низа */
.mapcta__desc { color: var(--on-dark-mut); font-size: 1.12rem; line-height: 1.6; max-width: 52ch; }
.mapcta__btn {
  margin-top: 1.5rem;
  border-radius: 999px;                 /* pill */
  font-weight: 700;
  background: var(--stone); color: var(--ink);   /* спокойный дорогой off-white */
}
.mapcta__btn:hover { background: #fff; transform: none; }
.mapcta__btn svg { width: 19px; height: 19px; }

.footer { background: transparent; color: var(--on-dark); position: relative; z-index: 1; }
.footer__grid { display: block; padding-bottom: 3rem; }
.footer__tag { margin-top: 1.2rem; color: var(--on-dark-mut); font-size: .92rem; max-width: 34ch; }
.footer__col { display: flex; flex-direction: column; gap: .7rem; }
.footer__col h4 { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; margin-bottom: .4rem; }
.footer__col a, .footer__col span { color: var(--on-dark-mut); font-size: .92rem; transition: color .2s var(--ease); }
.footer__col a:hover { color: var(--gold-soft); }
.footer__bottom a { color: var(--gold-soft); text-decoration: none; transition: color .2s var(--ease); }
.footer__bottom a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom {
  padding: 1.6rem var(--pad);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--on-dark-mut);
}

/* =========================================================
   Reveal animations
   ========================================================= */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal][data-delay="1"] { transition-delay: .1s; }
[data-reveal][data-delay="2"] { transition-delay: .2s; }
[data-reveal][data-delay="3"] { transition-delay: .3s; }
[data-reveal][data-delay="4"] { transition-delay: .4s; }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .ioann__grid { grid-template-columns: 1fr; }
  .ioann__frame { max-width: 420px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stages__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 1.2rem;
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    background: rgba(13,15,19,.96); backdrop-filter: blur(14px);
    border: 1px solid var(--line-dark); border-radius: 18px; padding: 1.6rem;
  }
  .nav.is-open .nav__links a { font-size: 1.1rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gcard--xl { grid-row: span 2; }
  .manifesto__meta { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .gcard, .gcard--xl, .gcard--wide { grid-column: span 1; grid-row: auto; min-height: 220px; }
  .gcard--xl { min-height: 300px; }
  .stages__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .signature__text { font-size: clamp(1.25rem, 5.6vw, 1.7rem); }
  .tl { grid-template-columns: 64px 1fr; gap: 1rem; }
  .timeline::before { left: 64px; }
}

/* =========================================================
   DESCENT — кинематографичный pinned-hero «Сошествие к храму»
   ========================================================= */
.descent { position: relative; background: var(--ink); color: var(--on-dark); }
.descent__track { position: relative; height: 100svh; }
.descent--js .descent__track { height: 200vh; }

.descent__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; place-items: center;
}
.dlayer { position: absolute; inset: 0; will-change: transform, opacity; }

.dlayer--sky {
  background:
    url("../img/sky-heaven.png?v=3") center 30% / cover no-repeat,
    radial-gradient(130% 85% at 50% 16%, #e7ddc9 0%, #cdd6e0 30%, #9aa7b6 60%, #5a6573 85%, var(--ink) 100%);
}
/* Облака на чёрном фоне накладываем через screen (чёрное «выбивается»).
   Без z-index у этих слоёв — иначе изолируется stacking context и screen ломается. */
/* плотная НЕпрозрачная гряда — полностью закрывает низ экрана, мягкий верхний край */
.dlayer--bank img {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%;
  object-fit: cover; object-position: center bottom;
  -webkit-mask-image: linear-gradient(to top, #000 58%, transparent 100%);
  mask-image: linear-gradient(to top, #000 58%, transparent 100%);
}
/* штучные облака — разлетаются поверх собора */
.skyclouds { position: absolute; inset: 0; pointer-events: none; }
.skycloud {
  position: absolute; height: auto;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  will-change: transform, opacity;
  filter: blur(.3px);
}

.dlayer--glow {
  background: radial-gradient(34% 26% at 50% 44%, rgba(246,226,165,.95), rgba(226,190,110,.4) 46%, transparent 72%);
  mix-blend-mode: screen; opacity: 0;
}
.descent--js .dlayer--glow { opacity: 0; }

.dlayer--cathedral { display: grid; place-items: center; will-change: transform; }
/* размытая копия заполняет бока, чтобы не было пустых полей */
.descent__imgbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); filter: blur(40px) brightness(.97) saturate(1.05); }
/* фото собора ЦЕЛИКОМ — без обрезки сверху/снизу; боковые края растворяются в размытом фоне */
.descent__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.descent__silhouette { position: relative; width: min(42vw, 400px); transform: none; }
.dlayer--cathedral.has-img .descent__silhouette { display: none; }

.descent__vignette { position: absolute; inset: 0; background: radial-gradient(125% 95% at 50% 35%, transparent 56%, rgba(13,15,19,.4)), linear-gradient(to bottom, transparent 87%, var(--ink) 100%); }
.descent__grain {
  position: absolute; inset: 0; opacity: .4; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.descent__captions { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 0 var(--pad); pointer-events: none; }
.dcap {
  grid-area: 1 / 1; text-align: center;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.5rem, 4.2vw, 3.1rem); line-height: 1.2;
  color: #19202e; max-width: 18ch;
  opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease);
  position: relative;
}
.dcap.is-active { opacity: 1; transform: none; }
/* небо светлое на всех фазах — подписи тёмные, читаемые, без тени */

.descent__final {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 var(--pad);
}
.descent__final::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(85% 60% at 50% 47%, rgba(13,15,19,.34), rgba(13,15,19,.12) 55%, transparent 75%);
}
.descent__final > * { max-width: 1100px; position: relative; }
.descent__final .hero__title { font-weight: 800; letter-spacing: -.04em; }
.descent--js .descent__final { opacity: 0; pointer-events: none; }
.descent--js .descent__final.is-revealed { opacity: 1; pointer-events: auto; transition: opacity .6s var(--ease); }

/* финальные ре-анимации (только в js-режиме) */
.descent--js .descent__final .hero__line > span { transform: translateY(110%); }
.descent--js .descent__final.is-revealed .hero__line:nth-child(1) > span { animation: lineUp 1s var(--ease-out) .1s forwards; }
.descent--js .descent__final.is-revealed .hero__line:nth-child(2) > span { animation: lineUp 1s var(--ease-out) .25s forwards; color: var(--gold-soft); font-style: normal; font-weight: 800; }
.descent--js .descent__final .signature__text { clip-path: inset(0 100% 0 0); }
.descent--js .descent__final.is-revealed .signature__text { animation: writeIn 1.8s var(--ease) .8s forwards; }
.descent--js .descent__final .signature__flourish path { stroke-dasharray: 520; stroke-dashoffset: 520; }
.descent--js .descent__final.is-revealed .signature__flourish path { animation: draw 1.4s var(--ease) 1.9s forwards; }
.descent--js .descent__final .hero__eyebrow,
.descent--js .descent__final .hero__sub,
.descent--js .descent__final .hero__actions { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.descent--js .descent__final.is-revealed .hero__eyebrow { opacity: 1; transform: none; transition-delay: .2s; }
.descent--js .descent__final.is-revealed .hero__sub { opacity: 1; transform: none; transition-delay: 1.15s; }
.descent--js .descent__final.is-revealed .hero__actions { opacity: 1; transform: none; transition-delay: 1.35s; }

.descent .hero__scroll { z-index: 6; left: 50%; right: auto; transform: translateX(-50%); }

/* статичное название — видно сразу, без фазовых подписей */
.descent--js .descent__final--static { opacity: 1; pointer-events: auto; }
.descent--js .descent__final--static .hero__line:nth-child(1) > span { animation: lineUp 1s var(--ease-out) .35s forwards; }
.descent--js .descent__final--static .hero__line:nth-child(2) > span { animation: lineUp 1s var(--ease-out) .5s forwards; color: var(--gold-soft); font-weight: 800; }

/* === HERO с вырезанным собором (отдельный PNG поверх) ===
   Глубина задаётся ПОРЯДКОМ в DOM (без z-index) — иначе ломается screen-blend облаков.
   sky → облака-сзади → НАЗВАНИЕ → собор(PNG) → облака-спереди → виньетка */
.hero-sky {
  background: linear-gradient(to bottom,
    #2c4a72 0%, #44638f 24%, #6f86ab 48%, #9ba2bd 68%, #c3b6bc 85%, #d6c8bc 100%);
}
.descent--js .descent__final--static { z-index: auto; } /* текст уходит ЗА собор по DOM-порядку */
.hero-cathedral { position: absolute; inset: 0; pointer-events: none; }
.hero-cathedral img {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(1500px, 98vw); height: auto;
  filter: drop-shadow(0 18px 38px rgba(18,28,48,.28));
}

/* === HERO: исходное фото (фон, ~2 экрана, целиком) + вырезанный собор поверх ===
   Текст между ними → уходит ЗА собор. Обычная прокрутка. */
.skyhero { position: relative; height: 200vh; overflow: hidden; background: #34507a; }
.skyhero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16vh; z-index: 5; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--ink)); }
.skyhero__bg,
.skyhero__cathedral {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
/* Порядок слоёв задаётся DOM-порядком (фон → текст → собор → облака),
   без z-index — иначе изолируется stacking context и screen-blend облаков ломается. */
.skyhero__cathedral { pointer-events: none; }
.skyhero__title {
  position: absolute; left: 0; right: 0; top: 0; height: 100vh;
  display: grid; place-items: center;
  padding: 0 var(--pad); text-align: center; will-change: transform, opacity;
}
.skyhero__title .hero__title { font-weight: 800; letter-spacing: -.04em; }
/* анимация появления заголовка при загрузке (маска + выезд снизу, со стаггером) */
.skyhero__title .hero__line > span { transform: translateY(110%); animation: lineUp 1.1s var(--ease-out) forwards; }
.skyhero__title .hero__line:nth-child(1) > span { animation-delay: .25s; }
.skyhero__title .hero__line:nth-child(2) > span { color: var(--gold-soft); animation-delay: .45s; }
/* индикатор «листайте» — БЕЗ z-index (за названием по DOM-порядку), чуть выше облаков */
.skyhero__scroll { position: absolute; top: 72vh; left: 50%; right: auto; bottom: auto; transform: translateX(-50%); }
/* слои облаков — только первый экран (иначе top:% считается от 200vh) */
#skyClouds, #skyCloudsBack { position: absolute; top: 0; left: 0; right: 0; bottom: auto; height: 100vh; }

/* Гротеск-режим как на референсе: без синтетического курсива, премиальная подача */
.dcap, .fullbleed__cap, .gcard__cap, .manifesto__lead em, .pull, .pull cite { font-style: normal; }
.dcap { font-weight: 600; letter-spacing: -.005em; }
.fullbleed__cap { font-weight: 300; }
.gcard__cap { font-weight: 500; }
.manifesto__lead { font-weight: 400; }
.manifesto__lead em { font-weight: 600; }
.sec-title { font-weight: 800; letter-spacing: -.03em; }
.fullbleed__year { font-weight: 800; }

/* =========================================================
   FULLBLEED — полнокадровые кинематографичные секции
   ========================================================= */
.fullbleed { position: relative; min-height: 92vh; min-height: 92svh; display: grid; align-items: center; overflow: hidden; background: var(--ink); color: var(--on-dark); }
.fullbleed__media { position: absolute; inset: 0; }
.fullbleed__media img { width: 100%; height: 100%; object-fit: cover; }
.fullbleed__media--kb img { animation: kenburns 26s ease-out infinite alternate; }
.fullbleed__media.is-empty { background: linear-gradient(160deg, #12141c, #1d2536); }
.fullbleed__media.is-empty img { display: none; }
.fullbleed--loss .fullbleed__media.is-empty { background: linear-gradient(160deg, #0d0e12, #24262d); }
.fullbleed--loss .fullbleed__media img { filter: grayscale(.92) brightness(.66) contrast(1.06); }
.fullbleed__scrim { position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 45%, rgba(13,15,19,.32), rgba(13,15,19,.85)); }
.fullbleed--loss .fullbleed__scrim { background: radial-gradient(120% 100% at 50% 45%, rgba(13,15,19,.55), rgba(13,15,19,.92)); }
.fullbleed__scrim--soft { background: linear-gradient(to top, rgba(13,15,19,.92) 0%, rgba(13,15,19,.18) 48%, rgba(13,15,19,.5) 100%); }
.fullbleed__content { position: relative; z-index: 2; width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.fullbleed__content--center { text-align: center; }
.fullbleed__content--bottom { align-self: end; padding-bottom: clamp(3rem, 8vh, 7rem); }
.fullbleed__year { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(4rem, 14vw, 11rem); line-height: .9; letter-spacing: -.02em; color: var(--gold-soft); }
.fullbleed--loss .fullbleed__year { color: #bcad8d; opacity: .85; }
.fullbleed__cap { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3.4vw, 2.6rem); line-height: 1.3; margin-top: 1rem; color: var(--on-dark); }
.fullbleed__content--center .fullbleed__cap { max-width: 22ch; margin-inline: auto; }

/* galleries: поэтичные подписи */
.gcard figcaption { flex-direction: column; align-items: flex-start; gap: .25rem; }
.gcard__cap { font-family: var(--serif); font-style: italic; font-size: 1.06rem; line-height: 1.25; color: var(--on-dark); }
.gcard__title { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
.gcard--xl .gcard__cap { font-size: 1.3rem; }

/* =========================================================
   HISTORY · горизонтальная прокрутка (листаешь вниз → едет вбок)
   ========================================================= */
.hscroll { position: relative; background: var(--ink); color: var(--on-dark); height: 500vh; }
.hscroll__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; display: flex; align-items: center;
}
.hscroll__row { display: flex; height: 100%; align-items: center; gap: clamp(1rem, 2.2vw, 2.4rem); padding: 0 clamp(1.4rem, 3.5vw, 3.5rem); will-change: transform; }

/* большая карточка почти на весь экран */
.hpanel {
  position: relative; flex: 0 0 auto;
  width: min(1500px, 88vw); height: min(880px, 86vh);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 50px 100px -45px rgba(0,0,0,.75);
}
.hpanel__media { position: absolute; inset: 0; background: linear-gradient(160deg, var(--ink-3), var(--blue)); }
.hpanel__media img { width: 100%; height: 100%; object-fit: cover; }
.hpanel.is-empty .hpanel__media { background: repeating-linear-gradient(135deg, #1b2030, #1b2030 20px, #1d2333 20px, #1d2333 40px); }
.hpanel.is-empty .hpanel__media img { display: none; }
.hpanel.is-empty .hpanel__media::after { content: "Место для рендера"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-style: italic; color: rgba(221,196,136,.4); font-size: 1.1rem; }
.hpanel--loss .hpanel__media img { filter: grayscale(.85) brightness(.7) contrast(1.06); }

/* подпись красиво поверх картинки */
.hpanel__cap {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  display: flex; align-items: flex-end; gap: clamp(1.2rem, 3vw, 3.2rem);
  padding: clamp(1.8rem, 5vw, 4rem);
  background: linear-gradient(to top, rgba(9,11,15,.94) 0%, rgba(9,11,15,.55) 42%, transparent 80%);
}
.hpanel__year {
  flex: none; font-family: var(--serif); font-weight: 800;
  font-size: clamp(2.8rem, 7.5vw, 6.5rem); line-height: .8; letter-spacing: -.03em;
  color: var(--gold-soft);
}
.hpanel--loss .hpanel__year { color: #c3b18d; }
.hpanel__text { padding-bottom: .5rem; }
.hpanel__kick { display: block; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .7rem; }
.hpanel__title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2.2rem); margin-bottom: .55rem; line-height: 1.05; }
.hpanel__cap p { color: rgba(243,238,228,.84); font-size: clamp(.96rem, 1.25vw, 1.12rem); line-height: 1.5; max-width: 48ch; }
@media (max-width: 700px) {
  .hpanel { width: 90vw; }
  .hpanel__cap { flex-direction: column; align-items: flex-start; gap: .8rem; }
}

/* ---------- телефоны: полировка ---------- */
@media (max-width: 600px) {
  /* компактная плавающая карточка, чтобы не перекрывать подписи истории */
  .mapopen { left: 12px; bottom: 12px; padding: .65rem 1.05rem; border-radius: 12px; }
  .mapopen__title { font-size: .92rem; }

  /* CTA: на узком экране текст идёт во всю ширину → усиливаем затемнение фона */
  .mapcta__inner { max-width: 100%; }
  .mapcta__bg::after {
    background:
      linear-gradient(180deg, rgba(13,15,19,.5) 0%, rgba(13,15,19,.32) 38%, rgba(13,15,19,.62) 100%),
      linear-gradient(90deg, rgba(13,15,19,.88) 0%, rgba(13,15,19,.5) 70%, rgba(13,15,19,.4) 100%);
  }
  .mapcta__desc { font-size: 1rem; }

  /* подсказка управления в карте — на телефоне не нужна (есть авто-покач) */
  .mapview__hint { display: none; }
  /* верхняя панель карты — чуть плотнее */
  .mapview__brand strong { font-size: .95rem; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__line > span { transform: none; }
  .signature__text { clip-path: none; }
  .signature__flourish path { stroke-dashoffset: 0; }
  .hero__img { animation: none; }
  /* descent: статичный храм + финал, без pin и параллакса */
  .descent__track { height: 100svh !important; }
  .descent__stage { position: relative; }
  .dlayer--clouds, .dlayer--haze, .dlayer--bank, .skyclouds, .descent__grain { display: none; }
  .dlayer--cathedral { opacity: 1 !important; }
  .dlayer--glow { opacity: .5 !important; }
  .descent__captions { display: none; }
  .descent__final { opacity: 1 !important; pointer-events: auto !important; }
  .descent__final .hero__line > span { transform: none !important; }
  .fullbleed__media--kb img { animation: none; }
  /* история: без горизонтального pin — обычная вертикальная лента */
  .hscroll { height: auto !important; }
  .hscroll__sticky { position: static; height: auto; padding-bottom: clamp(3rem, 8vh, 6rem); }
  .hscroll__row { flex-wrap: wrap; transform: none !important; padding-top: 2rem; row-gap: 3rem; }
  .hpanel { width: min(540px, 92vw); }
}
