/* ═══════════════════════════════════════════
   Shephard's Market — Custom Styles
   ═══════════════════════════════════════════ */

/* ── Base ── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: #B85C38;
  color: #FDF9F3;
}

/* ── Navbar scroll state ── */
#navbar.scrolled {
  background-color: rgba(253, 249, 243, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(44, 24, 16, 0.08);
}

#navbar.scrolled .font-display,
#navbar.scrolled a:not(.bg-terra-500) {
  color: #2C1810;
}

/* ── Hero image parallax ── */
#hero .absolute.inset-0 img {
  will-change: transform;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF9F3;
}
::-webkit-scrollbar-thumb {
  background: #D4B88C;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B85C38;
}

/* ── Mobile menu transitions ── */
.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 item hover ── */
#menu ul li {
  transition: transform 0.2s ease;
}
#menu ul li:hover {
  transform: translateX(4px);
}

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

/* ── Button ripple effect ── */
button, a {
  position: relative;
  overflow: hidden;
}

/* ── Image lazy-load placeholder ── */
img {
  background-color: #EDE0C8;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── Print styles ── */
@media print {
  #navbar, #mobile-menu, button {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
  .bg-espresso, .bg-terra-500 {
    background: #2C1810 !important;
    color: #fff !important;
  }
}
