/* ============================================
   Ebaugh's Whistle Stop — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after { box-sizing: border-box; }

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

/* Smooth scroll offset for fixed nav */
section[id] {
  scroll-margin-top: 80px;
}

/* Section eyebrow */
.section-eyebrow {
  letter-spacing: 0.2em;
}

/* Hero animations — only run when JS is available and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.2s;
  }
  .hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards 0.4s;
  }
  .hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.6s;
  }
  .hero-ctas {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards 0.8s;
  }
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal — progressive enhancement via JS */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal:not(.revealed) {
    opacity: 0;
    transform: translateY(40px);
  }
}

/* Navbar scroll state */
#nav.scrolled {
  background: rgba(4, 47, 46, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.2);
}

#nav.scrolled a:not([class*="bg-"]) {
  color: rgba(255, 255, 255, 0.9) !important;
}

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

/* Image hover zoom */
.bg-white.rounded-2xl.overflow-hidden img {
  transition: transform 0.6s ease;
}

.bg-white.rounded-2xl.overflow-hidden:hover img {
  transform: scale(1.05);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
  background: #0d9488;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0f766e;
}

/* Selection */
::selection {
  background: #0d9488;
  color: #fff;
}

/* Focus visible */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Mobile menu links */
.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #14b8a6;
  transition: width 0.3s ease;
}

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

/* Menu list items — hover effect */
#menu ul li {
  transition: background 0.2s ease;
}

#menu ul li:hover {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding-left: 8px;
  margin-left: -8px;
}

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