/* ============================================================
   Sergeev.AI — scroll-driven видео-сайт
   Палитра по ТЗ: фон #FAFAFA · линии/текст #0B0E14 · акцент — градиент синий→фиолетовый→розовый
   Шрифты: Sora (дисплей) + Inter (текст), самохостинг в assets/fonts/
   ============================================================ */

:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --video-bg: #F5F5F7;
  --line: #0B0E14;
  --ink: #111827;
  --ink-2: #6B7280;
  --accent: #38BDF8;
  --accent-ink: #0369a1;
  --accent-2: #8B5CF6;
  --accent-3: #EC4899;
  --accent-gradient: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);

  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --nav-h: 76px;
  --container: 1280px;
  --card-bg: rgba(250, 250, 250, 0.88);
  --line-soft: rgba(11, 14, 20, 0.15);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Переполнение не маскируем (ТЗ v2): причины overflow устранены по месту */
}

img, video { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--line); }

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--line);
  color: var(--bg);
  border-radius: 6px;
  font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ============ ПРЕЛОАДЕР ============ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader__inner {
  width: min(320px, 78vw);
  text-align: center;
}
.preloader__logo {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--line);
}
.preloader__logo span { color: var(--accent-ink); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .preloader__logo span,
  .nav__logo span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.preloader__bar {
  margin-top: 24px;
  height: 2px;
  background: var(--line-soft);
  border-radius: 99px;
  overflow: hidden;
}
.preloader__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}
.preloader__hint {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ============ НАВИГАЦИЯ ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  height: var(--nav-h);
  background: rgba(250, 250, 250, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--line);
  margin-right: auto;
}
.nav__logo span { color: var(--accent-ink); }
.nav__links { display: flex; gap: 4px; }
.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav__link:hover { color: var(--ink); background: rgba(11, 14, 20, 0.06); }
.nav__link.is-active { color: var(--line); }
.nav__link:focus-visible,
.nav__cta:focus-visible,
.btn:focus-visible,
.contact-row:focus-visible,
.s-card:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}
.nav__cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--line);
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
  white-space: nowrap;
}
.nav__cta:hover { background: transparent; color: var(--line); }
.nav__cta:active { transform: scale(0.96); }
.nav__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
}
.nav__burger span {
  width: 22px;
  height: 2px;
  background: var(--line);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 140;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 24px 24px;
  display: none;
}
.mobile-menu.is-open { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu a {
  padding: 14px 0;
  font-size: 18px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu__vk { color: var(--accent-ink); }

/* ============================================================
   КИНО-АКТ
   ============================================================ */
.cinema {
  position: relative;
  height: 400vh;
  height: 400dvh;
  background: var(--video-bg);
}

.cinema__video-bg,
.cinema__video,
.cinema__frames {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cinema__video-bg,
.cinema__video,
.cinema__frames {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* Размытый canvas-фон — заполняет края letterbox-а */
.cinema__video-bg {
  z-index: 0;
  filter: blur(48px) brightness(0.65) saturate(1.35);
  opacity: 0.75;
  background: var(--video-bg);
}
/* Основной canvas — letterbox 9:16 на портретных */
.cinema__video {
  z-index: 1;
  will-change: transform;
  background: transparent;
}
/* Широкий desktop-режим: размытый слой не нужен */
body[data-video="wide"] .cinema__video-bg {
  display: none;
}
.cinema__frames {
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}
body[data-media="frames"] .cinema__frames,
body[data-media="buffering"] .cinema__frames {
  opacity: 1;
}
.cinema__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}
.cinema__frame.is-active { opacity: 1; }
.cinema__frames {
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}
body[data-media="frames"] .cinema__frames,
body[data-media="buffering"] .cinema__frames {
  opacity: 1;
}
.cinema__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}
.cinema__frame.is-active { opacity: 1; }

/* --- Сцены и карточки --- */
.cinema-scene {
  position: relative;
  height: 100vh;
  height: 100dvh;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(52px, 9vh, 88px);
}
.cinema-scene--1, .cinema-scene--3, .cinema-scene--4 { justify-content: center; }
.cinema-scene--2 { justify-content: flex-start; }

.cinema-card {
  width: min(640px, 90vw);
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  animation: forceScenesReveal 0.6s ease 5.5s forwards;
}
.cinema-scene.is-in .cinema-card {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

/* Гарантированный fallback для сцен: если is-in класс не добавился за 5.5 сек, показываем force-fully */
@keyframes forceScenesReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cinema-card--center { text-align: center; }
.cinema-card--left {
  margin-left: clamp(20px, 7vw, 120px);
  text-align: left;
}

.cinema-card__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: #FFFFFF;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.cinema-card__title--hero {
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.15;
}
.cinema-card__sub {
  margin-top: 16px;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
/* Короткая подпись сцены (фраза целиком, без заголовка и описания) */
.cinema-card__caption {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #FFFFFF;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* --- Прогресс кино-акта --- */
.cinema__progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  height: 3px;
  background: var(--line-soft);
}
.cinema__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
}
.cinema__hint {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  z-index: 5;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.60);
  opacity: 0;
  transition: opacity 0.5s;
  text-align: center;
}
.cinema__hint.is-shown { opacity: 1; }

/* --- Градиент нижней трети для читаемости текста --- */
.cinema__bottom-gradient {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60vh;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(4, 6, 10, 0.80) 0%,
    rgba(4, 6, 10, 0.50) 30%,
    rgba(4, 6, 10, 0.18) 60%,
    transparent 100%
  );
}

