/* ==========================================================================
   Капелан — бути поруч
   Единственный стиль сайта. Никаких внешних ресурсов: CSP запрещает всё,
   кроме 'self', поэтому шрифты локальные, а inline-стилей нет вообще
   (в том числе атрибутов style= — они блокируются той же политикой).
   ========================================================================== */

/* --------------------------------------------------------------- шрифты */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/inter-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/inter-400-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/inter-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/inter-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/inter-600-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/inter-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Lora'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/lora-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Lora'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/lora-600-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Lora'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/lora-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* --------------------------------------------------------------- токены */
:root {
  /* Палитра выведена из логотипа: бирюза #0C7D83, красный #B22221, охра. */
  --ink:        #12171b;
  --ink-2:      #1b2228;
  --ink-3:      #263038;
  --cream:      #f7f3ec;
  --cream-2:    #ede6da;
  --gold:       #c2953c;
  --gold-soft:  #dcb463;
  --teal:       #0c7d83;
  --teal-deep:  #075257;
  --red:        #b22221;

  --on-cream:       #171c21;
  --on-cream-muted: #55606a;
  --on-ink:         #ece6db;
  --on-ink-muted:   #a7b0b6;

  --rule:      rgba(23, 28, 33, .14);
  --rule-dark: rgba(236, 230, 219, .18);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;

  --wrap: 1240px;
  --wrap-narrow: 760px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(72px, 9vw, 132px);
  --header-h: 76px;

  --dur-fast: .2s;
  --dur: .45s;
  --dur-slow: 1.1s;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (max-width: 860px) {
  :root { --header-h: 60px; }
}

/* ----------------------------------------------------------------- база */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--on-cream);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Плёночное зерно поверх всей страницы — очень слабое, только фактура. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../img/ui/grain.png');
  background-size: 128px 128px;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 900;
}

img, picture, video, svg, iframe { display: block; max-width: 100%; }
img, video { height: auto; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.15em; }

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 20px;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- сетка */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: calc(var(--wrap-narrow) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); position: relative; }

.section--dark {
  background: var(--ink);
  color: var(--on-ink);
}
.section--tint { background: var(--cream-2); }

/* Мягкое растворение между тёмной и кремовой зоной вместо резкой границы. */
.section--dark::before,
.section--dark::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 90px;
  pointer-events: none;
}
.section--dark::before { top: 0; background: linear-gradient(var(--cream), transparent); opacity: .10; }
.section--dark::after { bottom: 0; background: linear-gradient(transparent, var(--cream)); opacity: .10; }

