/* =========================================================
   Школа-театр балета «Такт» — стили
   Палитра: #000 #fff #d4af37 + #f5f1e8 off-white, #1a1410 ink
   ========================================================= */

:root {
  --gold: #d4af37;
  --gold-soft: #b8942e;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-line: rgba(212, 175, 55, 0.22);
  --black: #000000;
  --ink: #0d0a08;
  --ink-2: #1a1410;
  --cream: #f5f1e8;
  --cream-2: #ece5d4;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --muted-dark: rgba(13, 10, 8, 0.62);
  --f-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
  /* Место под полосу прокрутки держим занятым всегда. Модалка с видео,
     просмотр фото и мобильное меню на время блокируют прокрутку страницы —
     без этой строки полоса пропадала бы, содержимое и закреплённая шапка
     расширялись на её ширину, и окно заметно дёргалось. */
  scrollbar-gutter: stable;
}

/* Навигация фиксированная — иначе якорь уезжает под неё */
section[id], [id="diplomas"] { scroll-margin-top: 110px; }

body {
  font-family: var(--f-body);
  background: var(--ink);
  color: var(--white);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---- Typography primitives ---- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: ''; width: 28px; height: 1px; background: var(--gold);
}

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; }
.h-display { font-size: clamp(54px, 8vw, 128px); font-weight: 400; line-height: 0.98; letter-spacing: -0.02em; }
.h-section { font-size: clamp(40px, 5.5vw, 76px); font-weight: 400; }
.h-card    { font-size: clamp(22px, 2vw, 30px); font-weight: 500; }
/* Для длинных заголовков-абзацев из брифа: тот же стиль, кегль ниже */
.h-section-sm { font-size: clamp(25px, 2.9vw, 44px); line-height: 1.16; }
/* Заголовок секции с полным названием школы — длинный, поэтому кегль сдержаннее */
.h-section.h-long { font-size: clamp(32px, 4vw, 56px); line-height: 1.08; }
.italic    { font-style: italic; }

.lede { font-size: clamp(16px, 1.2vw, 19px); line-height: 1.65; color: var(--muted); max-width: 58ch; }
.on-cream .lede { color: var(--muted-dark); }

/* ---- Layout ---- */
.container {
  width: min(1320px, 100% - 48px);
  margin-inline: auto;
}
.section {
  padding: clamp(80px, 11vw, 160px) 0;
  position: relative;
}
/* --fade — цвет, в который растворяются края прокручиваемых лент */
.section.on-cream { background: var(--cream); color: var(--ink); --fade: var(--cream); }
.section.on-black { background: var(--ink); color: var(--white); --fade: var(--ink); }

.section-header {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 48px;
  row-gap: 0;
  align-items: start;
  margin-bottom: 64px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--gold-line);
}
/* Рубрика «§ 0N · …» — отдельной строкой над сеткой. Тогда заголовок и
   подзаголовок начинаются от одной горизонтали, а не «съезжают» друг от друга. */
.section-header > .eyebrow { grid-column: 1 / -1; margin-bottom: 24px; }
.section-header .subtitle { max-width: 42ch; }
.section-header .subtitle p + p { margin-top: 14px; }
/* Вариант шапки: заголовок во всю ширину, подзаголовок — строкой под ним */
.section-header.sh-wide { grid-template-columns: 1fr; row-gap: 28px; }
.section-header.sh-wide > .eyebrow { margin-bottom: 0; }
.section-header.sh-wide .subtitle { max-width: none; }
@media (max-width: 820px) {
  .section-header { grid-template-columns: 1fr; row-gap: 28px; }
  .section-header > .eyebrow { margin-bottom: 0; }
}

/* ---- Reveal on scroll ---- */
@keyframes revealIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 1; animation: revealIn 0.9s cubic-bezier(.2,.7,.2,1) both; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.16s; }
.reveal.d3 { animation-delay: 0.24s; }
.reveal.d4 { animation-delay: 0.32s; }

/* С включённым JS анимация стоит на паузе, пока script.js не пометит блок
   классом .in при попадании во вьюпорт. Без JS класс .js-reveal на <html>
   не появляется — блоки видны и анимируются сразу после загрузки. */
.js-reveal .reveal { animation-play-state: paused; }
.js-reveal .reveal.in { animation-play-state: running; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
}

/* ---- Nav ---- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 18px 0;
  transition: background 0.35s, backdrop-filter 0.35s, padding 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 8, 6, 0.78);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--gold-line);
  padding: 12px 0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.nav-logo { display: flex; align-items: center; gap: 14px; }
.nav-logo img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-line); }
.nav-logo .nl-title { font-family: var(--f-display); font-size: 20px; line-height: 1; color: var(--white); letter-spacing: 0.02em; }
.nav-logo .nl-sub { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.24em; color: var(--gold); text-transform: uppercase; margin-top: 4px; }
.nav-links {
  display: flex; gap: 28px;
  font-size: 13px; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.8);
}
.nav-links a { position: relative; padding: 6px 0; transition: color 0.3s; }
.nav-links a::after {
  content:''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--gold); transition: width 0.35s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
@media (max-width: 960px) { .nav-links { display: none; } }
.nav-cta {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}
.nav-cta:hover { background: var(--gold); color: var(--black); }
.nav-right { display: flex; align-items: center; gap: 14px; }

/* ---- Кнопка меню (только в мобильной версии) ---- */
.nav-burger {
  display: none;
  width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--gold); border-radius: 50%;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  transition: background 0.3s, border-color 0.3s;
}
.nav-burger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--gold);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), opacity 0.25s;
}
.nav-burger:hover { background: rgba(212,175,55,0.14); }
/* открытое меню — полоски складываются в крестик */
.nav-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 960px) { .nav-burger { display: flex; } }
@media (max-width: 380px) {
  .nav-cta { padding: 9px 14px; font-size: 11px; letter-spacing: 0.08em; }
  .nav-right { gap: 10px; }
}

