/* ============================================
   Parqueate Landing — Animations
   ============================================ */

/* --- Keyframes --- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes blob {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Animation Classes (triggered by Intersection Observer) --- */

.anim {
  opacity: 0;
  will-change: transform, opacity;
}

.anim.visible {
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Fade In Up */
.fade-in-up.visible {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Fade In Down */
.fade-in-down.visible {
  animation: fadeInDown 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Fade In Left */
.fade-in-left.visible {
  animation: fadeInLeft 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Fade In Right */
.fade-in-right.visible {
  animation: fadeInRight 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Scale In */
.scale-in.visible {
  animation: scaleIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Slide In */
.slide-in.visible {
  animation: slideInFromBottom 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Rotate In */
.rotate-in.visible {
  animation: rotateIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Stagger delays for child elements --- */
.stagger-1 { animation-delay: 0.1s !important; }
.stagger-2 { animation-delay: 0.2s !important; }
.stagger-3 { animation-delay: 0.3s !important; }
.stagger-4 { animation-delay: 0.4s !important; }
.stagger-5 { animation-delay: 0.5s !important; }
.stagger-6 { animation-delay: 0.6s !important; }
.stagger-7 { animation-delay: 0.7s !important; }
.stagger-8 { animation-delay: 0.8s !important; }

/* --- Continuous Animations (no scroll trigger) --- */

.floating {
  animation: float 4s ease-in-out infinite;
}

.floating-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.pulsing {
  animation: pulse 2.5s ease-in-out infinite;
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.blob-animate {
  animation: blob 8s ease-in-out infinite;
}

.spin-slow {
  animation: spinSlow 20s linear infinite;
}

/* --- Hover Animations --- */

.hover-lift {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

/* --- Special Effects --- */

.shimmer-text {
  background: linear-gradient(90deg, 
    var(--color-primary) 0%, 
    #fde68a 40%, 
    var(--color-primary) 80%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}

.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* --- Phone mockup glow --- */
.phone-glow {
  position: relative;
}

.phone-glow::after {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .anim,
  .anim.visible,
  .floating,
  .floating-slow,
  .pulsing,
  .gradient-animate,
  .blob-animate,
  .spin-slow {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hover-lift:hover {
    transform: none;
  }

  .hover-scale:hover {
    transform: none;
  }
}