/* ---------------------------------------------------------- типографика */
.kicker {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.kicker::after {
  content: '';
  flex: 0 0 auto;
  width: 54px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.kicker--center { justify-content: center; }
.kicker--center::before {
  content: '';
  width: 54px; height: 1px;
  background: currentColor; opacity: .55;
}

.h-display { font-size: clamp(2.5rem, 6.4vw, 4.6rem); }
.h-1 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
.h-2 { font-size: clamp(1.55rem, 2.9vw, 2.35rem); }
.h-3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.28; }

.lead {
  font-size: clamp(1.06rem, 1.5vw, 1.28rem);
  line-height: 1.62;
  color: var(--on-cream-muted);
  max-width: 66ch;
}
.section--dark .lead { color: var(--on-ink-muted); }

.sec-head { max-width: 72ch; margin-bottom: clamp(36px, 4.5vw, 64px); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center .lead { margin-inline: auto; }
.sec-head .h-1 + .lead { margin-top: 22px; }

.prose { max-width: 68ch; }
.prose p + p { margin-top: 0; }
.prose > p { font-size: 1.05rem; }
.prose strong { font-weight: 600; }

.text-gold { color: var(--gold); }

/* --------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border: 1px solid transparent;
  border-radius: 2px;
  font: 600 .9rem/1 var(--font-body);
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--gold { background: var(--gold); color: #14181c; }
.btn--gold:hover { background: var(--gold-soft); }

.btn--ghost {
  border-color: rgba(236, 230, 219, .42);
  color: var(--on-ink);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

.btn--outline {
  border-color: rgba(23, 28, 33, .3);
  color: var(--on-cream);
}
.btn--outline:hover { border-color: var(--ink); background: var(--ink); color: var(--cream); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* Текстовая ссылка со стрелкой — основной «вторичный» CTA. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: .93rem;
  letter-spacing: .03em;
  text-decoration: none;
  color: var(--teal-deep);
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  transition: gap var(--dur) var(--ease), color var(--dur) var(--ease);
}
.link-arrow:hover { gap: 16px; }
.section--dark .link-arrow,
.card .link-arrow { color: var(--gold); }

/* --------------------------------------------------------------- шапка */
/* Ни backdrop-filter, ни transform на самой .header ставить нельзя: любое из
   них делает шапку containing block для position:fixed потомков, а такой
   потомок — выезжающая панель мобильного меню. С ними панель получает
   размер шапки и превращается в полоску в 48 px. Поэтому фон со стеклом
   вынесен в ::after, а пряталась шапка через top, а не через transform. */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: var(--on-ink);
  transition: height var(--dur) var(--ease), top var(--dur) var(--ease);
}
.header::before,
.header::after {
  content: '';
  position: absolute;
  inset: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.header::before {
  background: linear-gradient(rgba(10, 14, 17, .75), rgba(10, 14, 17, 0));
}
.header::after {
  z-index: -1;
  background: rgba(18, 23, 27, .93);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(236, 230, 219, .1);
  opacity: 0;
}
.header.is-scrolled { height: calc(var(--header-h) - 12px); }
.header.is-scrolled::before { opacity: 0; }
.header.is-scrolled::after { opacity: 1; }
.header.is-hidden { top: calc(-2px - var(--header-h)); }

.header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1400px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
  flex: 0 0 auto;
}
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.brand-sub {
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

/* Сброс списка идёт до медиазапроса: ниже .nav получает свои отступы для
   мобильной панели, и «обнуляющее» правило после него их бы съело. */
.nav { margin: 0; padding: 0; list-style: none; }
.nav > li { list-style: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  background: none;
  border: 0;
  color: inherit;
  font: 600 .76rem/1 var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.nav a:hover, .nav button:hover, .nav a[aria-current='page'] { color: var(--gold-soft); }
.nav a[aria-current='page'] { position: relative; }
.nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 13px; right: 13px; bottom: 2px;
  height: 1px;
  background: var(--gold);
}

.has-sub { position: relative; }
.has-sub > button::after {
  content: '';
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--dur-fast) var(--ease);
}
.has-sub[data-open='true'] > button::after { transform: rotate(-135deg) translateY(-2px); }

.subnav {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 250px;
  padding: 10px;
  margin: 0;
  list-style: none;
  background: rgba(20, 25, 30, .97);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rule-dark);
  border-radius: 3px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.has-sub[data-open='true'] > .subnav { opacity: 1; visibility: visible; transform: none; }
.subnav a {
  display: block;
  width: 100%;
  padding: 11px 14px;
  letter-spacing: .06em;
  border-left: 2px solid transparent;
}
.subnav a:hover, .subnav a[aria-current='page'] { border-left-color: var(--gold); background: rgba(236, 230, 219, .06); }
.subnav a[aria-current='page']::after { content: none; }

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 20px;
  margin-left: 6px;
  border-left: 1px solid var(--rule-dark);
  font: 600 .74rem/1 var(--font-body);
  letter-spacing: .1em;
}
.lang a { text-decoration: none; opacity: .6; transition: opacity var(--dur-fast); }
.lang a:hover { opacity: 1; }
.lang [aria-current='true'] { opacity: 1; color: var(--gold); }

.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--rule-dark);
  border-radius: 2px;
  color: inherit;
  cursor: pointer;
}
.burger span {
  position: relative;
  display: block;
  width: 18px; height: 1.5px;
  background: currentColor;
  transition: background var(--dur-fast);
}
.burger span::before, .burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px; height: 1.5px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded='true'] span { background: transparent; }
.burger[aria-expanded='true'] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded='true'] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  /* Бургер должен остаться над выехавшей панелью: она перекрывает правый
     верхний угол шапки, и без z-index крестик закрытия недоступен. */
  .burger { display: inline-flex; position: relative; z-index: 2; }
  .nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(400px, 88vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: calc(var(--header-h) + 26px) 24px 40px;
    background: var(--ink);
    border-left: 1px solid var(--rule-dark);
    overflow-y: auto;
    overscroll-behavior: contain;   /* прокрутка меню не «протекает» на страницу */
    /* Закрытая панель не просто уезжает за экран, но и скрывается: иначе её
       ссылки остаются в порядке табуляции и фокус уходит в никуда. */
    visibility: hidden;
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease), visibility var(--dur);
  }
  .nav a, .nav button {
    padding: 15px 0;
    font-size: .8rem;
    letter-spacing: .07em;   /* иначе «Напрямки служіння» не влезает в панель */
  }
  .nav > li { border-bottom: 1px solid var(--rule-dark); }
  .nav[data-open='true'] { transform: none; visibility: visible; }
  .has-sub > button { width: 100%; justify-content: space-between; }
  .subnav {
    position: static;
    opacity: 1;
    /* Не visible, а inherit: раскрытый подраздел не должен пережить закрытие
       самой панели и вернуть свои ссылки в порядок табуляции. */
    visibility: inherit;
    transform: none;
    background: none;
    border: 0;
    backdrop-filter: none;
    padding: 0 0 10px 14px;
    display: none;
  }
  /* visibility здесь тоже inherit: у десктопного правила выше специфичность,
     и без переопределения оно вернуло бы раскрытому подразделу visible. */
  .has-sub[data-open='true'] > .subnav { display: block; visibility: inherit; }
  .lang { border-left: 0; padding-left: 0; margin: 22px 0 0; }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 11, 14, .6);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), visibility var(--dur);
    z-index: 400;
  }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
}

