/* =========================================================
   КосмоПати — стили
   Десктоп-макет: 1480×865, контейнер 1158px
   ========================================================= */

:root {
  --container: 1158px;
  --design-h: 865px;
  /* одинаковое расстояние между всеми блоками */
  --section-space: 120px;
  /* насколько полоса преимуществ выходит за края контейнера */
  --bleed: max(60px, calc((100vw - var(--container)) / 2 + 60px));

  --white: #fff;
  --pink: #ff64ed;
  --glass-bg: rgba(21, 21, 21, 0.3);
  --glass-border: rgba(255, 255, 255, 0.2);

  --grad-primary: linear-gradient(104.77deg, #f13cff 0.66%, #a250ff 50.81%, #67c9fc 100%);
  --grad-secondary: linear-gradient(90deg, #142582 0%, #1d3580 50%, #1d3580 100%);
  --grad-offer: linear-gradient(90deg, #0d195c 0%, #2c3aaf 50%, #0d195c 100%);

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- База ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  position: relative;
  margin: 0;
  /* мелкие тусклые звёзды — неподвижный слой, нагрузки не добавляет */
  background-color: #000;
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 90px 140px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.2px 1.2px at 160px 70px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 210px 190px, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 50px 220px, rgba(190, 170, 255, 0.5), transparent),
    radial-gradient(1px 1px at 130px 250px, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.1px 1.1px at 250px 110px, rgba(160, 220, 255, 0.45), transparent);
  background-size: 270px 270px;
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Яркие звёзды: два слоя медленно и едва заметно мерцают вразнобой.
   Слои начинаются под первым экраном: там свой фон, и мерцание
   не заставляет браузер пересчитывать размытия шапки и полосы преимуществ. */
body::before,
body::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: max(100vh, var(--design-h));
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

body::before {
  background-image:
    radial-gradient(2px 2px at 40px 60px, #fff, transparent),
    radial-gradient(1.4px 1.4px at 130px 190px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.6px 1.6px at 250px 90px, #fff, transparent),
    radial-gradient(1.2px 1.2px at 330px 280px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 190px 330px, #f13cff, transparent),
    radial-gradient(1.5px 1.5px at 360px 20px, #fff, transparent),
    radial-gradient(1.3px 1.3px at 80px 300px, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.8px 1.8px at 290px 370px, #67c9fc, transparent);
  background-size: 400px 400px;
  animation: twinkle 9s ease-in-out infinite alternate;
}

body::after {
  background-image:
    radial-gradient(1.8px 1.8px at 70px 420px, #fff, transparent),
    radial-gradient(1.3px 1.3px at 300px 40px, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(2px 2px at 460px 250px, #67c9fc, transparent),
    radial-gradient(1.5px 1.5px at 520px 480px, #fff, transparent),
    radial-gradient(1.2px 1.2px at 180px 520px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.6px 1.6px at 400px 130px, #fff, transparent),
    radial-gradient(1.9px 1.9px at 120px 90px, #f13cff, transparent),
    radial-gradient(1.4px 1.4px at 540px 330px, rgba(255, 255, 255, 0.9), transparent);
  background-size: 580px 580px;
  animation: twinkle 13s ease-in-out 3s infinite alternate-reverse;
}

/* пока открыт просмотр фото, звёзды не мерцают */
.is-locked body::before,
.is-locked body::after {
  animation-play-state: paused;
}

@keyframes twinkle {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
    opacity: 0.6;
  }
}

img {
  display: block;
  max-width: none;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* =========================================================
   Блок 1. Первый экран
   ========================================================= */

.hero {
  position: relative;
  isolation: isolate;
  height: 100vh;
  min-height: var(--design-h);
  overflow: hidden;
}

/* Фон */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  width: max(1670px, 100%);
  height: max(940px, 100%);
  object-fit: cover;
}

/* Размытая копия фона в левой части.
   Заменяет живой backdrop-filter: картинка размывается один раз,
   а не пересчитывается в каждом кадре при прокрутке. */
.hero__bg--blur {
  z-index: 1;
  -webkit-mask-image: linear-gradient(to right, #000 calc(50% - 168px), transparent calc(50% + 92px));
  mask-image: linear-gradient(to right, #000 calc(50% - 168px), transparent calc(50% + 92px));
}

.hero__bg--blur img {
  filter: blur(10px);
}

/* Затемнение левой части фона */
.hero__shade {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: calc(min(0px, 50% - 740px) - 95px);
  right: calc(50% - 92px);
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3));
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 260px);
  mask-image: linear-gradient(to left, transparent 0, #000 260px);
}

/* мягкий переход от первого экрана к чёрному фону страницы */
.hero::after {
  content: '';
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000);
  pointer-events: none;
}

/* Сцена: всё позиционируется по координатам макета внутри контейнера */
.hero__stage {
  position: absolute;
  left: 0;
  right: 0;
  top: max(0px, calc((100% - var(--design-h)) / 2));
  width: var(--container);
  height: var(--design-h);
  margin-inline: auto;
}

/* ---------- Шапка ---------- */

/* плавающая шапка: всегда сверху экрана при прокрутке */
.header {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 0;
  right: 0;
  width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 26px;
  border-radius: 20px;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* после начала прокрутки шапка плотнее, чтобы текст читался поверх фото */
.header.is-scrolled {
  background-color: rgba(10, 12, 36, 0.78);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header__burger {
  display: none;
}

.header__logo img {
  width: 170px;
  height: 26.82px;
}

.header__address {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  line-height: 0.987;
}

.header__address img {
  width: 26px;
  height: 26px;
}

.header__address div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 187px;
}

.header__hours {
  opacity: 0.5;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 12px;
  line-height: 0.987;
  letter-spacing: 1.44px;
  text-transform: uppercase;
  white-space: nowrap;
}

.header__nav a,
.header__phone {
  position: relative;
  transition: color 0.3s var(--ease);
}

.header__nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 1.44px;
  bottom: -6px;
  height: 1px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.header__nav a:hover {
  color: var(--pink);
}

.header__nav a:hover::after {
  transform: scaleX(1);
}

.header__phone {
  font-size: 14px;
  font-weight: 700;
  line-height: 0.987;
  letter-spacing: 1.68px;
  white-space: nowrap;
}

.header__phone:hover {
  color: var(--pink);
}

/* ---------- Ребята ---------- */

.hero__guys {
  position: absolute;
  z-index: 2;
  left: 431.85px;
  top: 76.36px;
  width: 855.15px;
  height: 481.28px;
  object-fit: cover;
  pointer-events: none;
}

/* ---------- Заголовок и плашки ---------- */

.hero__intro {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 128px;
  width: 558.87px;
}

.hero__age {
  position: absolute;
  left: 2px;
  top: -14px;
  rotate: -8deg;
  transform-origin: left bottom;
}

/* плашка с градиентной рамкой («от 7 лет») */
.badge {
  display: inline-block;
  padding: 6px 13px 6px;
  border: 1px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(rgba(21, 21, 21, 0.55), rgba(21, 21, 21, 0.55)) padding-box,
    var(--grad-primary) border-box;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.44px;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__title {
  margin: 0;
}

.hero__title img {
  width: 558.87px;
  height: 207.5px;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 470px;
  margin-top: 28px;
}

/* фон под плашками уже размыт, поэтому своё размытие им не нужно */
.tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px 7px 7px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass-bg);
  font-size: 14px;
  line-height: 0.987;
  white-space: nowrap;
}

.tag__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.tag__icon img {
  width: 21px;
  height: 21px;
}

/* ---------- Кнопка play на первом экране ---------- */

/* слой того же размера, что и картинка с ребятами: кнопка стоит у руки мальчика */
.hero__video {
  position: absolute;
  z-index: 4;
  left: 431.85px;
  top: 76.36px;
  width: 855.15px;
  height: 481.28px;
  pointer-events: none;
}

.hero__play {
  position: absolute;
  left: 13.5%;
  top: 63%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: 0 10px 30px rgba(241, 60, 255, 0.5);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

/* треугольник */
.hero__play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 28px;
  margin: -14px 0 0 -9px;
  background: var(--white);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* мягкая пульсирующая волна вокруг кнопки */
.hero__play::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(241, 60, 255, 0.8);
  border-radius: 50%;
  animation: play-pulse 2.4s var(--ease) infinite;
  pointer-events: none;
}

.hero__play:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 40px rgba(241, 60, 255, 0.7);
}

.hero__play:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

@keyframes play-pulse {
  0%   { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__play::after {
    animation: none;
  }
}

/* ---------- Полоса преимуществ ---------- */

.features {
  position: absolute;
  z-index: 5;
  top: 496px;
  left: calc(-1 * var(--bleed));
  right: calc(-1 * var(--bleed));
  height: 118px;
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.features__list {
  position: absolute;
  top: 29px;
  left: calc(var(--bleed) - 1px);
  width: var(--container);
  display: flex;
  justify-content: space-between;
}

.feature {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.feature__circle {
  flex: none;
  width: 59px;
  height: 59px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg);
}

.feature__img {
  position: absolute;
  pointer-events: none;
  transition: transform 0.5s var(--ease);
}

/* при наведении картинка преимущества приподнимается (только на устройствах с мышью) */
@media (hover: hover) {
  .feature:hover .feature__img {
    transform: translateY(-4px) scale(1.08);
  }
}

.feature__text {
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
}

.feature__text b {
  font-weight: 700;
}

.feature--1 .feature__img { left: -3px;     top: -3px;     width: 64px;     height: 64px; }
.feature--2 .feature__img { left: -17.08px; top: -4.16px;  width: 86.15px;  height: 69.33px; }
.feature--3 .feature__img { left: -11.71px; top: -1.23px;  width: 83.76px;  height: 67.42px; }
.feature--4 .feature__img { left: -7px;     top: -6px;     width: 72px;     height: 67px; }
.feature--5 .feature__img { left: -20.9px;  top: -16.91px; width: 105.97px; height: 93.35px; }

/* ---------- Оффер ---------- */

/* фон у полосы непрозрачный, поэтому без размытия */
.offer {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 633px;
  width: var(--container);
  height: 136px;
  display: flex;
  align-items: center;
  padding: 0 24px 0 187px;
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  background: var(--grad-offer);
}

.offer__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 276px;
}

.offer__title {
  font-size: 21.157px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.accent {
  color: var(--pink);
}

.offer__note {
  font-size: 12px;
  line-height: 1.35;
}

.offer__actions {
  display: flex;
  gap: 7.74px;
  margin-left: auto;
}

/* ---------- Кнопки ---------- */

.btn {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.82px;
  height: 87.24px;
  border: 0.764px solid var(--glass-border);
  border-radius: 30px;
  line-height: 0.987;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.35s var(--ease);
}

.btn__title {
  font-size: 21.39px;
  font-weight: 900;
  text-transform: uppercase;
}

.btn__sub {
  font-size: 12.223px;
}

.btn--primary {
  width: 290.2px;
  background: var(--grad-primary);
}

.btn--secondary {
  width: 344.2px;
  background: var(--grad-secondary);
}

/* блик, пробегающий по главной кнопке (через transform — считается на видеокарте) */
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-150%) skewX(-20deg);
  animation: shine 5s var(--ease) 2.5s infinite;
  pointer-events: none;
}

/* эффекты наведения — только там, где есть мышь: на телефоне «залипший» hover
   сдвигал кнопку, и первое касание уходило на наведение вместо нажатия */
@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
  }

  .btn--primary:hover {
    box-shadow: 0 12px 34px rgba(241, 60, 255, 0.45);
    filter: brightness(1.07);
  }

  .btn--secondary:hover {
    box-shadow: 0 12px 34px rgba(44, 58, 175, 0.55);
    filter: brightness(1.2);
  }
}

.btn:active {
  transform: translateY(0);
}

/* ---------- Подарок и планета ---------- */

.hero__gift {
  position: absolute;
  z-index: 7;
  left: -24px;
  top: 600.5px;
  width: 195px;
  height: 195px;
  pointer-events: none;
}

.hero__planet {
  position: absolute;
  z-index: 6;
  left: calc(min(0px, 50% - 740px) - 95px);
  bottom: -76px;
  width: 417px;
  height: 362px;
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
  /* планета растворяется к низу экрана, без резкого среза */
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 79%);
  mask-image: linear-gradient(to bottom, #000 50%, transparent 79%);
}

/* ---------- Подсказка «прокрутите вниз» ---------- */

.scroll-hint {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 40px;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}

.scroll-hint img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  animation: nudge 2.2s ease-in-out infinite;
}

.scroll-hint:hover {
  color: var(--white);
}

/* =========================================================
   Общие элементы разделов
   ========================================================= */

.section-title {
  margin: 0;
  font-size: 56px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.5px;
}

.text-gradient {
  background: linear-gradient(90deg, #f13cff 0%, #a250ff 50%, #67c9fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Цветные подсветки разделов.
   Градиент гаснет ровно к краю своего пятна, а разделы
   обрезают только по горизонтали — поэтому краёв не видно */
.gallery::before,
.gallery::after,
.program::before,
.program::after {
  content: '';
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.gallery > *,
.program > * {
  position: relative;
  z-index: 1;
}

/* Появление при прокрутке */
.js .on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s var(--ease) var(--d, 0s),
    transform 0.9s var(--ease) var(--d, 0s);
}

.js .on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

/* Бегущая строка: сама анимация задаётся в main.js */
.marquee {
  overflow: hidden;
}

.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marquee__set {
  display: flex;
  flex: none;
  align-items: center;
}

/* =========================================================
   Блок 2. Галерея
   ========================================================= */

.gallery {
  position: relative;
  /* ленты наклонены, поэтому визуально отступ сверху совпадает с остальными */
  padding: calc(var(--section-space) - 30px) 0 calc(var(--section-space) - 12px);
  overflow-x: clip;
}

.gallery::before {
  left: -260px;
  top: 8%;
  width: 1000px;
  height: 820px;
  background: radial-gradient(closest-side, rgba(162, 80, 255, 0.2), transparent);
}

.gallery::after {
  right: -300px;
  top: 45%;
  width: 1100px;
  height: 820px;
  background: radial-gradient(closest-side, rgba(103, 201, 252, 0.1), transparent);
}

/* ---------- Ленты ---------- */

.ribbons {
  height: 150px;
  margin-bottom: 40px;
}

.ribbon {
  position: absolute;
  top: 50%;
  left: -4%;
  right: -4%;
  height: 56px;
  margin-top: -28px;
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ribbon .marquee__set {
  gap: 26px;
  padding-right: 26px;
}

.ribbon i {
  font-size: 18px;
  font-style: normal;
}

.ribbon--back {
  rotate: 3deg;
  border-block: 1px solid var(--glass-border);
  background: rgba(21, 21, 21, 0.35);
  color: rgba(255, 255, 255, 0.85);
}

.ribbon--back i {
  color: var(--pink);
}

.ribbon--front {
  rotate: -2.5deg;
  background: var(--grad-primary);
  box-shadow: 0 12px 40px rgba(241, 60, 255, 0.35);
}

/* ---------- Заголовок раздела ---------- */

.gallery__head {
  width: var(--container);
  margin: 0 auto 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

/* ---------- Ленты фото ---------- */

.gallery__row {
  padding-block: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.gallery__row .marquee__set {
  gap: 16px;
  padding-right: 16px;
}

.photo {
  position: relative;
  flex: none;
  display: block;
  height: 300px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  background: #10132e;
  cursor: zoom-in;
  transition: box-shadow 0.45s var(--ease);
}

.photo--l {
  width: 450px;
}

.photo--p {
  width: 200px;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

/* рамка поверх фото */
.photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid var(--glass-border);
  border-radius: inherit;
  pointer-events: none;
  transition: border-color 0.45s var(--ease);
}

/* затемнение снизу при наведении */
.photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(13, 25, 92, 0) 45%, rgba(13, 25, 92, 0.6));
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

/* кружок с плюсом */
.photo__zoom {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(21, 21, 21, 0.45);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.photo__zoom::before,
.photo__zoom::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  margin: -1px 0 0 -9px;
  border-radius: 2px;
  background: var(--white);
}

.photo__zoom::after {
  rotate: 90deg;
}

.photo:hover {
  box-shadow: 0 8px 24px rgba(241, 60, 255, 0.35);
}

.photo:hover img {
  transform: scale(1.07);
}

.photo:hover::before {
  border-color: rgba(241, 60, 255, 0.8);
}

.photo:hover::after,
.photo:hover .photo__zoom {
  opacity: 1;
}

.photo:hover .photo__zoom {
  transform: none;
}

.photo:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: -2px;
}

/* =========================================================
   Блок 3. Программа
   ========================================================= */

.program {
  position: relative;
  padding: 0 0 var(--section-space);
  overflow-x: clip;
}

.program::before {
  right: -320px;
  top: -12%;
  width: 1000px;
  height: 800px;
  background: radial-gradient(closest-side, rgba(241, 60, 255, 0.1), transparent);
}

.program::after {
  left: -340px;
  top: 40%;
  width: 1000px;
  height: 820px;
  background: radial-gradient(closest-side, rgba(44, 58, 175, 0.32), transparent);
}

.program__inner {
  width: var(--container);
  margin: 0 auto;
}

.program__title {
  margin-bottom: 48px;
}

/* ---------- Этап ---------- */

/* без заливки: только обводка, которая растворяется вправо */
.stage {
  position: relative;
  padding: 40px;
  border-radius: 40px; /* для подсветки при переходе с плашки «Квесты» */
}

.stage::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 40px;
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 100%);
  mask-image: linear-gradient(to right, #000 45%, transparent 100%);
  pointer-events: none;
}

/* колонка пунктов узкая — каждый пункт ровно в две строки, без висящих хвостов */
.stage__head {
  display: grid;
  grid-template-columns: auto 1fr 380px;
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
}

/* иконка этапа с номером (исходник 534×400) и лёгким свечением */
.stage__image {
  width: 227px;
  height: 170px;
  filter: drop-shadow(0 0 18px rgba(241, 60, 255, 0.4));
}

.stage__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.stage__title {
  margin: 0;
  font-size: 44px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

/* время — отдельная белая плашка с иконкой часов */
.stage__time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 9px 12px;
  border-radius: 20px;
  background: var(--white);
  color: #0d1238;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.stage__time img {
  width: 22px;
  height: 22px;
}

.stage__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 15px;
  line-height: 1.45;
  text-wrap: balance; /* строки пункта одинаковой длины */
}

.stage__list b {
  font-weight: 700;
}
.stage__list li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stage__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg);
}

.stage__icon img {
  width: 24px;
  height: 24px;
}

/* подпись над рядом карточек и подсказка про листание */
.stage__choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.stage__label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.68px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.68px;
  text-transform: uppercase;
  color: var(--pink);
}

.scroll-cue[hidden] {
  display: none;
}

/* палец слегка «листает» вправо-влево */
.scroll-cue__finger {
  width: 24px;
  height: 24px;
  animation: swipe-hint 1.8s ease-in-out infinite;
}

@keyframes swipe-hint {
  0%, 100% { translate: 4px 0; }
  50%      { translate: -6px 0; }
}

/* ---------- Карточки игр ---------- */

/* Горизонтальный ряд: тянется до краёв экрана, карточки стоят по сетке контейнера
   и уезжают за край; листается перетаскиванием мышью (main.js), тачпадом или пальцем */
.games {
  --row-bleed: calc(max(0px, (100vw - var(--container)) / 2) + 40px);
  position: relative; /* карточки ложатся поверх обводки этапа */
  display: flex;
  gap: 16px;
  margin-inline: calc(-1 * var(--row-bleed));
  padding-inline: var(--row-bleed);
  /* место под тень карточек: иначе прокручиваемый ряд её обрежет */
  margin-block: -12px -36px;
  padding-block: 12px 36px;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.games::-webkit-scrollbar {
  display: none;
}

.games.is-dragging {
  cursor: grabbing;
}

.games img {
  -webkit-user-drag: none;
}

/* рамка-карточка, внутри скруглённое фото */
.game {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  /* непрозрачный фон: при листании сквозь карточку не просвечивает обводка этапа */
  background: #101224;
  box-shadow: 0 12px 28px rgba(44, 58, 175, 0.3);
}

.game__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 35%, rgba(162, 80, 255, 0.45), transparent 65%),
    linear-gradient(160deg, #262c86, #11144a);
}

/* заглушка, пока нет фото (как в прототипе) */
.slider__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  font-size: 12px;
  letter-spacing: 1.44px;
  text-align: center;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* большое фото этапа (Перекус, Кульминация) — тоже слайдер со стрелками */
.stage__photo {
  position: relative;
  height: 420px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 40%, rgba(162, 80, 255, 0.45), transparent 60%),
    linear-gradient(160deg, #262c86, #11144a);
}

/* расстояние между этапами */
.stage + .stage {
  margin-top: 32px;
}

.game__body {
  flex: 1;
  padding: 18px 12px 12px;
}

.game__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
}

.game__text {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.75);
}

/* ---------- Слайдер фото в карточке ---------- */

.slider__track {
  display: flex;
  height: 100%;
  transition: transform 0.5s var(--ease);
}

.slider__slide {
  flex: 0 0 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: #0e1238;
  cursor: pointer;
}

.slider__nav[hidden] {
  display: none;
}

.slider__nav img {
  width: 20px;
  height: 20px;
}

.slider__nav--prev {
  left: 10px;
}

.slider__nav--prev img {
  rotate: 90deg;
}

.slider__nav--next {
  right: 10px;
}

.slider__nav--next img {
  rotate: -90deg;
}

/* подсветка блока после перехода с плашки первого экрана */
.is-highlighted {
  animation: highlight 1.8s var(--ease);
}

/* =========================================================
   Блок 6. Форма «Закрепите скидку»
   ========================================================= */

.booking {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 80vh; /* по ТЗ блок на 80% высоты экрана */
  padding: 0 0 var(--section-space);
  overflow-x: clip;
}

/* большой фон: космос с первого экрана, приглушён и растворяется сверху и снизу */
.booking::before {
  content: '';
  position: absolute;
  inset: 0 0 var(--section-space);
  background: url('../assets/img/bg-hero-1600.webp') center / cover no-repeat;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
  pointer-events: none;
}

.booking__inner {
  position: relative;
  z-index: 1;
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 561px 1fr;
  gap: 40px;
  align-items: center;
}

/* телефон — кнопка: по клику открывается видео */
.booking__phone {
  display: block;
  width: 561px;
  height: 590px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.booking__phone img {
  width: 100%;
  height: 100%;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

.booking__phone:hover img {
  transform: scale(1.03) rotate(-1.5deg);
  filter: drop-shadow(0 0 36px rgba(241, 60, 255, 0.45));
}

.booking__phone:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
  border-radius: 40px;
}

.booking__card {
  padding: 48px;
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  background: linear-gradient(160deg, #141b5a 0%, #0d1238 60%, #0a0c24 100%);
  box-shadow: 0 20px 50px rgba(44, 58, 175, 0.35);
}

.booking__title {
  margin: 0 0 10px;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.5px;
}

.booking__note {
  margin-bottom: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.booking__text {
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  text-wrap: balance;
}

.booking__form {
  display: flex;
  flex-direction: column;
}

.booking__form[hidden] {
  display: none;
}

.booking__label {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.68px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.booking__input {
  height: 64px;
  margin-bottom: 16px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 30px; /* как у кнопок сайта */
  background: var(--white);
  color: #0d1238;
  font: 400 20px/1 var(--font);
  letter-spacing: 0.5px;
  outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.booking__input::placeholder {
  color: rgba(13, 18, 56, 0.4);
}

.booking__input:focus {
  border-color: #f13cff;
  box-shadow: 0 0 0 4px rgba(241, 60, 255, 0.25);
}

/* <button> не наследует цвет и шрифт страницы — задаём явно */
.booking__submit {
  width: 100%;
  height: 72px;
  color: var(--white);
  font-family: inherit;
  cursor: pointer;
}

.booking__submit .btn__title {
  font-size: 18px;
}

.booking__success {
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--white);
  color: #0d1238;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.booking__success[hidden] {
  display: none;
}

/* ---------- Согласие на обработку данных ---------- */

.consent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

/* настоящий чекбокс скрыт, но остаётся доступным с клавиатуры и для проверки формы */
.consent__input {
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0;
  opacity: 0;
}

.consent__box {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.consent__box::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
  opacity: 0;
}

.consent__input:checked + .consent__box {
  border-color: transparent;
  background: var(--grad-primary);
}

.consent__input:checked + .consent__box::after {
  opacity: 1;
}

.consent__input:focus-visible + .consent__box {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.consent a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent a:hover {
  color: var(--pink);
}

/* =========================================================
   Видео в попапе
   ========================================================= */

.video-popup__player {
  max-width: 100%;
  max-height: 100%;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 80px rgba(162, 80, 255, 0.25);
}

.video-popup__player[hidden],
.video-popup__empty[hidden] {
  display: none;
}

.video-popup__frame {
  position: relative;
  height: min(100%, 86vh);
  aspect-ratio: 9 / 16;
  max-width: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 80px rgba(162, 80, 255, 0.25);
}

.video-popup__frame[hidden] {
  display: none;
}

.video-popup__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-popup__empty {
  padding: 28px 40px;
  border-radius: 24px;
  background: var(--white);
  color: #0d1238;
  font-size: 18px;
  font-weight: 700;
}

/* =========================================================
   Блок 7. Другие пакеты
   ========================================================= */

.packages {
  position: relative;
  padding: 0 0 var(--section-space);
}

.packages__inner {
  width: var(--container);
  margin: 0 auto;
}

/* заголовок слева, подсказка «листайте влево» справа */
.packages__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.packages__title {
  margin-bottom: 0;
}

/* пакеты крупные, чтобы текст на них читался; ряд листается и выходит к краям экрана */
.packages__list {
  --row-bleed: max(0px, (100vw - var(--container)) / 2);
  display: flex;
  gap: 24px;
  margin-inline: calc(-1 * var(--row-bleed));
  padding-inline: var(--row-bleed);
  /* место под тень и подъём карточки при наведении */
  margin-block: -12px -36px;
  padding-block: 12px 36px;
  overflow-x: auto;
  scroll-padding-inline: var(--row-bleed);
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.packages__list::-webkit-scrollbar {
  display: none;
}

.packages__list.is-dragging {
  cursor: grabbing;
}

.packages__list img {
  -webkit-user-drag: none;
}

.package {
  flex: 0 0 400px;
}

.package {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* вертикальная картинка пакета: пропорции как у макетов пакетов (1122×1402) */
.package__image {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 1122 / 1402;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font: inherit;
  color: inherit;
  background:
    radial-gradient(circle at 50% 40%, rgba(162, 80, 255, 0.45), transparent 60%),
    linear-gradient(160deg, #262c86, #11144a);
  box-shadow: 0 12px 28px rgba(44, 58, 175, 0.3);
}

/* картинка целиком, без обрезки */
.package__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* картинку можно открыть крупно */
button.package__image {
  cursor: zoom-in;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

button.package__image:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(44, 58, 175, 0.45);
}

button.package__image:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.package__btn {
  width: 100%;
  height: 72px;
}

.package__btn .btn__title {
  font-size: 18px;
}

/* =========================================================
   Блок 8. Остались вопросы + подвал
   ========================================================= */

/* общая обёртка: ракета заходит и на блок вопросов, и на подвал */
/* overflow: hidden не даёт ракете и засветам удлинять страницу.
   Блок заранее расширен вверх на 240px (margin/padding), чтобы свечение формы
   и засветы плавно заходили на блок пакетов, а не обрезались резкой границей.
   Расширенная часть прозрачна для кликов — кнопки пакетов нажимаются. */
.finale {
  position: relative;
  overflow: hidden;
  margin-top: -240px;
  padding-top: 240px;
  pointer-events: none;
}

.finale > * {
  pointer-events: auto;
}

/* засветы: розово-фиолетовый за ракетой, голубой и розовый за формой.
   Пятна гаснут к краю сами (closest-side), поэтому границ не видно */
.finale::before,
.finale::after,
.question::before,
.question::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}

/* за ракетой — тёплое розовое свечение от пламени */
.finale::before {
  left: calc(50% - var(--container) / 2 - 220px);
  top: 320px;
  width: 1000px;
  height: 900px;
  background: radial-gradient(closest-side, rgba(241, 60, 255, 0.32), rgba(162, 80, 255, 0.14) 55%, transparent);
}

/* низ подвала — глубокий синий «горизонт» */
.finale::after {
  left: 50%;
  bottom: -420px;
  width: 1900px;
  height: 760px;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgba(44, 58, 175, 0.45), rgba(13, 25, 92, 0.2) 60%, transparent);
}

/* за формой — голубой засвет справа сверху */
.question::before {
  right: calc(50% - var(--container) / 2 - 260px);
  top: -200px;
  width: 900px;
  height: 800px;
  background: radial-gradient(closest-side, rgba(103, 201, 252, 0.22), rgba(44, 58, 175, 0.12) 55%, transparent);
}

/* и небольшой розовый акцент под левым нижним углом формы */
.question::after {
  left: calc(50% - var(--container) / 2 + 460px);
  top: 260px;
  width: 520px;
  height: 420px;
  background: radial-gradient(closest-side, rgba(241, 60, 255, 0.22), transparent);
}

/* ракета от верха карточки вопросов до низа страницы;
   слой выше серых линий подвала, но ниже текста */
.finale__rocket {
  position: absolute;
  z-index: 2;
  /* пламя проходит между описанием и реквизитами подвала */
  left: calc(50% - var(--container) / 2);
  top: 230px;
  width: 696px;
  height: 869px;
  pointer-events: none;
}

.question {
  position: relative;
  padding: 0 0 var(--section-space);
}

.question__card {
  position: relative;
  z-index: 3;
  /* свечение по краю формы */
  box-shadow:
    0 20px 50px rgba(44, 58, 175, 0.35),
    0 0 90px rgba(162, 80, 255, 0.28);
}

/* тонкая градиентная кромка сверху: обе формы, карточки игр, картинки пакетов */
.booking__card,
.game,
.package {
  position: relative;
}

.booking__card::before,
.game::before,
.package::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -1px;
  left: 48px;
  right: 48px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #f13cff 30%, #67c9fc 70%, transparent);
  opacity: 0.9;
  pointer-events: none;
}

/* у небольших карточек кромка ближе к краям */
.game::before,
.package::before {
  left: 32px;
  right: 32px;
}

.question__inner {
  width: var(--container);
  margin: 0 auto;
  display: grid;
  /* узкая колонка: заголовок формы ровно в две строки */
  grid-template-columns: 1fr 540px;
}

.question__card {
  grid-column: 2;
}

/* ---------- Подвал ---------- */

.footer {
  position: relative;
  padding: 48px 0 40px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.footer__inner {
  width: var(--container);
  margin: 0 auto;
}

/* реквизиты сдвинуты вправо — между ними и логотипом проходит ракета */
.footer__top {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr 240px auto;
  gap: 40px;
  padding-bottom: 32px;
}

/* серые линии подвала — отдельным слоем под ракетой */
.footer::before,
.footer__top::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.footer::before {
  top: 0;
}

.footer__top::after {
  bottom: 0;
}

/* текст подвала поверх ракеты */
.footer__brand,
.footer__requisites,
.footer__contacts,
.footer__bottom {
  position: relative;
  z-index: 3;
}

.footer__brand img {
  width: 170px;
  height: 27px;
  margin-bottom: 14px;
}

.footer__brand p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.footer__requisites {
  grid-column: 3;
}

.footer__label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.44px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.footer__muted {
  color: rgba(255, 255, 255, 0.5);
}

.footer__contacts {
  grid-column: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.footer__phone {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.footer__phone:hover,
.footer__links a:hover {
  color: var(--pink);
}

/* ссылка на разработчика — максимально незаметная */
.footer__dev {
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
}

.footer__dev:hover {
  color: rgba(255, 255, 255, 0.5);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.footer__links {
  display: flex;
  gap: 24px;
}



/* =========================================================
   Просмотр фото
   ========================================================= */

html.is-locked {
  overflow: hidden;
}

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  overflow: hidden;
}

.lightbox[open] {
  animation: fade 0.3s var(--ease);
}

.lightbox::backdrop {
  background: rgba(3, 4, 14, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.lightbox__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* фото почти на весь экран: сверху/снизу небольшой отступ, по бокам место под стрелки */
  padding: 24px 110px;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 80px rgba(162, 80, 255, 0.25);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__img.is-loaded {
  opacity: 1;
  transform: none;
}

.lightbox__nav,
.lightbox__close {
  position: absolute;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(21, 21, 21, 0.4);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.lightbox__nav:hover,
.lightbox__close:hover {
  background-color: rgba(241, 60, 255, 0.2);
  border-color: rgba(241, 60, 255, 0.7);
}

.lightbox__nav {
  top: 50%;
  margin-top: -28px;
}

.lightbox__nav img {
  width: 24px;
  height: 24px;
}

.lightbox__nav--prev {
  left: 40px;
}

.lightbox__nav--prev img {
  rotate: 90deg;
}

.lightbox__nav--next {
  right: 40px;
}

.lightbox__nav--next img {
  rotate: -90deg;
}

.lightbox__close {
  top: 24px;
  right: 40px;
}

.lightbox__close::before,
.lightbox__close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2px;
  margin: -1px 0 0 -10px;
  border-radius: 2px;
  background: var(--white);
  rotate: 45deg;
}

.lightbox__close::after {
  rotate: -45deg;
}

/* одно фото — листать нечего */
.lightbox.is-single .lightbox__nav {
  display: none;
}

/* =========================================================
   Анимации
   ========================================================= */

@keyframes rise {
  from { opacity: 0.01; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@keyframes drop {
  from { opacity: 0.01; transform: translateY(-16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0.01; }
  to   { opacity: 1; }
}

@keyframes bg-in {
  from { opacity: 0.01; scale: 1.06; }
  to   { opacity: 1; scale: 1; }
}

@keyframes guys-in {
  from { opacity: 0.01; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@keyframes gift-in {
  from { opacity: 0.01; transform: translateY(30px) rotate(-10deg) scale(0.8); }
  to   { opacity: 1; transform: none; }
}

/* покачивание на отдельных свойствах translate/rotate: не пересекается
   с transform у появления, поэтому браузер считает его на видеокарте */
@keyframes float {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50%      { translate: 0 -10px; rotate: -2deg; }
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

@keyframes shine {
  0%        { transform: translateX(-150%) skewX(-20deg); }
  40%, 100% { transform: translateX(350%) skewX(-20deg); }
}

@keyframes highlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(241, 60, 255, 0); }
  20%, 65% { box-shadow: 0 0 0 3px rgba(241, 60, 255, 0.9), 0 0 40px rgba(241, 60, 255, 0.45); }
}

/* Элементы первого экрана скрыты, пока не загрузились шрифты (только при включённом JS).
   Не 0, а 1 %: глазом не видно, но браузер засчитывает отрисовку (важно для PageSpeed) */
.js .reveal,
.js .hero__gift {
  opacity: 0.01;
}

/* Фон и ведущие шрифтов не ждут: это картинки, и по ним измеряется скорость загрузки */
.js .hero__bg.reveal,
.js .hero__guys.reveal {
  opacity: 1;
  animation: var(--anim, rise) var(--dur, 0.9s) var(--ease) var(--d, 0s) both;
}

.is-ready .reveal {
  animation: var(--anim, rise) var(--dur, 0.9s) var(--ease) var(--d, 0s) both;
}

.is-ready .hero__gift {
  animation:
    gift-in 1s var(--ease) 0.9s both,
    float 6s ease-in-out 1.9s infinite;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .hero__gift,
  .js .on-scroll {
    opacity: 1;
    transform: none;
  }

  .is-ready .reveal,
  .is-ready .hero__gift,
  .btn--primary::after,
  .scroll-hint img,
  .scroll-cue__finger {
    animation: none;
  }

  .js .on-scroll,
  .slider__track {
    transition: none;
  }

  .gallery__row {
    overflow-x: auto;
  }
}

/* =========================================================
   Градиентная кромка сверху у круглых и маленьких элементов:
   шапка, плашки времени, иконки пунктов, кружки преимуществ.
   Рамка рисуется маской: видна только верхняя часть,
   к бокам и вниз плавно гаснет.
   ========================================================= */

.stage__icon,
.feature__circle,
.stage__time {
  position: relative;
}

.header::after,
.stage__icon::after,
.feature__circle::after,
.stage__time::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 6%, #f13cff 36%, #67c9fc 64%, transparent 94%);
  -webkit-mask:
    linear-gradient(to bottom, #000, transparent 60%),
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: source-in, xor;
  mask:
    linear-gradient(to bottom, #000, transparent 60%),
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: intersect, exclude;
  pointer-events: none;
}

/* =========================================================
   Меню для телефона и планшета
   ========================================================= */

.mobile-menu {
  position: fixed;
  z-index: 99;
  top: 84px;
  left: 0;
  right: 0;
  width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 24px 24px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: rgba(10, 12, 36, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 60px rgba(162, 80, 255, 0.2);
  animation: drop 0.35s var(--ease);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.mobile-menu__nav a:hover,
.mobile-menu__phone:hover {
  color: var(--pink);
}

.mobile-menu__contacts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

.mobile-menu__phone {
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.mobile-menu__muted {
  color: rgba(255, 255, 255, 0.5);
}

.mobile-menu__btn {
  width: 100%;
  height: 64px;
}

.mobile-menu__btn .btn__title {
  font-size: 17px;
}

/* кнопка-бургер: три полоски превращаются в крестик */
.header__burger {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.header__burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.header__burger span:nth-child(1) { top: 14px; }
.header__burger span:nth-child(2) { top: 20px; }
.header__burger span:nth-child(3) { top: 26px; }

.header__burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.header__burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.header__burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================================================
   Плавающий видео-виджет
   ========================================================= */

.video-widget {
  position: fixed;
  z-index: 90;
  left: 24px;
  bottom: 24px;
  transition: opacity 0.4s var(--ease), translate 0.4s var(--ease);
}

/* на первом экране виджет не закрывает оффер — появляется после прокрутки */
.video-widget.is-away {
  opacity: 0;
  translate: 0 24px;
  pointer-events: none;
}

.video-widget[hidden] {
  display: none;
}

.video-widget__frame {
  position: relative;
  width: 168px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 24px;
  background:
    linear-gradient(#0d1238, #0d1238) padding-box,
    var(--grad-primary) border-box;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(241, 60, 255, 0.35);
  cursor: pointer;
  transition: width 0.45s var(--ease);
}

.video-widget.is-open .video-widget__frame {
  width: min(320px, calc(100vw - 32px), calc((100vh - 120px) * 9 / 16));
  cursor: default;
}

.video-widget__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

/* затемнение снизу, чтобы кнопка читалась на любом кадре */
.video-widget__frame::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(5, 7, 22, 0.75));
  pointer-events: none;
}

.video-widget__play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(13, 18, 56, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease);
}

/* треугольник «play» */
.video-widget__play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 20px;
  margin: -10px 0 0 -7px;
  background: var(--white);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

@media (hover: hover) {
  .video-widget__frame:hover .video-widget__play {
    transform: scale(1.08);
    background-color: rgba(241, 60, 255, 0.55);
  }
}

.video-widget.is-open .video-widget__play {
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
}

.video-widget.is-open .video-widget__play::before {
  width: 24px;
  height: 28px;
  margin: -14px 0 0 -9px;
}

/* во время просмотра кнопка play прячется, клик по видео ставит паузу */
.video-widget.is-playing .video-widget__play {
  opacity: 0;
  pointer-events: none;
}

.video-widget__close {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(5, 7, 22, 0.6);
  cursor: pointer;
}

.video-widget__close::before,
.video-widget__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--white);
  rotate: 45deg;
}

.video-widget__close::after {
  rotate: -45deg;
}

.video-widget.is-open .video-widget__close {
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
}

.video-widget.is-open .video-widget__close::before,
.video-widget.is-open .video-widget__close::after {
  width: 16px;
  margin-left: -8px;
}

.video-widget__cta {
  position: absolute;
  z-index: 3;
  touch-action: manipulation; /* нажатие срабатывает сразу, без ожидания двойного касания */
  left: 10px;
  right: 10px;
  bottom: 10px;
  width: auto;
  height: 40px;
  border-radius: 20px;
}

.video-widget__cta .btn__title {
  font-size: 11px;
}

.video-widget.is-open .video-widget__cta {
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 56px;
  border-radius: 28px;
}

.video-widget.is-open .video-widget__cta .btn__title {
  font-size: 16px;
}

.video-widget__empty {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(50% + 52px);
  translate: -50% 0;
  display: none;
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--white);
  color: #0d1238;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.video-widget.is-open.is-empty.is-asked .video-widget__empty {
  display: block;
}

/* плеер Kinescope в развёрнутом виджете: над кнопкой «Забронировать», чтобы она не закрывала управление */
.video-widget__kinescope {
  position: absolute;
  z-index: 1;
  inset: 0 0 56px;
  width: 100%;
  height: calc(100% - 56px);
  border: 0;
  border-radius: 22px 22px 0 0;
  background: #000;
}

.video-widget.is-kinescope .video-widget__frame::after {
  display: none;
}

/* с плеером Kinescope кнопка прижата к низу виджета на всю ширину */
.video-widget.is-open.is-kinescope .video-widget__cta {
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  border-radius: 0 0 22px 22px;
}

/* пока играет Kinescope, превью под ним не видно: полоса под кнопкой — сплошная, в цвет плеера */
.video-widget.is-kinescope .video-widget__video {
  visibility: hidden;
}

.video-widget.is-kinescope .video-widget__frame {
  background:
    linear-gradient(#000, #000) padding-box,
    var(--grad-primary) border-box;
}

@media (prefers-reduced-motion: reduce) {
  .video-widget__frame {
    transition: none;
  }

  .mobile-menu {
    animation: none;
  }
}

/* =========================================================
   Адаптив: планшет и небольшие ноутбуки (до 1239px)
   ========================================================= */

@media (max-width: 1239px) {
  :root {
    --container: calc(100% - 48px);
    --design-h: 0px;
    --section-space: 90px;
  }

  /* ---------- Шапка ---------- */

  .header {
    padding: 10px 12px 10px 20px;
  }

  .header__address,
  .header__nav {
    display: none;
  }

  .header__phone {
    margin-left: auto;
    margin-right: 20px;
  }

  .header__burger {
    display: block;
  }

  /* ---------- Первый экран: обычный поток вместо координат макета ---------- */

  .hero {
    height: auto;
    min-height: 0;
    padding: 104px 0 60px;
  }

  .hero__bg img {
    left: 0;
    translate: none;
    width: 100%;
    height: 100%;
  }

  .hero__bg--blur {
    display: none;
  }

  .hero__shade {
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.55));
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero__stage {
    position: relative;
    top: auto;
    width: var(--container);
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }

  .hero__intro {
    position: relative;
    grid-row: 1;
    top: auto;
    width: auto;
  }

  .hero__age {
    position: relative;
    left: auto;
    top: auto;
    display: inline-block;
    margin-bottom: 16px;
    rotate: -4deg;
  }

  .hero__title img {
    width: min(558.87px, 100%);
    height: auto;
  }

  .hero__tags {
    width: auto;
    max-width: 560px;
  }

  .hero__video {
    position: relative;
    grid-row: 2;
    grid-column: 1;
    left: auto;
    top: auto;
    justify-self: center;
    width: 100%;
    max-width: 760px;
    height: auto;
    aspect-ratio: 855 / 481;
  }

  .hero__guys {
    position: relative;
    grid-row: 2;
    grid-column: 1;
    left: auto;
    top: auto;
    justify-self: center;
    width: 100%;
    max-width: 760px;
    height: auto;
    aspect-ratio: 855 / 481;
  }

  .features {
    position: relative;
    grid-row: 3;
    top: auto;
    left: auto;
    right: auto;
    height: auto;
    padding: 26px 24px;
    border-radius: 32px;
  }

  .features__list {
    position: static;
    width: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 16px;
  }

  .offer {
    position: relative;
    grid-row: 4;
    grid-column: 1;
    top: auto;
    width: auto;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 28px 28px 210px;
    border-radius: 40px;
  }

  .offer__text {
    width: auto;
  }

  .offer__actions {
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 0;
    width: 100%;
  }

  .offer__actions .btn {
    flex: 1 1 240px;
    width: auto;
    height: 76px;
  }

  /* подарок в той же ячейке, что и оффер, — слева поверх */
  .hero__gift {
    position: relative;
    z-index: 7;
    grid-row: 4;
    grid-column: 1;
    left: auto;
    top: auto;
    align-self: center;
    justify-self: start;
    width: 180px;
    height: 180px;
    margin-left: 14px;
  }

  .hero__planet,
  .scroll-hint {
    display: none;
  }

  /* ---------- Заголовки разделов ---------- */

  .section-title {
    font-size: 44px;
  }

  /* ---------- Галерея ---------- */

  .ribbons {
    height: 120px;
    margin-bottom: 24px;
  }

  .ribbon {
    height: 48px;
    margin-top: -24px;
    font-size: 17px;
  }

  .gallery__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 36px;
  }

  .photo {
    height: 240px;
  }

  .photo--l {
    width: 360px;
  }

  .photo--p {
    width: 160px;
  }

  /* ---------- Программа ---------- */

  .program__title {
    margin-bottom: 36px;
  }

  .stage {
    padding: 28px 24px;
  }

  .stage__head {
    grid-template-columns: auto 1fr;
    gap: 20px 24px;
  }

  .stage__list {
    grid-column: 1 / -1;
  }

  .stage__title {
    font-size: 36px;
  }

  .games {
    /* отступ страницы + внутренний отступ этапа */
    --row-bleed: 48px;
  }

  .stage__photo {
    height: 340px;
  }

  /* ---------- Форма с телефоном ---------- */

  .booking {
    min-height: 0;
  }

  .booking__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 16px;
  }

  .booking__phone {
    width: min(460px, 100%);
    height: auto;
    aspect-ratio: 561 / 590;
  }

  .booking__card {
    width: 100%;
    max-width: 660px;
  }

  /* ---------- Пакеты ---------- */

  .packages__head {
    margin-bottom: 36px;
  }

  .packages__list {
    --row-bleed: 24px;
    gap: 16px;
  }

  .package {
    flex-basis: 360px;
  }

  /* ---------- Вопросы: ракета взлетает из-за формы ---------- */

  .question {
    padding-top: 330px;
  }

  .question__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .question__card {
    grid-column: 1;
    width: 100%;
    max-width: 540px;
  }

  .finale__rocket {
    left: 50%;
    top: 250px;
    width: 360px;
    height: 450px;
    translate: -50% 0;
  }

  .finale::before {
    left: 50%;
    top: 200px;
    width: 900px;
    translate: -50% 0;
  }

  .question::before {
    right: -300px;
  }

  .question::after {
    left: 50%;
    top: 420px;
    translate: -50% 0;
  }

  /* ---------- Подвал ---------- */

  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .footer__requisites,
  .footer__contacts {
    grid-column: auto;
  }

  .footer__contacts {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  /* ---------- Просмотр фото ---------- */

  .lightbox__stage {
    padding: 72px 24px 96px;
  }

  .lightbox__nav {
    top: auto;
    bottom: 20px;
    margin-top: 0;
  }

  .lightbox__nav--prev {
    left: calc(50% - 72px);
  }

  .lightbox__nav--next {
    right: calc(50% - 72px);
  }

  .lightbox__close {
    top: 12px;
    right: 12px;
  }
}

/* =========================================================
   Адаптив: телефон (до 767px)
   ========================================================= */

@media (max-width: 767px) {
  :root {
    --container: calc(100% - 32px);
    --section-space: 64px;
  }

  html {
    scroll-padding-top: 80px;
  }

  /* ---------- Шапка ---------- */

  .header {
    top: 8px;
    padding: 8px 8px 8px 16px;
    border-radius: 18px;
  }

  .header__logo img {
    width: 140px;
    height: 22px;
  }

  .header__phone {
    display: none;
  }

  .header__burger {
    margin-left: auto;
  }

  .mobile-menu {
    top: 72px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding: 24px 20px 20px;
  }

  /* ---------- Первый экран ---------- */

  .hero {
    padding: 84px 0 48px;
  }

  .hero__stage {
    row-gap: 20px;
  }

  .hero__tags {
    max-width: none;
  }

  .hero__tags {
    gap: 4px;
  }

  /* заголовок первого экрана на телефоне на 30% меньше */
  .hero__title img {
    width: min(391px, 70%);
  }

  /* «от 7 лет» — справа от заголовка, заголовок сразу под шапкой */
  .hero__age {
    position: absolute;
    z-index: 3;
    top: 6px;
    right: 0;
    left: auto;
    margin: 0;
    rotate: 6deg;
  }

  .tag {
    gap: 4px;
    padding: 4px 10px 4px 4px;
    border-radius: 16px;
    font-size: 12px;
  }

  .tag__icon {
    width: 22px;
    height: 22px;
  }

  .tag__icon img {
    width: 16px;
    height: 16px;
  }

  /* картинка с ребятами на 10px ближе к плашкам «Квесты, Шоу…»,
     под ней вплотную — оффер с подарком */
  .hero__guys,
  .hero__video {
    margin-top: -10px;
    margin-bottom: -56px;
  }

  /* на телефоне сначала оффер с кнопками, потом преимущества */
  .offer,
  .hero__gift {
    grid-row: 3;
  }

  .features {
    grid-row: 4;
  }

  /* плашка по ширине текста — уже экрана и по центру */
  .features {
    justify-self: center;
    width: fit-content;
    max-width: 100%;
    padding: 18px 22px;
    border-radius: 28px;
  }

  .features__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .feature {
    gap: 12px;
  }

  /* кружок и картинка уменьшаются вместе, сохраняя положение из макета */
  .feature__circle,
  .feature__img {
    zoom: 0.68;
  }

  /* текст на всю ширину и без принудительных переносов — в две строки */
  /* одинаковая ширина текста: каждый пункт ровно в две строки, без висящих слов */
  .feature__text {
    flex: 1;
    width: 210px;
    max-width: 210px;
    font-size: 13px;
    line-height: 1.3;
    white-space: normal;
    text-wrap: balance;
  }

  .feature__text br {
    display: none;
  }

  /* подарок слева, текст «Получите…» справа от него по левому краю, кнопки ниже на всю ширину */
  .offer {
    align-items: stretch;
    padding: 18px;
    border-radius: 32px;
    text-align: left;
  }

  .offer__text {
    min-height: 84px;
    padding-left: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .offer__title {
    font-size: 18px;
    white-space: normal;
  }

  .offer__actions {
    flex-direction: column;
  }

  .offer__actions .btn {
    flex: none;
    width: 100%;
    height: 72px;
  }

  .offer__actions .btn__title {
    font-size: 18px;
  }

  .hero__play {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
  }

  .hero__play::before {
    width: 18px;
    height: 21px;
    margin: -10.5px 0 0 -7px;
  }

  /* подарок в левом верхнем углу оффера, рядом с текстом */
  .hero__gift {
    align-self: start;
    justify-self: start;
    width: 96px;
    height: 96px;
    margin: 10px 0 0 8px;
  }

  /* ---------- Заголовки разделов ---------- */

  .section-title {
    font-size: 32px;
    letter-spacing: -0.3px;
  }

  /* ---------- Галерея ---------- */

  .ribbons {
    height: 96px;
    margin-bottom: 16px;
  }

  .ribbon {
    height: 40px;
    margin-top: -20px;
    font-size: 14px;
  }

  .ribbon .marquee__set {
    gap: 18px;
    padding-right: 18px;
  }

  .gallery__cta {
    display: none;
  }

  .gallery__head > div {
    width: 100%;
  }

  .gallery__row .marquee__set {
    gap: 10px;
    padding-right: 10px;
  }

  .photo {
    height: 180px;
    border-radius: 20px;
  }

  .photo--l {
    width: 270px;
  }

  .photo--p {
    width: 120px;
  }

  /* ---------- Программа ---------- */

  .program__title {
    margin-bottom: 28px;
  }

  .stage {
    padding: 22px 16px;
    border-radius: 28px;
  }

  .stage::before {
    border-radius: 28px;
  }

  .stage + .stage {
    margin-top: 20px;
  }

  .stage__head {
    gap: 18px 14px;
    margin-bottom: 28px;
  }

  .stage__image {
    width: 104px;
    height: 78px;
  }

  .stage__heading {
    gap: 10px;
  }

  .stage__title {
    font-size: 22px;
  }

  .stage__time {
    padding: 7px 14px 7px 10px;
    font-size: 16px;
  }

  .stage__time img {
    width: 18px;
    height: 18px;
  }

  .stage__list {
    font-size: 14px;
  }

  .stage__icon {
    width: 42px;
    height: 42px;
  }

  .stage__icon img {
    width: 21px;
    height: 21px;
  }

  .stage__choice-head {
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .stage__label,
  .scroll-cue {
    font-size: 12px;
    letter-spacing: 1.2px;
  }

  .games {
    --row-bleed: 32px;
    gap: 12px;
  }

  .game {
    flex-basis: 260px;
    border-radius: 28px;
  }

  .game__media {
    border-radius: 20px;
  }

  .game__title {
    font-size: 18px;
  }

  .stage__photo {
    height: 220px;
    border-radius: 20px;
  }

  /* ---------- Форма с телефоном ---------- */

  .booking__phone {
    width: min(360px, 100%);
  }

  .booking__card {
    position: relative;
    z-index: 2;
    margin-top: -90px;
  }

  .booking__card {
    padding: 28px 20px;
    border-radius: 32px;
  }

  .booking__title {
    font-size: 28px;
  }

  .booking__text {
    margin-bottom: 24px;
  }

  .booking__input {
    height: 58px;
    padding: 0 20px;
    font-size: 18px;
  }

  .booking__submit {
    height: 64px;
  }

  .booking__submit .btn__title {
    padding: 0 12px;
    font-size: 15px;
    line-height: 1.2;
    white-space: normal;
  }

  .booking__card::before {
    left: 32px;
    right: 32px;
  }

  /* ---------- Пакеты: листаются пальцем ---------- */

  .packages__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
  }

  .packages__list {
    --row-bleed: 16px;
    gap: 12px;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
  }

  .package {
    flex-basis: 84%;
    scroll-snap-align: start;
  }

  .package__btn {
    height: 64px;
  }

  .package__btn .btn__title {
    font-size: 16px;
  }

  /* ---------- Вопросы ---------- */

  .packages {
    padding-bottom: 8px;
  }

  .question {
    padding-top: 250px;
  }

  .finale__rocket {
    top: 230px;
    width: 272px;
    height: 340px;
  }

  /* ---------- Подвал ---------- */

  .footer {
    padding: 36px 0 55px;
  }

  .footer__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .footer__contacts {
    grid-column: auto;
    grid-row: auto;
    align-items: flex-start;
    text-align: left;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer__links {
    flex-direction: column;
    gap: 10px;
  }

  /* ---------- Видео-виджет ---------- */

  .video-widget {
    left: 12px;
    bottom: 12px;
  }

  .video-widget__frame {
    width: 106px;
    border-radius: 18px;
  }

  .video-widget__video {
    border-radius: 16px;
  }

  .video-widget__play {
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
  }

  .video-widget__play::before {
    width: 14px;
    height: 16px;
    margin: -8px 0 0 -5px;
  }

  .video-widget__close {
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
  }

  .video-widget__close::before,
  .video-widget__close::after {
    width: 10px;
    margin-left: -5px;
  }

  /* в маленьком виджете кнопка тоже видна — компактная */
  .video-widget:not(.is-open) .video-widget__cta {
    left: 0;
    right: 0;
    bottom: 0;
    height: 28px;
    padding: 0 4px;
    border-radius: 0 0 16px 16px;
  }

  .video-widget:not(.is-open) .video-widget__cta .btn__title {
    font-size: 9px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .video-widget.is-open .video-widget__frame {
    border-radius: 24px;
  }

  /* ---------- Просмотр фото ---------- */

  .lightbox__stage {
    padding: 64px 10px 92px;
  }

  .lightbox__img {
    border-radius: 16px;
  }

  .lightbox__nav,
  .lightbox__close {
    width: 48px;
    height: 48px;
  }

  .lightbox__nav--prev {
    left: calc(50% - 60px);
  }

  .lightbox__nav--next {
    right: calc(50% - 60px);
  }
}

/* фото этапов без карточек («Перекус», «Кульминация») — крупные и одной высоты */
.stage .stage__photo {
  height: 600px;
}

@media (max-width: 1239px) {
  .stage .stage__photo {
    height: 480px;
  }
}

@media (max-width: 767px) {
  .stage .stage__photo {
    height: 320px;
  }
}

/* =========================================================
   Блок 2. Квиз
   ========================================================= */

.quiz {
  position: relative;
  padding: calc(var(--section-space) * 0.6) 0 0;
  overflow-x: clip; /* широкая подсветка не должна расширять страницу на телефоне */
}

.quiz::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 0;
  width: 1300px;
  height: 900px;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgba(162, 80, 255, 0.18), rgba(44, 58, 175, 0.1) 55%, transparent);
  pointer-events: none;
}

.quiz__inner {
  position: relative;
  z-index: 1;
  width: var(--container);
  margin: 0 auto;
}

.quiz__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
}

.quiz__lead {
  max-width: 400px;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  text-wrap: balance;
}

/* карточка: слева вопрос, справа сотрудник и бонусы */
.quiz__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas:
    "progress manager"
    "steps    manager"
    "steps    bonuses"
    "nav      bonuses";
  grid-template-rows: auto auto 1fr auto;
  gap: 28px 48px;
  padding: 44px 48px;
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  background: linear-gradient(160deg, #141b5a 0%, #0d1238 60%, #0a0c24 100%);
  box-shadow: 0 20px 50px rgba(44, 58, 175, 0.35), 0 0 90px rgba(162, 80, 255, 0.2);
}

.quiz__card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 48px;
  right: 48px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #f13cff 30%, #67c9fc 70%, transparent);
  opacity: 0.9;
  pointer-events: none;
}

/* ---------- Прогресс ---------- */

.quiz__progress {
  grid-area: progress;
}

.quiz__progress-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.68px;
  text-transform: uppercase;
}

.quiz__counter {
  color: rgba(255, 255, 255, 0.6);
}

.quiz__percent {
  color: var(--pink);
}

.quiz__bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

/* заполнение через transform — плавно и без нагрузки */
.quiz__bar-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--grad-primary);
  box-shadow: 0 0 16px rgba(241, 60, 255, 0.6);
  transform: scaleX(0.04);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

/* ---------- Сотрудник ---------- */

.quiz__manager {
  grid-area: manager;
  align-self: start;
}

.quiz__person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.quiz__photo {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 50%;
  background:
    linear-gradient(#1b2266, #1b2266) padding-box,
    var(--grad-primary) border-box;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* обрезаем по кругу саму фотографию, а не контейнер — иначе срезается зелёная точка */
.quiz__photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* зелёная точка «на связи» */
.quiz__photo::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 12px;
  height: 12px;
  border: 2px solid #0d1238;
  border-radius: 50%;
  background: #3ddc84;
}

.quiz__name {
  font-size: 16px;
  font-weight: 700;
}

.quiz__role {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.quiz__bubble {
  position: relative;
  padding: 16px 18px;
  border-radius: 4px 20px 20px 20px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.quiz__bubble.is-changing {
  animation: bubble-in 0.45s var(--ease);
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Бонусы ---------- */

.quiz__bonuses {
  grid-area: bonuses;
  align-self: end;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(5, 7, 22, 0.35);
}

.quiz__bonuses-title {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.44px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.quiz__bonus-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz__bonus {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.4s var(--ease);
}

/* кружок: замок до ответа, галочка после */
.quiz__bonus::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.quiz__bonus::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 5px;
  height: 10px;
  margin-top: -6px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}

.quiz__bonus.is-unlocked {
  color: var(--white);
}

.quiz__bonus.is-unlocked::before {
  border-color: transparent;
  background: var(--grad-primary);
  box-shadow: 0 0 12px rgba(241, 60, 255, 0.55);
}

.quiz__bonus.is-unlocked::after {
  opacity: 1;
  transform: none;
}

.quiz__note {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- Вопросы ---------- */

.quiz__steps {
  grid-area: steps;
  min-width: 0;
}

.quiz__step {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.quiz__step[hidden] {
  display: none;
}

.quiz__step.is-active {
  animation: step-in 0.5s var(--ease);
}

@keyframes step-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}

.quiz__step.is-back {
  animation-name: step-in-back;
}

@keyframes step-in-back {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: none; }
}

.quiz__question {
  float: left; /* legend иначе не получает отступы в части браузеров */
  width: 100%;
  margin: 0 0 22px;
  padding: 0;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
}

.quiz__options {
  clear: both;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quiz__option {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 84px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.quiz__option--icon {
  align-items: center;
  gap: 14px;
}

/* радио скрыто визуально, но доступно с клавиатуры */
.quiz__option input,
.quiz__pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz__option:hover {
  border-color: rgba(241, 60, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.quiz__option:has(input:checked) {
  border-color: transparent;
  background:
    linear-gradient(#1b2266, #1b2266) padding-box,
    var(--grad-primary) border-box;
  box-shadow: 0 0 28px rgba(241, 60, 255, 0.35);
}

.quiz__option:has(input:focus-visible) {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.quiz__option-big {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.quiz__option-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
}

.quiz__option-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg);
}

.quiz__option-icon img {
  width: 24px;
  height: 24px;
}

.quiz__option-text {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

/* ---------- Финальный шаг ---------- */

.quiz__form {
  clear: both;
}

.quiz__messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.quiz__pill {
  position: relative;
  cursor: pointer;
}

.quiz__pill span {
  display: block;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.quiz__pill input:checked + span {
  border-color: var(--white);
  background: var(--white);
  color: #0d1238;
}

.quiz__pill input:focus-visible + span {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

/* ---------- Навигация ---------- */

.quiz__nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz__nav[hidden] {
  display: none;
}

.quiz__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  font: 700 14px/1 var(--font);
  letter-spacing: 1.68px;
  text-transform: uppercase;
  cursor: pointer;
}

.quiz__back[hidden] {
  visibility: hidden;
  display: inline-flex;
}

.quiz__back img {
  rotate: 90deg;
}

.quiz__back:hover {
  color: var(--white);
}

.quiz__next {
  width: 220px;
  height: 64px;
  color: var(--white);
  font-family: inherit;
  cursor: pointer;
}

.quiz__next .btn__title {
  font-size: 17px;
}

/* .btn задаёт display: flex — без этого атрибут hidden не скрывает кнопку */
.quiz__next[hidden] {
  display: none;
}

.quiz__next:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
  box-shadow: none;
  filter: none;
}

.quiz__next:disabled::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .quiz__step.is-active,
  .quiz__bubble.is-changing {
    animation: none;
  }

  .quiz__bar-fill {
    transition: none;
  }
}

/* ---------- Квиз: планшет ---------- */

@media (max-width: 1239px) {
  .quiz__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 36px;
  }

  .quiz__card {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px 32px;
    padding: 36px 32px;
  }

  .quiz__question {
    font-size: 26px;
  }
}

/* ---------- Квиз: телефон ---------- */

@media (max-width: 767px) {
  .quiz__card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "progress"
      "manager"
      "steps"
      "nav"
      "bonuses";
    grid-template-rows: none;
    gap: 22px;
    padding: 26px 18px;
    border-radius: 32px;
  }

  .quiz__card::before {
    left: 32px;
    right: 32px;
  }

  .quiz__lead {
    font-size: 15px;
  }

  .quiz__progress-top {
    font-size: 12px;
    letter-spacing: 1.2px;
  }

  .quiz__photo {
    width: 48px;
    height: 48px;
  }

  .quiz__photo::after {
    right: 1px;
    bottom: 1px;
    width: 10px;
    height: 10px;
  }

  .quiz__bubble {
    padding: 12px 14px;
    font-size: 13px;
  }

  .quiz__question {
    margin-bottom: 16px;
    font-size: 22px;
  }

  .quiz__options {
    gap: 8px;
  }

  .quiz__option {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-height: 76px;
    padding: 14px;
    border-radius: 18px;
  }

  .quiz__option--icon {
    gap: 10px;
  }

  .quiz__option-big {
    font-size: 24px;
  }

  .quiz__option-sub {
    font-size: 13px;
  }

  .quiz__option-icon {
    width: 36px;
    height: 36px;
  }

  .quiz__option-icon img {
    width: 20px;
    height: 20px;
  }

  .quiz__option-text {
    font-size: 14px;
  }

  .quiz__next {
    flex: 1;
    width: auto;
    height: 58px;
  }

  .quiz__next .btn__title {
    font-size: 15px;
  }
}

/* =========================================================
   Градиенты под рамкой.
   По умолчанию фон растягивается только до внутреннего края рамки
   и повторяется под ней — по бокам кнопок и значков видны светлые полосы.
   Растягиваем градиент на всю плашку вместе с рамкой.
   ========================================================= */

.btn,
.offer,
.booking__card,
.quiz__card,
.hero__play,
.stage__photo,
.package__image,
.game__media,
.quiz__bonus.is-unlocked::before,
.consent__input:checked + .consent__box {
  background-origin: border-box;
}

/* Большое видео на весь экран (кнопка play на первом экране и телефон) */
.video-popup .lightbox__stage {
  padding: 24px;
}

@media (max-width: 767px) {
  /* от блока выше до бегущих строк — в два раза меньше */
  .gallery {
    padding-top: 6px;
  }

  .video-popup .lightbox__stage {
    padding: 64px 10px 16px;
  }

  .video-popup__player {
    border-radius: 16px;
  }
}

/* =========================================================
   Внутренние страницы: 404, «Спасибо»
   ========================================================= */

.page-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100vh, 900px);
  padding: 150px 0 var(--section-space);
  overflow-x: clip;
}

/* фон — космос с первого экрана, приглушён и растворяется книзу */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/img/bg-hero.webp') center / cover no-repeat;
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  align-items: center;
  gap: 40px;
}

.page-hero__code {
  margin-bottom: 4px;
  font-size: 180px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -4px;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 40px rgba(241, 60, 255, 0.35));
}

.page-hero__title {
  margin: 0 0 20px;
  font-size: 56px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.5px;
}

.page-hero__lead {
  max-width: 540px;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  text-wrap: balance;
}

.page-hero__note {
  margin-bottom: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.page-hero__phone {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.page-hero__phone a {
  font-weight: 700;
  white-space: nowrap;
}

.page-hero__phone a:hover {
  color: var(--pink);
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

/* неоновая картинка страницы (404 / галочка) */
.page-hero__image {
  justify-self: center;
  width: 100%;
  max-width: 420px;
  height: auto;
  pointer-events: none;
}

/* подарок и планета медленно покачиваются */
.is-ready .page-hero__image {
  animation:
    fade 1.2s var(--ease) 0.3s both,
    float 7s ease-in-out 1.5s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .is-ready .page-hero__image {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 1239px) {
  .page-hero {
    min-height: 0;
    padding-top: 130px;
  }

  .page-hero__inner {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .page-hero__code {
    font-size: 140px;
  }

  .page-hero__title {
    font-size: 44px;
  }
}

@media (max-width: 767px) {
  .page-hero {
    padding-top: 104px;
  }

  .page-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  /* картинка над текстом */
  .page-hero__image {
    grid-row: 1;
    max-width: 240px;
  }


  .page-hero__code {
    font-size: 104px;
    letter-spacing: -2px;
  }

  .page-hero__title {
    margin-bottom: 14px;
    font-size: 32px;
  }

  .page-hero__lead {
    font-size: 15px;
  }

  .page-hero__phone {
    font-size: 14px;
  }

  .page-hero__actions {
    flex-direction: column;
    margin-top: 24px;
  }

  .page-hero__actions .btn {
    width: 100%;
    height: 72px;
  }

  .page-hero__actions .btn__title {
    font-size: 18px;
  }
}

/* =========================================================
   Служебное: поле-ловушка для роботов и сообщение об ошибке формы
   ========================================================= */

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

.booking__error {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: #ff9db0;
}

/* =========================================================
   Правовые страницы: политика, согласие
   ========================================================= */

.legal {
  position: relative;
  padding: 150px 0 var(--section-space);
}

.legal__inner {
  width: min(var(--container), calc(100% - 40px));
  max-width: 820px;
  margin: 0 auto;
}

.legal__title {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

.legal__date {
  margin: 0 0 32px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.legal__text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.legal__text h2 {
  margin: 32px 0 12px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.legal__text p { margin: 0 0 12px; }

.legal__text ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.legal__text li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

/* вместо точек — маленькая градиентная черта */
.legal__text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-primary);
}

.legal__back {
  margin-top: 40px;
  font-size: 15px;
}

@media (max-width: 767px) {
  .legal { padding-top: 104px; }
  .legal__title { font-size: 28px; }
  .legal__text { font-size: 14px; }
  .legal__text h2 { font-size: 18px; margin-top: 26px; }
}


/* =========================================================
   Бронирование пакета: всплывающая форма
   ========================================================= */

.package-popup__stage {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 80px 24px;
  overflow-y: auto;
}

.package-popup__card {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: auto;
}

/* название выбранного пакета — небольшая плашка над заголовком */
.package-popup__package {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 14px;
  border: 1px solid rgba(241, 60, 255, 0.45);
  border-radius: 999px;
  background: rgba(241, 60, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.package-popup__package b {
  color: var(--white);
}

.package-popup__title {
  font-size: 32px;
  text-wrap: balance;
}

.package-popup__date {
  cursor: pointer;
}

@media (max-width: 767px) {
  .package-popup__stage {
    padding: 72px 12px 24px;
  }

  .package-popup__card {
    padding: 28px 20px;
    border-radius: 28px;
  }

  .package-popup__title {
    font-size: 24px;
  }

  .package-popup .lightbox__close {
    top: 12px;
    right: 12px;
  }
}

/* =========================================================
   Скорость: пока блок не долистали, браузер его не рассчитывает
   ========================================================= */

.gallery,
.program,
.packages,
.finale {
  content-visibility: auto;
}

/* примерная высота, чтобы полоса прокрутки не прыгала */
.gallery { contain-intrinsic-size: auto 900px; }
.program { contain-intrinsic-size: auto 3600px; }
.packages { contain-intrinsic-size: auto 800px; }
.finale { contain-intrinsic-size: auto 1200px; }

/* =========================================================
   Уведомление о cookie (появляется, если подключена Метрика)
   ========================================================= */

.cookie-note {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 16px;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(760px, calc(100% - 32px));
  padding: 14px 16px 14px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: rgba(13, 18, 56, 0.94);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cookie-note[hidden] {
  display: none;
}

.cookie-note__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.9;
}

.cookie-note__text a {
  text-decoration: underline;
}

.cookie-note__actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.cookie-note__btn {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 20px;
  background: var(--grad-primary);
  color: var(--white);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.cookie-note__btn--ghost {
  border: 1px solid var(--glass-border);
  background: transparent;
}

@media (max-width: 767px) {
  .cookie-note {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    bottom: 12px;
    padding: 14px;
  }

  .cookie-note__actions > * {
    flex: 1;
  }
}
