/* ============================================
   FreshPress — Keyframe Animations & Effects
   Premium Laundromat Website
   ============================================ */

/* ---- Bubble Float Animation ---- */
@keyframes floatUp {
  0% {
    transform: translateY(100vh) scale(0.6);
    opacity: 0;
  }
  20% {
    opacity: 0.8;
  }
  80% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-20vh) scale(1.2);
    opacity: 0;
  }
}

/* ---- WhatsApp Button Pulse Ring ---- */
@keyframes pulseRing {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.25);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* ---- Shimmer Light Sweep ---- */
@keyframes shimmerSweep {
  0% {
    left: -100%;
  }
  30%, 100% {
    left: 150%;
  }
}

/* ---- Infinite Marquee Scroll Left & Right ---- */
@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 12px));
  }
}

@keyframes scrollRight {
  0% {
    transform: translateX(calc(-50% - 12px));
  }
  100% {
    transform: translateX(0);
  }
}

/* ---- Gentle Float ---- */
@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

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

/* ---- Gradient Rotation ---- */
@keyframes gradientRotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient-border {
  background-size: 200% 200%;
  animation: gradientRotate 6s ease infinite;
}

/* ---- Sparkle Twinkle ---- */
@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(45deg);
  }
}

.sparkle-icon {
  animation: twinkle 3s ease-in-out infinite;
}

/* ---- Typing Cursor Blink ---- */
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  background-color: var(--color-primary);
  margin-left: 4px;
  animation: blinkCursor 0.8s infinite;
  vertical-align: middle;
  height: 0.9em;
}

/* ---- 3D Card Tilt Utilities ---- */
.tilt-card-wrapper {
  perspective: 1000px;
}

.tilt-card {
  transition: transform 0.15s ease-out, box-shadow 0.25s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-inner {
  transform: translateZ(20px);
}

/* ---- Scroll Reveal Initial Classes ---- */
.reveal-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- 3D Flip Card Animations ---- */
.flip-card {
  perspective: 1200px;
  background: transparent;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.34, 1.25, 0.64, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
}

.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
}

/* ---- Card Glow Pulse ---- */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.1);
  }
  50% {
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.2);
  }
}

.card-glow-pulse {
  animation: glowPulse 4s ease-in-out infinite;
}
