/* ── Custom Properties ─────────────────────────────── */
:root {
  --color-green-dark:  #1a3d2b;
  --color-green-mid:   #2d6a4f;
  --color-green-light: #74b49b;
  --color-cta:         #df6320;
  --color-brown-dark:  #3d2b1f;
  --color-brown-mid:   #8b7355;
  --color-tan:         #d4b896;
  --color-cream:       #f5f0e8;
  --color-charcoal:    #2c2c2c;
  --color-sky-top:     #87ceeb;
  --color-sky-bottom:  #c8e6f5;

  --font-family: 'Inter', sans-serif;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.25rem;
  --font-size-xl:   1.75rem;
  --font-size-2xl:  2.5rem;
  --font-size-3xl:  3.5rem;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  --max-width: 1100px;
  --radius:    8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-charcoal);
  background: var(--color-cream);
  line-height: 1.6;
}

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

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

/* ── Utility ───────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-green-dark);
  margin-bottom: var(--space-md);
}

.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  border: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-cta);
  color: #fff;
}

.btn-primary:hover { background: #c8591d; }

/* ── Parallax fixed layers ────────────────────────── */
.layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  will-change: transform;
}

.layer-sky {
  height: 100vh;
  z-index: 0;
  background: linear-gradient(to bottom,
    #1e4d72 0%, #2c6e9e 15%, #4a90c4 35%,
    #87ceeb 60%, #c8e6f5 80%, #a8d5b5 100%
  );
}

.layer-trees-back  { height: 220vh; z-index: 1; }
.layer-trees-mid   { height: 240vh; z-index: 2; }
.layer-trees-front { height: 260vh; z-index: 3; }
.layer-fence       { height: 35vh;  z-index: 15; }

.layer svg { width: 100%; height: 100%; }

/* Eliminate sub-pixel antialiasing gaps between tier polygons */
.layer-trees-back svg,
.layer-trees-mid svg,
.layer-trees-front svg { shape-rendering: crispEdges; }

/* ── Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 10;
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: var(--space-md);
}

.hero-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-sub {
  font-size: var(--font-size-xl);
  font-weight: 400;
  margin-bottom: var(--space-md);
  opacity: 0.92;
}

/* ── Services ──────────────────────────────────────── */
.services {
  position: relative;
  z-index: 10;
  background: #fff;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.service-card {
  background: var(--color-cream);
  border-radius: var(--radius);
  padding: var(--space-md);
  text-align: center;
  border: 1px solid rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-sm);
  color: var(--color-green-mid);
}

.service-icon svg { width: 100%; height: 100%; }

.service-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-green-dark);
  margin-bottom: var(--space-xs);
}

.service-desc {
  font-size: var(--font-size-sm);
  color: #555;
  line-height: 1.7;
}

/* ── About ─────────────────────────────────────────── */
.about {
  position: relative;
  z-index: 10;
  background: var(--color-cream);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-lg);
  align-items: center;
}

.about-text p {
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-base);
  color: #444;
  max-width: 560px;
}

.about-accent svg {
  width: 100%;
  height: auto;
  opacity: 0.85;
}

/* ── Contact ───────────────────────────────────────── */
.contact {
  position: relative;
  z-index: 10;
  background: linear-gradient(to bottom, #fff 50%, #23533d 100%);
  text-align: center;
  /* Extra bottom space so fence tips overlap the form bottom, not the content */
  padding-bottom: 32vh;
}

.contact-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  align-items: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-base);
  color: var(--color-charcoal);
  transition: color 0.2s;
}

.contact-item:hover { color: var(--color-green-mid); }

.contact-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}


/* ── Site footer — lawn strip ──────────────────────── */
.site-footer {
  position: relative;
  z-index: 20;
  background: #1a3d2b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  box-shadow: 0 -3px 24px rgba(0, 0, 0, 0.4);
}

.footer-copy {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.75);
}

.footer-email {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

.footer-email:hover { color: rgba(255, 255, 255, 0.9); }

/* ── Responsive ────────────────────────────────────── */

/* Tablet: ≤ 900px */
@media (max-width: 900px) {
  /* Scale SVGs wider on tablet — GSAP animates parent divs, no transform conflict */
  .layer-fence,
  .layer-trees-back,
  .layer-trees-mid,
  .layer-trees-front { overflow: hidden; }
  .layer-fence svg { transform: scaleX(1.8); transform-origin: center; }
  .layer-trees-back svg,
  .layer-trees-mid svg,
  .layer-trees-front svg { transform: scaleX(1.5); transform-origin: center; }

  :root {
    --font-size-3xl: 2.4rem;
    --font-size-2xl: 1.8rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-accent {
    display: none;
  }

}

/* Mobile: ≤ 600px */
@media (max-width: 600px) {
  .layer-fence svg { transform: scaleX(2.8); }
  .layer-trees-back svg,
  .layer-trees-mid svg,
  .layer-trees-front svg { transform: scaleX(2.2); }

  :root {
    --font-size-3xl: 1.9rem;
    --font-size-2xl: 1.5rem;
    --space-xl: 4rem;
  }

  .hero-title { line-height: 1.2; }

  .container { padding: 0 var(--space-sm); }
}
