/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

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

::selection {
  background: #53802b;
  color: #fafaf7;
}

/* ─── Navbar ─── */
#nav {
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

#nav.scrolled {
  background: rgba(250, 250, 247, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(45, 80, 22, 0.08);
}

.nav-link {
  position: relative;
}

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

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

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

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* ─── Hero ─── */
.hero-gradient {
  background: linear-gradient(
    135deg,
    #111b09 0%,
    #28411a 30%,
    #3d6422 55%,
    #53802b 75%,
    #73a03f 100%
  );
}

.hero-overlay {
  background: rgba(17, 27, 9, 0.45);
}

.hero-img {
  opacity: 0.7;
}

.hero-subtitle {
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-desc {
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-cta {
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-scroll {
  opacity: 0;
  animation: fadeIn 1s ease 1.2s forwards;
}

.hero-line {
  animation: lineGrow 1s ease 1.4s forwards;
  opacity: 0;
  height: 0;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes lineGrow {
  from { height: 0; opacity: 1; }
  to { height: 48px; opacity: 1; }
}

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

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

/* Prefers reduced motion */
@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; }
  .reveal { opacity: 1; transform: none; }
}

/* ─── Form Focus ─── */
input:focus, textarea:focus {
  border-bottom-color: #53802b !important;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #fafaf7;
}
::-webkit-scrollbar-thumb {
  background: #9cc06b;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #53802b;
}
