/* ─────────────────────────────────────────────
   TravelX PWA Splash – Animation Keyframes
   ───────────────────────────────────────────── */

/* ── Container ── */
#pwa-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0A1628;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Particle canvas (behind everything) ── */
#splash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Plane wrapper ── */
#splash-plane-wrap {
  position: relative;
  z-index: 2;
  width: min(72vw, 340px);
  /* Entry state: tiny at bottom, tilted, blurred */
  transform: translateY(60vh) scale(0.08) rotate(-8deg);
  filter: blur(2px);
  opacity: 0.6;
  will-change: transform, filter, opacity;
}

#splash-plane-wrap img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
}

/* ── Logo block ── */
#splash-logo {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  will-change: transform, opacity;
}

#splash-brand {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 700;
  letter-spacing: 4px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

/* Gold underline accent */
#splash-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #F5A623, #FFD700, #F5A623);
  border-radius: 2px;
  transition: width 0.5s ease 0.15s;
}

#splash-logo.logo-visible #splash-brand::after {
  width: 80%;
}

#splash-tagline {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(11px, 2.8vw, 14px);
  font-weight: 400;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(8px);
  will-change: transform, opacity;
}

/* ── Keyframes ── */

/* Phase 1: plane ascent — entry → center */
@keyframes planeEntry {
  0%   { transform: translateY(60vh)  scale(0.08) rotate(-8deg); filter: blur(2px);   opacity: 0.5; }
  30%  { transform: translateY(20vh)  scale(0.45) rotate(-5deg); filter: blur(1.5px); opacity: 0.8; }
  70%  { transform: translateY(-2vh)  scale(0.95) rotate(-1deg); filter: blur(0.3px); opacity: 1;   }
  85%  { transform: translateY(1vh)   scale(1.08) rotate(0deg);  filter: blur(0px);   opacity: 1;   }
  100% { transform: translateY(0)     scale(1.0)  rotate(0deg);  filter: blur(0px);   opacity: 1;   }
}

/* Phase 2: gentle hover after arrival */
@keyframes planeHover {
  0%, 100% { transform: translateY(0px)   scale(1); }
  50%       { transform: translateY(-6px)  scale(1); }
}

/* Phase 3: logo reveal */
@keyframes logoReveal {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Phase 4: tagline reveal */
@keyframes taglineReveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* Phase 5: plane exit — flies off top while fading */
@keyframes planeExit {
  0%   { transform: translateY(0)     scale(1.0); opacity: 1; }
  40%  { transform: translateY(-8vh)  scale(1.05); opacity: 0.9; }
  100% { transform: translateY(-80vh) scale(0.6);  opacity: 0; }
}

/* Phase 5: full splash fade */
@keyframes splashFade {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Reduced motion: skip all animations ── */
@media (prefers-reduced-motion: reduce) {
  #splash-plane-wrap {
    transform: translateY(0) scale(1) rotate(0deg) !important;
    filter: none !important;
    opacity: 1 !important;
    animation: none !important;
  }
  #splash-logo {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  #splash-tagline {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
