/* =====================================================================
   Mule Town Fence — site styles
   Palette pulled from the business card: cream paper, dark bark brown,
   warm wood tans. Fonts: Cinzel (display), Libre Baskerville (body),
   Oswald (phone numbers / UI labels).
   ===================================================================== */

:root {
  --cream:      #faf3e6;   /* matches the logo's background exactly */
  --cream-2:    #f2e7d3;
  --cream-3:    #e6d7bc;
  --white:      #fffdf8;

  --bark:       #3a2a1c;   /* primary dark brown */
  --bark-2:     #56412f;
  --ink:        #241a11;

  --wood:       #b98a5a;   /* tan wood */
  --wood-2:     #8a5a2b;   /* darker wood / accent */
  --wood-3:     #d9bd93;   /* light wood / borders */

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body:    'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-ui:      'Oswald', 'Arial Narrow', Arial, sans-serif;

  --radius: 6px;
  --shadow: 0 6px 24px rgba(58, 42, 28, 0.12);
  --shadow-sm: 0 2px 8px rgba(58, 42, 28, 0.10);
  --container: 1140px;
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--bark);
  background: var(--cream);
}

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

[hidden] { display: none !important; }

a { color: var(--wood-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--bark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.2vw + 0.5rem, 3.4rem); }
h2 { font-size: clamp(1.7rem, 2.6vw + 0.5rem, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--bark); color: var(--cream);
  padding: 10px 14px; border-radius: var(--radius); z-index: 1000;
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--wood-2); outline-offset: 3px; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wood-2);
  margin-bottom: 0.9em;
}

.eyebrow-light { color: var(--wood-3); }

.lead { font-size: 1.15rem; color: var(--bark-2); max-width: 54ch; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.8rem; }
.section-head .section-intro { color: var(--bark-2); font-size: 1.05rem; }
.section-head h2::after {
  content: "";
  display: block;
  width: 64px; height: 4px;
  margin: 0.55em auto 0;
  background: var(--wood);
  border-radius: 2px;
}

.section-note { text-align: center; color: var(--bark-2); margin: 2.2rem 0 0; font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75em 1.4em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: 1.1rem; padding: 0.85em 1.7em; }

.btn-primary { background: var(--bark); color: var(--cream); border-color: var(--bark); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.btn-outline { background: transparent; color: var(--bark); border-color: var(--wood-2); }
.btn-outline:hover { background: var(--wood-2); color: var(--cream); }

.btn-cream { background: var(--cream); color: var(--bark); border-color: var(--cream); }
.btn-cream:hover { background: var(--white); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--wood-3);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(58, 42, 28, 0.12); }

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--wood);
  object-fit: cover;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; }
.brand-tag { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wood-2); margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a:not(.btn) {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bark);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--wood); }
.nav-cta { padding: 0.6em 1.1em; font-size: 0.95rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 8px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle-bar { display: block; width: 100%; height: 3px; background: var(--bark); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(185, 138, 90, 0.18), transparent 55%),
    var(--cream);
  padding-top: clamp(2.5rem, 6vw, 5rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.hero h1 .amp { font-style: italic; font-family: var(--font-body); font-weight: 400; font-size: 0.72em; color: var(--wood-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.hero-logo img { width: 100%; max-width: 560px; margin-inline: auto; filter: drop-shadow(0 10px 14px rgba(58, 42, 28, 0.22)); }

/* Fence-line divider (repeating SVG of posts + rails) */
.fence-divider {
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='40' viewBox='0 0 96 40'%3E%3Crect x='0' y='0' width='8' height='40' rx='1' fill='%238a5a2b'/%3E%3Crect x='0' y='9' width='96' height='4' fill='%238a5a2b'/%3E%3Crect x='0' y='19' width='96' height='4' fill='%238a5a2b'/%3E%3Crect x='0' y='29' width='96' height='4' fill='%238a5a2b'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center bottom;
  opacity: 0.9;
}
.fence-divider-dark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='40' viewBox='0 0 96 40'%3E%3Crect x='0' y='0' width='8' height='40' rx='1' fill='%23b98a5a'/%3E%3Crect x='0' y='9' width='96' height='4' fill='%23b98a5a'/%3E%3Crect x='0' y='19' width='96' height='4' fill='%23b98a5a'/%3E%3Crect x='0' y='29' width='96' height='4' fill='%23b98a5a'/%3E%3C/svg%3E");
  opacity: 0.55;
}

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--bark); color: var(--cream); }
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2.5rem;
  padding-block: 1.1rem;
}
.trust-item {
  display: flex; align-items: center; gap: 0.6em;
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}
.trust-item .icon { color: var(--wood); width: 1.35em; height: 1.35em; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.section-alt { background: var(--cream-2); }

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--wood-3);
  border-top: 4px solid var(--wood);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card p { margin: 0; color: var(--bark-2); font-size: 1rem; }
.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--cream-2);
  border: 1px solid var(--wood-3);
  border-radius: 50%;
  margin-bottom: 1rem;
}
.card-icon svg { width: 26px; height: 26px; fill: var(--wood-2); }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.gallery-item { margin: 0; }
.gallery-btn {
  display: block; width: 100%;
  padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.gallery-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.gallery-btn img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform .3s;
}
.gallery-btn:hover img { transform: scale(1.03); }
.gallery-item figcaption {
  margin-top: 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bark-2);
  text-align: center;
}

