/* 
* Animations CSS for tribecaquonex.com
* Contains all animation-related styles
*/

/* ===== GENERAL TRANSITIONS ===== */
.cta-button,
.service-card,
.submit-button,
.service-link,
.testimonial-control {
  transition: all 0.3s ease;
}

/* ===== FADE IN ANIMATION ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content h1,
.hero-content p,
.hero-content .cta-button {
  animation: fadeIn 1s ease forwards;
}

.hero-content h1 {
  animation-delay: 0.2s;
}

.hero-content p {
  animation-delay: 0.4s;
}

.hero-content .cta-button {
  animation-delay: 0.6s;
  opacity: 0;
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.cta-section .cta-button.primary {
  animation: pulse 2s infinite;
}

/* ===== FLOAT ANIMATION ===== */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.service-icon {
  animation: float 3s ease-in-out infinite;
}

/* Stagger service icons animation */
.services-grid .service-card:nth-child(1) .service-icon {
  animation-delay: 0s;
}

.services-grid .service-card:nth-child(2) .service-icon {
  animation-delay: 0.5s;
}

.services-grid .service-card:nth-child(3) .service-icon {
  animation-delay: 1s;
}

/* ===== SLIDE IN ANIMATION ===== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.about-image {
  animation: slideInLeft 1s ease-out forwards;
}

.about-content {
  animation: slideInRight 1s ease-out forwards;
}

/* ===== TESTIMONIAL SLIDESHOW ===== */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.testimonial-item.active .testimonial-content {
  animation: fadeInSlide 0.5s ease-out forwards;
}

/* CSS-only Testimonial Slideshow */
.testimonial-controls {
  position: relative;
  z-index: 1;
}

#testimonial-1:checked ~ .testimonial-item:nth-child(1),
#testimonial-2:checked ~ .testimonial-item:nth-child(2),
#testimonial-3:checked ~ .testimonial-item:nth-child(3) {
  display: block;
}

/* ===== WAVE ANIMATION ===== */
@keyframes wave {
  0% {
    transform: translateX(0) translateZ(0);
  }
  50% {
    transform: translateX(-25px) translateZ(0);
  }
  100% {
    transform: translateX(0) translateZ(0);
  }
}

.hero-wave svg,
.section-divider svg {
  animation: wave 15s ease-in-out infinite;
}

/* ===== HOVER ANIMATIONS ===== */

/* Service Card Hover */
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Button Hover Animation */
.cta-button:hover,
.submit-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(235, 78, 39, 0.25);
}

/* Link Hover Animation */
.service-link {
  position: relative;
}

.service-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.service-link:hover::after {
  width: 100%;
}

/* ===== ANIMATION FOR MOBILE MENU ===== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile menu animation will be triggered via CSS checkbox hack in responsive.css */

/* ===== THANK YOU PAGE ANIMATION ===== */
@keyframes checkmark {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.thank-you-icon {
  animation: checkmark 0.8s ease-in-out forwards;
}

/* ===== BENEFIT ICON ANIMATION ===== */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.benefit-icon {
  animation: bounce 2s ease infinite;
}

.benefits-grid .benefit-card:nth-child(1) .benefit-icon {
  animation-delay: 0s;
}

.benefits-grid .benefit-card:nth-child(2) .benefit-icon {
  animation-delay: 0.3s;
}

.benefits-grid .benefit-card:nth-child(3) .benefit-icon {
  animation-delay: 0.6s;
}

/* ===== FORM SUBMISSION ANIMATION ===== */
@keyframes buttonPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.submit-button:focus {
  animation: buttonPulse 0.5s ease-in-out;
}
