/* 
* DJ Garry - Equipment Rental Website
* Animations Stylesheet
*/

/* ===== TEXT ANIMATIONS ===== */
.animated-text {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.animated-text-delay {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards 0.3s;
}

.animated-text-delay-2 {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards 0.6s;
}

.animated-text-delay-3 {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards 0.9s;
}

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

/* ===== SECTION ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== LIGHTING EFFECTS ===== */
.lighting-effect {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
}

.light-beam {
  position: absolute;
  width: 5px;
  height: 0;
  background: linear-gradient(to bottom, rgba(255, 0, 102, 0.8), transparent);
  animation: light-beam-anim 8s infinite;
  transform-origin: top;
  opacity: 0.7;
}

@keyframes light-beam-anim {
  0% {
    height: 0;
    transform: rotate(0deg);
  }
  20% {
    height: 100vh;
    transform: rotate(45deg);
  }
  40% {
    height: 50vh;
    transform: rotate(-30deg);
  }
  60% {
    height: 80vh;
    transform: rotate(15deg);
  }
  80% {
    height: 70vh;
    transform: rotate(-45deg);
  }
  100% {
    height: 0;
    transform: rotate(0deg);
  }
}

/* ===== SPEAKER PULSE EFFECT ===== */
.speaker-pulse {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: rgba(255, 0, 102, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 0, 102, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 30px rgba(255, 0, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 0, 102, 0);
  }
}

/* ===== DIGITAL LIGHTNING EFFECT ===== */
.digital-lightning {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  /* Add a max number of children to prevent multiplication */
  max-children: 15;
}

.lightning-bolt {
  position: absolute;
  background-color: rgba(0, 198, 255, 0.8);
  width: 3px;
  height: 0;
  transform-origin: top;
  animation: lightning 5s infinite;
  filter: blur(1px);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .digital-lightning {
    /* Reduce the number of lightning bolts on mobile */
    max-children: 5;
  }
  
  .lightning-bolt {
    width: 2px;
    opacity: 0.7;
  }
}

@keyframes lightning {
  0% {
    height: 0;
    opacity: 0;
  }
  10% {
    height: 200px;
    opacity: 1;
  }
  20% {
    height: 0;
    opacity: 0;
  }
  100% {
    height: 0;
    opacity: 0;
  }
}

/* ===== EQUIPMENT HOVER EFFECTS ===== */
.equipment-item {
  position: relative;
  overflow: hidden;
}

.equipment-item::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(255, 0, 102, 0.3));
  transition: top 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.equipment-item:hover::before {
  top: 0;
}

/* ===== GLITCH TEXT EFFECT ===== */
.glitch-text {
  position: relative;
  animation: glitch 3s infinite;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  left: 2px;
  text-shadow: -1px 0 #00c6ff;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: -1px 0 #ff0066;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 #00c6ff, -0.05em -0.025em 0 #ff0066;
  }
  14% {
    text-shadow: 0.05em 0 0 #00c6ff, -0.05em -0.025em 0 #ff0066;
  }
  15% {
    text-shadow: -0.05em -0.025em 0 #00c6ff, 0.025em 0.025em 0 #ff0066;
  }
  49% {
    text-shadow: -0.05em -0.025em 0 #00c6ff, 0.025em 0.025em 0 #ff0066;
  }
  50% {
    text-shadow: 0.025em 0.05em 0 #00c6ff, 0.05em 0 0 #ff0066;
  }
  99% {
    text-shadow: 0.025em 0.05em 0 #00c6ff, 0.05em 0 0 #ff0066;
  }
  100% {
    text-shadow: -0.025em 0 0 #00c6ff, -0.025em -0.025em 0 #ff0066;
  }
}

@keyframes glitch-anim {
  0% {
    clip: rect(15px, 9999px, 30px, 0);
  }
  20% {
    clip: rect(78px, 9999px, 76px, 0);
  }
  40% {
    clip: rect(13px, 9999px, 86px, 0);
  }
  60% {
    clip: rect(23px, 9999px, 25px, 0);
  }
  80% {
    clip: rect(35px, 9999px, 31px, 0);
  }
  100% {
    clip: rect(14px, 9999px, 43px, 0);
  }
}

@keyframes glitch-anim2 {
  0% {
    clip: rect(65px, 9999px, 119px, 0);
  }
  20% {
    clip: rect(51px, 9999px, 67px, 0);
  }
  40% {
    clip: rect(89px, 9999px, 98px, 0);
  }
  60% {
    clip: rect(14px, 9999px, 56px, 0);
  }
  80% {
    clip: rect(91px, 9999px, 68px, 0);
  }
  100% {
    clip: rect(16px, 9999px, 55px, 0);
  }
}

/* Enhanced Hero Section Animations */

/* Speaker vibration effect */
.speaker-vibration {
  position: absolute;
  bottom: 100px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 50px;
  z-index: 3;
}

.speaker {
  width: 180px;
  height: 180px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  margin: 0 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 0, 102, 0.7);
  animation: speakerPulse 1.2s infinite alternate;
}

.speaker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: linear-gradient(45deg, #333, #666);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) inset;
}

.speaker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  height: 30%;
  background: #111;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.8) inset;
}

.speaker-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  animation: speakerRing 1s infinite;
}

@keyframes speakerPulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

@keyframes speakerRing {
  0% {
    width: 30%;
    height: 30%;
    opacity: 1;
  }
  100% {
    width: 100%;
    height: 100%;
    opacity: 0;
  }
}

/* Enhanced sound wave animation */
.sound-wave-animation {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  height: 100px;
  width: 300px;
  z-index: 2;
}

