/* ============================================================
   SPLASH SCREEN — Betterhope Sports Club
   Broadcast-quality intro loading animation
   "In Pursuit of Excellence" | Est. 1960
   ============================================================ */

/* ─── KEYFRAMES ────────────────────────────────────────────── */

/* Ring draws itself via stroke-dashoffset */
@keyframes splashRingDraw {
  0% {
    stroke-dashoffset: 566;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* Ring glow pulses after draw completes */
@keyframes splashRingGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(0, 102, 51, 0.6))
            drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(0, 102, 51, 0.9))
            drop-shadow(0 0 35px rgba(255, 215, 0, 0.6))
            drop-shadow(0 0 60px rgba(0, 102, 51, 0.3));
  }
}

/* Logo scales up from nothing with a slight overshoot */
@keyframes splashLogoReveal {
  0% {
    opacity: 0;
    transform: scale(0.3);
    filter: brightness(0);
  }
  50% {
    opacity: 1;
    filter: brightness(1.3);
  }
  70% {
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

/* Individual letter drops in from above */
@keyframes splashLetterIn {
  0% {
    opacity: 0;
    transform: translateY(-40px) scaleY(0.3);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    transform: translateY(4px) scaleY(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    filter: blur(0);
  }
}

/* Subtitle slides up from below */
@keyframes splashSubtitleSlide {
  0% {
    opacity: 0;
    transform: translateY(25px);
    letter-spacing: 0.3em;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 0.45em;
  }
}

/* Est. year fades in with scale */
@keyframes splashEstFade {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Horizontal line expands from center */
@keyframes splashLineExpand {
  0% {
    width: 0;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    width: 200px;
    opacity: 1;
  }
}

/* Tagline fades in */
@keyframes splashTaglineFade {
  0% {
    opacity: 0;
    transform: translateY(8px);
    letter-spacing: 0.15em;
  }
  100% {
    opacity: 0.7;
    transform: translateY(0);
    letter-spacing: 0.2em;
  }
}

/* Progress bar fills left to right */
@keyframes splashProgressFill {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Progress bar shimmer sweep */
@keyframes splashProgressShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200%);
  }
}

/* Entire splash exits upward */
@keyframes splashExit {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-100%);
    opacity: 1;
  }
}

/* Background radial pulse behind the logo */
@keyframes splashRadialPulse {
  0%, 100% {
    opacity: 0.15;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

/* Floating particle drift */
@keyframes splashParticleDrift1 {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
    transform: translate(10px, -20px) scale(1);
  }
  100% {
    transform: translate(60px, -160px) scale(0);
    opacity: 0;
  }
}

@keyframes splashParticleDrift2 {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }
  25% {
    opacity: 0.8;
    transform: translate(-15px, -30px) scale(1);
  }
  100% {
    transform: translate(-80px, -180px) scale(0);
    opacity: 0;
  }
}

@keyframes splashParticleDrift3 {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }
  30% {
    opacity: 0.6;
    transform: translate(25px, -15px) scale(1);
  }
  100% {
    transform: translate(100px, -140px) scale(0);
    opacity: 0;
  }
}

/* Shimmer sweep for the ring */
@keyframes splashShimmerSweep {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Vertical light streak */
@keyframes splashLightStreak {
  0% {
    opacity: 0;
    transform: translateY(60px) scaleY(0);
  }
  30% {
    opacity: 0.4;
    transform: translateY(0) scaleY(1);
  }
  70% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scaleY(0);
  }
}

/* Subtle background grain/noise flicker */
@keyframes splashGrainShift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2%, -2%); }
  20% { transform: translate(1%, 3%); }
  30% { transform: translate(-3%, 1%); }
  40% { transform: translate(3%, -1%); }
  50% { transform: translate(-1%, 2%); }
  60% { transform: translate(2%, -3%); }
  70% { transform: translate(-2%, 1%); }
  80% { transform: translate(1%, -2%); }
  90% { transform: translate(3%, 2%); }
}


/* ─── SPLASH CONTAINER ─────────────────────────────────────── */

.splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0D1117;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* Exit animation — triggers at 3.5s, takes 0.7s */
  animation: splashExit 0.7s cubic-bezier(0.76, 0, 0.24, 1) 3.5s forwards;
}

/* Film-grain overlay for texture — broadcasts always have this */
.splash::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    repeating-conic-gradient(
      rgba(255, 255, 255, 0.01) 0%,
      transparent 0.5%,
      transparent 1%
    );
  background-size: 200px 200px;
  animation: splashGrainShift 0.5s steps(6) infinite;
  pointer-events: none;
  z-index: 1;
}