/* ----------------------------------------------------------------- герой */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
}
.hero--inner { min-height: min(74svh, 640px); }

/* Стопка слоёв героя строится положительными z-index: отрицательные
   вместе с isolation прячут картинку под фон секции в части движков. */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* <picture> тоже должен занимать всю высоту: иначе height:100% у картинки
   считается от авто-высоты обёртки и object-fit не срабатывает. */
.hero-media picture { display: block; width: 100%; height: 100%; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 26s var(--ease) both;
}
@keyframes kenburns {
  from { transform: scale(1.08) translate3d(0, 1.2%, 0); }
  to   { transform: scale(1) translate3d(0, 0, 0); }
}

/* Свет: нижний градиент под текст + затемнение левого края + виньетка.
   Левый градиент нужен потому, что текст героя всегда прижат влево, а кадры
   бывают светлыми именно там (небо на рассвете, белый борт микроавтобуса):
   надкатегория и хлебные крошки набраны мелко и на светлом фоне пропадают.
   Затемнять весь кадр вместо этого нельзя — фотография превращается в кашу. */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Верхняя ступень градиента — подложка под шапку: без неё меню теряется
       на светлых кадрах (например, на летней зелени). */
    linear-gradient(to top, rgba(10, 13, 16, .93) 0%, rgba(10, 13, 16, .72) 26%, rgba(10, 13, 16, .2) 55%, rgba(10, 13, 16, .38) 80%, rgba(10, 13, 16, .78) 100%),
    linear-gradient(to right, rgba(10, 13, 16, .58) 0%, rgba(10, 13, 16, .3) 32%, rgba(10, 13, 16, 0) 62%),
    radial-gradient(120% 80% at 50% 45%, transparent 40%, rgba(8, 11, 14, .55) 100%);
}

.hero-body {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(96px, 14vh, 170px) clamp(80px, 12vh, 128px);
}
.hero h1 { max-width: 15ch; }
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.1vw, 1.6rem);
  line-height: 1.45;
  color: var(--gold-soft);
  margin: 26px 0 0;
  max-width: 34ch;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
}
.hero-meta svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--gold); }

.scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--gold), transparent);
  overflow: hidden;
}
.scroll-cue::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* Заголовок внутренних страниц без фото — типографика на градиенте. */
.hero--type { background: linear-gradient(160deg, #10151a 0%, #1a2329 55%, #12181d 100%); }
.hero--type .hero-media::after {
  background: radial-gradient(90% 70% at 25% 30%, rgba(12, 125, 131, .16), transparent 70%);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs li + li::before { content: '/'; margin-right: 8px; opacity: .5; }

/* ------------------------------------------------- кинокадр-разделитель */
.band {
  position: relative;
  min-height: clamp(300px, 46vw, 560px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-ink);
  text-align: center;
}
.band img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .55;
  transform: scale(1.06);
  transition: transform 2.4s var(--ease), opacity 1.4s var(--ease);
}
.band.is-visible img { transform: scale(1); }
.band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 70% at 50% 50%, rgba(10, 13, 16, .55), rgba(10, 13, 16, .9));
}
/* Letterbox: две полосы, которые расходятся при появлении кадра. */
.band-bar {
  position: absolute;
  left: 0; right: 0;
  height: 14%;
  background: var(--ink);
  z-index: 2;
  transition: transform 1.3s var(--ease);
}
.band-bar--top { top: 0; }
.band-bar--bottom { bottom: 0; }
.js .band .band-bar--top { transform: translateY(0); }
.js .band .band-bar--bottom { transform: translateY(0); }
.js .band.is-visible .band-bar--top { transform: translateY(-100%); }
.js .band.is-visible .band-bar--bottom { transform: translateY(100%); }

