/* =============================================
   Brampton Cleaning Services — Animations
   ce-animations.css
   ============================================= */

/* ---- Keyframes ---- */
@keyframes ce-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

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

@keyframes ce-slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

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

@keyframes ce-rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes ce-bounce-in {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes ce-counter-spin {
  from { transform: rotateX(90deg); opacity: 0; }
  to { transform: rotateX(0deg); opacity: 1; }
}

@keyframes ce-hero-float-1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -15px) rotate(5deg); }
  50% { transform: translate(-5px, -25px) rotate(-3deg); }
  75% { transform: translate(-12px, -10px) rotate(2deg); }
}

@keyframes ce-hero-float-2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-15px, 10px) rotate(-6deg); }
  66% { transform: translate(12px, 20px) rotate(4deg); }
}

@keyframes ce-hero-float-3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

@keyframes ce-gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes ce-draw-line {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

/* ---- Scroll-triggered animations (base states) ---- */
.ce-anim-ready {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ce-anim-fade-up { transform: translateY(30px); }
.ce-anim-fade-left { transform: translateX(-30px); }
.ce-anim-fade-right { transform: translateX(30px); }
.ce-anim-scale-in { transform: scale(0.92); }

.ce-anim-ready.ce-anim-visible {
  opacity: 1;
  transform: none !important;
}

/* Stagger delays */
.ce-anim-delay-1 { transition-delay: 0.1s; }
.ce-anim-delay-2 { transition-delay: 0.2s; }
.ce-anim-delay-3 { transition-delay: 0.3s; }
.ce-anim-delay-4 { transition-delay: 0.4s; }
.ce-anim-delay-5 { transition-delay: 0.5s; }
.ce-anim-delay-6 { transition-delay: 0.6s; }

/* ---- Hero Decorative Elements ---- */
.ce-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.ce-hero-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(74,158,202,0.25) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  animation: ce-hero-float-1 8s ease-in-out infinite;
}

.ce-hero-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(240,165,0,0.18) 0%, transparent 70%);
  bottom: -50px;
  left: -80px;
  animation: ce-hero-float-2 10s ease-in-out infinite;
}

.ce-hero-orb-3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  top: 40%;
  left: 45%;
  animation: ce-hero-float-3 6s ease-in-out infinite;
}

/* ---- Floating Shapes ---- */
.ce-shape-circle {
  border-radius: 50%;
  position: absolute;
  pointer-events: none;
}

.ce-shape-blob {
  position: absolute;
  pointer-events: none;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: ce-hero-float-1 12s ease-in-out infinite;
}

/* ---- Loading Shimmer ---- */
.ce-shimmer {
  background: linear-gradient(90deg,
    var(--ce-light-grey) 25%,
    var(--ce-mid-grey) 50%,
    var(--ce-light-grey) 75%
  );
  background-size: 200% auto;
  animation: ce-shimmer 1.5s linear infinite;
}

/* ---- Hero gradient animation ---- */
.ce-animated-gradient {
  background-size: 200% 200%;
  animation: ce-gradient-shift 8s ease infinite;
}

/* ---- Hover effects ---- */
.ce-hover-lift {
  transition: transform var(--ce-transition), box-shadow var(--ce-transition);
}
.ce-hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--ce-shadow-lg);
}

.ce-hover-glow {
  transition: box-shadow var(--ce-transition);
}
.ce-hover-glow:hover {
  box-shadow: 0 0 30px rgba(74,158,202,0.35);
}

/* ---- Carousel / Slider transitions ---- */
.ce-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ce-carousel-item {
  flex-shrink: 0;
}

/* ---- Testimonial fade ---- */
.ce-testimonial-slide {
  animation: ce-fadeIn 0.5s ease;
}

/* ---- Number counter animation ---- */
.ce-counter-animated {
  display: inline-block;
  transition: transform 0.1s;
}

/* ---- Service selector animation ---- */
.ce-selector-result {
  animation: ce-fadeInUp 0.4s ease;
}

/* ---- Notification pulse ---- */
.ce-pulse-ring {
  position: relative;
}

.ce-pulse-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 2px solid var(--ce-secondary);
  opacity: 0;
  animation: ce-pulse 2s ease-in-out infinite;
}

/* ---- SVG path animation ---- */
.ce-svg-animated path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: ce-draw-line 2s ease forwards;
}

/* ---- Page transition ---- */
.ce-page-transition {
  animation: ce-fadeIn 0.4s ease;
}

/* ---- Reduce motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .ce-anim-ready {
    opacity: 1;
    transform: none;
  }
}