/* Dark vignette — deepens the edges like a broadcast frame */
.splash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 70% at center,
    transparent 30%,
    rgba(0, 0, 0, 0.6) 100%
  );
  pointer-events: none;
  z-index: 2;
}


/* ─── SPLASH CONTENT ───────────────────────────────────────── */

.splash-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}


/* ─── LOGO WRAPPER + RING ──────────────────────────────────── */

.splash-logo-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 28px;
}

/* Radial glow behind the entire logo area */
.splash-logo-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 102, 51, 0.25) 0%,
    rgba(255, 215, 0, 0.08) 40%,
    transparent 70%
  );
  transform: translate(-50%, -50%) scale(0);
  animation: splashRadialPulse 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.4s infinite;
  pointer-events: none;
  z-index: 0;
}

/* Secondary outer glow — gives depth like stadium lights */
.splash-logo-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.04) 0%,
    transparent 60%
  );
  transform: translate(-50%, -50%);
  animation: splashRadialPulse 3s cubic-bezier(0.4, 0, 0.2, 1) 0.6s infinite;
  pointer-events: none;
  z-index: 0;
}

/* SVG Ring */
.splash-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;

  /* Ring glow after it draws — starts pulsing at 1.2s */
  animation: splashRingGlow 2s ease-in-out 1.2s infinite;
}

.splash-ring circle {
  fill: none;
  stroke: url(#splashRingGradient, #FFD700);
  stroke-width: 2.5;
  stroke-linecap: round;

  /* Circumference of r=90: 2 * PI * 90 ≈ 565.49 */
  stroke-dasharray: 566;
  stroke-dashoffset: 566;

  /* Draw animation: starts at 0.2s, takes 1.2s */
  animation: splashRingDraw 1.2s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

/* Fallback stroke color if gradient not present */
.splash-ring circle {
  stroke: #FFD700;
}

/* Rotating shimmer on the ring — a bright spot that sweeps around */
.splash-ring::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #FFD700;
  box-shadow: 0 0 12px 4px rgba(255, 215, 0, 0.6),
              0 0 30px 8px rgba(255, 215, 0, 0.2);
  opacity: 0;
  animation: splashShimmerSweep 1.2s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

/* Logo image */
.splash-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 65%;
  height: 65%;
  object-fit: contain;
  transform-origin: center;
  z-index: 3;

  /* Reveal: starts at 0.5s, takes 0.8s */
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  animation: splashLogoReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

/* Fix transform-origin for the logo since it uses translate for centering */
@keyframes splashLogoReveal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    filter: brightness(0);
  }
  50% {
    opacity: 1;
    filter: brightness(1.4);
  }
  70% {
    transform: translate(-50%, -50%) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
}


/* ─── TEXT BLOCK ────────────────────────────────────────────── */

.splash-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.splash-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  line-height: 1;
}

/* ── "BETTERHOPE" — letter-by-letter reveal ─────────── */

.splash-word {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.15em;
  display: inline-flex;
  overflow: hidden;
}

/*
  Since we cannot split letters with pure CSS, we use a word-level
  animation that mimics a broadcast text reveal — clip + blur sweep.
  If JS splits into <span>s, the per-letter keyframe below kicks in.
*/
.splash-word {
  opacity: 0;
  animation: splashWordReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.3s forwards;
}

@keyframes splashWordReveal {
  0% {
    opacity: 0;
    transform: translateY(-20px);
    filter: blur(10px);
    letter-spacing: 0.4em;
  }
  50% {
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    letter-spacing: 0.15em;
  }
}

/* If JS wraps each letter in <span class="splash-letter">, use this: */
.splash-word .splash-letter {
  display: inline-block;
  opacity: 0;
  animation: splashLetterIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Override the word-level anim when letters exist */
.splash-word:has(.splash-letter) {
  opacity: 1;
  animation: none;
  filter: none;
  transform: none;
  letter-spacing: 0.15em;
}

/* Stagger each letter — 10 letters in BETTERHOPE */
.splash-word .splash-letter:nth-child(1)  { animation-delay: 1.30s; }
.splash-word .splash-letter:nth-child(2)  { animation-delay: 1.35s; }
.splash-word .splash-letter:nth-child(3)  { animation-delay: 1.40s; }
.splash-word .splash-letter:nth-child(4)  { animation-delay: 1.45s; }
.splash-word .splash-letter:nth-child(5)  { animation-delay: 1.50s; }
.splash-word .splash-letter:nth-child(6)  { animation-delay: 1.55s; }
.splash-word .splash-letter:nth-child(7)  { animation-delay: 1.60s; }
.splash-word .splash-letter:nth-child(8)  { animation-delay: 1.65s; }
.splash-word .splash-letter:nth-child(9)  { animation-delay: 1.70s; }
.splash-word .splash-letter:nth-child(10) { animation-delay: 1.75s; }


/* ── "SPORTS CLUB" — slides up ──────────────────────── */

.splash-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.7rem, 2.2vw, 1rem);
  font-weight: 600;
  color: #C9D1D9;
  text-transform: uppercase;
  letter-spacing: 0.45em;
  opacity: 0;
  animation: splashSubtitleSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) 1.85s forwards;
}