/* ============ КНОПКИ ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 16px 32px;
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  /* Текст переносится внутри кнопки, кнопка не шире контейнера (масштаб 200%) */
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.btn:active { transform: scale(0.97); }
.btn--dark {
  background: var(--line);
  color: var(--bg);
  border-color: var(--line);
}
.btn--dark:hover {
  background: transparent;
  color: var(--line);
}
.btn--hero { margin-top: 24px; }
.btn--pulse {
  animation: pulse 2s ease-in-out 3;
  margin-top: 28px;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Кнопки поверх тёмного градиента: стеклянный стиль */
.cinema-card .btn--dark {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cinema-card .btn--dark:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--line);
  border-color: white;
}

/* ============================================================
   БИЗНЕС-СЕКЦИИ
   ============================================================ */
.scene {
  position: relative;
  z-index: 5;
  background: var(--bg);
  padding: clamp(88px, 12vh, 140px) 0;
  scroll-margin-top: var(--nav-h);
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

.section-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 16px;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .section-kicker {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--line);
}
.section-lead {
  max-width: 640px;
  margin-top: 18px;
  font-size: 18px;
  color: var(--ink-2);
}

/* Длинные слова переносятся как крайняя мера: без горизонтального переполнения
   и обрезки слов даже при масштабе 200% (критерий приёмки ТЗ v2) */
.cinema-card__title,
.cinema-card__caption,
.cinema-card__sub,
.section-title,
.section-lead,
.about-lead,
.stat-tile__num,
.stat-tile__label,
.s-card h3,
.s-card p,
.site-footer p {
  overflow-wrap: anywhere;
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
/* min-width:0 у сжимаемых grid-элементов — колонки не расширяются длинными словами */
.about-grid > * { min-width: 0; }
.about-text p.about-lead {
  margin-top: 20px;
  font-size: 17px;
}
.about-logo {
  margin-top: 32px;
  width: min(280px, 70%);
  height: auto;
  opacity: 0.92;
}
.about-side { }
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.stat-tile {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 18px 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-tile__num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--line);
  letter-spacing: -0.02em;
}
.stat-tile__label { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
/* Текстовая карточка: не оформляем значение как гигантский числовой счётчик */
.stat-tile--text .stat-tile__num {
  font-size: clamp(17px, 2.6vw, 22px);
  line-height: 1.25;
}

.tools-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.tool-group { margin-bottom: 18px; }
.tool-group__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.tool-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 99px;
  padding: 7px 14px;
}
.tool-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gradient);
}

/* --- Portfolio: фон — спокойное продолжение кино-акта Hero,
   тем же приёмом (размытое голубое свечение + тёмный верхний градиент),
   но статичнее и мягче, чтобы не отвлекать от карточек работ --- */
