/* Advanced animation effects for Othala Solutions website */

/* Scroll-based reveal animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Different animation types */
.fade-in-up {
  transform: translateY(30px);
}

.fade-in-down {
  transform: translateY(-30px);
}

.fade-in-left {
  transform: translateX(30px);
}

.fade-in-right {
  transform: translateX(-30px);
}

.zoom-in {
  transform: scale(0.9);
}

.zoom-out {
  transform: scale(1.1);
}

/* Animation delays for staggered effects */
.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

.delay-400 {
  transition-delay: 400ms;
}

.delay-500 {
  transition-delay: 500ms;
}

/* Hover glow effects */
.hover-glow {
  animation: button-glow 1.5s infinite alternate;
}

@keyframes button-glow {
  from {
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
  }
  to {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.8), 0 0 30px rgba(16, 185, 129, 0.4);
  }
}

/* Floating animations for elements */
.float {
  animation: float 6s ease-in-out infinite;
}

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

/* Particle canvas styling */
.particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Text reveal animations */
.text-reveal {
  position: relative;
  overflow: hidden;
}

.text-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: translateX(-100%);
  animation: text-reveal 1.5s forwards;
}

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

/* Pulse animation for interactive elements */
.pulse {
  animation: pulse 2s infinite;
}

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

/* 3D card effect */
.card-3d {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale3d(1.05, 1.05, 1.05);
}

/* Parallax effect for background elements */
.parallax {
  will-change: transform;
  transform: translateZ(0);
}

.parallax-slow {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax-fast {
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Cursor spotlight effect */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at var(--x) var(--y),
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  transform: translate(-100%, -100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.spotlight:hover::before {
  opacity: 1;
}

/* Icon animation enhancements */
.icon-animated {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-animated:hover {
  transform: scale(1.2);
}

/* Background gradient animation */
.gradient-animate {
  background-size: 200% 200%;
  background-image: linear-gradient(45deg, 
    var(--primary-color) 0%, 
    var(--secondary-color) 25%, 
    var(--accent-color) 50%, 
    var(--secondary-color) 75%, 
    var(--primary-color) 100%
  );
  animation: gradient-shift 15s ease infinite;
}

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