/* ========== TRANSPORT — единый блок (intro + cinema pin + pillars) ========== */
.cinema-block {
  background: #050505;
  position: relative;
}

/* INTRO (title) — сидит на чёрном фоне cinema-block, без своего раздела. */
.cinema-intro {
  padding: clamp(70px, 10vw, 140px) 0 0;
}

/* CINEMA — pin-зона с видео. Top/bottom feather plавно растворяет видео в чёрный. */
.cinema {
  position: relative;
  width: 100%;
  /* 700vh pin = ~7 screens for 15s footage → ~47vh per second of footage. */
  height: 700vh;
  height: 700dvh;
}
.cinema-pin {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.cinema-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cinema-video,
.cinema-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 1;
}
.cinema-canvas[hidden] { display: none; }
/* Full-quality final frame — fades in once animation completes. */
.cinema-final {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  z-index: 2;
}
.cinema.is-finished .cinema-final {
  opacity: 1;
}

/* Feather: video → black gradient на верхнем и нижнем краях (мягкий переход
   в окружающий чёрный фон cinema-block, без видимых границ секций).
   Применяется только на mobile (iOS/Android); на ПК — полноэкранное видео без
   рамок, текст приходит через scroll-driven overlay. */
.cinema-feather {
  position: absolute;
  left: 0;
  right: 0;
  height: 14vh;
  z-index: 3;
  pointer-events: none;
  display: none;
}
html[data-device="ios"] .cinema-feather,
html[data-device="android"] .cinema-feather {
  display: block;
}
.cinema-feather-top {
  top: 0;
  background: linear-gradient(180deg, #050505 0%, rgba(5,5,5,0) 100%);
}
.cinema-feather-bottom {
  bottom: 0;
  height: 18vh;
  background: linear-gradient(0deg, #050505 0%, rgba(5,5,5,0) 100%);
}

/* OVERLAY (desktop only) — title и chips поверх видео, scroll-driven фазы.
   Скрывается на mobile — там используется внешние intro/pillars блоки. */
/* Оверлей с текстом поверх видео убран — анимация чистая на всех устройствах.
   Заголовок и пункты живут в .cinema-pillars под анимацией. */
.cinema-overlay,
.cinema-intro { display: none; }

.cinema-grad {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: var(--grad-opacity, 0);
  background:
    linear-gradient(180deg,
      rgba(0,0,0,0.95) 0%,
      rgba(0,0,0,0.78) 18%,
      rgba(0,0,0,0.18) 36%,
      rgba(0,0,0,0.0) 50%,
      rgba(0,0,0,0.18) 62%,
      rgba(0,0,0,0.85) 84%,
      rgba(0,0,0,0.98) 100%
    );
  transition: opacity 0.2s linear;
}
.cinema-overlay-content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(20px, 3vh, 36px) clamp(28px, 6vw, 96px) clamp(20px, 3vh, 36px);
  opacity: var(--text-opacity, 0);
  transform: translateY(calc(var(--text-shift, 24) * 1px));
  transition: opacity 0.25s linear, transform 0.4s var(--ease);
  will-change: opacity, transform;
  pointer-events: none;
}
.cinema-overlay-top {
  display: grid;
  gap: 14px;
  max-width: 760px;
  align-self: start;
}
.cinema-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.cinema-h2 {
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.cinema-h2-break { display: none; }
.cinema-sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: rgba(245,245,245,0.85);
  margin: 4px 0 0;
  max-width: 540px;
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
.cinema-overlay-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-self: end;
}
.cinema-chip--overlay {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  background: rgba(15,15,15,0.55);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.cinema-chip--overlay b {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.005em;
}
.cinema-chip--overlay span {
  font-size: 13px;
  color: rgba(245,245,245,0.7);
  line-height: 1.45;
}

/* Android: collapse pin-zone (autoplay-once instead of scroll-scrub). */
.cinema.is-android {
  height: 100vh;
  height: 100dvh;
}

/* PILLARS — chips под видео. Без рамок-карточек: линейная панель с разделителями
   столбцов, чтобы выглядела как продолжение видео-блока, а не отдельная секция. */
.cinema-pillars {
  padding: clamp(64px, 8vw, 110px) 0 clamp(80px, 12vw, 140px);
}
.cinema-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cinema-chip {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 30px 26px 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s var(--ease), transform 0.3s var(--ease);
}
.cinema-chip:hover {
  border-color: rgba(200, 168, 110, 0.45);
  transform: translateY(-3px);
}
.cinema-chip-ic {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(200, 168, 110, 0.35);
  border-radius: 8px;
  background: rgba(200, 168, 110, 0.09);
  margin-bottom: 3px;
}
.cinema-chip-ic svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: #c8a86e;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cinema-chip b {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.cinema-chip span {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* stagger появления карточек */
.cinema-chips > [data-reveal-item]:nth-child(1) { transition-delay: 0ms; }
.cinema-chips > [data-reveal-item]:nth-child(2) { transition-delay: 80ms; }
.cinema-chips > [data-reveal-item]:nth-child(3) { transition-delay: 160ms; }
.cinema-chips > [data-reveal-item]:nth-child(4) { transition-delay: 240ms; }

@media (max-width: 860px) {
  .cinema-chips { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .cinema-chips { grid-template-columns: 1fr; }
}
