/* ===== Crosswinds Resort & Campground — Custom Styles ===== */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

/* --- Reveal on Scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Staggered reveal delays --- */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal:nth-child(3) { transition-delay: 0.19s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal:nth-child(5) { transition-delay: 0.33s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }
.reveal:nth-child(7) { transition-delay: 0.47s; }
.reveal:nth-child(8) { transition-delay: 0.54s; }

/* --- Navbar --- */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .nav-logo-text {
  color: #251E18;
}

#navbar.scrolled .nav-link {
  color: #6E5A4C;
}

#navbar.scrolled .nav-link:hover {
  color: #7B2D3B;
}

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

#mobile-menu.open .mobile-link {
  animation: fadeInUp 0.4s ease forwards;
  opacity: 1;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(6) { animation-delay: 0.3s; }

/* --- Hamburger Animation --- */
.menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

/* --- Smooth Scroll --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* --- Selection --- */
::selection {
  background: #7B2D3B;
  color: #FFF8F5;
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
  background: #D4B482;
  border-radius: 4px;
}

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

/* --- Image hover smoothness --- */
img {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* --- Responsive adjustments --- */
@media (max-width: 767px) {
  html {
    scroll-padding-top: 70px;
  }

  #navbar {
    background: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
  }

  #navbar .nav-logo-text {
    color: #251E18;
  }
}

/* --- Print --- */
@media print {
  #navbar,
  #menu-toggle,
  #mobile-menu {
    display: none !important;
  }

  section {
    page-break-inside: avoid;
  }
}
