/* ============================================================
   CINEMATIC INTRO OVERLAY
   Full-screen, muted, skippable, plays once per tab.
   Hidden by default in the markup (hidden attribute) so a
   visitor never sees a black rectangle if the script fails.
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #071a13;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity .6s ease;
}
.intro[hidden] { display: none; }
.intro.is-leaving { opacity: 0; }
.intro.is-leaving .intro-video { transform: scale(1.04); }

.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.22,.72,.3,1);
  background: #071a13;
}

.intro-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(75% 70% at 50% 45%, rgba(4, 12, 9, 0) 45%, rgba(4, 12, 9, .32) 100%),
    linear-gradient(180deg, rgba(4, 12, 9, .18) 0%, rgba(4, 12, 9, 0) 35%, rgba(4, 12, 9, .38) 100%);
  pointer-events: none;
}

.intro-skip,
.intro-sound {
  position: absolute;
  bottom: 26px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid rgba(251, 239, 201, .5);
  color: #fbefc9;
  background: rgba(6, 22, 16, .55);
  backdrop-filter: blur(6px);
  transition: background .25s ease, transform .25s ease, opacity .4s ease;
}
.intro-skip { right: 26px; background: rgba(212, 160, 23, .92); color: #0a2b20; border-color: transparent; }
.intro-sound { left: 26px; }
.intro-skip:hover,
.intro-sound:hover { transform: translateY(-1px); }
.intro-skip:focus-visible,
.intro-sound:focus-visible { outline: 2px solid #e8c766; outline-offset: 3px; }

/* the sound button only makes sense while the film is running */
.intro-sound.is-on { background: rgba(232, 199, 102, .9); color: #0a2b20; border-color: transparent; }

@media (max-width: 620px) {
  .intro-skip { right: 14px; bottom: 18px; padding: 9px 14px; font-size: .72rem; }
  .intro-sound { left: 14px; bottom: 18px; padding: 9px 14px; font-size: .72rem; }
}

/* respect a visitor who asked for less motion: no zoom, no veil animation */
@media (prefers-reduced-motion: reduce) {
  .intro-video { transition: none; }
  .intro.is-leaving .intro-video { transform: none; }
}

/* the page behind must not scroll while the intro covers it */
body.intro-open { overflow: hidden; }