/* ---- Панель меню ---- */
.menu-panel {
  position: fixed; inset: 0; z-index: 120;
  background: #050403;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.35s cubic-bezier(.2,.7,.2,1), visibility 0s linear 0.35s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.menu-panel.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 0.35s cubic-bezier(.2,.7,.2,1), visibility 0s;
}
.menu-inner {
  min-height: 100%;
  width: min(560px, 100% - 40px);
  margin-inline: auto;
  padding: 22px 0 40px;
  display: flex; flex-direction: column;
}
.menu-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.menu-logo { width: 88px; height: 88px; object-fit: contain; }
.menu-close {
  width: 44px; height: 44px; flex-shrink: 0;
  border: 1px solid var(--gold-line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 26px; line-height: 1;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.menu-close:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }

.menu-links { display: grid; margin-top: 26px; }
.menu-links a {
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-family: var(--f-display); font-size: 26px; line-height: 1.1;
  color: var(--white);
  transition: color 0.3s, padding-left 0.3s;
}
.menu-links a:first-child { border-top: 1px solid rgba(255,255,255,0.07); }
.menu-links a:hover, .menu-links a:focus-visible { color: var(--gold); padding-left: 10px; }

.menu-socials {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 30px;
}
.menu-socials a {
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--gold-line); color: var(--gold);
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: background 0.3s, border-color 0.3s;
}
.menu-socials a:hover { background: rgba(212,175,55,0.14); border-color: var(--gold); }

.menu-phone {
  display: block; margin-top: 26px;
  font-family: var(--f-display); font-size: 24px; color: var(--white);
  transition: color 0.3s;
}
.menu-phone:hover { color: var(--gold); }
.menu-cta { margin-top: 20px; justify-content: center; }

@media (max-width: 420px) {
  .menu-links a { font-size: 22px; padding: 13px 0; }
  .menu-logo { width: 72px; height: 72px; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 32px;
  font-family: var(--f-body); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500;
  transition: all 0.35s cubic-bezier(.2,.7,.2,1);
  position: relative; overflow: hidden;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--gold); color: var(--black);
}
.btn-primary:hover { background: #e8c24c; transform: translateY(-2px); box-shadow: 0 18px 40px -12px var(--gold-glow); }
.btn-ghost {
  border-color: rgba(255,255,255,0.35); color: var(--white);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.on-cream .btn-ghost { border-color: rgba(0,0,0,0.25); color: var(--ink); }
.on-cream .btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.btn .arrow { display: inline-block; transition: transform 0.3s; }
.btn:hover .arrow { transform: translateX(4px); }
.play-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--black); flex-shrink: 0;
}
.play-icon svg { width: 12px; height: 12px; margin-left: 2px; }

/* ---- Перелив на главных кнопках ----
   Наклонный блик раз в несколько секунд пробегает по кнопке. Ширина блика
   и пауза подобраны так, чтобы он читался как отблеск на золоте, а не как
   мигание: сам проход короткий, между проходами — долгая пауза. */
@keyframes btnSheen {
  0%        { transform: translateX(-160%) skewX(-18deg); }
  22%, 100% { transform: translateX(320%)  skewX(-18deg); }
}
.btn-primary, .nav-cta { position: relative; overflow: hidden; }
.btn-primary::after, .nav-cta::after {
  content: '';
  position: absolute; top: -30%; bottom: -30%; left: 0;
  width: 32%;
  pointer-events: none;
  animation: btnSheen 5.5s ease-in-out infinite;
}
/* по золотой заливке — светлый отблеск */
.btn-primary::after {
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
}
/* по контурной кнопке — золотой, иначе белая полоса смотрится грязью */
.nav-cta::after {
  background: linear-gradient(100deg, transparent, rgba(212,175,55,0.28), transparent);
  animation-delay: 2.2s; /* чтобы не вспыхивала одновременно с кнопкой в первом экране */
}
.nav-cta:hover::after { background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent); }
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after, .nav-cta::after { animation: none; opacity: 0; }
}

/* ---- Social widgets ---- */
.social-rail {
  position: fixed; left: 28px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 18px;
  z-index: 40;
}
.social-rail::before, .social-rail::after {
  content:''; display: block; width: 1px; height: 60px; background: linear-gradient(var(--gold-line), transparent);
  margin-inline: auto;
}
.social-rail::after { background: linear-gradient(transparent, var(--gold-line)); }
.social-dot {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); transition: all 0.3s;
  font-size: 13px;
}
.social-dot:hover { background: var(--gold); color: var(--black); transform: scale(1.08); border-color: var(--gold); }
/* Лента висит в левом поле экрана. Контент шириной min(1320px, 100% - 48px)
   центрован, значит свободного поля слева ровно (100vw - 1320) / 2. Ленте
   нужно 64px плюс зазор — то есть от 1500px и уже она наезжала бы на текст. */
@media (max-width: 1500px) { .social-rail { display: none; } }

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
  background: radial-gradient(ellipse at 80% 20%, rgba(212,175,55,0.08), transparent 55%), var(--ink);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }

/* Заголовок длиннее прежнего, поэтому кегль ниже, чем у .h-display */
.hero h1 { margin-bottom: 26px; font-size: clamp(38px, 5vw, 74px); }
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero h1 .soft { color: rgba(255,255,255,0.55); }

.hero-sub {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
}
.hero-sub::before { content:''; width: 40px; height: 1px; background: var(--gold); }
.hero-badge { color: var(--muted); max-width: 52ch; margin-bottom: 18px; font-size: 16px; }
.hero-line {
  font-family: var(--f-display); font-style: italic;
  font-size: clamp(19px, 1.8vw, 25px); line-height: 1.3;
  color: var(--white); margin-bottom: 34px;
}

/* Чипы-преимущества */
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-line);
  color: var(--gold);
  font-size: 13px; line-height: 1.35;
  transition: background 0.3s, border-color 0.3s;
}
.chip:hover { background: rgba(212, 175, 55, 0.2); border-color: var(--gold); }
.hero-proof {
  font-size: 13px; line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
  max-width: 56ch; margin-bottom: 40px;
}