.sound-bar {
  width: 12px;
  background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
  margin: 0 4px;
  border-radius: 10px;
  animation: sound-wave 0.8s infinite ease-in-out alternate;
  box-shadow: 0 0 10px rgba(255, 0, 102, 0.7);
}

.sound-bar:nth-child(1) { animation-delay: 0.1s; height: 20px; }
.sound-bar:nth-child(2) { animation-delay: 0.2s; height: 40px; }
.sound-bar:nth-child(3) { animation-delay: 0.3s; height: 60px; }
.sound-bar:nth-child(4) { animation-delay: 0.4s; height: 80px; }
.sound-bar:nth-child(5) { animation-delay: 0.5s; height: 100px; }
.sound-bar:nth-child(6) { animation-delay: 0.4s; height: 80px; }
.sound-bar:nth-child(7) { animation-delay: 0.3s; height: 60px; }
.sound-bar:nth-child(8) { animation-delay: 0.2s; height: 40px; }
.sound-bar:nth-child(9) { animation-delay: 0.1s; height: 20px; }

@keyframes sound-wave {
  0% {
    transform: scaleY(0.5);
    opacity: 0.5;
  }
  100% {
    transform: scaleY(1.2);
    opacity: 1;
  }
}

/* Glowing text effect */
.glowing-text {
  text-shadow: 0 0 10px var(--primary-color),
               0 0 20px var(--primary-color),
               0 0 30px var(--primary-color),
               0 0 40px var(--secondary-color);
  animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
  0% {
    text-shadow: 0 0 10px var(--primary-color),
                 0 0 20px var(--primary-color),
                 0 0 30px var(--primary-color);
  }
  100% {
    text-shadow: 0 0 15px var(--primary-color),
                 0 0 25px var(--primary-color),
                 0 0 35px var(--primary-color),
                 0 0 45px var(--secondary-color),
                 0 0 55px var(--secondary-color);
  }
}

/* Particle effect */
.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) rotate(360deg);
  }
}

/* Updated Digital Equalizer Effect - Matching the image */
.equalizer-container {
  position: absolute;
  top: 20%; /* Position well above the text */
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  height: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px; /* Very tight spacing for grid-like appearance */
  z-index: 2;
}

.equalizer-bar {
  width: 12px;
  background-color: #fff;
  border-radius: 0; /* Completely square corners */
  animation: equalize 0.5s infinite ease-in-out alternate; /* Faster animation */
  box-shadow: none; /* Remove shadow for cleaner look */
}

/* Colors exactly matching the image */
.equalizer-bar:nth-child(1) { background-color: #4b0082; } /* Indigo */
.equalizer-bar:nth-child(2) { background-color: #6a0dad; } /* Purple */
.equalizer-bar:nth-child(3) { background-color: #8a2be2; } /* Blue Violet */
.equalizer-bar:nth-child(4) { background-color: #9370db; } /* Medium Purple */
.equalizer-bar:nth-child(5) { background-color: #ee82ee; } /* Violet */
.equalizer-bar:nth-child(6) { background-color: #ff69b4; } /* Hot Pink */
.equalizer-bar:nth-child(7) { background-color: #dc143c; } /* Crimson */
.equalizer-bar:nth-child(8) { background-color: #ff0000; } /* Red */
.equalizer-bar:nth-child(9) { background-color: #ff4500; } /* Orange Red */
.equalizer-bar:nth-child(10) { background-color: #ff8c00; } /* Dark Orange */
.equalizer-bar:nth-child(11) { background-color: #ffa500; } /* Orange */
.equalizer-bar:nth-child(12) { background-color: #ffff00; } /* Yellow */
.equalizer-bar:nth-child(13) { background-color: #ffff99; } /* Light Yellow */
.equalizer-bar:nth-child(14) { background-color: #adff2f; } /* Green Yellow */
.equalizer-bar:nth-child(15) { background-color: #7fff00; } /* Chartreuse */
.equalizer-bar:nth-child(16) { background-color: #00ff00; } /* Lime */
.equalizer-bar:nth-child(17) { background-color: #32cd32; } /* Lime Green */
.equalizer-bar:nth-child(18) { background-color: #00ffff; } /* Cyan */
.equalizer-bar:nth-child(19) { background-color: #1e90ff; } /* Dodger Blue */
.equalizer-bar:nth-child(20) { background-color: #0000ff; } /* Blue */

/* Digital stepped animation - faster and more pronounced */
@keyframes equalize {
  0% {
    height: 10px;
  }
  25% {
    height: 30px;
  }
  50% {
    height: 60px;
  }
  75% {
    height: 90px;
  }
  100% {
    height: 120px;
  }
}

/* Reflection effect matching the image */
.equalizer-reflection {
  position: absolute;
  top: calc(20% + 120px); /* Position right below the equalizer */
  left: 50%;
  transform: translateX(-50%) scaleY(-1);
  width: 80%;
  max-width: 800px;
  height: 60px; /* Half height for reflection */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  z-index: 1;
  opacity: 0.3;
  filter: blur(1px);
}

.equalizer-reflection .equalizer-bar {
  opacity: 0.5;
  height: 50%; /* Shorter bars for reflection */
}

/* Update hero content positioning to work with the equalizer */
.hero-content {
  position: relative;
  z-index: 3; /* Ensure text is above equalizer */
  max-width: 800px;
  margin-top: 200px; /* Add more space for equalizer above */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .equalizer-container {
    width: 90%;
    height: 100px;
    top: 15%;
  }
  
  .equalizer-bar {
    width: 8px;
  }
  
  .equalizer-reflection {
    top: calc(15% + 100px);
    height: 50px;
  }
  
  .hero-content {
    margin-top: 160px;
  }
} 