/* =========================================================
   J.R.'s Fine Fences, static site styles
   Earthy, cedar-inspired palette + craftsman touches
   ========================================================= */

:root {
  /* --- Earthy palette, built around cedar wood tones --- */
  --bark: #2b2116;        /* deep espresso brown, dark sections, ink */
  --bark-2: #3a2c1d;       /* softer bark, gradients */
  --cedar: #bc6a2c;        /* warm cedar, primary brand accent */
  --cedar-dark: #94531f;
  --cedar-light: #e2954f;
  --terracotta: #b5502f;   /* clay red-orange, CTAs */
  --terracotta-dark: #8f3f22;
  --moss: #6b7a45;         /* moss green, third accent, Picket's color */
  --moss-dark: #52602f;
  --moss-light: #9caf6e;

  --bg: #f7f1e2;           /* warm oat cream, page background */
  --surface: #fffcf5;      /* card surface */
  --surface-alt: #efe3c8;  /* deeper tan, alt section bg */
  --border: #e1d1ac;

  --ink: #2b2116;
  --ink-dim: #6b5c48;
  --ink-faint: #9c8d76;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --container: 1180px;
  --shadow: 0 18px 40px -18px rgba(43, 33, 22, 0.35);

  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--bark);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 999;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Wood-grain texture helper ---------- */
.grain {
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 7px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--terracotta);
  color: #fff;
}
.btn-primary:hover {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(181, 80, 47, 0.32);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--bark);
  transform: translateY(-2px);
}
.btn-cta {
  background: var(--bark);
  color: #fff;
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-lg { padding: 17px 34px; font-size: 1.02rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 241, 226, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-badge { width: 42px; height: 42px; flex-shrink: 0; }
.logo-badge svg { width: 100%; height: 100%; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: -0.01em;
  color: var(--bark);
}
.logo-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cedar-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-dim);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--bark); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--bark);
}
.header-phone svg { width: 18px; height: 18px; color: var(--terracotta); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  width: 16px;
  height: 2px;
  margin: 0 auto;
  background: var(--bark);
  border-radius: 2px;
}

.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(320px, 82vw);
  background: var(--bark);
  z-index: 201;
  padding: 28px 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 22px; }
.mobile-menu nav a { font-size: 1.15rem; font-weight: 600; color: #f3ead9; }
.mobile-phone { color: var(--cedar-light) !important; font-weight: 800 !important; }

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 9, 0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 90px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  color: var(--terracotta);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0 0 22px;
  color: var(--bark);
}
.hero-sub {
  color: var(--ink-dim);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.hero-badges span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-dim);
}
.hero-badges svg { width: 18px; height: 18px; color: var(--cedar); flex-shrink: 0; }