.hero-ctas { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-bottom: 60px; }
.hero-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; padding-top: 36px;
  border-top: 1px solid var(--gold-line);
}
.hero-meta .m-num { font-family: var(--f-display); font-size: 44px; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.hero-meta .m-label { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; line-height: 1.4; }

/* Hero visual */
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border: 1px solid var(--gold-line);
  background: #0a0706;
  overflow: hidden;
}
.hero-visual .hero-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%;
}
/* в одну колонку вертикальный кадр во всю ширину занял бы целый экран */
@media (max-width: 1024px) { .hero-visual { max-width: 430px; margin-inline: auto; } }
/* затемнение снизу — под подпись и угловые засечки */
.hero-visual::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 45%; z-index: 1;
  background: linear-gradient(transparent, rgba(10,7,6,0.8));
  pointer-events: none;
}
.hero-visual .caption {
  position: absolute; left: 20px; bottom: 20px; right: 20px; z-index: 2;
  display: flex; justify-content: space-between; align-items: end;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.hero-visual .caption .num { color: var(--gold); font-size: 32px; font-family: var(--f-display); letter-spacing: 0; }
.hero-visual .corner {
  position: absolute; width: 32px; height: 32px; z-index: 2;
  border: 1px solid var(--gold);
}
.hero-visual .corner.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.hero-visual .corner.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.hero-visual .corner.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }
.hero-visual .corner.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }

.hero-marquee {
  margin-top: 60px; padding: 18px 0;
  border-top: 1px solid var(--gold-line); border-bottom: 1px solid var(--gold-line);
  overflow: hidden;
}
.hero-marquee .track { display: flex; gap: 60px; animation: scroll 30s linear infinite; white-space: nowrap; }
.hero-marquee span {
  font-family: var(--f-display); font-size: 22px; font-style: italic; color: rgba(255,255,255,0.5);
  display: inline-flex; align-items: center; gap: 60px;
}
.hero-marquee span::after { content:'✦'; color: var(--gold); font-size: 12px; font-style: normal; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---- About ---- */
/* Блок развёрнут на всю ширину: заголовок сверху, текст — в две колонки. */
.about-lead { max-width: 920px; }
.about-text { margin-top: 48px; }
.about-text p + p { margin-top: 20px; }
.about-text p { font-size: 16px; line-height: 1.7; color: var(--muted-dark); }
.about-text .lede { font-size: clamp(19px, 1.5vw, 23px); color: var(--ink); max-width: none; }
.about-cols {
  margin-top: 24px;
  columns: 2; column-gap: 80px;
}
.about-cols p { break-inside: avoid; }
.about-cols p + p { margin-top: 20px; }
@media (max-width: 900px) {
  .about-lead { max-width: none; }
  .about-cols { columns: 1; }
}

/* Diplomas carousel
   Лента едет сама (script.js двигает scrollLeft) и при этом остаётся
   обычным горизонтальным скроллом — на телефоне её можно листать пальцем
   с инерцией, без «переключения по одному». */
/* Общий механизм самоедущей ленты — им пользуются и карусели дипломов,
   и лента остальных фото в галерее. script.js двигает scrollLeft у элемента
   с data-autoscroll, поэтому лента и едет сама, и листается пальцем. */
[data-autoscroll] {
  position: relative;
  /* отступы держим здесь, а не на обёртке: overflow срезал бы
     подъём карточки при наведении */
  padding: 26px 0;
  overflow: hidden;
  /* вертикальный жест оставляем странице, горизонтальный забираем себе */
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none; user-select: none;
}
[data-autoscroll].is-dragging { cursor: grabbing; }
[data-autoscroll] > * {
  display: flex; width: max-content;
  gap: var(--strip-gap, 20px);
}
/* картинку не даём «отрывать» мышью, клик уходит на карточку целиком */
[data-autoscroll] img { -webkit-user-drag: none; pointer-events: none; }
/* Карточка-миниатюра: скан диплома в «паспарту». Клик открывает
   полноэкранный просмотр (.lightbox). */
.diploma-card {
  width: 220px; flex-shrink: 0;
  aspect-ratio: 1000 / 1400;
  background: linear-gradient(135deg, #fdfaf2 0%, #f4ecd4 100%);
  border: 1px solid rgba(212,175,55,0.4);
  padding: 12px;
  display: block;
  position: relative;
  transition: transform 0.4s, box-shadow 0.4s;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  cursor: zoom-in;
}
.diploma-card img { width: 100%; height: 100%; object-fit: cover; }
.diploma-card:hover, .diploma-card:focus-visible {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 22px 44px -14px rgba(0,0,0,0.5);
}
.diploma-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.diploma-card::before {
  content:''; position: absolute; inset: 6px;
  border: 1px solid rgba(212,175,55,0.45);
  pointer-events: none; z-index: 2;
}
/* Значок «увеличить» — подсказка, что карточку можно открыть */
.diploma-card .dc-zoom {
  position: absolute; inset: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13,10,8,0.42);
  color: var(--gold); font-size: 28px; line-height: 1;
  opacity: 0; transition: opacity 0.3s;
}
.diploma-card:hover .dc-zoom, .diploma-card:focus-visible .dc-zoom { opacity: 1; }
.diplomas-wrap {
  margin-top: 48px;
  padding: 0;
  position: relative;
}
/* те же градиентные накладки вместо маски — по той же причине */
.diplomas-wrap::before, .diplomas-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; z-index: 2;
  width: clamp(30px, 6vw, 90px);
  pointer-events: none;
}
.diplomas-wrap::before { left: 0;  background: linear-gradient(90deg, var(--fade, var(--ink)), transparent); }
.diplomas-wrap::after  { right: 0; background: linear-gradient(270deg, var(--fade, var(--ink)), transparent); }

/* ---- For whom ---- */
.whom-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
@media (max-width: 1180px) { .whom-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .whom-grid { grid-template-columns: 1fr; } }
.whom-card {
  background: var(--ink-2);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 40px 32px;
  position: relative;
  transition: all 0.4s;
  min-height: 280px;
  height: 100%; /* обёртка .reveal — ячейка грида, тянем карточку по строке */
  /* flex-start, а не space-between: иначе текстовый блок прижат к низу и
     заголовки карточек стоят на разной высоте из-за разной длины текста. */
  display: flex; flex-direction: column; justify-content: flex-start; gap: 28px;
}
.whom-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  background: #221a13;
}
.whom-card .ic {
  width: 56px; height: 56px; border: 1px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-family: var(--f-display); font-size: 24px; font-style: italic;
}
/* Заголовки карточек длинные («Для тех, кто…»), поэтому кегль сдержаннее */
.whom-card h3 { font-size: 21px; line-height: 1.2; margin-bottom: 14px; }
.whom-card p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ---- Фото-полоса между секциями ---- */
.photo-strip {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  height: clamp(180px, 26vw, 380px);
}
.photo-strip img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%;
}
/* Мягкие затемнения по краям — чтобы полоса «садилась» между тёмным и
   кремовым блоками без резкого стыка. */
