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

body {
  overflow-x: hidden;
}

::selection {
  background: #447a32;
  color: #faf9f4;
}

/* ── Navbar ── */
#navbar {
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(250, 249, 244, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  padding: 0;
}

#navbar.scrolled .nav-link {
  color: #1f3b19;
}

#navbar.scrolled .nav-link:hover {
  color: #447a32;
}

#navbar.scrolled .font-serif {
  color: #1f3b19;
}

/* ── Floating Card Animations ── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes float-delay {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-16px); }
}

@keyframes float-delay-2 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes float-delay-3 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}

.floating-card {
  animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
  animation: float-delay 7s ease-in-out infinite;
  animation-delay: -1.5s;
}

.floating-card:nth-child(3) {
  animation: float-delay-2 5.5s ease-in-out infinite;
  animation-delay: -3s;
}

.floating-card:nth-child(4) {
  animation: float-delay-3 6.5s ease-in-out infinite;
  animation-delay: -4.5s;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    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);
  }

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

/* ── Mobile Menu ── */
#mobile-menu {
  z-index: 50;
}

#mobile-menu.open {
  transform: translateX(0) !important;
}

.menu-line {
  display: block;
}

/* ── Button Focus States ── */
a:focus-visible, button:focus-visible {
  outline: 3px solid #8dbc76;
  outline-offset: 2px;
  border-radius: 9999px;
}

/* ── Utility ── */
img {
  max-width: 100%;
  height: auto;
}

/* ── Smooth Image Loading ── */
img {
  background-color: #dce8d6;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #8dbc76;
}
