/* Base & Utilities */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #C4725A;
  color: #FDF6F0;
}

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

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

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

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

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(253, 246, 240, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(196, 114, 90, 0.08);
}

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

/* Hamburger animation */
.hamburger-active #bar1 {
  transform: translateY(4px) rotate(45deg);
}

.hamburger-active #bar2 {
  opacity: 0;
}

.hamburger-active #bar3 {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile links */
.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

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

/* Menu tabs */
.menu-tab {
  background: transparent;
  color: #7D6B5E;
  border: none;
  cursor: pointer;
}

.menu-tab.active {
  background: #C4725A;
  color: #FDF6F0;
  box-shadow: 0 4px 12px rgba(196, 114, 90, 0.3);
}

.menu-tab:not(.active):hover {
  background: #F7EDE0;
  color: #9A4A35;
}

/* Menu content transitions */
.menu-content {
  animation: fadeUp 0.4s ease forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  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);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .menu-content {
    animation: none;
  }

  img, .group img {
    transition: none;
  }
}

/* Subtle image hover on gallery */
.rounded-3xl.overflow-hidden img {
  will-change: transform;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

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

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

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

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