.photo-strip::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,10,8,0.55) 0%, transparent 22%, transparent 74%, rgba(245,241,232,0.35) 100%),
    linear-gradient(90deg, rgba(13,10,8,0.45), transparent 18%, transparent 82%, rgba(13,10,8,0.45));
}

/* ---- Age groups (lessons) ---- */
.groups {
  display: grid; gap: 0;
}
.group-row {
  display: grid; grid-template-columns: 120px 260px 1fr auto; gap: 40px;
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid rgba(0,0,0,0.12);
  cursor: pointer;
  transition: background 0.4s, padding 0.4s;
  position: relative;
}
.group-row:last-child { border-bottom: 1px solid rgba(0,0,0,0.12); }
.group-row:hover { padding-left: 20px; padding-right: 20px; background: rgba(212,175,55,0.06); }
.group-row:hover .g-arrow { transform: translateX(6px); color: var(--gold-soft); }
.group-row .g-age {
  font-family: var(--f-display); font-size: 56px; color: var(--gold-soft); line-height: 1;
}
.group-row .g-name { font-family: var(--f-display); font-size: 30px; font-style: italic; color: var(--ink-2); }
.group-row .g-desc { color: var(--muted-dark); font-size: 15px; max-width: 52ch; }
.group-row .g-arrow { font-size: 24px; color: var(--ink-2); transition: transform 0.3s, color 0.3s; }
@media (max-width: 820px) {
  .group-row { grid-template-columns: 80px 1fr; gap: 20px; }
  .group-row .g-desc, .group-row .g-arrow { grid-column: 1 / -1; }
  .group-row .g-age { font-size: 36px; }
  .group-row .g-name { font-size: 22px; }
}

/* ---- Why us (features) ---- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 0; }
@media (max-width: 1024px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .why-grid { grid-template-columns: 1fr; } }
.why-cell {
  padding: 40px 32px;
  border: 1px solid rgba(255,255,255,0.08);
  border-right: 0; border-bottom: 0;
  min-height: 300px;
  /* Ячейка лежит внутри обёртки .reveal, которая и является ячейкой грида,
     поэтому высоту строки тянем через height, а не через сам грид. */
  height: 100%;
  /* flex-start — заголовки 01–08 встают на одну линию под номером ячейки */
  display: flex; flex-direction: column; justify-content: flex-start; gap: 28px;
  transition: background 0.35s;
}
.why-grid { border-right: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.why-cell:hover { background: rgba(212,175,55,0.06); }
.why-cell .wn { font-family: var(--f-display); font-size: 60px; color: var(--gold); font-style: italic; line-height: 1; }
.why-cell h4 { font-size: 19px; line-height: 1.25; margin-bottom: 12px; }
.why-cell p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.why-cell p + p { margin-top: 12px; }

/* ---- Founder ---- */
.founder-grid {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px;
  align-items: start;
}
@media (max-width: 960px) { .founder-grid { grid-template-columns: 1fr; } }
.founder-portrait {
  display: block; width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(180deg, #2a201a, #0d0a08);
  border: 1px solid var(--gold-line);
  position: relative; overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.4s;
}
/* кадр чуть уже рамки: смещаем окно вверх, чтобы не срезать голову */
.founder-portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 25%;
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.founder-portrait:hover { border-color: var(--gold); }
.founder-portrait:hover img { transform: scale(1.03); }
.founder-portrait:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
/* подложка под подпись */
.founder-portrait::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(transparent, rgba(10,7,6,0.7));
  pointer-events: none;
}
@media (max-width: 960px) { .founder-portrait { max-width: 460px; } }
.founder-portrait .f-sig {
  position: absolute; bottom: 20px; right: 20px; z-index: 2;
  font-family: var(--f-display); font-style: italic; font-size: 22px; color: var(--white); opacity: 0.75;
}
.founder-name { font-size: clamp(36px, 4vw, 56px); margin-bottom: 14px; }
.founder-role { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em; color: var(--gold); text-transform: uppercase; margin-bottom: 32px; display: inline-flex; align-items: center; gap: 14px; }
.founder-role::before { content:''; width: 30px; height: 1px; background: var(--gold); }
.founder-bio p + p { margin-top: 16px; }
.founder-toggle { margin-top: 32px; }
.founder-creds {
  margin-top: 36px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
@media (max-width: 620px) { .founder-creds { grid-template-columns: 1fr; gap: 22px; } }
.founder-cred .c-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
.founder-cred .c-val { font-family: var(--f-display); font-size: 19px; line-height: 1.35; }
.founder-cred .c-val + .c-val { color: var(--muted); }

/* Раскрывающаяся биография («Подробнее обо мне») */
.founder-more {
  margin-top: 36px;
  border-top: 1px solid var(--gold-line);
  padding-top: 36px;
  display: grid; gap: 36px;
  animation: revealIn 0.6s cubic-bezier(.2,.7,.2,1) both;
}
.founder-more[hidden] { display: none; }
.fm-block h3 {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); font-weight: 500;
  margin-bottom: 16px;
}
.fm-block p { color: var(--muted); font-size: 15px; line-height: 1.75; }
.fm-block p + p { margin-top: 14px; }
.fm-list { list-style: none; display: grid; gap: 8px; margin-top: 14px; }
.fm-list li {
  position: relative; padding-left: 22px;
  color: var(--muted); font-size: 15px; line-height: 1.6;
}
.fm-list li::before { content: '✦'; position: absolute; left: 0; top: 1px; color: var(--gold); font-size: 10px; }
.fm-list + p { margin-top: 18px; }
.fm-list-2col { grid-template-columns: 1fr 1fr; gap: 8px 28px; }
@media (max-width: 700px) { .fm-list-2col { grid-template-columns: 1fr; } }
.fm-goal {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 26px;
  font-family: var(--f-display); font-style: italic;
  font-size: clamp(20px, 1.9vw, 26px); line-height: 1.4;
  color: var(--white);
}

/* ---- Gallery / performances ----
   Весь блок — прокручиваемая вбок сетка: 4 ряда в высоту, на экране
   помещается 4 колонки, то есть 16 снимков. Остальные открываются
   прокруткой в сторону — лента едет сама (script.js) и листается пальцем. */
.gallery-scroll { --gcols: 4; --ggap: 16px; padding: 0; }
.gallery-scroll > .gallery-cols {
  /* перебиваем общее правило [data-autoscroll] > * (там flex/max-content):
     ширина должна остаться обычной блочной, иначе проценты в треках
     сетки не от чего считать */
  display: grid;
  width: auto;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, auto);
  grid-auto-columns: calc((100% - (var(--gcols) - 1) * var(--ggap)) / var(--gcols));
  gap: var(--ggap);
}
@media (max-width: 1100px) { .gallery-scroll { --gcols: 3; } }
@media (max-width: 760px)  { .gallery-scroll { --gcols: 2; --ggap: 12px; } }

