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

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

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

::selection {
  background: color-mix(in srgb, #3c5f28 30%, transparent);
  color: #1d2f16;
}

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

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(29, 47, 22, 0.82) 0%,
    rgba(47, 74, 33, 0.72) 50%,
    rgba(60, 95, 40, 0.65) 100%
  );
}

.hero-eyebrow {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.3s ease forwards;
}

.hero-title {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s 0.5s ease forwards;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.7s ease forwards;
}

.hero-ctas {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.9s ease forwards;
}

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

/* ─── Scroll indicator ─── */
.scroll-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.scroll-indicator:hover {
  border-color: rgba(255,255,255,0.6);
  transform: translateY(4px);
}

/* ─── Buttons ─── */
.btn-primary {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
}

/* ─── Section shared ─── */
.section-eyebrow {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.6s ease;
}

.section-title {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s 0.15s ease;
}

.section-subtitle {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.6s 0.3s ease;
}

.section-eyebrow.in-view,
.section-title.in-view,
.section-subtitle.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Service cards ─── */
.service-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }

/* ─── Approach steps ─── */
.approach-step {
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease;
}

.approach-step.in-view {
  opacity: 1;
  transform: translateX(0);
}

.approach-step:nth-child(2) { transition-delay: 0.15s; }
.approach-step:nth-child(3) { transition-delay: 0.3s; }

/* ─── Testimonial cards ─── */
.testimonial-card {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s ease;
}

.testimonial-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.3s; }

/* ─── Contact info ─── */
.contact-info {
  opacity: 0;
  transform: translateX(-16px);
  transition: all 0.5s ease;
}

.contact-info.in-view {
  opacity: 1;
  transform: translateX(0);
}

.contact-info:nth-child(2) { transition-delay: 0.1s; }
.contact-info:nth-child(3) { transition-delay: 0.2s; }
.contact-info:nth-child(4) { transition-delay: 0.3s; }

/* ─── Inputs ─── */
.input-field {
  background: white;
  border: 1.5px solid color-mix(in srgb, #3c5f28 20%, transparent);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #1d2f16;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  width: 100%;
}

.input-field::placeholder {
  color: #cfc7c1;
}

.input-field:focus {
  border-color: #3c5f28;
  box-shadow: 0 0 0 3px color-mix(in srgb, #3c5f28 12%, transparent);
}

.input-field:hover:not(:focus) {
  border-color: color-mix(in srgb, #3c5f28 50%, transparent);
}

/* ─── Header state ─── */
#site-header.scrolled {
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(60, 95, 40, 0.08), 0 4px 24px rgba(60, 95, 40, 0.06);
}

#site-header.scrolled .nav-link {
  color: #2f4a21;
}

#site-header.scrolled .nav-link:hover {
  color: #3c5f28;
}

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

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

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

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

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

/* ─── Nav link underline ─── */
.nav-link {
  position: relative;
}

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

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

/* ─── Responsive ─── */
@media (max-width: 767px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2.25rem;
  }
}

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

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

  .service-card, .testimonial-card, .approach-step, .contact-info,
  .section-eyebrow, .section-title, .section-subtitle {
    opacity: 1;
    transform: none;
  }
}