.scene--portfolio {
  position: relative;
  overflow: hidden;
}
.scene--portfolio .section-inner {
  position: relative;
  z-index: 1;
}
.portfolio-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Эхо нижнего градиента Hero (rgba на базе --line) — тень уходящей сцены */
.portfolio-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22vh;
  background: linear-gradient(to bottom, rgba(11, 14, 20, 0.06), transparent);
}
.portfolio-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  will-change: transform, opacity;
  animation: portfolioGlowBreathe 16s ease-in-out infinite;
}
.portfolio-glow--1 {
  width: 46vw;
  height: 46vw;
  left: -10vw;
  top: -8vw;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), rgba(139, 92, 246, 0.12) 45%, transparent 72%);
}
.portfolio-glow--2 {
  width: 38vw;
  height: 38vw;
  right: -8vw;
  bottom: -6vw;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.16), rgba(139, 92, 246, 0.1) 45%, transparent 72%);
  animation-delay: -8s;
}
@keyframes portfolioGlowBreathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* --- Portfolio: 3D-карусель работ --- */
.pf-stage {
  position: relative;
  height: min(78vh, 720px);
  margin-top: 44px;
  perspective: 1500px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.pf-stage.is-drag { cursor: grabbing; }
.pf-floor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 120vw);
  height: 180px;
  transform: translate(-50%, 40%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.26), rgba(56, 189, 248, 0.12) 55%, transparent);
  filter: blur(18px);
  animation: pfFloorPulse 6s ease-in-out infinite;
}
@keyframes pfFloorPulse {
  50% { opacity: 0.6; transform: translate(-50%, 40%) scaleX(0.92); }
}
.pf-tilt {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  transform: rotateX(-14deg) rotateZ(-9deg);
}
.pf-ring { position: absolute; transform-style: preserve-3d; }

.pf-card {
  position: absolute;
  left: calc(var(--w) / -2);
  top: calc(var(--h) / -2);
  width: var(--w);
  height: var(--h);
  border-radius: 12px;
  overflow: hidden;
  transform-style: preserve-3d;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: 0 20px 50px -20px rgba(11, 14, 20, 0.25);
  transition: filter 0.3s;
}
.pf-card img, .pf-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.pf-card .pf-shade { position: absolute; inset: 0; background: #E4EAF0; pointer-events: none; }
.pf-card .pf-inner { position: absolute; inset: 0; transition: transform 0.28s var(--ease); }
.pf-card:hover .pf-inner, .pf-card.is-active .pf-inner { transform: translateZ(60px) scale(1.06); }
.pf-card:active .pf-inner { transform: translateZ(40px) scale(1.02); transition-duration: 0.12s; }
.pf-card.is-active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent-2), 0 30px 80px -20px rgba(139, 92, 246, 0.5);
}
.pf-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.pf-caption {
  position: relative;
  max-width: 620px;
  margin: -4vh auto 0;
  padding: 0 24px;
  text-align: center;
  min-height: 120px;
  transition: opacity 0.35s, transform 0.35s;
}
.pf-caption.is-hidden { opacity: 0; transform: translateY(10px); }
.pf-caption h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--line);
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.pf-caption p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.6; font-size: 15.5px; }
.pf-tools { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pf-tool {
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-soft);
}

/* --- Portfolio: лайтбокс с видео (FLIP-раскрытие из карточки) ---
   .pf-lightbox всегда живёт вне .pf-stage (perspective там создаёт
   containing block для position:fixed) — вставлена прямым потомком body. */
.pf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}
.pf-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0s;
}
.pf-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.pf-lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.pf-lightbox__close:hover { background: rgba(255, 255, 255, 0.22); }
.pf-lightbox__close:active { transform: scale(0.92); }
.pf-lightbox__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pf-lightbox__stage {
  position: relative;
  width: min(92vw, 640px);
  max-height: 88vh;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.7);
  transform-origin: center;
  will-change: transform;
}
.pf-lightbox__stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* Заглушка карточки — фон - кадры Hero (frame-1..4), сильно размытые
   и приглушённые тёмной подложкой, чтобы надпись читалась: тот же
   приём (blur 48px, тёмный оверлей rgba(4,6,10,.5), белый текст
   с тенью), что уже использован в титрах Hero */
.pf-ph {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  background: #EFF3F7;
}
.pf-ph__bg { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(48px); }
.pf-ph::after { content: ''; position: absolute; inset: 0; background: rgba(4, 6, 10, 0.5); }
.pf-ph b {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  color: #FFFFFF;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* --- Services --- */
.services-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.s-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 26px 22px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.s-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(11, 14, 20, 0.08);
}
.s-card:active {
  transform: translateY(-2px) scale(0.98);
  transition-duration: 0.12s;
}
.s-card__icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(3, 105, 161, 0.22);
  margin-bottom: 18px;
}
.s-card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.s-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--line);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.s-card p { font-size: 14.5px; color: var(--ink-2); }

