/* Cold-open splash — RESTORED Nov 24 2026 at the owner's word.
   The original full-screen splash (splash-bg.jpg, the guaguita at
   sunset) was removed Nov 23 2026 (Optimization Center finding
   #26); the owner asked for it back the next night, with the
   entrance from his chosen example #3 («Volteretas»): both mascots
   come in PLAYING, somersaulting through the air — la nena spins
   in from the left (-360°), el nene from the right (+360°) — and
   land floating big in the sky over the truck, at the original
   splash positions (owner's Nov 16 recording: la nena at ~11% of
   the width, el nene at ~52%, heads near the top), bobbing softly
   once they land. Then the title, the «FOOD TRUCK · AGUADA, PR»
   line and a gently pulsing «Toca para entrar». A tap anywhere
   closes it with a fade; the companion script auto-closes it at
   ~2.9s, and the safety fade at the bottom of this file clears it
   at 6s even if that script ever fails to load. The mascot art is
   the official cutouts (mascot-girl.webp / mascot-boy.webp, the
   same files the top bar uses). Self-contained on purpose: nothing
   here touches the app styles. */

#jp-splash {
  position: fixed;
  inset: 0;
  z-index: 3000;
  overflow: hidden;
  background: #59324a url("splash-bg.jpg") center center / cover no-repeat;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  opacity: 1;
  transition: opacity 0.45s ease;
  animation: jp-splash-safety 0.6s ease 6s forwards;
}
#jp-splash.jp-splash-out {
  opacity: 0;
}

.jp-splash-mascot {
  position: absolute;
  will-change: transform;
}
.jp-splash-mascot img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(43, 10, 32, 0.35));
}

/* La nena — in from the left, spinning -360°. */
.jp-splash-girl {
  left: 11%;
  top: 6%;
  width: min(35vw, 21vh);
  animation: jp-girl-in 1.05s cubic-bezier(0.25, 0.8, 0.3, 1) 0.05s both;
}
.jp-splash-girl img {
  animation: jp-bob 2.8s ease-in-out 1.25s infinite alternate;
}
/* El nene — in from the right, spinning +360°. */
.jp-splash-boy {
  left: 52%;
  top: 4.5%;
  width: min(46vw, 26vh);
  animation: jp-boy-in 0.9s cubic-bezier(0.25, 0.8, 0.3, 1) 0.15s both;
}
.jp-splash-boy img {
  animation: jp-bob 3.1s ease-in-out 1.2s infinite alternate;
}

@keyframes jp-girl-in {
  0% { transform: translateX(-75vw) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateX(0) rotate(-360deg); opacity: 1; }
}
@keyframes jp-boy-in {
  0% { transform: translateX(75vw) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateX(0) rotate(360deg); opacity: 1; }
}
/* Soft floating once they have landed. */
@keyframes jp-bob {
  from { transform: translateY(-6px); }
  to { transform: translateY(7px); }
}

.jp-splash-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  padding: 0 16px;
  text-align: center;
  pointer-events: none;
}
.jp-splash-title {
  font-family: "Archivo Black", Archivo, sans-serif;
  font-size: clamp(32px, 10.5vw, 80px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 3px 18px rgba(59, 16, 44, 0.45), 0 1px 3px rgba(59, 16, 44, 0.5);
  animation: jp-rise 0.55s ease-out 1s both;
}
.jp-splash-sub {
  margin-top: 10px;
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: clamp(12px, 3.6vw, 19px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 10px rgba(59, 16, 44, 0.5);
  animation: jp-rise 0.55s ease-out 1.18s both;
}
.jp-splash-tap {
  margin-top: clamp(18px, 4.5vh, 40px);
  font-family: Archivo, sans-serif;
  font-weight: 800;
  font-size: clamp(16px, 5vw, 24px);
  color: #fff;
  text-shadow: 0 2px 12px rgba(59, 16, 44, 0.55);
  animation: jp-rise 0.5s ease-out 1.38s both, jp-tap-pulse 1.6s ease-in-out 2s infinite;
}
@keyframes jp-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes jp-tap-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.97); }
}

/* Safety net: if the dismissal script never runs, the splash
   still fades itself away instead of trapping the customer. */
@keyframes jp-splash-safety {
  to { opacity: 0; visibility: hidden; }
}

/* Reduced motion: no somersaults, no bobbing — a plain fade-in. */
@media (prefers-reduced-motion: reduce) {
  .jp-splash-girl, .jp-splash-boy { animation: jp-rise 0.4s ease-out both; }
  .jp-splash-girl img, .jp-splash-boy img { animation: none; }
  .jp-splash-title { animation-delay: 0.1s; }
  .jp-splash-sub { animation-delay: 0.2s; }
  .jp-splash-tap { animation: jp-rise 0.4s ease-out 0.3s both; }
}
