/* ── Base & Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; }

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: always visible if JS is disabled */
.scroll-reveal { opacity: 1; transform: none; }

/* ── Navbar Scroll State ── */
#navbar.scrolled {
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08);
}

/* ── Mobile Menu Animations ── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

.menu-line:nth-child(1) {
  transform-origin: top;
}
.menu-line:nth-child(2) {
  opacity: 1;
}
.menu-line:nth-child(3) {
  transform-origin: bottom;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ── Custom Select Arrow ── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232D5A3D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── Selection Color ── */
::selection {
  background: rgba(45, 90, 61, 0.2);
  color: #2D5A3D;
}

/* ── Focus Ring Global ── */
:focus-visible {
  outline: 2px solid #4d8342;
  outline-offset: 2px;
  border-radius: 4px;
}
