/* ═══ MR JOLLY ROLLY — SITE INTRO ═══ */

html {
  scroll-behavior: smooth;
}

/* ── Splash overlay ── */
.site-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050505;
  transform: translateY(0);
  transition: transform 0.75s cubic-bezier(0.77, 0, 0.18, 1) 0.05s;
}

.site-intro.is-lift {
  transform: translateY(-101%);
}

.site-intro.is-gone {
  visibility: hidden;
  pointer-events: none;
}

.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  padding: 0 20px;
}

.intro-logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(255, 199, 0, 0.28));
  opacity: 0;
}

.intro-title {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-family: 'Bebas Neue', 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  white-space: nowrap;
}

.intro-title span {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 0.9;
  opacity: 0;
  color: #ffffff;
}

.intro-title .t-rolly {
  color: #ffc700;
}

.intro-subline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0;
}

.intro-bar {
  width: 180px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
}

.intro-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: #ffc700;
  transform-origin: left;
  transform: scaleX(0);
}

/* ── Staggered splash entrance ── */
.site-intro.is-play .intro-logo {
  animation: introIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.site-intro.is-play .intro-title .t-mr {
  animation: introIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.site-intro.is-play .intro-title .t-jolly {
  animation: introIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.38s both;
}

.site-intro.is-play .intro-title .t-rolly {
  animation: introIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.site-intro.is-play .intro-subline {
  animation: introIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.66s both;
}

.site-intro.is-play .intro-bar {
  animation: introIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}

.site-intro.is-play .intro-bar span {
  animation: introFill 1.1s cubic-bezier(0.4, 0.05, 0.25, 1) 0.9s both;
}

@keyframes introIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes introFill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ── Hero content reveal (only while the intro is actually running) ── */
.reveal {
  will-change: transform, opacity;
}

body.intro-running .reveal {
  opacity: 0;
}

body.intro-done .reveal {
  opacity: 1;
  animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-headline.reveal {
  animation-delay: 1.5s;
}

.hero-headline-br.reveal {
  animation-delay: 1.62s;
}

.hero-sub.reveal {
  animation-delay: 1.76s;
}

.mobile-cta-btn.reveal {
  animation-delay: 1.92s;
}

.hero-right.reveal {
  animation-delay: 2.05s;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .site-intro {
    visibility: hidden;
  }

  body.intro-running .reveal {
    opacity: 1 !important;
  }

  body.intro-done .reveal {
    animation: none !important;
    opacity: 1 !important;
  }
}