.g-cell {
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--gold-line);
  background: linear-gradient(135deg, #1a1410, #0a0706);
  cursor: zoom-in;
  transition: border-color 0.4s;
  /* Ячеек 72. Размер каждой задан треком сетки и пропорцией, от содержимого
     он не зависит — поэтому можно разрешить браузеру не отрисовывать те,
     что сейчас за пределами экрана. Прокрутка от этого заметно легчает. */
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}
.g-cell img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center 35%;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
/* приближаем сам снимок, а не двигаем ячейку: трансформация внутри
   overflow:hidden считается видеокартой и не трогает раскладку */
.g-cell:hover img, .g-cell:focus-visible img { transform: scale(1.07); }
.g-cell:hover, .g-cell:focus-visible { border-color: var(--gold); }
.g-cell:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.g-cell::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(transparent, rgba(10,7,6,0.78));
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.g-cell .gn {
  position: absolute; right: 12px; bottom: 10px; z-index: 2;
  color: var(--gold); font-family: var(--f-display); font-size: 17px;
  opacity: 0; transition: opacity 0.4s;
}
.g-cell:hover::after, .g-cell:focus-visible::after,
.g-cell:hover .gn, .g-cell:focus-visible .gn { opacity: 1; }

/* Края подтаивают — подсказка, что блок продолжается за экраном.
   Раньше это была mask-image, но маска заставляет браузер пересобирать
   всю область при каждом сдвиге прокрутки. Две неподвижные градиентные
   накладки дают тот же вид и обходятся видеокарте почти бесплатно. */
