/* ===== BASE & RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-up.revealed,
  .reveal-left.revealed,
  .reveal-right.revealed {
    /* default visible state — JS adds .revealed for timing */
  }
}

/* When JS is unavailable, all content is visible by default (already set above) */

/* ===== NAVBAR ===== */
#navbar.scrolled {
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08);
}

.nav-text-color {
  color: #2D5A3D;
}

.nav-link {
  color: #2D5A3D;
}

#navbar:not(.scrolled) .nav-text-color,
#navbar:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

#navbar:not(.scrolled) .nav-link:hover {
  color: #ffffff;
}

#navbar:not(.scrolled) .mobile-link {
  color: #2D5A3D;
}

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

/* ===== HERO ===== */
.hero-gradient {
  background: linear-gradient(135deg, rgba(24, 48, 32, 0.88) 0%, rgba(45, 90, 61, 0.75) 50%, rgba(61, 125, 90, 0.5) 100%);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: #2D5A3D;
  color: white;
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: #264d34;
  box-shadow: 0 8px 30px rgba(45, 90, 61, 0.3);
  transform: translateY(-1px);
}

/* ===== CARD HOVER ===== */
.product-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

/* ===== FORM INPUTS ===== */
input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.15);
}

/* ===== MOBILE MENU TRANSITIONS ===== */
#mobileMenu {
  transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

/* ===== SUBTLE ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.floating {
  animation: float 4s ease-in-out infinite;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #5a9f78;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== UTILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
