/* === Fonts === */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=DM+Serif+Display&display=swap');

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

:root {
  --primary: #4b6458;
  --primary-dark: #3b5147;
  --primary-deeper: #2b3c36;
  --primary-light: #5e7868;
  --primary-muted: #7a9287;
  --header-sage: #637869;

  --secondary: #9a6b3a;
  --secondary-dark: #7a5228;
  --secondary-light: #b8844e;
  --cedar: #d4a66a;

  --cream: #faf7f2;
  --sand: #f0ebe2;
  --stone: #e2dbd0;
  --text: #2c2c2c;
  --text-light: #5a5a5a;
  --text-muted: #888;
  --white: #fff;

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-heading: 'DM Serif Display', Georgia, 'Times New Roman', serif;
}

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

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
.site-header {
  background: var(--header-sage);
  color: var(--white);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--white);
}

.logo-text span,
.footer-brand .logo-text span {
  color: inherit;
}

/* Nav */
.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-color: var(--secondary-light);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* === Photo Banner === */
.photo-banner {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  background: #1c2620;
}

.banner-track {
  list-style: none;
  height: 100%;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-btn:hover {
  background: rgba(0,0,0,0.6);
}

.banner-prev { left: 18px; }
.banner-next { right: 18px; }

.banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.banner-dot.active {
  background: var(--cedar);
  transform: scale(1.25);
}

@media (max-width: 768px) {
  .photo-banner { height: 240px; }
  .banner-btn { width: 38px; height: 38px; font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .photo-banner { height: 180px; }
}

/* === Hero === */
.hero {
  background: linear-gradient(160deg, var(--primary-deeper) 0%, var(--primary-dark) 35%, var(--primary) 65%, var(--primary-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 60px 24px 110px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(154,107,58,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cedar);
  margin-bottom: 20px;
  padding: 6px 18px;
  border: 1px solid rgba(212,166,106,0.35);
  border-radius: 100px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 400;
  margin-bottom: 20px;
  line-height: 1.18;
}

.hero p {
  font-size: 1.12rem;
  max-width: 580px;
  margin: 0 auto 36px;
  opacity: 0.88;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  letter-spacing: 0.02em;
}

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

.btn-primary {
  background: transparent;
  color: var(--cedar);
  border: 1.5px solid rgba(212,166,106,0.55);
}

.btn-primary:hover {
  background: rgba(212,166,106,0.1);
  border-color: var(--cedar);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

/* === Sections === */
.section {
  padding: 88px 24px;
}

.section-accent {
  background: var(--cream);
}

.section-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 52px;
  font-size: 1.02rem;
}

/* === Service Cards === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  border-radius: 14px;
  padding: 40px 28px 36px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(0,0,0,0.04);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.icon-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.icon-badge.new {
  background: rgba(54,92,59,0.1);
  color: var(--primary);
}

.icon-badge.replace {
  background: rgba(154,107,58,0.12);
  color: var(--secondary-dark);
}

.icon-badge.repair {
  background: rgba(75,100,88,0.1);
  color: var(--primary-dark);
}

.icon-badge.custom {
  background: rgba(107,154,112,0.12);
  color: var(--primary-light);
}

.service-card h3 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-size: 1.25rem;
  font-weight: 400;
}

.service-card p {
  color: var(--text-light);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* === Photo Gallery === */
.gallery-section {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid var(--stone);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.gallery-photo {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1/1;
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* === Before & After === */
.ba-section {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--stone);
}

.ba-heading {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 8px;
}

.ba-subheading {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 40px;
}

.ba-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 32px;
}

.ba-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.ba-photo {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1/1;
}

.ba-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ba-label {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

.ba-label.after {
  background: var(--primary);
}

.ba-arrow {
  font-size: 1.5rem;
  color: var(--cedar);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .ba-pair {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .ba-arrow { text-align: center; }
}

/* === Fence Types Grid === */
.fence-types-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.fence-type {
  background: var(--white);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.fence-type-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--cedar));
}

.fence-type h3 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.fence-type p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

.fence-type ul {
  padding-left: 0;
}

.fence-type ul li {
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 5px;
}

.fence-type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.fence-type-header h3 {
  margin-bottom: 0;
}
.fence-type-icon {
  width: 54px;
  height: auto;
  flex-shrink: 0;
  color: var(--primary);
}

/* === About Layout === */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 56px;
  align-items: start;
}

.about-photo {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about-text p {
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat {
  text-align: center;
  padding: 28px 16px;
  background: var(--cream);
  border-radius: 14px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* === Process === */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.process-step {
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.process-step h3 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.process-step p {
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* === Contact Layout === */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.contact-intro {
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
  align-items: flex-start;
}

.contact-item .icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: var(--sand);
  border-radius: 10px;
}

.contact-item p {
  color: var(--text-light);
  line-height: 1.5;
}

.contact-item strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
  font-size: 0.9rem;
}

/* === Form === */
.form-container {
  background: var(--cream);
  padding: 36px 32px;
  border-radius: 16px;
  border: 1px solid var(--stone);
}

.form-heading {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--stone);
  border-radius: 8px;
  font-size: 0.93rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b5ada4;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-muted);
  box-shadow: 0 0 0 3px rgba(54, 92, 59, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.form-group .error-msg {
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: #c0392b;
}

.form-group.has-error .error-msg {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-submit {
  background: var(--primary);
  color: var(--white);
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(54,92,59,0.18);
}

.btn-submit:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 20px rgba(54,92,59,0.22);
}

.success-message {
  display: none;
  text-align: center;
  padding: 48px 24px;
  background: var(--cream);
  border-radius: 16px;
  border: 1px solid var(--stone);
}

.success-message .checkmark {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.success-message h3 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.success-message p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* === Footer === */
.site-footer {
  background: #1c1f1d;
  color: #bbb;
  padding: 56px 24px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 36px;
}

.footer-brand .logo-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  font-size: 0.87rem;
  line-height: 1.7;
  color: #8a8a8a;
}

.footer-links h4,
.footer-contact h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-links a {
  display: block;
  color: #8a8a8a;
  margin-bottom: 9px;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-contact p {
  font-size: 0.88rem;
  margin-bottom: 7px;
  color: #8a8a8a;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #2e332f;
  font-size: 0.8rem;
  color: #666;
}

/* === Responsive === */
@media (max-width: 900px) {
  .process-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--header-sage);
    flex-direction: column;
    padding: 12px 24px 20px;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.8);
  }

  .hero { padding: 80px 24px 70px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }

  .section { padding: 64px 20px; }

  .services-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .fence-types-grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { aspect-ratio: 4/3; max-width: 400px; margin: 0 auto; width: 100%; }
  .stats-grid { max-width: 320px; }
  .process-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }

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

  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .btn { padding: 12px 26px; font-size: 0.88rem; }
  .form-container { padding: 28px 20px; }
}
