/* === Custom styles for Falmouth Country Club === */

html {
  scroll-behavior: smooth;
}

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

/* Navbar transitions */
#nav {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#nav.scrolled {
  background-color: rgba(254, 249, 243, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(27, 27, 36, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff6b3f;
  transition: width 0.25s ease;
  border-radius: 1px;
}

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

#nav.scrolled .nav-link {
  color: #3f3f50;
}

#nav.scrolled .nav-link:hover {
  color: #f55a2b;
}

/* Mobile menu */
.mobile-link {
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-link:hover {
  background-color: #fff5f2;
}

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

.scroll-animate[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-animate[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.scroll-animate[data-reveal="1"] { transition-delay: 0s; }
.scroll-animate[data-reveal="2"] { transition-delay: 0.08s; }
.scroll-animate[data-reveal="3"] { transition-delay: 0.16s; }
.scroll-animate[data-reveal="4"] { transition-delay: 0.24s; }
.scroll-animate[data-reveal="5"] { transition-delay: 0.32s; }
.scroll-animate[data-reveal="6"] { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-animate[data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .group img { transition: none; }
}

/* Selection color */
::selection {
  background-color: #ffd8c8;
  color: #1b1b24;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fef9f3;
}
::-webkit-scrollbar-thumb {
  background: #c4c4cc;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9b9ba6;
}