/* ── "Est. 1960" — gold fade in ─────────────────────── */

.splash-est {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.75rem, 2vw, 1rem);
  font-weight: 400;
  font-style: italic;
  color: #FFD700;
  opacity: 0;
  margin-top: 6px;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  animation: splashEstFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) 2.15s forwards;
}


/* ─── HORIZONTAL LINE ──────────────────────────────────────── */

.splash-line {
  height: 2px;
  width: 0;
  margin-top: 20px;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent,
    #C49A02 20%,
    #FFD700 50%,
    #C49A02 80%,
    transparent
  );
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3),
              0 0 30px rgba(255, 215, 0, 0.1);
  animation: splashLineExpand 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.3s forwards;
}


/* ─── TAGLINE ──────────────────────────────────────────────── */

.splash-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.55rem, 1.5vw, 0.75rem);
  font-weight: 300;
  color: #8B949E;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 14px;
  opacity: 0;
  animation: splashTaglineFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) 2.55s forwards;
}


/* ─── PROGRESS BAR ─────────────────────────────────────────── */

.splash-progress {
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 60vw);
  height: 3px;
  background: rgba(48, 54, 61, 0.6);
  border-radius: 3px;
  overflow: hidden;
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    #006633,
    #00994d 30%,
    #FFD700 70%,
    #C49A02
  );
  box-shadow: 0 0 10px rgba(0, 153, 77, 0.4),
              0 0 20px rgba(255, 215, 0, 0.2);

  /* Fill: starts immediately, takes 3.3s (finishes just before exit) */
  animation: splashProgressFill 3.3s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

/* Shimmer sweep on the progress bar */
.splash-progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 50%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  animation: splashProgressShimmer 1.2s ease-in-out 0.5s infinite;
}


/* ─── PARTICLES ────────────────────────────────────────────── */

.splash-particles {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

/* Golden particle dots using pseudo-elements and box-shadows */
.splash-particles::before,
.splash-particles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

/* Particle cluster 1 — bottom center, drifts up-right */
.splash-particles::before {
  bottom: 40%;
  left: 45%;
  width: 4px;
  height: 4px;
  background: #FFD700;
  box-shadow:
    /* Each shadow = separate particle at different offset */
    20px 10px 0 1px rgba(255, 215, 0, 0.6),
    -30px 30px 0 0.5px rgba(0, 153, 77, 0.7),
    50px -10px 0 1.5px rgba(255, 215, 0, 0.4),
    -60px -20px 0 1px rgba(0, 153, 77, 0.5),
    80px 25px 0 0.5px rgba(255, 215, 0, 0.5),
    -15px -50px 0 1px rgba(255, 215, 0, 0.3),
    40px 45px 0 0.5px rgba(0, 153, 77, 0.6),
    -70px 15px 0 1px rgba(255, 215, 0, 0.4),
    100px -30px 0 1.5px rgba(0, 102, 51, 0.5),
    -90px -40px 0 0.5px rgba(255, 215, 0, 0.5),
    25px -60px 0 1px rgba(0, 153, 77, 0.4),
    -45px 60px 0 0.5px rgba(255, 215, 0, 0.6),
    65px 50px 0 1px rgba(0, 102, 51, 0.3),
    -110px 5px 0 1.5px rgba(255, 215, 0, 0.3),
    110px 15px 0 0.5px rgba(0, 153, 77, 0.5);
  animation: splashParticleDrift1 3s ease-out 0.8s infinite;
}

/* Particle cluster 2 — offset position, drifts up-left */
.splash-particles::after {
  bottom: 35%;
  left: 55%;
  width: 3px;
  height: 3px;
  background: rgba(0, 153, 77, 0.8);
  box-shadow:
    15px 20px 0 1px rgba(255, 215, 0, 0.5),
    -25px 5px 0 0.5px rgba(0, 153, 77, 0.6),
    45px -25px 0 1px rgba(255, 215, 0, 0.3),
    -55px 35px 0 1.5px rgba(0, 102, 51, 0.5),
    70px 15px 0 0.5px rgba(255, 215, 0, 0.4),
    -85px -15px 0 1px rgba(0, 153, 77, 0.5),
    30px 55px 0 0.5px rgba(255, 215, 0, 0.5),
    -40px -45px 0 1px rgba(0, 102, 51, 0.4),
    95px -5px 0 1.5px rgba(255, 215, 0, 0.3),
    -100px 25px 0 0.5px rgba(0, 153, 77, 0.6);
  animation: splashParticleDrift2 3.5s ease-out 1.0s infinite;
}

/* Extra particle layer on the splash-content for depth */
.splash-content::before {
  content: '';
  position: absolute;
  bottom: 20%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.7);
  box-shadow:
    -120px 40px 0 1px rgba(255, 215, 0, 0.3),
    130px -30px 0 0.5px rgba(0, 153, 77, 0.5),
    -80px -60px 0 1px rgba(255, 215, 0, 0.4),
    90px 50px 0 1.5px rgba(0, 102, 51, 0.4),
    -150px 10px 0 0.5px rgba(255, 215, 0, 0.5),
    160px 20px 0 1px rgba(0, 153, 77, 0.3);
  animation: splashParticleDrift3 4s ease-out 0.5s infinite;
  pointer-events: none;
  z-index: 0;
}


