/* ===== Base & Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

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

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

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== Focus Styles ===== */
:focus-visible {
  outline: 2px solid #4a7c4a;
  outline-offset: 2px;
}

/* ===== Button Hover Effects ===== */
a, button {
  transition: all 0.2s ease;
}

/* ===== Selection Color ===== */
::selection {
  background-color: #3d663d;
  color: #faf9f6;
}

/* ===== Form Input Focus ===== */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 124, 74, 0.15);
}

/* ===== Mobile Menu Animation ===== */
#mobileMenu {
  animation: slideDown 0.2s ease-out;
}

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

/* ===== Smooth Scroll Offset for Fixed Header ===== */
[id] {
  scroll-margin-top: 80px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #8fb88f;
}

/* ===== Print Styles ===== */
@media print {
  header, footer, #contactForm, iframe {
    display: none;
  }

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

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75rem;
    color: #666;
  }
}
