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

body {
  overflow-x: hidden;
}

/* ── Scroll Reveal (progressive enhancement — content visible by default) ── */
@media (prefers-reduced-motion: no-preference) {
  .scroll-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-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Navbar transition ── */
#navbar {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
#navbar.scrolled {
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(31, 51, 31, 0.08);
  padding: 0;
}
#navbar.scrolled .font-serif {
  color: #1f331f !important;
}
#navbar.scrolled .icon-tire {
  color: #2e4e2e !important;
}

/* ── Mobile menu animations ── */
#mobile-menu {
  animation: slideDown 0.25s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Hamburger animation ── */
.menu-line {
  transition: transform 0.3s ease, opacity 0.2s ease;
}
#menu-toggle.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* ── Mobile link transition ── */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e3ece3;
}
.mobile-link:last-child {
  border-bottom: none;
}

/* ── Selection color ── */
::selection {
  background: #96b896;
  color: #0f1a0f;
}

/* ── Focus styles ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #4a7a4a;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Subtle pattern overlay for hero section ── */
#hero {
  background-image: radial-gradient(ellipse at 80% 20%, rgba(150, 184, 150, 0.15) 0%, transparent 60%),
                    radial-gradient(ellipse at 10% 80%, rgba(74, 122, 74, 0.08) 0%, transparent 50%);
}

/* ── Smooth image loading ── */
img {
  display: block;
  max-width: 100%;
}
