/* =========================================================
   Motion — reveals, floats, entrances
   ========================================================= */

@keyframes px-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes px-float-soft {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}

@keyframes px-pulse-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes px-rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes px-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll reveal */
.px-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.px-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.px-reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.px-reveal-left.is-in {
  opacity: 1;
  transform: translateX(0);
}

.px-reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.px-reveal-scale.is-in {
  opacity: 1;
  transform: scale(1);
}

/* Hero entrance (first paint) */
.px-hero-copy .px-eyebrow,
.px-hero-copy .px-hero-title,
.px-hero-copy .px-hero-lead,
.px-hero-copy .px-hero-actions,
.px-hero-copy .px-hero-stats {
  animation: px-rise 0.9s var(--ease-out) both;
}

.px-hero-copy .px-eyebrow { animation-delay: 0.05s; }
.px-hero-copy .px-hero-title { animation-delay: 0.12s; }
.px-hero-copy .px-hero-lead { animation-delay: 0.2s; }
.px-hero-copy .px-hero-actions { animation-delay: 0.28s; }
.px-hero-copy .px-hero-stats { animation-delay: 0.36s; }

.px-stage {
  animation: px-rise 1s var(--ease-out) 0.15s both;
}

.px-stage-layer.cast img {
  animation: px-float-soft 7s ease-in-out infinite;
}

.px-stage-layer.party img {
  animation: px-float 5.5s ease-in-out infinite;
  animation-delay: -2s;
}

.px-stage-layer.frank img {
  animation: px-float 4.5s ease-in-out infinite;
  animation-delay: -1s;
}

/* Magnetic will override transform via JS inline */
.px-magnetic {
  will-change: transform;
}

.px-tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

/* Stage layer float offsets for parallax base */
.px-stage-layer {
  transition: transform 0.12s linear;
}

@media (prefers-reduced-motion: reduce) {
  .px-reveal,
  .px-reveal-left,
  .px-reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .px-hero-copy .px-eyebrow,
  .px-hero-copy .px-hero-title,
  .px-hero-copy .px-hero-lead,
  .px-hero-copy .px-hero-actions,
  .px-hero-copy .px-hero-stats,
  .px-stage,
  .px-stage-layer.cast img,
  .px-stage-layer.party img,
  .px-stage-layer.frank img,
  .px-orbit,
  .px-discord-art img {
    animation: none !important;
  }
}
