/* ==========================================================================
   D.maf — базовые токены, фон, типографика, стекло, шапка, подвал
   ========================================================================== */

:root {
  --bg: #08060d;
  --bg-2: #120c1c;
  --accent: #e98bff;          /* магента-розовый из макета — он же цвет неона */
  --accent-2: #c467ff;
  --violet: #6b3ff0;
  --violet-2: #8a5cff;
  --nebula: rgba(110, 46, 220, 0.42);   /* фиолетовая «туманность» фона */
  --nebula-pink: rgba(196, 60, 200, 0.24);

  /* Неон: светлая «трубка» + цветное свечение. Правило — неон только у сигнальных
     элементов (подписи разделов, линии, активные состояния, подпись D.maf),
     а не у всего текста подряд. */
  --neon-core: #ffe3ff;
  --neon-glow: 0 0 4px rgba(255, 210, 255, .9), 0 0 12px rgba(233, 139, 255, .75), 0 0 32px rgba(170, 80, 255, .45);
  --neon-glow-soft: 0 0 10px rgba(233, 139, 255, .45), 0 0 30px rgba(140, 70, 255, .25);
  --neon-drop: drop-shadow(0 0 3px rgba(255, 210, 255, .95)) drop-shadow(0 0 10px rgba(233, 139, 255, .8)) drop-shadow(0 0 24px rgba(170, 80, 255, .55));
  --neon-text: 0 0 6px rgba(233, 139, 255, .75), 0 0 20px rgba(170, 80, 255, .45);
  --text: #f4f1f8;
  --text-2: #d6d0e2;
  --muted: #9b95ab;
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.28);
  --ok: #46d48a;
  --warn: #ff7a7a;

  --f-display: "Oswald", "Arial Narrow", sans-serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --f-kicker: "Unbounded", "Oswald", sans-serif;
  --f-round: "Comfortaa", "Manrope", sans-serif;
  --f-script: "Great Vibes", cursive;

  --r-lg: 34px;
  --r-md: 22px;
  --r-sm: 14px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-gap: clamp(88px, 11vw, 150px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* атрибут hidden сильнее любых display у классов (.btn и т.п.) */
[hidden] { display: none !important; }
/* место под полосу прокрутки зарезервировано всегда: когда модалка блокирует прокрутку и полоса пропадает,
   страница не расширяется и не «прыгает» */
html { scrollbar-gutter: stable; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* полоса прокрутки страницы — как в «Риг в движении»: тёмная дорожка и светящийся розово-фиолетовый ползунок-пилюля */
html { scrollbar-width: thin; scrollbar-color: #d78bff #0b0712; }
@supports selector(::-webkit-scrollbar) {
  html { scrollbar-width: auto; scrollbar-color: auto; }
  html::-webkit-scrollbar { width: 12px; }
  html::-webkit-scrollbar-track { background: #0b0712; box-shadow: inset 1px 0 0 rgba(255,255,255,.05); }
  html::-webkit-scrollbar-thumb {
    border: 3px solid transparent; border-radius: 999px; background-clip: padding-box;
    background-image: linear-gradient(180deg, #f98eff, #8f6bff); box-shadow: inset 0 0 6px rgba(255,255,255,.25);
  }
  html::-webkit-scrollbar-thumb:hover { background-image: linear-gradient(180deg, #ffb2ff, #a88bff); }
  html::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* атмосферный фон: фиолетовая туманность, «растущая» из почти чёрного (как у JetBrains), + зерно */
:root {
  --backdrop-bg:
    radial-gradient(62vw 72vh at 4% 14%, var(--nebula), transparent 70%),
    radial-gradient(52vw 62vh at 98% 60%, var(--nebula-pink), transparent 70%),
    radial-gradient(70vw 50vh at 40% 115%, rgba(80, 36, 200, .30), transparent 70%),
    linear-gradient(180deg, #0a0612 0%, #0d0718 50%, #07050c 100%);
}
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: var(--backdrop-bg);
}

/* Заставка при загрузке: тот же фон-туманность и три мерцающие звёздочки. Закрывает страницу, пока разделы
   собираются (иначе на миг видна пустая страница с линией подвала), и растворяется, когда готов первый экран. */
.preloader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; pointer-events: none;
  background: var(--backdrop-bg); transition: opacity .7s var(--ease), visibility .7s;
}
html:not(.is-loading) .preloader { opacity: 0; visibility: hidden; }
.preloader__mark { display: flex; align-items: center; gap: 6px; color: #e9ddff; filter: drop-shadow(0 0 14px rgba(190,150,255,.9)); transition: transform .7s var(--ease); }
html:not(.is-loading) .preloader__mark { transform: scale(1.25); }
.preloader__mark svg { width: 22px; height: 22px; animation: pl-twinkle 1.4s ease-in-out infinite; }
.preloader__mark svg:nth-child(2) { width: 34px; height: 34px; animation-delay: .18s; }
.preloader__mark svg:nth-child(3) { animation-delay: .36s; }
@keyframes pl-twinkle { 0%, 100% { opacity: .3; transform: scale(.65); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@media (prefers-reduced-motion: reduce) { .preloader__mark svg { animation: none; opacity: .9; } }
/* медленное «дыхание» света — почти незаметное, но фон не мёртвый */
/* слой больше окна на 30% с каждой стороны: свечение сдвигается до 14vh вниз и 6vw вбок, и у слоя размером
   с окно верхний край обрезал свечение — сверху сползала тёмная полоса с заметной границей. Центр свечения —
   по-прежнему 70% ширины и 20% высоты окна (отсчёт от угла слоя: +30vw / +30vh) */
.backdrop::before {
  content: ""; position: absolute; inset: -30vh -30vw;
  background: radial-gradient(40vw 40vh at 100vw 50vh, rgba(233, 139, 255, .10), transparent 70%);
  animation: nebula-drift 28s ease-in-out infinite alternate;
}
@keyframes nebula-drift { from { transform: translate(-6vw, 0); opacity: .6; } to { transform: translate(4vw, 14vh); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .backdrop::before { animation: none; } }
.backdrop::after {
  content: ""; position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .06; mix-blend-mode: overlay;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -------------------------------------------------------------------------- */
/* Типографика секций                                                         */
/* -------------------------------------------------------------------------- */
.section { position: relative; padding-block: calc(var(--section-gap) / 2); }
.section + .section { margin-top: calc(var(--section-gap) / 2); }

/* подпись над заголовком раздела (PRICE, LIVE 2D, D.MAF) — Dela Gothic One 17.8 px, как в макете */
.kicker {
  margin: 0; font-family: "Dela Gothic One", var(--f-kicker); font-weight: 400; font-size: clamp(14px, 1.5vw, 17.8px); line-height: 26px;
  letter-spacing: 0; text-transform: uppercase; color: var(--neon-core);
  text-shadow: var(--neon-text);   /* подписи разделов — единственный «неоновый» текст, как вывеска */
}
.title-xl {
  /* заголовки разделов в макете: Oswald 400, 105.85 px, разрядка 5.29 px */
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(52px, 8.8vw, 106px); line-height: 1; letter-spacing: .05em; margin: 0;
}
/* заголовок, который «уходит» под стеклянную панель (фишка макета) */
.section-head { text-align: center; position: relative; z-index: 0; }
.section-head .title-xl { margin-bottom: -0.3em; }
.section-head--left { text-align: left; }
.section-head + .glass { z-index: 1; }

/* заголовок подраздела с линиями по бокам (RIGGING EXAMPLES, FREE MODEL, SHOWCASE): в макете вся строка ~810 px */
.rule-title {
  display: flex; align-items: center; gap: 14px; margin: 0 auto 28px; max-width: 810px;
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(30px, 4.6vw, 56px); line-height: 1; letter-spacing: .01em;
}
/* линии у заголовков — тонкие неоновые трубки, гаснущие к краям.
   Затухание — градиентом, свечение — drop-shadow (mask обрезал бы ореол). */
.rule-title::before, .rule-title::after {
  content: ""; flex: 1; height: 2px; border-radius: 2px; filter: var(--neon-drop);
}
.rule-title::before { background: linear-gradient(90deg, transparent, var(--neon-core) 70%); }
.rule-title::after { background: linear-gradient(90deg, var(--neon-core) 30%, transparent); }
.rule-title--left::before { display: none; }

/* отдельная неоновая линия (под карточкой главного экрана, над подвалом) */
.neon-line {
  display: block; height: 2px; border-radius: 2px; filter: var(--neon-drop);
  background: linear-gradient(90deg, transparent, var(--neon-core) 18%, var(--neon-core) 82%, transparent);
}
.rule-title--left { font-size: clamp(18px, 2vw, 22px); text-transform: none; gap: 14px; max-width: none; }

.muted { color: var(--muted); }
.sparkle { display: inline-block; width: .9em; height: .9em; vertical-align: -.08em; flex: none; }
.sparkle--accent { color: var(--accent); }

/* плейсхолдеры TODO, чтобы было видно, что заполнить */
.todo {
  background: repeating-linear-gradient(-45deg, rgba(255, 200, 0, .22) 0 6px, rgba(255, 200, 0, .1) 6px 12px);
  color: #ffd76a; border-radius: 4px; padding: 0 4px; font-weight: 700; font-size: .85em;
  font-family: var(--f-body); letter-spacing: 0;
}

/* -------------------------------------------------------------------------- */
/* Стекло. .glass — прозрачное стекло с бликами по краю.                      */
/* В Chromium на блоки добавляется рефракция «тонкая кромка» (js/core/glass.js) */
/* -------------------------------------------------------------------------- */
.glass {
  position: relative;
  border-radius: var(--r-lg);
  background:
    linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.015) 40%, rgba(255,255,255,.03));
  -webkit-backdrop-filter: blur(3px) saturate(150%) brightness(1.06);
  backdrop-filter: blur(3px) saturate(150%) brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(255,255,255,.06),
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 40px 80px -40px rgba(120, 50, 230, .45);   /* под стеклом не тень, а фиолетовый свет */
  /* без isolation: с ним Chromium отдаёт фильтру стекла только фон страницы — заголовки и картинки под панелью
     не видны и не преломляются. Слой и так создаёт backdrop-filter, блик ::after остаётся внутри стекла */
}
/* яркий кант, как у линзы на photo_31: белый блик сверху-слева, розово-фиолетовый снизу-справа */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.08) 30%, rgba(255,255,255,0) 55%, rgba(200,130,255,.18) 75%, rgba(240,160,255,.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  z-index: 2;
}
/* мягкий внутренний блик */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 60% at 15% 0%, rgba(255,255,255,.10), transparent 55%);
}
/* пока блок меняет размер, преломление из js/core/glass.js заменяется тем же размытием без него
   (иначе размытие на новой части стекла на миг пропадает) */
.is-liquid.lg-resizing { backdrop-filter: var(--lg-plain) !important; -webkit-backdrop-filter: var(--lg-plain) !important; }
/* варианты стекла — почти прозрачные, как liquid glass: фон под ними виден, а по краю его «затягивает» линза (js/core/glass.js) */
.glass--dark { background: linear-gradient(160deg, rgba(13,9,21,.16), rgba(13,9,21,.08)); }
.glass--tint { background: linear-gradient(160deg, rgba(120,70,190,.10), rgba(28,18,44,.10)); }
/* стекло с подсветкой изнутри: свет «натекает» из угла (violet nebula card у JetBrains) */
.glass--glow { background: linear-gradient(130deg, rgba(110,46,220,.18) 0%, rgba(46,16,106,0) 60%), linear-gradient(160deg, rgba(17,11,27,.08), rgba(8,5,13,.16)); }
/* белый блик по кромке для блоков внутри стекла (плашки прайса): как у .glass::before, но только сверху-слева */
.glass-rim { position: relative; }
.glass-rim::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.8), rgba(255,255,255,.18) 18%, rgba(255,255,255,0) 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass--sm { border-radius: var(--r-md); }
.glass--xs { border-radius: var(--r-sm); }

@media (prefers-reduced-transparency: reduce) {
  .glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: #19121f; }
}

/* -------------------------------------------------------------------------- */
/* Кнопки                                                                     */
/* -------------------------------------------------------------------------- */
.btn {
  --b-bg: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--b-bg); color: var(--text); text-decoration: none; cursor: pointer;
  font-family: var(--f-display); font-size: 16px; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-2); background: rgba(255,255,255,.12); }
.btn:active { transform: translateY(0); }
.btn--accent {
  background: linear-gradient(180deg, #f2a6ff, var(--accent)); border-color: transparent; color: #2a0b33;
  box-shadow: 0 10px 30px -10px rgba(233,139,255,.7), inset 0 1px 0 rgba(255,255,255,.6);
}
.btn--accent:hover { background: linear-gradient(180deg, #f6b9ff, #ee9cff); box-shadow: 0 0 0 1px rgba(255,220,255,.6), var(--neon-glow-soft), inset 0 1px 0 rgba(255,255,255,.6); }
.btn--violet { background: linear-gradient(90deg, var(--violet), var(--violet-2)); border-color: transparent; font-family: var(--f-body); font-weight: 700; letter-spacing: .02em; }
.btn--light { background: #fff; color: #2d1259; border-color: transparent; font-family: var(--f-body); font-weight: 700; letter-spacing: .02em; }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); cursor: pointer;
  transition: background .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: rgba(255,255,255,.14); }
.icon-btn svg { width: 20px; height: 20px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-family: var(--f-display); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(233,139,255,.16); color: #f6d2ff; border: 1px solid rgba(233,139,255,.3);
}

/* -------------------------------------------------------------------------- */
/* Шапка                                                                      */
/* -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; padding: 12px var(--gutter);
  transition: background .3s, backdrop-filter .3s;
}
.site-header.is-scrolled { background: linear-gradient(180deg, rgba(12,8,19,.85), rgba(12,8,19,0)); }
.site-header__bar {
  max-width: calc(var(--wrap) - 2 * var(--gutter)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 52px; padding: 6px 10px 6px 22px; border-radius: 999px;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
/* наверху страницы шапка как в макете — просто строка меню без плашки; стекло появляется при прокрутке */
.site-header:not(.is-scrolled) .site-header__bar.glass { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* наверху меню стоит ниже (как в макете) и начинается на линии текста карточки главного экрана; сдвиг через transform, без перестройки страницы */
@media (min-width: 1081px) {
  .site-header__bar { padding-left: clamp(22px, 5vw, 110px); transition: background .3s, box-shadow .3s, backdrop-filter .3s, transform .3s var(--ease); }
  .site-header:not(.is-scrolled) .site-header__bar { transform: translateY(26px); }
}
.site-header:not(.is-scrolled) .site-header__bar.glass::before, .site-header:not(.is-scrolled) .site-header__bar.glass::after { opacity: 0; }
.site-header__bar.glass::before, .site-header__bar.glass::after { transition: opacity .3s; }
/* шапка — плотное матовое стекло: под ней проезжает текст, рефракция его бы «отражала» */
.site-header__bar.glass { background: rgba(14, 9, 24, .72); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  position: relative; padding: 8px 9px; text-decoration: none; white-space: nowrap;
  font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: .15em; text-transform: uppercase;
}
.site-nav a + a::before { content: "|"; position: absolute; left: -4px; color: rgba(255,255,255,.7); font-weight: 400; }
.site-nav a::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 2px; height: 2px; border-radius: 2px;
  background: #e478ff; box-shadow: 0 0 8px rgba(233, 139, 255, .7); transform: scaleX(0); transition: transform .3s var(--ease);
}
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
.site-nav__star { width: 14px; height: 14px; margin-inline: 4px; color: #fff; }

.header-tools { display: flex; align-items: center; gap: 12px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap;
  font-family: var(--f-display); font-weight: 400; font-size: 17px; letter-spacing: .05em; text-transform: uppercase;
}
/* плашка статуса из макета: градиент #f98eff → #965599, чёрный Oswald 600 16 px, скругление ~3 px */
.status-badge b {
  padding: 0 4px; border-radius: 3px; font-weight: 600; font-size: 16px; line-height: 20px; letter-spacing: 0;
  background: linear-gradient(90deg, #f98eff, #965599); color: #000; border: 0;
  box-shadow: var(--neon-glow-soft);
}
.status-badge[data-open="true"] b { background: var(--ok); color: #062615; }

/* переключатель языка как на photo_3 */
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer; padding: 5px 10px; border-radius: 999px;
  font-family: var(--f-kicker); font-weight: 700; font-size: 11px; letter-spacing: .12em; color: var(--muted);
  transition: background .2s, color .2s;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #2a0b33; }

.burger { display: none; }
.mobile-nav { display: none; }

@media (max-width: 1080px) {
  .site-nav { display: none; }
  .burger { display: inline-grid; }
  .site-header__bar { padding-left: 18px; }
  .brand-mini { display: inline-block !important; }
  .mobile-nav {
    display: block; position: fixed; inset: 0; z-index: 60; padding: 90px var(--gutter) 32px;
    background: rgba(10,7,17,.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .mobile-nav.is-open { opacity: 1; visibility: visible; }
  .mobile-nav__list { display: grid; gap: 4px; padding: 18px; }
  .mobile-nav__list a {
    padding: 12px 8px; text-decoration: none; border-bottom: 1px solid var(--line);
    font-family: var(--f-display); font-size: 28px; letter-spacing: .08em; text-transform: uppercase;
  }
  .mobile-nav__close { position: absolute; top: 24px; right: var(--gutter); }
}
.brand-mini { display: none; font-family: var(--f-round); font-weight: 700; font-size: 22px; text-decoration: none; }
@media (max-width: 420px) {
  .status-badge span { display: none; }
  .header-tools { gap: 8px; }
}

/* -------------------------------------------------------------------------- */
/* Подвал                                                                     */
/* -------------------------------------------------------------------------- */
.site-footer { position: relative; padding: 70px 0 40px; margin-top: var(--section-gap); background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); }
/* над подвалом — одна тонкая неоновая линия (приём Phantom Studios) */
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 2px; border-radius: 2px; filter: var(--neon-drop);
  background: linear-gradient(90deg, transparent, var(--neon-core) 25%, var(--neon-core) 75%, transparent);
}
.site-footer__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer__logo { font-family: var(--f-round); font-weight: 700; font-size: 35px; text-decoration: none; }
.site-footer__links { display: flex; gap: 34px; }
.site-footer__links a { font-family: var(--f-round); font-size: 16px; text-decoration: none; color: #fff; }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__copy { margin-top: 26px; font-size: 13px; color: var(--muted); }

.socials { display: flex; gap: 12px; flex-wrap: wrap; }
.social {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: #0c0c0c; transition: transform .25s var(--ease), background .25s;
  /* свой слой постоянно: иначе в конце обратного перехода слой снимается и иконка на дробных координатах
     перепрыгивает на целый пиксель (дёргается при возврате на место) */
  will-change: transform; backface-visibility: hidden;
}
.social:hover { transform: translateY(-2px) rotate(-6deg); background: var(--accent); }
.social svg { width: 20px; height: 20px; }
.socials--sm .social { width: 32px; height: 32px; }
.socials--sm .social svg { width: 16px; height: 16px; }

/* -------------------------------------------------------------------------- */
/* Декор: летучие мыши и звёздочки                                            */
/* -------------------------------------------------------------------------- */
.bat { position: absolute; width: var(--s, 90px); color: #050607; pointer-events: none; z-index: 0; animation: bat-float 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
.bat svg, .bat img { width: 100%; height: auto; display: block; }
.bat--far { color: rgba(5, 8, 10, .45); opacity: .45; z-index: 0; }
.bat--front { z-index: 5; }
@keyframes bat-float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(calc(var(--r, 0deg) + 4deg)); } }
@media (prefers-reduced-motion: reduce) { .bat { animation: none; } }
@media (max-width: 700px) { .bat { --s: 56px !important; } .bat--hide-m { display: none; } }

.sparkles { display: flex; justify-content: center; gap: 2px; margin: 40px auto 0; position: relative; z-index: 3; color: #e9ddff; filter: drop-shadow(0 0 8px rgba(190,150,255,.85)); }
.sparkles svg { width: 20px; height: 20px; }
.sparkles svg:nth-child(2) { width: 30px; height: 30px; margin-top: -5px; }

/* -------------------------------------------------------------------------- */
/* Модалка / лайтбокс                                                         */
/* -------------------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: rgba(7,4,13, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .25s;
}
.modal.is-open { opacity: 1; }
.modal__box {
  position: relative; width: min(1040px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  padding: clamp(18px, 3vw, 34px); border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(36,24,52,.92), rgba(14,17,22,.94));
  border: 1px solid var(--line); box-shadow: 0 40px 100px -20px rgba(0,0,0,.8);
  transform: translateY(14px) scale(.98); transition: transform .35s var(--ease);
}
.modal.is-open .modal__box { transform: none; }
/* своя полоса прокрутки у окна не нужна: листается колесом/пальцем, а системная полоса торчит у скруглённого края */
.modal__box { scrollbar-width: none; }
.modal__box::-webkit-scrollbar { display: none; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 5; }
.modal--image .modal__box { width: auto; max-width: min(1200px, 100%); padding: 10px; background: rgba(14,17,22,.9); }
/* картинка оставляет место под подпись: окно — не выше 100vh − 40px, внутри поля 2×10 и подпись ~40 px */
.modal--image img { max-height: calc(100vh - 110px); width: auto; margin-inline: auto; border-radius: 18px; }
/* прокрутка страницы под модалкой блокируется в js/core/ui.js (колесо/свайп/клавиши), полоса и шапка остаются на месте;
   прокрутка внутри окна не передаётся странице, когда доходит до края */
.modal__box, .mobile-nav { overscroll-behavior: contain; }
/* -------------------------------------------------------------------------- */
/* Окно с роликом: свой плеер (js/core/ui.js → openVideo)                      */
/* -------------------------------------------------------------------------- */
.modal--video .modal__box {
  width: auto; max-width: min(980px, 100%); padding: 14px; border-radius: 30px; overflow: visible;
  background: linear-gradient(165deg, rgba(56,32,84,.95), rgba(17,11,28,.97) 52%, rgba(38,18,58,.96));
  border-color: rgba(233,139,255,.36);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.85), 0 0 70px -20px rgba(190,110,255,.6), inset 0 1px 0 rgba(255,255,255,.14);
}
.modal--video .modal__close { top: 14px; right: 14px; }
.vplayer { display: grid; gap: 12px; }
.vplayer__title { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding: 0 58px 0 10px; font-family: var(--f-display); font-size: clamp(18px, 2.2vw, 24px); letter-spacing: .04em; }
.vplayer__title .sparkle { flex: none; width: 16px; height: 16px; color: var(--accent); filter: drop-shadow(0 0 6px rgba(233,139,255,.7)); }
.vplayer__stage { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 20px; background: #000; cursor: pointer; }
/* тонкая сиреневая кромка и мягкая тень снизу — поверх ролика, чтобы чёрный кадр не выглядел вырезанным прямоугольником */
.vplayer__stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(233,139,255,.24), inset 0 -70px 60px -50px rgba(70,24,116,.5); }
.vplayer.is-alpha .vplayer__stage { background: radial-gradient(90% 70% at 50% 20%, rgba(150,84,220,.34), transparent 70%), linear-gradient(180deg, #1b1029, #0d0816); }
/* ширина — от окна браузера, а не от 100%: окно подстраивается под ролик, и процент от него ни во что не упирается */
.vplayer__video { display: block; max-width: min(900px, calc(100vw - 70px)); max-height: calc(100vh - 190px); }
.vplayer.is-alpha .vplayer__video { padding: 10px 24px 0; filter: drop-shadow(0 10px 22px rgba(20,0,40,.45)); }
.vplayer__big {
  position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; place-items: center; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.34); background: rgba(22,13,36,.5); color: #fff; pointer-events: none;
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: 0 0 34px -6px rgba(233,139,255,.8), inset 0 1px 0 rgba(255,255,255,.3);
  opacity: 0; transform: scale(.82); transition: opacity .25s, transform .3s var(--ease);
}
.vplayer__big svg { width: 30px; height: 30px; margin-left: 4px; }
.vplayer.is-paused .vplayer__big { opacity: 1; transform: none; }
.vplayer__bar { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.vplayer__btn { flex: none; width: 38px; height: 38px; }
.vplayer__btn svg { width: 16px; height: 16px; }
.vplayer__btn:hover { border-color: var(--accent); background: rgba(233,139,255,.18); box-shadow: var(--neon-glow-soft); }
.vplayer__time { flex: none; font-family: var(--f-display); font-size: 14px; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.vplayer__time b { font-weight: 500; color: #fff; }
/* перемотка: обычный range, чтобы работали мышь, палец и клавиатура; --p — сколько сыграно, --b — сколько загружено */
.vplayer__seek { --p: 0%; --b: 0%; flex: 1; min-width: 60px; height: 22px; margin: 0; padding: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: none; }
.vplayer__seek::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, #b85cff, #f3a6ff) 0 / var(--p) 100% no-repeat, linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)) 0 / var(--b) 100% no-repeat, rgba(255,255,255,.13);
}
.vplayer__seek::-moz-range-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, #b85cff, #f3a6ff) 0 / var(--p) 100% no-repeat, linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)) 0 / var(--b) 100% no-repeat, rgba(255,255,255,.13);
}
.vplayer__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(233,139,255,.45), 0 0 14px rgba(233,139,255,.9); transition: transform .2s var(--ease); }
.vplayer__seek::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(233,139,255,.45), 0 0 14px rgba(233,139,255,.9); }
.vplayer__seek:hover::-webkit-slider-thumb, .vplayer__seek:active::-webkit-slider-thumb { transform: scale(1.18); }
.vplayer__seek:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
/* во весь экран плеер разворачивается целиком, со своей полосой, а не системной */
.vplayer:fullscreen { grid-template-rows: auto minmax(0, 1fr) auto; padding: 18px; background: radial-gradient(80% 60% at 50% 0%, rgba(96,48,150,.35), transparent 70%), #07040c; }
.vplayer:fullscreen .vplayer__title { padding-right: 10px; }
.vplayer:fullscreen .vplayer__stage { height: 100%; }
.vplayer:fullscreen .vplayer__video { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
@media (max-width: 560px) {
  .modal--video .modal__box { padding: 10px; border-radius: 24px; }
  .modal--video .modal__close { top: 10px; right: 10px; }
  .vplayer { gap: 10px; }
  .vplayer__video { max-width: calc(100vw - 62px); }
  .vplayer__bar { gap: 8px; padding: 5px 6px; }
  .vplayer__time { font-size: 12.5px; }
  .vplayer__big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}
@media (prefers-reduced-motion: reduce) { .vplayer__big, .vplayer__seek::-webkit-slider-thumb { transition: none; } }
.lightbox { position: relative; }
.lightbox__fig { margin: 0; }
.lightbox__fig figcaption { padding: 10px 6px 2px; text-align: center; font-family: var(--f-display); letter-spacing: .04em; }
.lightbox__nav { position: absolute; top: 50%; translate: 0 -50%; background: rgba(13,9,21,.7); }
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }
.lightbox__count { position: absolute; top: 12px; left: 14px; padding: 2px 10px; border-radius: 999px; background: rgba(13,9,21,.7); font-size: 13px; }

/* -------------------------------------------------------------------------- */
/* Карусель coverflow (rigging examples, showcase)                            */
/* -------------------------------------------------------------------------- */
.coverflow { position: relative; height: var(--cf-h, 400px); perspective: 1400px; user-select: none; touch-action: pan-y; }
.coverflow__item {
  position: absolute; top: 0; left: 50%; width: var(--cf-w, 700px); height: 100%; margin-left: calc(var(--cf-w, 700px) / -2);
  border-radius: 28px; overflow: hidden; background: #111; cursor: pointer;
  transition: transform .6s var(--ease), opacity .6s cubic-bezier(.45, 0, .3, 1);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
}
/* затемнение соседних карточек (js: coverflow → --cf-dim). Кромку не трогает (отступ 2 px): иначе у карточки,
   приехавшей в центр, рамка ещё тусклая и разгорается уже после остановки — заметный перепад света */
.coverflow__item::after {
  content: ""; position: absolute; inset: 2px; z-index: 4; border-radius: calc(28px - 2px); pointer-events: none;
  background: #07040c; opacity: var(--cf-dim, 0);
  /* затемнение идёт вровень с движением карточки, плавно с обоих концов: с резким стартом (--ease) уезжающая
     в сторону карточка гасла почти целиком за первые 0,1 с — выглядело как вспышка */
  transition: opacity .7s cubic-bezier(.45, 0, .3, 1);
}
.coverflow__item img, .coverflow__item video { width: 100%; height: 100%; object-fit: cover; }
.coverflow__item.is-active { cursor: default; }
.coverflow__nav { position: absolute; top: 50%; translate: 0 -50%; z-index: 20; }
.coverflow__nav--prev { left: max(0px, calc(50% - var(--cf-w, 700px) / 2 - 8px)); }
.coverflow__nav--next { right: max(0px, calc(50% - var(--cf-w, 700px) / 2 - 8px)); }
/* точки каруселей из макета: 15 px через 26 px, активная — розовая #f98eff */
.dots { display: flex; justify-content: center; gap: 26px; margin-top: 26px; }
.dots button { width: 15px; height: 15px; padding: 0; border-radius: 50%; border: 0; background: #fff; cursor: pointer; transition: background .2s, box-shadow .2s; }
.dots button[aria-current="true"] { background: #f98eff; box-shadow: 0 0 10px rgba(249,142,255,.6); }

/* появление при скролле */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* placeholder картинки, если её ещё нет */
.ph {
  display: grid; place-items: center; width: 100%; height: 100%; min-height: 80px; color: rgba(255,255,255,.5);
  background:
    radial-gradient(circle at 30% 20%, rgba(233,139,255,.25), transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(138,61,255,.32), transparent 60%),
    #19121f;
  font-family: var(--f-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-align: center; padding: 8px;
}
.ph__q { font-family: var(--f-display); font-weight: 500; font-size: 52px; line-height: 1; color: var(--accent); text-shadow: var(--neon-text); }

/* одиночный режим блока (blocks.html?s=...) */
.block-index { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); padding-block: 40px; }
.block-index a { padding: 22px; text-decoration: none; font-family: var(--f-display); font-size: 22px; letter-spacing: .06em; text-transform: uppercase; }
.block-index small { display: block; font-family: var(--f-body); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); }

/* -------------------------------------------------------------------------- */
/* Страницы (js/app.js): переключение — View Transitions. Старая страница гаснет и уходит               */
/* чуть вверх, новая проявляется снизу; шапка стоит на месте (своё имя перехода, без анимации).         */
/* -------------------------------------------------------------------------- */
.page { min-height: calc(100svh - 220px); }
/* боковые карточки каруселей выходят за ширину экрана. Без обрезки на телефоне страница становилась шире экрана
   (887 px при 390), и окна поверх страницы (ролик, галерея) раскладывались по этой ширине — уезжали вбок */
.page { overflow-x: clip; }
.site-header { view-transition-name: site-header; }
::view-transition-group(site-header), ::view-transition-old(site-header), ::view-transition-new(site-header) { animation: none; }
::view-transition-old(site-header) { display: none; }
::view-transition-old(root) { animation: page-out .2s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: page-in .55s cubic-bezier(.2, .8, .2, 1) .08s both; }
/* без размытия: blur на снимке всего экрана — самая дорогая часть перехода, на тяжёлых страницах (калькулятор) давал рывки */
@keyframes page-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(22px); } }
