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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* ─── Navigation ─── */
#site-header {
  transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

#site-header.scrolled {
  background-color: rgba(253, 249, 243, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
  position: relative;
}

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

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

/* ─── Mobile Menu ─── */
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #C4835A;
  transition: width 0.3s ease;
}

.mobile-link:hover::after {
  width: 60%;
}

/* ─── Hero ─── */
.hero-bg {
  will-change: transform;
}

.hero-content {
  will-change: opacity, transform;
}

.hero-tag {
  animation: fadeInDown 1s ease forwards;
}

.hero-content h1 {
  animation: fadeInUp 1s ease 0.2s forwards;
  opacity: 0;
}

.hero-content p {
  animation: fadeInUp 1s ease 0.4s forwards;
  opacity: 0;
}

.hero-content > div {
  animation: fadeInUp 1s ease 0.6s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── 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);
}

/* Default state for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Bread Cards ─── */
.bread-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bread-card:hover {
  transform: translateY(-6px);
}

.bread-card img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Grocery Cards ─── */
.grocery-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

/* ─── Button Focus ─── */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #C4835A;
  outline-offset: 2px;
}

/* ─── Selection ─── */
::selection {
  background: #F7C0AA;
  color: #5C3226;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #C4835A;
}

/* ─── Mobile Responsive ─── */
@media (max-width: 767px) {
  .hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.15;
  }

  .hero-content h1 span.italic {
    font-size: 2.2rem;
  }

  #site-header {
    padding: 1rem 1.5rem;
  }

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

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-content h1 {
    font-size: 3.5rem;
  }
}

/* ─── Print ─── */
@media print {
  #site-header,
  #mobile-menu,
  .hero-scroll {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  .hero-bg img {
    display: none;
  }
}
