/* ===================================
   VEDIC BLUEPRINT - ANIMATIONS
   ================================= */

/* Fade-in animation for sections */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Pulse animation for CTA buttons */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
  }
  50% {
    box-shadow: 0 6px 25px rgba(217, 119, 6, 0.5);
  }
  100% {
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
  }
}

.cta-button {
  animation: pulse 2s infinite;
}

.cta-button:hover {
  animation: none;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Loading state for images */
.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy.loaded {
  opacity: 1;
}

/* Hover effects for cards */
.blueprint-item,
.sample-card,
.testimonial-card,
.feature-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Step number animation */
@keyframes stepPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.step-number {
  animation: stepPulse 3s infinite ease-in-out;
  animation-delay: calc(var(--step-index, 0) * 0.2s);
}

/* Guarantee badge animation */
@keyframes rotateBadge {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.guarantee-badge:hover .badge-seal {
  animation: rotateBadge 1s ease;
}

/* Form field focus animation */
@keyframes focusGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  100% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }
}

.form-group input:focus,
.form-group select:focus {
  animation: focusGlow 0.6s ease;
}

/* Sticky CTA slide-in animation */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sticky-cta {
  animation: slideUp 0.4s ease;
}

/* FAQ accordion smooth transition */
.faq-answer {
  transition: max-height 0.4s ease, padding 0.4s ease;
}

/* Trust signal fade-in stagger */
.trust-item {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.trust-item:nth-child(1) { animation-delay: 0.1s; }
.trust-item:nth-child(2) { animation-delay: 0.2s; }
.trust-item:nth-child(3) { animation-delay: 0.3s; }
.trust-item:nth-child(4) { animation-delay: 0.4s; }

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

/* Hero background pattern animation */
@keyframes patternMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 60px;
  }
}

.hero::before {
  animation: patternMove 20s linear infinite;
}

/* Button press effect */
.cta-button:active,
.sticky-cta button:active,
.form-submit:active {
  transform: scale(0.98);
}

/* Link hover effect */
a {
  transition: color 0.3s ease, transform 0.2s ease;
}

/* Icon animations */
.blueprint-icon,
.trust-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.blueprint-item:hover .blueprint-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Form submission loading state */
.form-submit.loading {
  position: relative;
  color: transparent;
}

.form-submit.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error shake animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.form-group input.error {
  animation: shake 0.4s ease;
}

/* Success checkmark animation */
@keyframes checkmark {
  0% {
    transform: scale(0) rotate(45deg);
  }
  50% {
    transform: scale(1.2) rotate(45deg);
  }
  100% {
    transform: scale(1) rotate(45deg);
  }
}

.success-icon {
  animation: checkmark 0.5s ease;
}

/* Gradient shift animation for backgrounds */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero,
.final-cta-section {
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

/* Number counter animation (for future use) */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Parallax scroll effect (subtle) */
@media (min-width: 768px) {
  .hero {
    background-attachment: fixed;
  }
}

/* Skeleton loading animation (for future use) */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}