.gallery-wrap { position: relative; }
.gallery-wrap::before, .gallery-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; z-index: 2;
  width: clamp(28px, 4vw, 64px);
  pointer-events: none;
}
.gallery-wrap::before { left: 0;  background: linear-gradient(90deg, var(--fade, var(--ink)), transparent); }
.gallery-wrap::after  { right: 0; background: linear-gradient(270deg, var(--fade, var(--ink)), transparent); }
.g-hint {
  margin-top: 20px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.g-hint::before { content: ''; width: 28px; height: 1px; background: var(--gold-line); }
/* ---- Reviews (живой виджет Яндекс.Карт) ---- */
.reviews-live {
  display: grid;
  grid-template-columns: 1fr minmax(0, 560px);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}
.reviews-aside { display: grid; gap: 36px; align-content: start; }
/* Подзаголовок блока переехал сюда из шапки: текст и карточка Яндекса
   начинаются от одной горизонтали. */
.rl-lede { max-width: none; }
.rl-note { border-left: 1px solid var(--gold-line); padding-left: 28px; }
.rl-note .k {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold-soft); margin-bottom: 12px;
}
.rl-note .v { font-family: var(--f-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; margin-bottom: 16px; }
.rl-note p { font-size: 15px; line-height: 1.7; color: var(--muted-dark); max-width: 46ch; }

/* Рамка вокруг виджета: внутрь iframe стилями не дотянуться,
   поэтому вписываем его в дизайн внешней оправой. */
.reviews-widget {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gold-line);
  padding: 10px 10px 32px;
  box-shadow: 0 24px 60px -30px rgba(13, 10, 8, 0.35);
}
.reviews-widget::before {
  content: ''; position: absolute; top: -1px; left: -1px;
  width: 40px; height: 40px;
  border-top: 1px solid var(--gold); border-left: 1px solid var(--gold);
  pointer-events: none;
}
.reviews-widget::after {
  content: ''; position: absolute; bottom: -1px; right: -1px;
  width: 40px; height: 40px;
  border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold);
  pointer-events: none;
}
.reviews-widget iframe { display: block; width: 100%; height: 800px; border: 0; }
.rl-source {
  position: absolute; left: 0; bottom: 10px; width: 100%;
  padding: 0 16px; text-align: center;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(13, 10, 8, 0.45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.3s;
}
.rl-source:hover { color: var(--gold-soft); }

@media (max-width: 1000px) {
  .reviews-live { grid-template-columns: 1fr; }
  .reviews-widget { max-width: 560px; width: 100%; }
}
@media (max-width: 560px) {
  .reviews-widget iframe { height: 640px; }
}

/* ---- Schedule ---- */
.schedule {
  display: grid; gap: 0;
  border: 1px solid var(--gold-line);
  background: rgba(212,175,55,0.02);
}
.schedule-header {
  display: grid; grid-template-columns: 1.15fr repeat(5, 1fr);
  background: rgba(212,175,55,0.08);
  border-bottom: 1px solid var(--gold-line);
}
.schedule-header div {
  padding: 18px 16px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); text-align: center;
}
.schedule-header div:first-child { text-align: left; }
.schedule-row {
  display: grid; grid-template-columns: 1.15fr repeat(5, 1fr);
  border-bottom: 1px solid rgba(212,175,55,0.1);
  transition: background 0.3s;
}
.schedule-row:last-child { border-bottom: 0; }
.schedule-row:hover { background: rgba(212,175,55,0.05); }
.schedule-row > div { padding: 22px 10px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.85); border-right: 1px solid rgba(212,175,55,0.08); }
.schedule-row > div:last-child { border-right: 0; }
.schedule-row .s-group {
  text-align: left;
  font-family: var(--f-display); font-size: 20px; color: var(--white);
}
.schedule-row .s-group small { display: block; font-family: var(--f-mono); font-size: 10px; color: var(--gold); letter-spacing: 0.16em; margin-top: 4px; text-transform: uppercase; }
.schedule-row .slot { color: var(--gold); font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.02em; white-space: nowrap; }
.schedule-row .off { color: rgba(255,255,255,0.2); }
@media (max-width: 1000px) {
  .schedule-header, .schedule-row { grid-template-columns: 1fr; }
  .schedule-header div:not(:first-child) { display: none; }
  .schedule-row > div { text-align: left; border-right: 0; border-bottom: 1px dashed rgba(212,175,55,0.1); }
  .schedule-row > div:last-child { border-bottom: 0; }
  .schedule-row > div::before { content: attr(data-day) ' · '; color: var(--gold); font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
  .schedule-row .s-group::before { display: none; }
}

/* ---- Pricing ---- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--gold-line);
}
@media (max-width: 1100px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  padding: 40px 30px;
  border-right: 1px solid var(--gold-line);
  background: var(--ink);
  position: relative;
  transition: background 0.4s;
  height: 100%; /* обёртка .reveal — ячейка грида */
  display: flex; flex-direction: column; gap: 20px;
}
.price-card:hover { background: #1a1410; }
.price-card .tier {
  font-family: var(--f-display); font-size: 25px; color: var(--gold);
  line-height: 1.15;
}
.price-card .per {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.price-card .p-desc { font-size: 14px; line-height: 1.65; color: var(--muted); }
.price-card ul {
  list-style: none; display: grid; gap: 10px;
  margin-top: auto; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.price-card li { font-size: 13.5px; color: rgba(255,255,255,0.85); display: flex; align-items: start; gap: 10px; }
.price-card li::before { content:'✦'; color: var(--gold); font-size: 9px; margin-top: 4px; flex-shrink: 0; }

/* Состав абонемента — одной полосой под карточками */
.price-includes {
  margin-top: 28px; padding: 36px 40px;
  border: 1px solid var(--gold-line);
  background: rgba(212, 175, 55, 0.04);
}
.pi-title {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 24px;
}
.pi-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px;
}
@media (max-width: 820px) { .pi-list { grid-template-columns: 1fr; } }
.pi-list li {
  display: flex; align-items: start; gap: 12px;
  font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,0.85);
}
.pi-list li::before { content:'✦'; color: var(--gold); font-size: 10px; margin-top: 4px; flex-shrink: 0; }

/* Единая цена + призыв к действию */
.price-final {
  margin-top: 28px; padding: 44px 40px;
  border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(212,175,55,0.03));
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: center; justify-content: space-between;
}
.pf-label {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.pf-amount { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pf-amount .v { font-family: var(--f-display); font-size: clamp(46px, 5vw, 68px); color: var(--white); line-height: 1; }
.pf-amount .c { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.pf-note { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ---- FAQ ---- */
.faq-list { display: grid; gap: 0; }
.faq-item {
  border-top: 1px solid rgba(0,0,0,0.12);
  padding: 0;
}
.faq-item:last-child { border-bottom: 1px solid rgba(0,0,0,0.12); }
.faq-q {
  width: 100%;
  padding: 28px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  text-align: left;
  font-family: var(--f-display); font-size: clamp(22px, 2vw, 28px); color: var(--ink-2);
  transition: color 0.3s;
}
.faq-q:hover { color: var(--gold-soft); }
.faq-plus {
  width: 40px; height: 40px; flex-shrink: 0;
  border: 1px solid var(--gold-soft); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-soft); font-size: 18px;
  transition: all 0.4s;
}
.faq-item.open .faq-plus { background: var(--gold); color: var(--black); transform: rotate(45deg); }
.faq-a {
  overflow: hidden; max-height: 0;
  transition: max-height 0.5s cubic-bezier(.2,.7,.2,1);
}
.faq-a > div {
  padding: 0 0 28px 0;
  max-width: 70ch;
  font-size: 16px; line-height: 1.65; color: var(--muted-dark);
}
.faq-a p + p { margin-top: 14px; }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
/* Мессенджеры вместо формы: человек сам выбирает канал и пишет напрямую */
.contact-messengers {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--gold-line);
  padding: 44px;
  position: relative;
}
.cm-title {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
}
.cm-note { font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 28px; }
.cm-list { display: grid; gap: 14px; }
.cm-item {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.25);
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.cm-item:hover {
  border-color: var(--gold);
  background: rgba(212,175,55,0.08);
  transform: translateX(4px);
}
.cm-mark {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em;
  transition: border-color 0.3s, background 0.3s;
}
.cm-item:hover .cm-mark { border-color: var(--gold); background: rgba(212,175,55,0.14); }
.cm-body { flex: 1; min-width: 0; }
.cm-name { display: block; font-family: var(--f-display); font-size: 24px; line-height: 1.1; color: var(--white); }
.cm-hint { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.cm-arrow { color: var(--gold); font-size: 18px; transition: transform 0.3s; }
.cm-item:hover .cm-arrow { transform: translateX(4px); }
@media (max-width: 560px) {
  .contact-messengers { padding: 28px 20px; }
  .cm-item { padding: 14px 16px; gap: 14px; }
  .cm-name { font-size: 20px; }
}

.contact-promo {
  display: inline-block; margin-bottom: 36px;
  padding: 12px 22px; border-radius: 999px;
  background: rgba(212, 175, 55, 0.14); border: 1px solid var(--gold-line);
  color: var(--gold); font-size: 13.5px; line-height: 1.4;
}
.contact-line { display: flex; gap: 16px; align-items: center; transition: color 0.3s; }
.contact-line .cl-ic {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); transition: border-color 0.3s, background 0.3s;
}
.contact-line:hover .cl-ic { border-color: var(--gold); background: rgba(212,175,55,0.1); }
.contact-line .cl-k {
  display: block;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold);
}
.contact-line .cl-v { display: block; font-family: var(--f-display); font-size: 22px; word-break: break-word; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ---- Статьи ---- */
.article-page { min-height: 100vh; background: var(--cream); color: var(--ink); }
/* .nav.scrolled задаёт тёмный фон — перебиваем его равной специфичностью */
.nav.article-nav {
  background: rgba(245, 241, 232, 0.92);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.article-wrap { width: min(820px, 100% - 48px); margin-inline: auto; padding: 150px 0 120px; }
/* Список статей на странице раздела. Сетка сама добирает колонки —
   новые статьи просто дописываются в разметку, править CSS не нужно. */
.art-list {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  margin-top: 48px;
}
.art-card {
  display: flex; flex-direction: column;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.4);
  overflow: hidden;
  transition: border-color 0.35s, transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s;
}
.art-card:hover {
  border-color: var(--gold-soft);
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -20px rgba(0,0,0,0.35);
}
.art-card .cover { aspect-ratio: 16/9; overflow: hidden; background: var(--ink-2); }
.art-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.art-card:hover .cover img { transform: scale(1.04); }
.art-card .body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; gap: 12px; }
.art-card .num {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold-soft);
}
.art-card h2 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; }
.art-card p { font-size: 15px; line-height: 1.65; color: var(--muted-dark); }
.art-card .go {
  margin-top: auto; padding-top: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-soft);
  display: inline-flex; align-items: center; gap: 10px;
}
.art-card:hover .go span { transform: translateX(4px); }
.art-card .go span { transition: transform 0.3s; }