.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Hang-tag: a little wood-shop price tag pinned to the hero photo */
.hero-tag {
  position: absolute;
  top: 26px;
  right: -12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cedar);
  color: var(--surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 10px 20px 10px 28px;
  border-radius: 3px 14px 14px 3px;
  transform: rotate(6deg);
  box-shadow: 0 12px 22px -8px rgba(43, 33, 22, 0.55);
  letter-spacing: 0.01em;
  z-index: 2;
}
.hero-tag::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--cedar-dark) inset;
}

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--bark); padding: 0; }
.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 36px 24px;
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  padding: 0 12px;
  border-left: 1px solid rgba(255,255,255,0.12);
}
.trust-item:first-child { border-left: none; }
.trust-item strong { color: #fff; font-size: 1rem; font-weight: 700; }
.trust-item span { color: #cbbfa7; font-size: 0.85rem; }

/* ---------- Section shared ---------- */
section { padding: 100px 0; }
.section-eyebrow {
  color: var(--terracotta);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 0 0 20px;
  max-width: 640px;
  color: var(--bark);
}
.section-lead {
  color: var(--ink-dim);
  font-size: 1.02rem;
  max-width: 560px;
  margin: 0 0 48px;
}

/* ---------- Services ---------- */
.services { background: var(--surface); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 34px 26px 30px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--swatch, var(--cedar));
}
.service-card.wood { --swatch: var(--cedar); }
.service-card.vinyl { --swatch: #cdc3a9; }
.service-card.aluminum { --swatch: #8996a0; }
.service-card.steel { --swatch: #57616a; }
.service-card.chainlink { --swatch: #a89c7f; }
.service-card.deck { --swatch: var(--moss); }
.service-card.porch { --swatch: var(--terracotta); }
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--cedar);
  box-shadow: var(--shadow);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(188, 106, 44, 0.12);
  color: var(--cedar-dark);
  margin-bottom: 18px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-family: var(--font-display); margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; color: var(--bark); }
.service-card p { margin: 0; color: var(--ink-dim); font-size: 0.92rem; }

.service-card-cta {
  background: var(--bark);
  border-color: var(--bark);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.service-card-cta::before { background: var(--cedar-light); }
.service-card-cta h3 { color: #fff; }
.service-card-cta p { color: #cbbfa7; margin-bottom: 20px; }
.service-card-cta .btn-ghost { border-color: rgba(255,255,255,0.3); color: #fff; }
.service-card-cta .btn-ghost:hover { border-color: var(--cedar-light); }

/* ---------- Gallery ---------- */
.gallery { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-item img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.gallery-item figcaption {
  padding: 14px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--bark);
}

/* ---------- Materials / Why cedar ---------- */
.materials { background: var(--surface); }
.materials-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: start;
}
.materials-copy .section-title,
.materials-copy .section-lead { max-width: none; }

.materials-list { display: grid; gap: 24px; }
.materials-item {
  border-left: 3px solid var(--cedar);
  padding: 4px 0 4px 20px;
}
.materials-item h3 { font-family: var(--font-display); margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; color: var(--bark); }
.materials-item p { margin: 0; color: var(--ink-dim); font-size: 0.94rem; }

/* ---------- Process ---------- */
.process { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.process-list { display: flex; flex-direction: column; }
.process-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  align-items: start;
}
.process-item:last-child { border-bottom: 1px solid var(--border); }

/* Tree-ring step badges */
.process-index {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--bark);
  background:
    radial-gradient(circle at center, var(--surface) 0 14px, transparent 15px),
    repeating-radial-gradient(circle at center, var(--cedar-light) 0px, var(--cedar-light) 5px, var(--cedar) 5px, var(--cedar) 10px);
  box-shadow: 0 4px 10px rgba(43,33,22,0.22), inset 0 0 0 3px var(--surface-alt);
}
.process-body h3 { font-family: var(--font-display); margin: 0 0 10px; font-size: 1.25rem; font-weight: 700; color: var(--bark); }
.process-body p { color: var(--ink-dim); max-width: 560px; margin: 0; }

/* ---------- About ---------- */
.about { background: var(--surface); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.about-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 12%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.about-copy p { color: var(--ink-dim); margin: 0 0 18px; }
.about-founder {
  color: var(--bark) !important;
  margin: 24px 0 4px !important;
  padding-left: 18px;
  border-left: 3px solid var(--terracotta);
}
.about-founder strong { font-family: var(--font-display); font-size: 1.05rem; }
.about-founder span { color: var(--ink-faint); font-size: 0.9rem; }

/* Picket's seal of approval, a little stamp badge for the office dog */
.paw-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 28px 18px;
  padding: 7px 16px;
  border: 2px dashed var(--moss);
  border-radius: var(--radius-pill);
  color: var(--moss-dark);
  font-weight: 700;
  font-size: 0.8rem;
  transform: rotate(-3deg);
}
.paw-badge svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--cedar), var(--terracotta-dark));
  padding: 0;
}
.cta-inner {
  padding: 80px 24px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.cta-inner h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; margin: 0 0 14px; color: #fff; }
.cta-inner p { color: rgba(255,255,255,0.88); font-size: 1.05rem; margin: 0 0 32px; }

/* ---------- Contact ---------- */
.contact { background: var(--surface-alt); border-top: 1px solid var(--border); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-copy .section-title,
.contact-copy .section-lead { max-width: none; }
.contact-cards { display: grid; gap: 14px; }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
a.contact-card:hover { transform: translateY(-3px); border-color: var(--terracotta); }
.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 700;
}
.contact-value { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; color: var(--bark); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.85rem; font-weight: 700; color: var(--bark); }
.form-row input,
.form-row textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--terracotta);
}
.form-submit { width: 100%; margin-top: 4px; }
.form-note { margin: 0; font-size: 0.78rem; color: var(--ink-faint); text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bark);
  color: #cbbfa7;
  padding-top: 0;
}
/* Fence-picket divider: dark cedar pickets rising from a solid base band,
   used as a decorative top border. Footer only. */
.site-footer {
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='26'%3E%3Cpath d='M0 26 L0 13 L20 1 L40 13 L40 26 Z' fill='%232b2116'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 40px 26px;
  background-position: bottom;
  background-color: var(--surface-alt); /* seam with contact */
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-footer .logo-name { color: #fff; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: #cbbfa7; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.footer-contact a, .footer-contact span { color: #cbbfa7; font-size: 0.88rem; }
.footer-contact a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  color: #93876f;
  font-size: 0.8rem;
}
.footer-copyright,
.footer-credit { margin: 0; }
.footer-credit a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(147, 135, 111, 0.4);
  text-underline-offset: 2px;
}
.footer-credit a:hover { color: #cbbfa7; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; margin-top: 18px; }
  .hero-tag { top: -14px; right: 14px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .materials-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .process-item { grid-template-columns: 52px 1fr; gap: 20px; }
  .process-index { width: 52px; height: 52px; font-size: 1rem; }
  .process-index { background: radial-gradient(circle at center, var(--surface) 0 11px, transparent 12px), repeating-radial-gradient(circle at center, var(--cedar-light) 0px, var(--cedar-light) 4px, var(--cedar) 4px, var(--cedar) 8px); }
  .trust-inner { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .trust-item:nth-child(3) { border-left: none; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .header-phone span { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-contact { text-align: left; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 480px) {
  .header-inner { padding: 10px 16px; gap: 8px; }
  .logo-badge { width: 36px; height: 36px; }
  .logo-name { font-size: 0.92rem; white-space: nowrap; }
  .logo-sub { display: none; }
  .header-phone { display: none; }
  .header-actions { gap: 8px; }
  .btn.btn-primary.btn-sm { padding: 9px 14px; font-size: 0.8rem; }
  .hero-tag { font-size: 0.74rem; padding: 8px 16px 8px 22px; }
}

@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .trust-inner { grid-template-columns: 1fr; }
  .trust-item { border-left: none; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; }
  .trust-item:first-child { border-top: none; padding-top: 0; }
  section { padding: 70px 0; }
  .hero { padding-top: 48px; }
  .contact-form { padding: 26px; }
  .paw-badge { margin-left: 0; }
}
