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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: #2C5F2D;
  color: #F5F2EB;
}

/* NAV */
.nav-link {
  position: relative;
}

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

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

#nav.scrolled {
  background: rgba(245, 242, 235, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E8E2D4;
}

/* MOBILE MENU */
.mobile-link {
  position: relative;
}

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

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

#mobileMenu.open {
  opacity: 1;
  pointer-events: auto;
}

#mobileMenu.open .menu-line:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

#mobileMenu.open .menu-line:nth-child(2) {
  opacity: 0;
}

#mobileMenu.open .menu-line:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
  width: 1.5rem;
}

/* HERO EYEBROW ANIMATION */
.hero-eyebrow {
  animation: fadeSlideUp 0.8s ease forwards;
}

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

/* SCROLL LINE */
@keyframes scrollLine {
  0% { top: -12px; }
  100% { top: 40px; }
}

.scroll-line {
  animation: scrollLine 1.2s ease-in-out infinite;
}

/* MARQUEE */
.marquee-track {
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* REVEAL ANIMATIONS */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-revealed="true"] {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal[data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
  }
}

/* PRODUCT CARDS */
.group:hover .group-hover\:text-cream {
  color: #F5F2EB;
}

/* FOCUS STYLES */
input:focus, textarea:focus, button:focus, a:focus {
  outline: 2px solid #2C5F2D;
  outline-offset: 2px;
}

/* FORM INPUTS */
input, textarea {
  border-width: 1px;
}

/* IMAGE LOADING */
img {
  display: block;
  max-width: 100%;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #C5D3B6;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9BB588;
}

/* VERTICAL TEXT */
.writing-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