/* Блок «читайте также» в конце статьи */
.art-next { margin-top: 60px; padding-top: 34px; border-top: 1px solid rgba(0,0,0,0.12); }
.art-next .k {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold-soft); margin-bottom: 18px;
}
.art-next a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 20px 24px; border: 1px solid rgba(0,0,0,0.12);
  transition: border-color 0.3s, background 0.3s;
}
.art-next a:hover { border-color: var(--gold-soft); background: rgba(212,175,55,0.07); }
.art-next .n { font-family: var(--f-display); font-size: 22px; color: var(--gold-soft); line-height: 1; }
.art-next .t { font-family: var(--f-display); font-size: clamp(19px, 2vw, 24px); line-height: 1.2; }

.article { margin-top: 8px; }
.article-hero { margin: 40px 0 44px; border: 1px solid rgba(0,0,0,0.1); }
.article-hero img { width: 100%; aspect-ratio: 16/7; object-fit: cover; display: block; }
.article h2 {
  font-size: clamp(28px, 3.6vw, 44px); line-height: 1.12;
  margin-bottom: 28px; padding-bottom: 22px;
  border-bottom: 1px solid var(--gold-line);
}
.article h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  margin: 44px 0 14px;
  color: var(--ink-2);
}
.article p { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.article p + p { margin-top: 16px; }
.article .lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.65; }
.article ul { list-style: none; display: grid; gap: 14px; margin: 20px 0; }
.article li {
  display: flex; align-items: start; gap: 12px;
  font-size: 17px; line-height: 1.7; color: var(--ink-2);
}
.article li::before { content: '✦'; color: var(--gold-soft); font-size: 10px; margin-top: 9px; flex-shrink: 0; }
.article li b { font-weight: 600; }
.article-cta {
  margin-top: 44px; padding: 34px 36px;
  border: 1px solid var(--gold-line); background: rgba(212,175,55,0.07);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
}
.article-cta p { max-width: 46ch; margin: 0; }
@media (max-width: 560px) {
  .article-wrap { padding-top: 120px; }
  .article-cta { padding: 26px 22px; }
}

/* ---- Map / footer ---- */
.map-section {
  background: var(--ink);
  padding: 0;
  position: relative;
}
.map-grid { display: grid; grid-template-columns: 1fr 1.2fr; min-height: 560px; }
@media (max-width: 960px) { .map-grid { grid-template-columns: 1fr; } }
.map-info {
  padding: clamp(60px, 7vw, 100px);
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
}
.map-info h2 { font-size: clamp(36px, 4vw, 56px); }
.map-line {
  display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--gold-line);
}
.map-line:last-child { border-bottom: 1px solid var(--gold-line); }
.map-line .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--gold); text-transform: uppercase; min-width: 110px; }
.map-line .v { font-size: 15px; color: rgba(255,255,255,0.9); }
.map-line .v a { border-bottom: 1px solid var(--gold-line); transition: color 0.3s; }
.map-line .v a:hover { color: var(--gold); }
.map-socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.map-socials a {
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--gold-line); color: var(--gold);
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: background 0.3s, border-color 0.3s;
}
.map-socials a:hover { background: rgba(212,175,55,0.14); border-color: var(--gold); }
.map-canvas {
  position: relative;
  background: var(--ink-2);
  overflow: hidden;
}
/* Карточка организации показывает фото и логотип, поэтому прежней
   инверсии «под тёмную тему» здесь нет — она превращала снимки в негатив.
   Оставлено лёгкое приглушение, чтобы карта не спорила с палитрой. */
.map-canvas iframe {
  position: relative; /* перекрывает ссылки-атрибуции Яндекса */
  width: 100%; height: 100%; min-height: 520px; border: 0;
  filter: saturate(0.85) contrast(0.95);
}
.map-canvas::after {
  content:''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--ink) 0%, transparent 7%), linear-gradient(-90deg, transparent 93%, var(--ink-2) 100%);
}
/* Ссылки-атрибуции: нужны Яндексу, визуально закрыты картой. */
.map-links { position: absolute; top: 0; left: 0; }
.map-links a { display: block; font-size: 12px; color: #eee; }
@media (max-width: 960px) {
  .map-canvas iframe { min-height: 460px; }
}

/* ---- Footer ---- */
.footer {
  background: #05040339;
  border-top: 1px solid var(--gold-line);
  padding: 60px 0 40px;
  background: #050403;
}
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 48px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h5 { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em; color: var(--gold); text-transform: uppercase; margin-bottom: 20px; }
.footer a { color: rgba(255,255,255,0.7); font-size: 14px; display: block; padding: 4px 0; transition: color 0.3s; }
.footer a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; font-size: 12px; color: var(--muted);
  font-family: var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase;
  flex-wrap: wrap; gap: 16px;
}