.band-quote {
  position: relative;
  z-index: 3;
  max-width: 22ch;
  padding: 40px var(--gutter);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.7rem);
  line-height: 1.28;
}
.band-quote--wide { max-width: 30ch; }
.band-quote cite {
  display: block;
  margin-top: 22px;
  font: 600 .74rem/1 var(--font-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  font-style: normal;
}

/* ----------------------------------------------------------- «маршрут» */
.route { margin-top: clamp(40px, 5vw, 72px); }
.route-line { display: block; width: 100%; height: 2px; overflow: visible; }
.route-line path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  opacity: .8;
}
.js .route.is-visible .route-line path { animation: draw 2.2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.route-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding: 26px 0 0;
  list-style: none;
  counter-reset: step;
}
.route-steps li {
  position: relative;
  padding-top: 26px;
  font-size: .95rem;
  color: var(--on-ink-muted);
}
.route-steps li::before {
  counter-increment: step;
  content: '0' counter(step);
  position: absolute;
  top: -18px; left: 0;
  font: 600 .72rem/1 var(--font-body);
  letter-spacing: .18em;
  color: var(--gold);
}
.route-steps strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--on-ink);
  margin-bottom: 6px;
}
@media (max-width: 760px) {
  .route-steps { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .route-line { display: none; }
}

/* --------------------------------------------------------------- сетки */
.grid { display: grid; gap: clamp(18px, 2.2vw, 30px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.split-media { position: relative; }
.split-media img {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}
/* Золотая рамка со смещением — «отпечаток» кадра позади фотографии. */
.split-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid var(--gold);
  border-radius: 2px;
  transform: translate(16px, 16px);
  opacity: .5;
}

/* ------------------------------------------------------- карточки-кадры */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 400px;
  padding: 30px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ink-2);
  color: var(--on-ink);
  text-decoration: none;
}
.card > * { position: relative; z-index: 2; }
.card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  /* Приглушаем снимки: они сняты в разном свете, а текст должен читаться
     поверх любого из них. Заодно это и есть «единый кадр» по тону. */
  filter: saturate(.82) brightness(.56) contrast(1.04);
  transition: transform 1.2s var(--ease), filter var(--dur) var(--ease);
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(9, 12, 15, .96) 0%, rgba(9, 12, 15, .88) 38%, rgba(9, 12, 15, .55) 72%, rgba(9, 12, 15, .34) 100%);
  transition: background var(--dur) var(--ease);
}
.card:hover img, .card:focus-visible img { transform: scale(1.06); filter: saturate(.9) brightness(.66) contrast(1.04); }
.card:hover::after { background: linear-gradient(to top, rgba(9, 12, 15, .96) 0%, rgba(9, 12, 15, .86) 38%, rgba(9, 12, 15, .5) 72%, rgba(12, 125, 131, .3) 100%); }
.card-num {
  font-size: .7rem;
  letter-spacing: .28em;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-num::after { content: ''; width: 26px; height: 1px; background: currentColor; opacity: .55; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .95rem; color: var(--on-ink-muted); margin-bottom: 16px; }
.card .link-arrow { align-self: flex-start; border-bottom-color: transparent; }
.card:hover .link-arrow { border-bottom-color: currentColor; gap: 16px; }
.card::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width var(--dur-slow) var(--ease);
  z-index: 1;
}
.card:hover::before, .card:focus-visible::before { width: 100%; }

/* Карточка направления, для которого фотографий пока нет. */
.card--plain {
  background:
    radial-gradient(120% 90% at 15% 10%, rgba(12, 125, 131, .28), transparent 60%),
    linear-gradient(155deg, #171e24, #0f1418);
  border: 1px solid var(--rule-dark);
}
.card--plain::after { content: none; }

/* Блок «Звернутися по допомогу» — кадр с фотографией под текстом. */
.cta-help {
  position: relative;
  background: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
}
.cta-help > .wrap { position: relative; z-index: 2; }
.cta-help::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../img/front/front-13-t.webp');
  background-size: cover;
  background-position: center;
  filter: saturate(.82) brightness(.6);
}
/* Два слоя затемнения: диагональный «свет» слева и общая подложка под текстом
   справа — иначе светлые пятна снимка съедают контраст. */
