/* Custom Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Initial states for animations */
.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.fade-in:nth-child(2) {
  animation-delay: 0.3s;
  opacity: 0;
}

.scroll-bounce {
  animation: scrollBounce 2s ease-in-out infinite;
  animation-delay: 1.2s;
}

/* Scroll animations */
.scroll-animate {
  position: relative;
}

.scroll-fade {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

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

/* Navbar background transition */
#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(40px);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Loading state for form button */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Focus styles */
input:focus {
  outline: none;
}

/* Stagger animation delays */
.scroll-fade:nth-child(1) { transition-delay: 0s; }
.scroll-fade:nth-child(2) { transition-delay: 0.1s; }
.scroll-fade:nth-child(3) { transition-delay: 0.2s; }
.scroll-fade:nth-child(4) { transition-delay: 0.3s; }
.scroll-fade:nth-child(5) { transition-delay: 0.4s; }
.scroll-fade:nth-child(6) { transition-delay: 0.5s; }
.scroll-fade:nth-child(7) { transition-delay: 0.6s; }
.scroll-fade:nth-child(8) { transition-delay: 0.7s; }

/* Responsive typography adjustments */
@media (max-width: 768px) {
  h1, h2 {
    line-height: 1.1;
  }
}

/* Backdrop blur for mobile menu */
.backdrop-blur-2xl {
  backdrop-filter: blur(40px);
}

/* Success message fade in */
@keyframes successFade {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#success-message.show {
  animation: successFade 0.5s ease-out forwards;
}