/* ─── LIGHT STREAKS (vertical broadcast-style accents) ─────── */

.splash-content::after {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  width: 1px;
  height: 80px;
  margin-left: 0;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 215, 0, 0.15),
    rgba(255, 215, 0, 0.4),
    rgba(255, 215, 0, 0.15),
    transparent
  );
  opacity: 0;
  animation: splashLightStreak 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
  pointer-events: none;
  z-index: 0;
}


/* ─── SPLASH HIDDEN STATE (after animation completes) ──────── */

/* After the 4.2s total (3.5s delay + 0.7s exit), hide and remove from flow */
.splash.splash-done {
  display: none;
}

/* JS-free fallback: after animation-fill-mode forwards, pointer-events off */
.splash {
  animation-fill-mode: forwards;
}

/* When the exit animation finishes, the splash sits at translateY(-100%).
   Ensure it doesn't block interaction: */
.splash:not(.splash-done) {
  will-change: transform, opacity;
}


/* ─── RESPONSIVE ───────────────────────────────────────────── */

/* Small phones (375px and below) */
@media (max-width: 420px) {
  .splash-logo-wrapper {
    width: 130px;
    height: 130px;
    margin-bottom: 20px;
  }

  .splash-logo-wrapper::before {
    width: 200px;
    height: 200px;
  }

  .splash-logo-wrapper::after {
    width: 260px;
    height: 260px;
  }

  .splash-subtitle {
    letter-spacing: 0.3em;
  }

  @keyframes splashSubtitleSlide {
    0% {
      opacity: 0;
      transform: translateY(25px);
      letter-spacing: 0.2em;
    }
    100% {
      opacity: 1;
      transform: translateY(0);
      letter-spacing: 0.3em;
    }
  }

  .splash-progress {
    bottom: -70px;
    width: min(220px, 70vw);
  }

  @keyframes splashLineExpand {
    0% {
      width: 0;
      opacity: 0;
    }
    20% {
      opacity: 1;
    }
    100% {
      width: 140px;
      opacity: 1;
    }
  }
}

/* Tablets */
@media (min-width: 421px) and (max-width: 768px) {
  .splash-logo-wrapper {
    width: 155px;
    height: 155px;
    margin-bottom: 24px;
  }
}

/* Large desktops */
@media (min-width: 1200px) {
  .splash-logo-wrapper {
    width: 200px;
    height: 200px;
    margin-bottom: 32px;
  }

  .splash-logo-wrapper::before {
    width: 380px;
    height: 380px;
  }

  .splash-logo-wrapper::after {
    width: 500px;
    height: 500px;
  }

  @keyframes splashLineExpand {
    0% {
      width: 0;
      opacity: 0;
    }
    20% {
      opacity: 1;
    }
    100% {
      width: 260px;
      opacity: 1;
    }
  }

  .splash-progress {
    bottom: -120px;
    width: 320px;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .splash,
  .splash *,
  .splash *::before,
  .splash *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .splash {
    animation: splashExit 0.01ms 0.5s forwards;
  }
}

/* Ultra-wide screens — keep content centered and sized reasonably */
@media (min-width: 1800px) {
  .splash-logo-wrapper {
    width: 220px;
    height: 220px;
  }
}


/* ─── PERFORMANCE ──────────────────────────────────────────── */

/* Promote animated elements to GPU layers */
.splash,
.splash-ring,
.splash-logo,
.splash-word,
.splash-subtitle,
.splash-est,
.splash-line,
.splash-tagline,
.splash-progress-bar,
.splash-particles {
  will-change: transform, opacity;
}

/* Remove will-change after all animations are done (cleanup) */
.splash.splash-done *,
.splash.splash-done *::before,
.splash.splash-done *::after {
  will-change: auto;
}