.cta-help::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(9, 12, 15, .94) 26%, rgba(9, 12, 15, .78) 62%, rgba(9, 12, 15, .64)),
    linear-gradient(to top, rgba(9, 12, 15, .8), rgba(9, 12, 15, .45));
}
.help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: start;
}
@media (max-width: 900px) { .help-grid { grid-template-columns: 1fr; } }
.help-grid > div + div {
  padding-top: 4px;
  border-top: 1px solid var(--rule-dark);
}
@media (min-width: 901px) {
  .help-grid > div + div {
    border-top: 0;
    border-left: 1px solid var(--rule-dark);
    padding: 0 0 0 clamp(30px, 4vw, 60px);
  }
}

/* карточка без фото — на светлом фоне */
.tile {
  padding: 30px;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.section--dark .tile { background: var(--ink-2); border-color: var(--rule-dark); }
.tile:hover { border-color: var(--gold); transform: translateY(-3px); }
.tile h3 { margin-bottom: 10px; }
.tile p { font-size: .95rem; color: var(--on-cream-muted); }
.section--dark .tile p { color: var(--on-ink-muted); }
.tile-num {
  display: block;
  font: 600 .72rem/1 var(--font-body);
  letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: 16px;
}

/* --------------------------------------------------------------- цифры */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.stat { border-top: 1px solid var(--rule-dark); padding-top: 22px; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  line-height: 1;
  color: var(--gold);
}
.stat-num sup { font-size: .45em; vertical-align: super; margin-left: 2px; }
.stat-label { display: block; margin-top: 12px; font-size: .95rem; color: var(--on-ink-muted); }

/* ------------------------------------------------------------ галерея */
.gallery {
  columns: 3 260px;
  column-gap: 14px;
}
.gallery button {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.gallery img {
  width: 100%;
  transition: transform 1s var(--ease), filter var(--dur) var(--ease);
  filter: saturate(.92);
}
.gallery button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 15, .28);
  transition: opacity var(--dur) var(--ease);
}
.gallery button:hover img, .gallery button:focus-visible img { transform: scale(1.04); filter: saturate(1); }
.gallery button:hover::after { opacity: 0; }

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  background: rgba(8, 11, 14, .97);
  color: var(--on-ink);
}
.lightbox::backdrop { background: rgba(8, 11, 14, .9); }
.lightbox-figure {
  margin: 0;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 60px 70px;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100dvh - 130px);
  width: auto;
  object-fit: contain;
}
.lightbox button {
  position: absolute;
  background: none;
  border: 1px solid var(--rule-dark);
  border-radius: 2px;
  color: inherit;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.lightbox button:hover { border-color: var(--gold); color: var(--gold); }
.lightbox svg { width: 20px; height: 20px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 12px; top: 50%; translate: 0 -50%; }
.lb-next { right: 12px; top: 50%; translate: 0 -50%; }
.lb-count {
  position: absolute;
  bottom: 20px; left: 50%;
  translate: -50% 0;
  font-size: .8rem;
  letter-spacing: .14em;
  color: var(--on-ink-muted);
}
@media (max-width: 640px) {
  .lightbox-figure { padding: 60px 12px 76px; }
  .lb-prev { left: 12px; top: auto; bottom: 16px; translate: none; }
  .lb-next { right: 12px; top: auto; bottom: 16px; translate: none; }
}

/* ------------------------------------------------------------ видео */
.video-card {
  position: relative;
  border: 1px solid var(--rule-dark);
  border-radius: 2px;
  overflow: hidden;
  background: var(--ink-2);
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #0a0d10;
}
.video-frame img, .video-frame iframe, .video-frame video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
.video-frame--portrait { aspect-ratio: 9 / 16; }
.video-frame--portrait video { object-fit: contain; background: #0a0d10; }
.play {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  background: rgba(9, 12, 15, .38);
  border: 0;
  color: var(--cream);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.play:hover { background: rgba(9, 12, 15, .2); }
.play span {
  width: 72px; height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236, 230, 219, .6);
  border-radius: 50%;
  background: rgba(9, 12, 15, .4);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.play:hover span { transform: scale(1.08); border-color: var(--gold); background: rgba(194, 149, 60, .22); }
.play svg { width: 22px; height: 22px; margin-left: 3px; }
.video-body { padding: 26px 26px 30px; }
/* Карточка тёмная сама по себе, поэтому цвет заголовка задаём явно:
   иначе на светлой секции он унаследует тёмный и станет нечитаемым. */
.video-body h3 { margin-bottom: 8px; color: var(--on-ink); }
.video-body .kicker { margin-bottom: 12px; }
.video-body p { font-size: .95rem; color: var(--on-ink-muted); }

/* ---------------------------------------------------------- список дел */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative;
  padding: 22px 0 22px 42px;
  border-bottom: 1px solid var(--rule);
}
.section--dark .checklist li { border-bottom-color: var(--rule-dark); }
.checklist li::before {
  content: '';
  position: absolute;
  left: 6px; top: 34px;
  width: 18px; height: 1px;
  background: var(--gold);
}
.checklist strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.checklist p { font-size: .96rem; color: var(--on-cream-muted); margin: 0; }
.section--dark .checklist p { color: var(--on-ink-muted); }

/* ---------------------------------------------------------- контакты */
.contacts { background: var(--ink); color: var(--on-ink); }
.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(34px, 5vw, 80px);
}
@media (max-width: 900px) { .contacts-grid { grid-template-columns: 1fr; } }

.contact-person {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.contact-role {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { border-top: 1px solid var(--rule-dark); }
.contact-list a, .contact-list span {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  text-decoration: none;
  font-size: 1.05rem;
  transition: color var(--dur-fast);
}
.contact-list a:hover { color: var(--gold); }
.contact-list svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--gold); }
.contact-list .muted { font-size: .92rem; color: var(--on-ink-muted); }

.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.socials a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--rule-dark);
  border-radius: 2px;
  font-size: .84rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.socials a:hover { border-color: var(--gold); color: var(--gold); }
