/* ============================================
   Rest Haven Motel — Custom Styles
   ============================================ */

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

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
#nav {
  background: rgba(250, 250, 246, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 74, 62, 0.08);
}

#nav.scrolled {
  box-shadow: 0 1px 20px rgba(20, 34, 26, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #2D4A3E;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

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

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-link:hover {
  color: #377337;
  transform: scale(1.05);
}

/* Menu button animation */
.menu-btn.active .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-btn.active .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 1.5rem;
}

/* Reveal animations — progressive enhancement */
.js-enabled .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

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

  .reveal.delay-1 { transition-delay: 0.1s; }
  .reveal.delay-2 { transition-delay: 0.2s; }
  .reveal.delay-3 { transition-delay: 0.3s; }
  .reveal.delay-4 { transition-delay: 0.4s; }
}

/* Hero image parallax feel */
.hero-img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #2D4A3E;
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: #2D4A3E;
  color: #F5F5DC;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #1e3529;
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