/* ---------- About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.about-copy .eyebrow { margin-bottom: 0.5em; }
.about-copy h2 { margin-bottom: 0.7em; }
.about-copy .btn { margin-top: 0.5rem; }

.check-list { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; }
.check-list li { position: relative; padding-left: 1.9em; margin-bottom: 0.55em; }
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.45em;
  width: 1.1em; height: 1.1em;
  border-radius: 50%;
  background: var(--wood-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 14.5-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 14.5-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.stat-card {
  background: var(--bark);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 2.2rem 1.8rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--bark-2);
}
.stat-mark {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid var(--wood);
  object-fit: cover;
  margin: 0 auto 1.2rem;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: 4.2rem; line-height: 1; color: var(--white); }
.stat-plus { color: var(--wood); font-size: 0.6em; vertical-align: top; }
.stat-label { font-family: var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.9rem; color: var(--wood-3); margin-top: 0.4rem; }
.stat-row {
  display: flex; justify-content: center; gap: 0.5rem;
  margin-top: 1.6rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(217, 189, 147, 0.25);
}
.stat-mini {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5em 0.4em;
  border: 1px solid rgba(217, 189, 147, 0.4);
  border-radius: 4px;
  color: var(--cream);
}

/* ---------- Process steps ---------- */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.step {
  background: var(--white);
  border: 1px solid var(--wood-3);
  border-radius: var(--radius);
  padding: 2rem 1.6rem 1.6rem;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--bark);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  border: 3px solid var(--wood);
}
.step p { margin: 0; color: var(--bark-2); font-size: 1rem; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  color: var(--cream);
  background:
    linear-gradient(rgba(36, 26, 17, 0.72), rgba(36, 26, 17, 0.82)),
    url("../images/farm-rail-fence.jpg") center 62% / cover no-repeat;
  text-align: center;
}
.cta-inner { padding-block: clamp(3.5rem, 8vw, 6rem); max-width: 720px; }
.cta-band h2 { color: var(--white); }
.cta-band p { font-size: 1.15rem; color: var(--cream-3); margin-bottom: 1.8rem; }
.cta-band .btn-lg { font-size: 1.35rem; padding: 0.7em 1.6em; }

/* ---------- Contact ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin-inline: auto;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--wood-3);
  border-top: 4px solid var(--wood);
  border-radius: var(--radius);
  padding: 2rem 1.4rem 1.6rem;
  text-decoration: none;
  color: var(--bark);
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--wood); color: var(--bark); }
.contact-icon {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bark);
  margin-bottom: 1rem;
}
.contact-icon svg { width: 28px; height: 28px; fill: var(--cream); }
.contact-label { font-family: var(--font-ui); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wood-2); }
.contact-value { font-family: var(--font-ui); font-weight: 600; font-size: 1.6rem; line-height: 1.2; color: var(--ink); margin-top: 0.25rem; }
.contact-email { font-size: 1.1rem; text-transform: lowercase; word-break: break-all; }
.contact-social { font-size: 1.25rem; }
.contact-cta {
  margin-top: 1rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wood-2);
  border-bottom: 2px solid var(--wood-3);
  padding-bottom: 2px;
}
.contact-card:hover .contact-cta { border-bottom-color: var(--wood-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bark); color: var(--cream-3); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 2rem;
  padding-block: 2.2rem 1.6rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.9rem; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--wood); object-fit: cover; }
.footer-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--white); margin: 0; }
.footer-tag { font-family: var(--font-ui); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wood-3); margin: 0.2rem 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.footer-nav a, .footer-contact a {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--wood); }
.footer-contact { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-end; }
.footer-contact a { text-transform: none; font-size: 1rem; }
.footer-social { display: inline-flex; align-items: center; gap: 0.4em; margin-top: 0.3rem; }
.footer-social .icon { width: 1.25em; height: 1.25em; }
.footer-bottom { border-top: 1px solid rgba(217, 189, 147, 0.2); padding-block: 1rem; }
.footer-bottom p { margin: 0; font-size: 0.85rem; text-align: center; color: var(--wood-3); }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0;
  background: transparent;
  max-width: min(96vw, 1100px);
  max-height: 96vh;
  width: auto;
}
.lightbox::backdrop { background: rgba(20, 14, 9, 0.9); }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img {
  max-width: 96vw;
  max-height: 84vh;
  width: auto; height: auto;
  margin-inline: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox figcaption {
  color: var(--cream);
  font-family: var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-top: 0.9rem;
}
.lightbox-close {
  position: fixed; top: 14px; right: 18px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(250, 243, 230, 0.15);
  color: var(--cream);
  font-size: 2rem; line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(250, 243, 230, 0.3); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1000px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { order: -1; }
  .hero-logo img { max-width: 380px; }
  .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }

  .about-inner { grid-template-columns: 1fr; }
  .about-aside { max-width: 420px; margin-inline: auto; width: 100%; }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--wood-3);
    box-shadow: 0 12px 24px rgba(58, 42, 28, 0.15);
    padding: 0.5rem 20px 1.2rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--cream-3);
    font-size: 1.05rem;
  }
  .site-nav a:not(.btn):hover { border-bottom-color: var(--cream-3); color: var(--wood-2); }
  .nav-cta { margin-top: 1rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand-tag { display: none; }
  .brand-name { font-size: 1.05rem; }
  .gallery-grid { gap: 0.9rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-contact { align-items: flex-start; }
  .trust-inner { gap: 0.6rem 1.4rem; }
  .trust-item { font-size: 0.8rem; }
  .cta-band .btn-lg { font-size: 1.15rem; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
