/* Custom styles for Spring Lake Resort */

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Navbar scroll state */
#navbar.scrolled {
  background-color: rgba(253, 252, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 24px rgba(0, 0, 0, 0.04);
}

/* Nav links */
.nav-link {
  position: relative;
}

/* Mobile menu */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.open #menuIcon {
  transform: rotate(90deg);
  opacity: 0;
}

#mobileMenu.open #closeIcon {
  opacity: 1;
  transform: rotate(0deg);
}

.mobile-nav-link {
  display: block;
  width: 100%;
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
  .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
  .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Floating animations */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float-fast {
  0%, 100% { transform: translateY(0px) rotate(2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .animate-float-slow {
    animation: float-slow 5s ease-in-out infinite;
  }
  .animate-float-medium {
    animation: float-medium 4s ease-in-out infinite;
  }
  .animate-float-fast {
    animation: float-fast 3.5s ease-in-out infinite;
  }
}

/* Back to top button */
#backToTop.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* Form focus styles */
input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Selection color */
::selection {
  background-color: rgba(16, 185, 129, 0.2);
  color: #064E3B;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F9F7F0;
}
::-webkit-scrollbar-thumb {
  background: #059669;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}
