/* Entry intro: the Arena Sports Media logo collapses into a ring that builds the ARENA STUDIO crest,
   the crest pulses until the visitor taps, scrolls or swipes, then the home page is revealed.
   Shown only when the inline script in <head> adds .intro-on to <html>. */
.intro { display: none; }
.intro-on body { overflow: hidden; }
.intro-on .intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: radial-gradient(120% 90% at 50% 45%, #141414 0%, #0A0A0A 55%, #000 100%);
  cursor: pointer; touch-action: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.intro:focus-visible { outline: none; }

.intro-stage { position: relative; width: min(72vw, 420px); aspect-ratio: 1; }
.intro-stage > * { position: absolute; inset: 0; width: 100%; height: 100%; }

.intro-grid {
  position: absolute; inset: -40vmax; pointer-events: none; opacity: 0;
  background:
    repeating-linear-gradient(90deg, rgba(200, 255, 0, .06) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(200, 255, 0, .06) 0 1px, transparent 1px 64px);
  mask: radial-gradient(circle at 50% 45%, #000 0, transparent 55%);
  animation: intro-grid 3.4s ease-out .2s forwards;
}

/* 1. the Arena Sports Media logo writes on, then implodes into the ring */
.intro-asm {
  object-fit: contain; padding: 12%;
  clip-path: inset(0 100% 0 0); filter: blur(10px);
  animation: asm-in .9s cubic-bezier(.2, .8, .2, 1) .25s forwards, asm-out .6s cubic-bezier(.6, 0, .9, .4) 1.55s forwards;
}
.intro-scan {
  inset: 12% auto 12% 12%; width: 3px; background: var(--lime); box-shadow: 0 0 18px var(--lime);
  opacity: 0; animation: scan .9s cubic-bezier(.2, .8, .2, 1) .25s;
}

/* 2. a lime ring draws around it and flashes into the crest */
.intro-morph { overflow: visible; }
.morph-ring {
  fill: none; stroke: var(--lime); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: 200px 200px;
  animation: ring-draw .75s cubic-bezier(.65, 0, .35, 1) 1.3s forwards, ring-fade .25s linear 2.1s forwards;
}
.intro-burst {
  border-radius: 50%; opacity: 0; transform: scale(.2);
  background: radial-gradient(circle, #fff 0, rgba(200, 255, 0, .9) 18%, rgba(200, 255, 0, 0) 62%);
  animation: burst .7s ease-out 2s;
}

/* 3. the crest assembles: rings, stripes, ball, banners */
.intro-crest { overflow: visible; }
.intro-crest .a { font-family: Anton, Impact, sans-serif; }
.intro-crest .c { transform-box: view-box; transform-origin: 200px 200px; opacity: 0; }
.c-base { animation: base-in .55s cubic-bezier(.2, 1.3, .4, 1) 2.05s forwards; }
.c-stripes { animation: stripes-in .7s cubic-bezier(.2, .9, .3, 1) 2.2s forwards; }
.c-core { animation: base-in .45s cubic-bezier(.2, 1.3, .4, 1) 2.3s forwards; }
.c-ball { animation: ball-in .75s cubic-bezier(.2, 1.5, .4, 1) 2.4s forwards; }
.c-top { animation: banner-in .45s cubic-bezier(.2, 1.4, .4, 1) 2.75s forwards; }
.c-bottom { animation: banner-in .45s cubic-bezier(.2, 1.4, .4, 1) 2.9s forwards; }

/* 4. idle: the crest pulses and blinks until the visitor enters */
.intro.ready .intro-crest { animation: crest-pulse 1.6s ease-in-out infinite; }
.intro.ready .intro-halo { animation: halo 1.6s ease-in-out infinite; }
.intro-halo { border-radius: 50%; opacity: 0; box-shadow: 0 0 0 2px rgba(200, 255, 0, .5), 0 0 60px 6px rgba(200, 255, 0, .35); }

.intro-hint {
  display: grid; justify-items: center; gap: 10px; margin: 0;
  font: 700 17px/1 Heebo, sans-serif; letter-spacing: .5px; color: var(--cream, #F4F4EF);
  opacity: 0; transition: opacity .5s;
}
.intro.ready .intro-hint { opacity: .85; }
.intro-hint i { width: 14px; height: 14px; border: solid var(--lime); border-width: 0 3px 3px 0; transform: rotate(45deg); animation: chevron 1.2s ease-in-out infinite; }

/* exit: the crest flies at the camera while the page fades in underneath */
.intro.exit { pointer-events: none; animation: intro-out .75s cubic-bezier(.7, 0, .3, 1) forwards; }
.intro.exit .intro-crest, .intro.exit .intro-halo { animation: crest-out .75s cubic-bezier(.7, 0, .3, 1) forwards; }
.intro.exit .intro-hint { opacity: 0; transition-duration: .2s; }
.intro-entering main, .intro-entering .topbar { animation: page-in .9s cubic-bezier(.2, .8, .2, 1); }

@keyframes intro-grid { 30% { opacity: 1; } to { opacity: .55; } }
@keyframes asm-in { to { clip-path: inset(0 0 0 0); filter: blur(0); } }
@keyframes scan { 0% { opacity: 1; transform: translateX(0); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateX(calc(min(72vw, 420px) * .76)); } }
@keyframes asm-out {
  40% { transform: scale(1.06); filter: brightness(1.6); }
  to { transform: scale(.18) rotate(-200deg); filter: brightness(3) blur(3px); opacity: 0; }
}
@keyframes ring-draw { to { stroke-dashoffset: 0; } }
@keyframes ring-fade { to { opacity: 0; } }
@keyframes burst { 0% { opacity: 1; transform: scale(.2); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes base-in { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes stripes-in { from { opacity: 0; transform: rotate(-140deg) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes ball-in { from { opacity: 0; transform: scale(0) rotate(-300deg); } to { opacity: 1; transform: none; } }
@keyframes banner-in { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: none; } }
@keyframes crest-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(200, 255, 0, 0)); }
  50% { transform: scale(1.035); filter: drop-shadow(0 0 26px rgba(200, 255, 0, .55)) brightness(1.08); }
  56% { filter: drop-shadow(0 0 34px rgba(200, 255, 0, .8)) brightness(1.35); }
  62% { filter: drop-shadow(0 0 22px rgba(200, 255, 0, .5)) brightness(1.05); }
}
@keyframes halo { 0% { opacity: .7; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes chevron { 0%, 100% { translate: 0 -3px; opacity: .5; } 50% { translate: 0 4px; opacity: 1; } }
@keyframes crest-out { to { transform: scale(7); opacity: 0; filter: blur(6px); } }
@keyframes intro-out { 0%, 35% { opacity: 1; } to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .intro-asm, .intro-scan, .intro-morph, .intro-burst, .intro-grid { display: none; }
  .intro-crest .c { animation: none; opacity: 1; }
  .intro.ready .intro-crest, .intro.ready .intro-halo, .intro-hint i { animation: none; }
  .intro.exit, .intro.exit .intro-crest { animation-duration: .3s; }
  .intro-entering main, .intro-entering .topbar { animation: none; }
}
