/* TOY BOX SPLASH
   This file is isolated. Remove its <link>, markup block, and script reference
   from toy_box.html to remove the splash without affecting the page. */

.toybox-splash {
  --splash-black: #05090b;
  --splash-gold: #f0ca79;
  --splash-blue: #2852a4;
  --splash-blue-light: #7fa9ff;
  --splash-teal: #2aa69a;
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fffdf6;
  background:
    radial-gradient(circle at 50% 46%, rgba(40, 82, 164, 0.88), transparent 28rem),
    radial-gradient(circle at 22% 82%, rgba(42, 166, 154, 0.36), transparent 25rem),
    radial-gradient(circle at 82% 14%, rgba(127, 169, 255, 0.24), transparent 22rem),
    var(--splash-black);
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.toybox-splash::before,
.toybox-splash::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.toybox-splash::before {
  width: min(72vw, 58rem);
  aspect-ratio: 1;
  border: 1px solid rgba(240, 202, 121, 0.28);
  box-shadow:
    0 0 0 2.2rem rgba(40, 82, 164, 0.08),
    0 0 0 5.4rem rgba(42, 166, 154, 0.055),
    inset 0 0 5rem rgba(240, 202, 121, 0.08);
  animation: toybox-orbit 2s cubic-bezier(0.22, 0.8, 0.25, 1) both;
}

.toybox-splash::after {
  width: 18rem;
  height: 18rem;
  background: rgba(240, 202, 121, 0.1);
  filter: blur(4rem);
  animation: toybox-pulse 1.55s ease-in-out both;
}

.toybox-splash.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.toybox-splash-copy {
  position: relative;
  z-index: 3;
  width: min(92vw, 68rem);
  text-align: center;
  transform: translateY(0);
  animation: toybox-copy-in 1.55s cubic-bezier(0.2, 0.84, 0.22, 1) both;
}

.toybox-splash-kicker {
  margin: 0 0 clamp(0.55rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.88);
  font: 700 clamp(0.62rem, 1.35vw, 0.9rem)/1 "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: clamp(0.24em, 0.7vw, 0.5em);
  text-transform: uppercase;
}

.toybox-splash-title {
  margin: 0;
  color: var(--splash-gold);
  font: 700 clamp(3rem, 11vw, 8rem)/0.87 Georgia, "Times New Roman", serif;
  letter-spacing: -0.055em;
  text-shadow:
    0 1px 0 rgba(255, 245, 189, 0.7),
    0 0 1.8rem rgba(240, 202, 121, 0.28),
    0 0 4rem rgba(40, 82, 164, 0.42);
  text-transform: uppercase;
}

.toybox-splash-cadence {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: clamp(1rem, 3vw, 1.8rem) auto 0;
}

.toybox-splash-cadence span {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--splash-blue-light);
  box-shadow: 0 0 1rem currentColor;
  animation: toybox-cadence 1.15s ease-in-out infinite;
}

.toybox-splash-cadence span:nth-child(2) {
  color: var(--splash-teal);
  background: var(--splash-teal);
  animation-delay: 110ms;
}

.toybox-splash-cadence span:nth-child(3) {
  color: var(--splash-gold);
  background: var(--splash-gold);
  animation-delay: 220ms;
}

.toybox-splash-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.toybox-splash-particle {
  position: absolute;
  left: var(--x);
  bottom: -3rem;
  display: block;
  color: var(--particle-color, var(--splash-gold));
  font: 700 var(--size, 1rem)/1 Georgia, "Times New Roman", serif;
  opacity: 0;
  filter: drop-shadow(0 0 0.65rem currentColor);
  transform: translate3d(0, 0, 0) rotate(0deg);
  animation: toybox-float-up var(--duration, 1.8s) ease-out var(--delay, 0s) both;
}

.toybox-splash-particle.is-blue {
  --particle-color: #7fa9ff;
}

.toybox-splash-particle.is-teal {
  --particle-color: #59d4c8;
}

.toybox-splash-particle.is-white {
  --particle-color: #fffdf6;
}

.toybox-splash-skip {
  position: absolute;
  top: clamp(0.8rem, 2vw, 1.5rem);
  right: clamp(0.8rem, 2vw, 1.5rem);
  z-index: 5;
  padding: 0.6rem 0.75rem;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(5, 9, 11, 0.34);
  font: 700 0.52rem/1 "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

@keyframes toybox-copy-in {
  0% {
    opacity: 0;
    transform: translateY(1.3rem) scale(0.96);
    filter: blur(0.35rem);
  }
  34% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes toybox-float-up {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.7);
  }
  16% {
    opacity: 0.92;
  }
  78% {
    opacity: 0.68;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 1rem), -112vh, 0) rotate(var(--turn, 120deg)) scale(1.15);
  }
}

@keyframes toybox-orbit {
  0% {
    opacity: 0;
    transform: scale(0.68) rotate(-10deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0.55;
    transform: scale(1.08) rotate(5deg);
  }
}

@keyframes toybox-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.7);
  }
  55% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes toybox-cadence {
  0%, 100% {
    opacity: 0.45;
    transform: translateY(0) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translateY(-0.28rem) scale(1.1);
  }
}

@media (max-width: 520px) {
  .toybox-splash::before {
    width: 92vw;
  }

  .toybox-splash-title {
    font-size: clamp(2.35rem, 14vw, 4.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toybox-splash::before,
  .toybox-splash::after,
  .toybox-splash-copy,
  .toybox-splash-particle,
  .toybox-splash-cadence span {
    animation: none !important;
  }

  .toybox-splash-particle,
  .toybox-splash-cadence {
    display: none;
  }
}
