/* Konami easter egg (app/js/egg.js). Kept out of style.css on purpose. */
#egg-pilot {
  position: fixed;
  left: 50%;
  bottom: -260px;
  width: 180px;
  height: 227px;
  margin-left: -90px;
  z-index: 9999;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
#egg-pilot img {
  width: 180px;
  height: auto;
  display: block;
  /* The image carries its own alpha (rembg human segmentation, faded out
     through the neck) — no clip-path needed. */
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}
#egg-pilot.on-pad { animation: egg-rumble 0.12s linear infinite; }
@keyframes egg-rumble {
  0% { transform: translate3d(-2px, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(2px, -1px, 0) rotate(1deg); }
  100% { transform: translate3d(-1px, 1px, 0) rotate(0deg); }
}
.egg-puff {
  position: fixed;
  z-index: 9998;
  pointer-events: none;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(170, 150, 110, 0.9), rgba(120, 100, 70, 0.35) 60%, transparent 70%);
  animation: egg-puff 1.4s ease-out forwards;
}
@keyframes egg-puff {
  0% { transform: scale(0.4) translateY(0); opacity: 0.9; }
  100% { transform: scale(2.6) translateY(70px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #egg-pilot.on-pad { animation: none; }
}

/* ---- thruster flame (under the chin; small on the pad, full burn in flight) ---- */
#egg-pilot { overflow: visible; }
.egg-flame {
  position: absolute;
  left: 50%;
  top: 93%;                 /* under the jaw, where the neck fades out */
  width: 54px;
  height: 0;                /* grows via --burn */
  margin-left: -27px;
  transform-origin: 50% 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.egg-flame span {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 20% 20% 80% 80%;   /* teardrop pointing down */
  animation: egg-flicker 0.14s ease-in-out infinite alternate;
}
.egg-flame .f-outer { width: 54px; height: calc(var(--burn, 40px) * 1.8); background: radial-gradient(ellipse at 50% 15%, #ff8a2a 0%, #ff4d1a 45%, rgba(255, 60, 20, 0) 75%); filter: blur(1.5px); }
.egg-flame .f-mid   { width: 34px; height: calc(var(--burn, 40px) * 1.35); background: radial-gradient(ellipse at 50% 15%, #ffd23f 0%, #ff9a1f 55%, rgba(255, 150, 30, 0) 78%); animation-delay: 0.05s; }
.egg-flame .f-core  { width: 16px; height: var(--burn, 40px); background: radial-gradient(ellipse at 50% 10%, #fff7c2 0%, #ffe56b 50%, rgba(255, 230, 100, 0) 80%); animation-delay: 0.09s; }
@keyframes egg-flicker {
  from { transform: translateX(-50%) scaleY(0.92) scaleX(1.04) skewX(-2deg); }
  to   { transform: translateX(-50%) scaleY(1.08) scaleX(0.96) skewX(2deg); }
}
#egg-pilot.on-pad .egg-flame  { opacity: 1; --burn: 34px; }
#egg-pilot.burning .egg-flame { opacity: 1; --burn: 110px; }