/* ---- Modal ---- */
.modal-back {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.35s;
}
.modal-back.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--ink-2);
  border: 1px solid var(--gold-line);
  width: min(520px, 100%);
  padding: 44px 40px;
  transform: translateY(20px); transition: transform 0.4s;
  position: relative;
}
.modal-back.open .modal { transform: none; }
.modal h3 { font-size: 32px; margin-bottom: 6px; }
.modal p { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.modal .close {
  position: absolute; top: 16px; right: 16px;
  z-index: 5; /* крестик всегда поверх содержимого окна, в том числе видео */
  width: 44px; height: 44px; border: 1px solid var(--gold-line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 24px; line-height: 1;
  background: rgba(10, 7, 6, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.modal .close:hover { background: var(--gold); color: var(--black); border-color: var(--gold); }
.modal .close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---- Полноэкранный просмотр дипломов ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(5, 4, 3, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.4s cubic-bezier(.2,.7,.2,1), visibility 0s linear 0.4s;
}
.lightbox.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 0.4s cubic-bezier(.2,.7,.2,1), visibility 0s;
}
.lb-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 0; /* иначе flex-элемент не даёт картинке ужаться по высоте */
}
/* Только вьюпортные единицы: проценты внутри flex-элемента с авто-высотой
   не разрешаются, и снимок вылезает за экран. */
.lb-img {
  max-width: min(820px, 86vw);
  max-height: 80vh;
  width: auto; height: auto;
  object-fit: contain;
  border: 1px solid var(--gold-line);
  box-shadow: 0 50px 110px -30px rgba(0,0,0,0.9);
  background: #0d0a08;
}
/* Появление кадра: при открытии — «наплывом», при листании — сдвигом по ходу */
.lightbox.open .lb-img { animation: lbIn 0.5s cubic-bezier(.2,.7,.2,1) both; }
.lightbox.open.dir-next .lb-img { animation: lbNext 0.42s cubic-bezier(.2,.7,.2,1) both; }
.lightbox.open.dir-prev .lb-img { animation: lbPrev 0.42s cubic-bezier(.2,.7,.2,1) both; }
@keyframes lbIn   { from { opacity: 0; transform: scale(0.9) translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes lbNext { from { opacity: 0; transform: translateX(56px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes lbPrev { from { opacity: 0; transform: translateX(-56px) scale(0.97); } to { opacity: 1; transform: none; } }

.lb-btn {
  position: absolute; z-index: 2;
  border: 1px solid var(--gold-line); border-radius: 50%;
  background: rgba(13, 10, 8, 0.65);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s;
}
.lb-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.lb-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.lb-close {
  top: clamp(16px, 3vw, 32px); right: clamp(16px, 3vw, 32px);
  width: 48px; height: 48px; font-size: 26px; line-height: 1;
}
.lb-nav {
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  font-family: var(--f-display); font-size: 34px; line-height: 1; padding-bottom: 4px;
}
.lb-prev { left: clamp(12px, 3vw, 40px); }
.lb-next { right: clamp(12px, 3vw, 40px); }
.lb-nav:hover { transform: translateY(-50%) scale(1.06); }
.lb-counter {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: clamp(16px, 3vw, 34px);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.22em;
  color: var(--muted);
}
.lb-counter .lb-cur { color: var(--gold); }
.lb-counter .lb-sep { opacity: 0.5; margin: 0 4px; }
.lightbox.single .lb-nav, .lightbox.single .lb-counter { display: none; }
@media (max-width: 640px) {
  .lb-nav { width: 44px; height: 44px; font-size: 26px; }
  .lb-close { width: 42px; height: 42px; font-size: 22px; }
  .lb-img { max-width: 82vw; max-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox.open .lb-img,
  .lightbox.open.dir-next .lb-img,
  .lightbox.open.dir-prev .lb-img { animation: none; }
}

/* Video modal — ролик вертикальный (1080×1920), поэтому окно по высоте экрана */
.video-modal {
  width: auto; max-width: 100%; min-width: 0;
  padding: 0; background: #000;
  border: 1px solid var(--gold-line);
  display: flex; align-items: center; justify-content: center;
}
/* Высоту ограничиваем и экраном по вертикали, и тем, что влезает по
   горизонтали: иначе на узком экране вертикальный кадр вылезает за края.
   64px — отступы модалки с обеих сторон плюс рамка. */
.video-modal video {
  display: block;
  aspect-ratio: 9 / 16;
  height: min(86vh, calc((100vw - 64px) * 16 / 9));
  width: auto;
  background: #000;
}

/* Scroll progress */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--gold); z-index: 60;
  width: 0%;
  transition: width 0.1s;
}

.nav-logo img { width: 90px; height: 90px; border-radius: 0 !important; object-fit: contain; background: transparent; border: none !important; }
.nav-logo .nl-title, .nav-logo .nl-sub { display: none; }
.nav-inner { padding: 6px 0; }

/* ===== INTRO ANIMATION ===== */
#intro-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #0d0a08;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  pointer-events: all;
}
#intro-screen.hiding {
  animation: introExit 0.9s cubic-bezier(.7,0,.3,1) 0s both;
}
@keyframes introExit {
  0%   { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-24px); }
}
#intro-logo {
  width: 320px; height: 320px; object-fit: contain;
  opacity: 0;
  animation: introLogoIn 0.9s cubic-bezier(.2,.7,.2,1) 0.2s both;
  filter: drop-shadow(0 0 60px rgba(212,175,55,0.5));
}
@keyframes introLogoIn {
  from { opacity: 0; transform: scale(0.82); filter: drop-shadow(0 0 0px rgba(212,175,55,0)); }
  to   { opacity: 1; transform: scale(1);    filter: drop-shadow(0 0 60px rgba(212,175,55,0.5)); }
}
#intro-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.38em; text-transform: uppercase;
  color: rgba(212,175,55,0.8);
  margin-top: 6px;
  opacity: 0;
  animation: introTextIn 0.7s ease 0.85s both;
}
#intro-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(42px, 6vw, 76px);
  font-style: italic; font-weight: 400;
  color: #d4af37;
  letter-spacing: 0.06em;
  line-height: 1;
  margin-top: 2px;
  opacity: 0;
  animation: introTextIn 0.8s ease 1.05s both;
}
#intro-line {
  width: 0; height: 1px; background: rgba(212,175,55,0.4);
  margin-top: 24px;
  animation: introLineIn 0.8s ease 1.4s both;
}
@keyframes introTextIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes introLineIn {
  from { width: 0; opacity: 0; }
  to   { width: 120px; opacity: 1; }
}
#intro-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 14px;
  opacity: 0;
  animation: introTextIn 0.6s ease 1.7s both;
}
/* Prevent scroll during intro */
body.intro-active { overflow: hidden; }