.socials svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- подвал */
.footer {
  background: #0d1114;
  color: var(--on-ink-muted);
  padding-block: clamp(48px, 6vw, 76px) 34px;
  font-size: .9rem;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule-dark);
}
@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr; gap: 30px; } }
.footer .brand { margin-right: 0; color: var(--on-ink); }
.footer-motto { margin-top: 18px; max-width: 34ch; }
.footer h4 {
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 10px; }
.footer a { text-decoration: none; transition: color var(--dur-fast); }
.footer a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  justify-content: space-between;
  padding-top: 26px;
  font-size: .82rem;
}

/* ------------------------------------------------------------- 404 */
.page-404 {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ink);
  color: var(--on-ink);
  padding: 100px var(--gutter) 60px;
}
.page-404 .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 1;
  color: var(--gold);
  opacity: .9;
}

/* Корневая страница выбора языка */
.picker {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ink);
  color: var(--on-ink);
  padding: 60px var(--gutter);
}
.picker img { width: 96px; height: 96px; margin: 0 auto 26px; object-fit: contain; }

/* --------------------------------------------------------------- анимации */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.js .reveal-clip {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.4s var(--ease);
}
.js .reveal-clip.is-visible { clip-path: inset(0 0 0 0); }

/* Каскад. Задержки только через nth-child: атрибут style запрещён CSP. */
.js .stagger > *:nth-child(1) { transition-delay: 0ms; }
.js .stagger > *:nth-child(2) { transition-delay: 90ms; }
.js .stagger > *:nth-child(3) { transition-delay: 180ms; }
.js .stagger > *:nth-child(4) { transition-delay: 270ms; }
.js .stagger > *:nth-child(5) { transition-delay: 360ms; }
.js .stagger > *:nth-child(6) { transition-delay: 450ms; }
.js .stagger > *:nth-child(7) { transition-delay: 540ms; }
.js .stagger > *:nth-child(8) { transition-delay: 630ms; }

.js .hero-body > * { animation: rise 1.1s var(--ease) both; }
.js .hero-body > *:nth-child(1) { animation-delay: .15s; }
.js .hero-body > *:nth-child(2) { animation-delay: .28s; }
.js .hero-body > *:nth-child(3) { animation-delay: .41s; }
.js .hero-body > *:nth-child(4) { animation-delay: .54s; }
.js .hero-body > *:nth-child(5) { animation-delay: .67s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

body.is-locked { overflow: hidden; }

/* ------------------------------------------------- уважение к настройкам */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-clip { clip-path: none; }
  .js .band .band-bar { transform: translateY(-100%); }
  .js .band .band-bar--bottom { transform: translateY(100%); }
  .route-line path { stroke-dashoffset: 0; }
  .hero-media img { animation: none; }
  .scroll-cue { display: none; }
}
