*, *::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;
}

/* ─── HEADER ───────────────────────────────────────────── */
#site-header {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#site-header.scrolled {
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header-text {
  transition: color 0.4s ease;
}

.header-sub {
  transition: color 0.4s ease;
}

#site-header.scrolled .header-text {
  color: #26231f;
}

#site-header.scrolled .header-sub {
  color: #567d40;
}

.header-btn .header-line {
  transition: background 0.4s ease, transform 0.3s ease;
}

#site-header.scrolled .header-btn .header-line {
  background: #26231f;
}

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
}

.hero-bg {
  will-change: transform;
}

.hero-img {
  will-change: transform;
}

.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(15, 22, 11, 0.3) 0%,
    rgba(15, 22, 11, 0.5) 50%,
    rgba(15, 22, 11, 0.85) 100%
  );
}

/* Hero entrance — runs only if JS is enabled */
.hero-eyebrow,
.hero-title,
.hero-subtitle,
.hero-ctas {
  opacity: 1;
  transform: none;
}

.js-enabled .hero-eyebrow {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js-enabled .hero-title {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}

.js-enabled .hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.js-enabled .hero-ctas {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.45s, transform 0.8s ease 0.45s;
}

.hero-animated .hero-eyebrow,
.hero-animated .hero-title,
.hero-animated .hero-subtitle,
.hero-animated .hero-ctas {
  opacity: 1;
  transform: none;
}

/* ─── SCROLL REVEAL ──────────────────────────────────────── */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }

  .reveal.revealed {
    opacity: 1;
    transform: none;
  }
}

/* ─── SERVICE CARDS ──────────────────────────────────────── */
.service-card a {
  text-decoration: none;
}

/* ─── GALLERY ────────────────────────────────────────────── */
.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-item.col-span-2 {
  aspect-ratio: 16/10;
}

.gallery-item img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── TESTIMONIAL CARDS ──────────────────────────────────── */
.testimonial-card {
  transition: background 0.4s ease;
}

/* ─── MOBILE MENU ────────────────────────────────────────── */
.mobile-menu-link {
  text-decoration: none;
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

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

/* ─── FORM ───────────────────────────────────────────────── */
#contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8272' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* ─── FOCUS VISIBLE ──────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #567d40;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── SELECTION ──────────────────────────────────────────── */
::selection {
  background: rgba(86, 125, 64, 0.2);
  color: #1f2e18;
}
