/* Living Christmas edition. Belongs to index6.html; layers on christmas.css without changing its theme. */

/* Stop decorative bleed (.hero-world, .map-grid) from creating a horizontal scrollbar. */
html, body { overflow-x: clip; }

/* ── Ambient video: poster paints first, video crossfades in once it can play ── */
.hero-video, .trailer-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
  opacity: 0; transition: opacity 1600ms ease;
}
.hero-video { object-position: center 60%; }
.trailer-video { object-position: center 58%; z-index: -2; transition: opacity 1600ms ease, transform 1.2s ease; }
.hero-video.is-playing, .trailer-video.is-playing { opacity: 1; }
.trailer-screen:hover .trailer-video { transform: scale(1.035); }
/* Hide the still once the loop is running so the two never fight at the edges. */
.hero-world:has(.hero-video.is-playing) .hero-art { opacity: 0; transition: opacity 1600ms ease 400ms; }
@media (max-width: 640px) {
  .hero-video { height: 63%; top: auto; bottom: 0; object-position: 58% center; }
}
@media (min-width: 1600px) { .hero-video { object-position: center 65%; } }

/* ── Hero entrance: blur-to-sharp lift, staggered by --delay ── */
@media (prefers-reduced-motion: no-preference) {
  .hero-enter { animation: living-enter 1.5s var(--ease) both; animation-delay: var(--delay, 0ms); }
  @keyframes living-enter {
    from { opacity: 0; transform: translateY(28px); filter: blur(10px); }
    60%  { filter: blur(0); }
    to   { opacity: 1; transform: none; filter: blur(0); }
  }
  /* Warm vignette breathes very slowly behind the headline. */
  .hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background: radial-gradient(ellipse at 70% 55%, #e3bc7926, transparent 45%);
    animation: living-breathe 9s ease-in-out infinite alternate;
  }
  @keyframes living-breathe { to { opacity: .35; transform: scale(1.08); } }
}

/* ── Scroll-driven light sweep across the red band ── */
[data-light-sweep] { --sweep: 0; }
[data-light-sweep]::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, transparent calc(var(--sweep) * 100% - 18%), #ffe8c433 calc(var(--sweep) * 100%), transparent calc(var(--sweep) * 100% + 18%), transparent 100%);
  mix-blend-mode: screen;
}
[data-light-sweep] .big-copy span { transition: letter-spacing 900ms var(--ease); }
[data-light-sweep].is-visible .big-copy span { letter-spacing: -.045em; }

/* ── Ticket cards: gold shimmer as each card lands ── */
@media (prefers-reduced-motion: no-preference) {
  .ticket-card.is-landed::after { animation: living-shimmer 1100ms var(--ease) both; }
  @keyframes living-shimmer { from { left: -100%; } to { left: 150%; } }
}

/* ── Reduced motion / data saver: still images only ── */
@media (prefers-reduced-motion: reduce) {
  .hero-video, .trailer-video { display: none; }
  .hero::before { display: none; }
  [data-light-sweep]::after { display: none; }
}
html.save-data .hero-video, html.save-data .trailer-video { display: none; }