/* --- Contact --- */
.contact-inner { text-align: center; }
.contact-inner .section-title { margin-bottom: 8px; }
.contact-inner .section-lead { margin-left: auto; margin-right: auto; }
.contact-list {
  margin: 44px auto 0;
  max-width: 620px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px 20px;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.contact-row:hover {
  border-color: rgba(11, 14, 20, 0.4);
  transform: translateX(4px);
}
.contact-row:active {
  transform: translateX(4px) scale(0.98);
  transition-duration: 0.12s;
}
.contact-row__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(3, 105, 161, 0.18);
}
.contact-row__icon svg {
  width: 20px;
  height: 20px;
  fill: var(--accent-ink);
  stroke: none;
}
.contact-row__icon svg[data-stroke] { fill: none; stroke: var(--accent-ink); stroke-width: 1.8; }
.contact-row__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.contact-row__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.contact-row__value {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.contact-row__arrow { color: var(--ink-2); font-size: 16px; }

.site-footer {
  max-width: var(--container);
  margin: clamp(60px, 8vh, 100px) auto 0;
  padding: 40px clamp(20px, 4vw, 32px) 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer__logo { width: 140px; height: auto; opacity: 0.75; }
.site-footer p { font-size: 13.5px; color: var(--ink-2); }
.site-footer__link {
  color: var(--accent-ink);
  text-decoration: none;
  transition: opacity 0.2s;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}
.site-footer__link:hover {
  opacity: 0.75;
  border-bottom-color: var(--accent-ink);
}

/* ============ REVEAL (бизнес-секции) ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  animation: forceReveal 0.6s ease 5s forwards;
}
/* Вертикальный слайд для всех направлений: не создаёт горизонтального overflow */
[data-reveal="left"] { transform: translateY(30px); }
[data-reveal="right"] { transform: translateY(30px); }
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  animation: none;
}

/* Гарантированный fallback: если элемент не получил is-revealed за 5 сек, показываем его force-fully */
@keyframes forceReveal {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============ АДАПТИВ ============ */
/* --- Навигация: сворачиваем по содержимому, ~768–900px уже тесно --- */
@media (max-width: 880px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
}

@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { margin-top: 12px; }
  .cinema-card--left { margin-left: 0; justify-content: center; }
  .cinema-scene--2 { justify-content: center; }
}

@media (max-width: 720px) {
  .services-grid { grid-template-columns: 1fr; }
  .cinema-card__title { font-size: clamp(36px, 11vw, 60px); }
  .cinema-card__title--hero { font-size: clamp(26px, 6.5vw, 38px); }
}

@media (max-width: 700px) {
  .pf-stage { height: 62vh; }
  .pf-caption { margin-top: 0; }

  /* Нативные video-controls на мобильных (AirPlay/PiP/mute-слайдер)
     рисуются в правом верхнем углу видео — переносим крестик закрытия
     влево, чтобы он не перекрывал эту зону и не блокировал тап по звуку. */
  .pf-lightbox__close {
    top: max(12px, env(safe-area-inset-top));
    right: auto;
    left: max(12px, env(safe-area-inset-left));
  }
}

/* ============ СТРАНИЦА ПОЛИТИКИ ============ */
.scene--privacy {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.privacy-content {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding-top: clamp(60px, 8vh, 100px);
  padding-bottom: clamp(60px, 8vh, 100px);
}

.privacy__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--line);
  margin-bottom: 48px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.privacy__body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

.privacy__section {
  margin-bottom: 40px;
}

.privacy__section h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  color: var(--line);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.privacy__section p {
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.privacy__section ul {
  list-style: none;
  padding-left: 0;
  margin: 16px 0 14px;
}

.privacy__section li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.privacy__section li::before {
  content: "•";
  position: absolute;
  left: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 20px;
}

.privacy__section a {
  color: var(--accent-ink);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.privacy__section a:hover {
  opacity: 0.75;
}

.privacy__section--last {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.privacy__date {
  font-size: 14px;
  color: var(--ink-2);
  font-style: italic;
}

.privacy__back {
  margin-top: 52px;
  display: flex;
  gap: 16px;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn--pulse { animation: none; }
  .portfolio-glow { animation: none; }
  .pf-floor { animation: none; }
  .pf-card .pf-inner { transition: none; }
  .pf-lightbox__stage { transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .cinema-card { opacity: 1; transform: none; transition: none; }
  .cinema__frame { transition: opacity 0.3s; }
}