/* Additional animations for the website */

/* Cursor pulse effect */
.cursor-pulse {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(160, 217, 149, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.cursor-pulse.active {
  opacity: 1;
  width: 40px;
  height: 40px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.2;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
}

/* Letter animation for hero title */
.letter-animation {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}

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

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

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

/* Growing dots animation for loading/waiting */
.growing-dots {
  display: inline-block;
}

.growing-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-primary);
  margin: 0 3px;
}

.growing-dots span:nth-child(1) {
  animation: growDot 1.5s infinite;
}

.growing-dots span:nth-child(2) {
  animation: growDot 1.5s 0.2s infinite;
}

.growing-dots span:nth-child(3) {
  animation: growDot 1.5s 0.4s infinite;
}

@keyframes growDot {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.5);
  }
  40% {
    transform: scale(1);
  }
}

/* Shimmer effect for elements */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    left: 150%;
  }
}

/* Animated underline for text */
.animate-underline {
  position: relative;
  display: inline-block;
}

.animate-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

.animate-underline:hover::after {
  width: 100%;
}

/* Leaf shake animation */
.leaf-shake {
  animation: leafShake 3s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes leafShake {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(5deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Paint brush stroke reveal */
.brush-reveal {
  position: relative;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  background-color: var(--color-primary-dark);
}

.brush-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: white;
  animation: brushStroke 1s forwards;
}

@keyframes brushStroke {
  to {
    width: 100%;
  }
}

/* Nature-inspired loading spinner */
.leaf-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  position: relative;
}

.leaf-spinner::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50% 0 50% 50%;
  background-color: var(--color-secondary);
  animation: leafSpin 1.5s linear infinite;
}

@keyframes leafSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}