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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: #9bbf8a;
  color: #111a0d;
}

/* ─── NAV SCROLL STATE ─── */
#site-header.scrolled {
  background: rgba(254, 253, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(45, 79, 33, 0.08);
}

#site-header.scrolled .font-serif {
  color: #1a130c;
}

.nav-link {
  position: relative;
}

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

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

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

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

.menu-line {
  display: block;
}

body.menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

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

.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 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; }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

  .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; }
}

/* ─── MENU CARDS ─── */
.menu-card {
  position: relative;
  overflow: hidden;
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #76a15e, #9bbf8a);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.menu-card:hover::before {
  opacity: 1;
}

/* ─── GALLERY ─── */
.gallery-item {
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 26, 13, 0);
  transition: background 0.3s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  background: rgba(17, 26, 13, 0.15);
}

.gallery-item {
  position: relative;
}

/* ─── FOCUS STYLES ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #76a15e;
  outline-offset: 2px;
  border-radius: inherit;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #76a15e;
}
