/* ===================================================================
   Frick's Demolition & Excavation — Site Styles
   Palette: Burgundy/Maroon (primary) · Navy Blue (secondary) · White
   Accent: Caliche tan (ties to dirt-work imagery)
   =================================================================== */

:root {
  /* Frick's Demolition & Excavation — Texas Panhandle western/desert palette
     drawn from the logo: deep maroon + canyon rust + desert tan + cream. */
  --burgundy: #6e1423;        /* deep maroon — primary brand              */
  --burgundy-dark: #4f0d18;
  --burgundy-light: #8c2233;
  --navy: #241611;            /* dark espresso brown — dark sections      */
  --navy-light: #35231a;
  --blue: #b5502a;            /* canyon rust — card accent gradient       */
  --caliche: #e2c79f;         /* desert tan — accents on dark            */
  --sand: #f4ede0;            /* cream / bone — light section background   */
  --white: #fffdf8;
  --ink: #2a1c14;             /* warm dark-brown body text                */
  --muted: #6b5f52;
  --line: #e6dcc9;
  --gold: #bf6a1e;            /* burnt amber — CTAs / accent              */
  --amber: #d99a3a;           /* sunset amber — small accents             */

  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(60, 28, 12, 0.10);
  --shadow: 0 10px 30px rgba(60, 28, 12, 0.16);
  --shadow-lg: 0 24px 60px rgba(60, 28, 12, 0.26);
  --container: 1180px;
  --header-h: 80px;

  --font-head: "Zilla Slab", "Oswald", Georgia, serif;
  --font-western: "Rye", "Zilla Slab", Georgia, serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ---------- Skip to content ----------
   Off-screen until focused, then pinned over the header so a keyboard user
   can jump the nav. Uses a real offset rather than display:none so screen
   readers still reach it. */
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 200;
  background: var(--burgundy);
  color: #fff;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0; color: #fff; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.5px;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); text-transform: uppercase; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1rem; color: var(--ink); }

a { color: var(--burgundy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--burgundy-light); }

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

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

.section { padding: clamp(56px, 8vw, 110px) 0; }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: #e8edf6; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--burgundy { background: var(--burgundy); color: #fbe9ec; }
.section--burgundy h2, .section--burgundy h3 { color: #fff; }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.85rem;
  color: var(--burgundy);
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: inline-block;
}
.section--navy .eyebrow, .section--burgundy .eyebrow { color: var(--caliche); }

.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section--navy .section-head p { color: #c3cde0; }

/* ---------- Focus visibility ----------
   Keyboard-only, via :focus-visible, so a mouse click does not leave a ring
   behind. Applied to everything interactive rather than per-component, so a
   new control cannot be added without one. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: 4px;
}
/* On dark panels the burgundy ring is too low-contrast to see. */
.section--navy a:focus-visible,
.footer a:focus-visible,
.footer button:focus-visible,
.topbar a:focus-visible,
.hero a:focus-visible,
.page-hero a:focus-visible,
.cta-band a:focus-visible,
.consent a:focus-visible,
.consent button:focus-visible {
  outline-color: var(--caliche);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--burgundy); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--burgundy-light); color: #fff; box-shadow: var(--shadow); }
.btn--gold { background: var(--gold); color: #201810; box-shadow: 0 6px 18px rgba(239,122,31,0.35); }
.btn--gold:hover { background: #ff8a33; color: #201810; box-shadow: 0 10px 26px rgba(239,122,31,0.45); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--lg { padding: 1.05rem 2.2rem; font-size: 1.05rem; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy);
  color: #d7deec;
  font-size: 0.86rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: #fff; }
.topbar__left { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.topbar__left span { display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar__faith { display: inline-flex; align-items: center; gap: 0.5rem; opacity: 0.92; }

/* ---------- Header / Nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s;
}
.header.scrolled { box-shadow: var(--shadow-sm); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand__mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--burgundy);
  color: #fff;
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.brand__text { line-height: 1.05; }
.brand__name {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--navy);
  font-size: 1.12rem;
}
.brand__tag { font-size: 0.72rem; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

/* Real logo lockup */
.brand__logo { height: 56px; width: auto; display: block; border-radius: 8px; }
.footer__logo { display: inline-block; background: #fff; padding: 8px; border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 1rem; }
.footer__logo img { width: 132px; height: auto; display: block; }

/* Inline icon system (replaces emoji) */
.ico { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.16em; }
.strip__item .ico { width: 20px; height: 20px; }
.card__icon .ico { width: 30px; height: 30px; }
.info-card__icon .ico { width: 24px; height: 24px; }
.fab .ico { width: 26px; height: 26px; }
.hero__badge .ico { width: 16px; height: 16px; }

.nav__links { display: flex; align-items: center; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 0.95rem;
  color: var(--navy);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
}
.nav__links a:hover, .nav__links a.active { color: var(--burgundy); background: var(--sand); }
.nav__cta { margin-left: 0.6rem; }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  display: block; width: 26px; height: 3px;
  background: var(--navy); border-radius: 3px; margin: 5px 0;
  transition: transform 0.25s, opacity 0.25s;
}

/* ---------- HERO (animated) ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFade 32s infinite;
  transform: scale(1.08);
  will-change: opacity, transform;
}
.hero__slide:nth-child(1) { animation-delay: 0s; }
.hero__slide:nth-child(2) { animation-delay: 8s; }
.hero__slide:nth-child(3) { animation-delay: 16s; }
.hero__slide:nth-child(4) { animation-delay: 24s; }

@keyframes heroFade {
  0%   { opacity: 0; transform: scale(1.08); }
  6%   { opacity: 1; }
  25%  { opacity: 1; transform: scale(1.15); }
  31%  { opacity: 0; }
  100% { opacity: 0; }
}

/* dark + brand gradient wash over slideshow for legibility + identity */
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(110deg, rgba(79,13,24,0.82) 0%, rgba(22,36,63,0.7) 45%, rgba(22,36,63,0.25) 100%),
    linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0) 55%);
}
/* subtle animated dust/particles drifting across hero */
.hero__dust {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.35), transparent),
    radial-gradient(2px 2px at 70% 60%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 85% 20%, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 55% 45%, rgba(255,255,255,0.22), transparent);
  background-size: 600px 600px;
  opacity: 0.5;
  animation: dustDrift 40s linear infinite;
}
@keyframes dustDrift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 600px 300px, -500px 200px, 400px -300px, -300px 400px, 200px -200px; }
}

.hero__inner { position: relative; z-index: 1; max-width: 760px; padding-top: 60px; padding-bottom: 60px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(4px);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.78rem;
  margin-bottom: 1.4rem;
  animation: fadeUp 0.8s 0.1s both;
}
.hero h1 {
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
  margin-bottom: 0.5rem;
  animation: fadeUp 0.8s 0.25s both;
}
.hero h1 .accent { color: var(--caliche); }
.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 600px;
  color: #f0e9df;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s 0.4s both;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; animation: fadeUp 0.8s 0.55s both; }
.hero__trust {
  display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 2.6rem;
  animation: fadeUp 0.8s 0.7s both;
}
.hero__trust div { line-height: 1.1; }
.hero__trust strong {
  font-family: var(--font-head); font-size: 1.9rem; color: #fff; display: block;
}
.hero__trust span { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1px; color: var(--caliche); }

.hero__scroll {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 1; color: rgba(255,255,255,0.8); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 2px; text-align: center;
  animation: bob 2s ease-in-out infinite;
}
.hero__scroll::before {
  content: ""; display: block; width: 1px; height: 34px; margin: 0 auto 8px;
  background: linear-gradient(rgba(255,255,255,0.9), transparent);
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ---------- Trust strip ---------- */
.strip {
  background: var(--burgundy);
  color: #fff;
}
.strip .container {
  display: flex; flex-wrap: wrap; justify-content: space-around; gap: 1.5rem;
  padding-top: 26px; padding-bottom: 26px; text-align: center;
}
.strip__item { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 1.02rem; }
.strip__item svg { flex-shrink: 0; }

/* ---------- Service cards ---------- */
.grid { display: grid; gap: 1.6rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; height: 4px; width: 100%;
  background: linear-gradient(90deg, var(--burgundy), var(--blue));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__icon {
  width: 58px; height: 58px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: var(--sand); color: var(--burgundy);
}
.card h3 { color: var(--navy); margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 0.8rem; }
.card__link {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px;
  font-size: 0.85rem; color: var(--burgundy); display: inline-flex; align-items: center; gap: 0.4rem;
}
.card__link:hover { gap: 0.7rem; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__media--stack { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; box-shadow: none; }
.split__media--stack img { border-radius: var(--radius); box-shadow: var(--shadow); height: 240px; }
.split__badge {
  position: absolute; bottom: 18px; left: 18px;
  background: var(--burgundy); color: #fff; padding: 0.9rem 1.3rem;
  border-radius: var(--radius); box-shadow: var(--shadow); line-height: 1.1;
}
.split__badge strong { font-family: var(--font-head); font-size: 1.7rem; display: block; }
.split__badge span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; }

.checklist { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 0.85rem; }
.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; }
.checklist svg { flex-shrink: 0; margin-top: 3px; color: var(--burgundy); }
.section--navy .checklist svg { color: var(--caliche); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat strong { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--caliche); display: block; line-height: 1; }
.stat span { text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem; color: #c3cde0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery figure:hover img { transform: scale(1.08); }
/* Captions are visible by default. They used to be opacity:0 revealed on
   hover, which meant no touch device ever showed one, and this site's
   traffic is mostly phones. Only devices that genuinely have a hover
   pointer get the reveal behaviour. */
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 0.9rem 1rem 0.7rem;
  background: linear-gradient(to top, rgba(22,36,63,0.92), transparent);
  color: #fff; font-size: 0.88rem; font-family: var(--font-head);
  text-transform: uppercase; letter-spacing: 0.5px;
  transform: translateY(0); opacity: 1; transition: 0.3s;
}
@media (hover: hover) and (pointer: fine) {
  .gallery figcaption { transform: translateY(8px); opacity: 0; }
  .gallery figure:hover figcaption,
  .gallery figure:focus-within figcaption { transform: translateY(0); opacity: 1; }
}

/* ---------- Testimonials ---------- */
.quote {
  background: #fff; border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
/* Was var(--gold) #ef7a1f: 2.81:1 on white, below the 4.5:1 AA minimum.
   The stars convey the rating, so they are content, not decoration.
   --burgundy measures 6.56:1. */
.quote__stars { color: var(--burgundy); letter-spacing: 2px; margin-bottom: 0.8rem; }
.quote p { font-size: 1.05rem; font-style: italic; color: var(--ink); }
.quote__by { display: flex; align-items: center; gap: 0.8rem; margin-top: 1rem; }
.quote__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--burgundy); color: #fff; display: grid; place-items: center; font-family: var(--font-head); }
.quote__by strong { display: block; color: var(--navy); }
.quote__by span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Service area chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.chip {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  padding: 0.45rem 1rem; border-radius: 999px; font-size: 0.9rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  background-color: var(--burgundy-dark);
  background-image:
    linear-gradient(115deg, rgba(60,9,17,0.90) 0%, rgba(110,20,35,0.80) 55%, rgba(60,9,17,0.90) 100%),
    url("/assets/img/cta-dirtwork-1600.webp");
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--burgundy-dark);
  box-shadow: inset 0 0 120px rgba(31,6,11,0.55);
}
/* Smaller files for narrower bands, same pattern as the [data-bg] heroes.
   The gradient is repeated because it shares background-image with the
   photo. Variants come from scripts/optimize_images.py. */
@media (max-width: 900px) {
  .cta-band {
    background-image:
      linear-gradient(115deg, rgba(60,9,17,0.90) 0%, rgba(110,20,35,0.80) 55%, rgba(60,9,17,0.90) 100%),
      url("/assets/img/cta-dirtwork-1200.webp");
  }
}
@media (max-width: 560px) {
  .cta-band {
    background-image:
      linear-gradient(115deg, rgba(60,9,17,0.90) 0%, rgba(110,20,35,0.80) 55%, rgba(60,9,17,0.90) 100%),
      url("/assets/img/cta-dirtwork-4x3-800.webp");
  }
}
.cta-band .eyebrow { color: var(--amber); }
.cta-band h2 { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.cta-band p { color: #f6e7dd; font-size: 1.15rem; max-width: 620px; margin: 0 auto 1.8rem; text-shadow: 0 1px 6px rgba(0,0,0,0.45); }
.cta-band .hero__actions { justify-content: center; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { display: block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: 0.82rem; color: var(--navy); margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border: 1px solid var(--line);
  border-radius: var(--radius); font-family: var(--font-body); font-size: 1rem; background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--burgundy); box-shadow: 0 0 0 3px rgba(110,20,35,0.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.form__note { font-size: 0.85rem; color: var(--muted); }

/* Honeypot. Must not be display:none, or some bots detect and skip it.
   Pulled off-canvas instead, and taken out of the a11y tree + tab order
   in the markup so no real visitor can reach it. */
.form__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.req { color: var(--burgundy); font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Per-field validation message */
.field__error {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--burgundy-dark);
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}
.field__error::before { content: "!"; font-weight: 700; flex: none; }
.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  border-color: var(--burgundy);
  background: #fdf6f4;
}
.field input.is-invalid:focus,
.field select.is-invalid:focus,
.field textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(166, 56, 26, 0.18);
}

/* Submission result banner */
.form__alert {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 0.97rem;
  line-height: 1.6;
}
.form__alert p { margin: 0.4rem 0 0; }
.form__alert p:first-child { margin-top: 0; }
.form__alert a { font-weight: 600; }
.form__alert--success {
  background: #f1f7ee;
  border-color: #bcd9ad;
  color: #24401a;
}
.form__alert--success a { color: #2f5c22; }
.form__alert--error {
  background: #fdf3f0;
  border-color: #e6b3a3;
  color: #6d2410;
}
.form__alert--error a { color: var(--burgundy-dark); }
.form__alert--info {
  background: var(--sand);
  border-color: var(--line);
  color: var(--ink);
}
.form__alert:focus-visible { outline: 3px solid var(--burgundy); outline-offset: 3px; }

button[disabled] { opacity: 0.65; cursor: progress; }
button[disabled]:hover { transform: none; }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  position: relative; color: #fff; padding: clamp(70px, 12vw, 130px) 0 clamp(50px, 8vw, 90px);
  background-size: cover; background-position: center; isolation: isolate;
}
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, rgba(79,13,24,0.9), rgba(22,36,63,0.78)); }
.page-hero h1 { color: #fff; }
.page-hero p { color: #f0e9df; max-width: 640px; font-size: 1.1rem; }
.breadcrumb { font-size: 0.85rem; color: var(--caliche); margin-bottom: 1rem; }
.breadcrumb a { color: #fff; }
.breadcrumb span { opacity: 0.6; margin: 0 0.4rem; }

/* ---------- Contact info cards ---------- */
.info-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.info-card__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--sand); color: var(--burgundy); display: grid; place-items: center; flex-shrink: 0; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.info-card p, .info-card a { margin: 0; font-size: 0.97rem; color: var(--muted); }
.info-card a { color: var(--burgundy); }

/* ---------- Detailed service blocks ---------- */
.svc-block { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
.svc-block:nth-child(even) .svc-block__media { order: 2; }
/* `height: auto` is load-bearing, not tidiness. The width/height attributes
   on an <img> apply as presentational hints, and this rule overrides only
   width, so height="900" was landing as a literal 900px. With both axes
   definite, `aspect-ratio` is ignored: every service figure rendered 534x900
   instead of 4:3, and 534x1600 before the crops went in. */
.svc-block__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.svc-block + .svc-block { margin-top: clamp(3rem, 6vw, 5rem); }
.svc-block h3 { font-size: 1.7rem; color: var(--navy); }
.svc-num { font-family: var(--font-head); color: var(--caliche); font-size: 3rem; line-height: 1; opacity: 0.5; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #b9c3d6; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-top: 70px; padding-bottom: 50px; }
.footer h4 { color: #fff; font-size: 1rem; letter-spacing: 1.5px; margin-bottom: 1.1rem; }
.footer a { color: #b9c3d6; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; font-size: 0.95rem; }
.footer__brand .brand__name { color: #fff; }
.footer__brand p { font-size: 0.95rem; color: #94a1ba; margin-top: 1rem; }
.footer__faith { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; font-style: italic; color: #94a1ba; font-size: 0.9rem; }
.footer__contact li { display: flex; gap: 0.6rem; align-items: flex-start; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px; padding-bottom: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; font-size: 0.85rem; color: #8593ad; }
.footer__legal { display: inline-flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; margin-left: 1rem; }
.footer__legal a { text-decoration: underline; text-underline-offset: 2px; }
.footer__legal span { opacity: 0.5; }
.footer__cookies {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: #b9c3d6;
  text-decoration: underline; text-underline-offset: 2px;
}
.footer__cookies:hover { color: #fff; }
@media (max-width: 760px) {
  .footer__legal { margin-left: 0; margin-top: 0.5rem; width: 100%; }
}
.footer__social { display: flex; gap: 0.7rem; }
.footer__social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.08); display: grid; place-items: center; color: #fff; }
.footer__social a:hover { background: var(--burgundy); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Scroll-animation engine (JS-driven; see js/main.js) */
.reveal-zoom {
  opacity: 0; transform: scale(0.92);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}
.reveal-zoom.in { opacity: 1; transform: none; }
.hero__inner { will-change: transform, opacity; }
.hero__slides { will-change: transform; }
/* Sticky-header anchor offset (ports the kit's SectionOffset) */
:target, [id] { scroll-margin-top: 96px; }

/* ---------- Blog article typography ---------- */
.post-body { font-size: 1.06rem; color: var(--ink); }
.post-body h2 { margin: 2.2rem 0 0.8rem; font-size: 1.5rem; color: var(--navy); text-transform: none; letter-spacing: 0.2px; }
.post-body p { margin: 0 0 1.1rem; line-height: 1.75; }
.post-body ul { margin: 0 0 1.3rem; padding-left: 1.2rem; display: grid; gap: 0.55rem; }
.post-body li { line-height: 1.6; }
.post-body a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--burgundy-light); }
.post-body strong { color: var(--navy); }

/* ---------- FAQ (accordion) ---------- */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 0.9rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 1.3rem; font-family: var(--font-head); font-size: 1.08rem; color: var(--navy); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--burgundy); line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { margin: 0; padding: 0 1.3rem 1.2rem; color: var(--muted); line-height: 1.7; }

/* ---------- Legal pages ---------- */
.legal { max-width: 780px; margin: 0 auto; }
.legal h2 { margin: 2.4rem 0 0.9rem; font-size: 1.45rem; text-transform: none; letter-spacing: 0.2px; }
.legal h3 { margin: 1.6rem 0 0.6rem; font-size: 1.12rem; }
.legal__updated { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.6rem; }
.legal__box {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 1.8rem 0;
}
.legal__box h2 { margin-top: 0; }
.legal__box ul { margin-bottom: 0.6rem; }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  background: var(--navy);
  color: #e8edf6;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: consentIn 0.35s ease both;
}
@keyframes consentIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.consent__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.consent__text { flex: 1 1 380px; }
.consent__title {
  font-size: 1.05rem;
  color: #fff;
  margin: 0 0 0.3rem;
  text-transform: none;
  letter-spacing: 0.3px;
}
.consent__text p { margin: 0; font-size: 0.92rem; color: #c9d3e4; line-height: 1.55; }
.consent__text a { color: var(--caliche); text-decoration: underline; text-underline-offset: 2px; }
.consent__text a:hover { color: #fff; }
.consent__actions { display: flex; gap: 0.7rem; flex-wrap: wrap; flex: 0 0 auto; }
.consent__actions .btn { font-size: 0.88rem; padding: 0.7rem 1.3rem; }
/* The ghost button is on a dark panel here, so it needs its own contrast. */
.consent__decline { border-color: rgba(255, 255, 255, 0.45); color: #fff; }

@media (max-width: 620px) {
  .consent { left: 8px; right: 8px; bottom: 8px; }
  .consent__inner { padding: 1rem; gap: 0.9rem; }
  .consent__actions { width: 100%; }
  .consent__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Full-bleed background images ----------
   Moved out of inline style attributes so a media query can serve a
   smaller file to small screens. An inline style cannot be overridden
   by a media query, so every phone was downloading the same 1200px
   file as a desktop, four times over on the homepage hero.

   Wide viewports get the 16:9 crop, narrow ones keep the portrait
   original: see the note in scripts/hero_backgrounds.py.

   Generated by scripts/hero_backgrounds.py. */
[data-bg="culvert-install-wide"] { background-image: url("/assets/img/culvert-install-wide-16x9-1600.webp"); }
[data-bg="culvert-pipe-skidsteer"] { background-image: url("/assets/img/culvert-pipe-skidsteer-16x9-1200.webp"); }
[data-bg="driveway-caliche-entrance"] { background-image: url("/assets/img/driveway-caliche-entrance-16x9-1200.webp"); }
[data-bg="excavation-grading"] { background-image: url("/assets/img/excavation-grading-16x9-1200.webp"); }
[data-bg="hero-canyon-excavator"] { background-image: url("/assets/img/hero-canyon-excavator-16x9-1200.webp"); }
[data-bg="railroad-tie-steps"] { background-image: url("/assets/img/railroad-tie-steps-16x9-1200.webp"); }
[data-bg="trench-drainage"] { background-image: url("/assets/img/trench-drainage-16x9-1200.webp"); }

@media (max-width: 900px) {
  [data-bg="culvert-install-wide"] { background-image: url("/assets/img/culvert-install-wide-800.webp"); }
  [data-bg="culvert-pipe-skidsteer"] { background-image: url("/assets/img/culvert-pipe-skidsteer-800.webp"); }
  [data-bg="driveway-caliche-entrance"] { background-image: url("/assets/img/driveway-caliche-entrance-800.webp"); }
  [data-bg="excavation-grading"] { background-image: url("/assets/img/excavation-grading-800.webp"); }
  [data-bg="hero-canyon-excavator"] { background-image: url("/assets/img/hero-canyon-excavator-800.webp"); }
  [data-bg="railroad-tie-steps"] { background-image: url("/assets/img/railroad-tie-steps-800.webp"); }
  [data-bg="trench-drainage"] { background-image: url("/assets/img/trench-drainage-800.webp"); }
}

@media (max-width: 560px) {
  [data-bg="culvert-install-wide"] { background-image: url("/assets/img/culvert-install-wide-500.webp"); }
  [data-bg="culvert-pipe-skidsteer"] { background-image: url("/assets/img/culvert-pipe-skidsteer-500.webp"); }
  [data-bg="driveway-caliche-entrance"] { background-image: url("/assets/img/driveway-caliche-entrance-500.webp"); }
  [data-bg="excavation-grading"] { background-image: url("/assets/img/excavation-grading-500.webp"); }
  [data-bg="hero-canyon-excavator"] { background-image: url("/assets/img/hero-canyon-excavator-500.webp"); }
  [data-bg="railroad-tie-steps"] { background-image: url("/assets/img/railroad-tie-steps-500.webp"); }
  [data-bg="trench-drainage"] { background-image: url("/assets/img/trench-drainage-500.webp"); }
}

/* ---------- end generated backgrounds ---------- */

@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}

/* Keep the floating call button clear of the consent panel.
   Driven by a body class, not a sibling selector: the banner is appended to
   the end of <body> after .fab, so ".consent ~ .fab" would never match. */
body.consent-open .fab { bottom: 148px; }
@media (max-width: 620px) {
  body.consent-open .fab { bottom: 200px; }
}

/* ---------- Floating call button (mobile) ---------- */
.fab {
  position: fixed; bottom: 18px; right: 18px; z-index: 90;
  background: var(--gold); color: #201810; width: 58px; height: 58px;
  border-radius: 50%; display: none; place-items: center; box-shadow: var(--shadow-lg);
  animation: pulse 2.5s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,122,31,0.55); } 50% { box-shadow: 0 0 0 14px rgba(239,122,31,0); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .split, .svc-block { grid-template-columns: 1fr; }
  .svc-block:nth-child(even) .svc-block__media { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar { display: none; }
  .brand__logo { height: 44px; }
  .brand__tag { display: none; }
  .brand__name { font-size: 1rem; }
  .nav__links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: #fff; padding: 1rem; gap: 0.2rem;
    box-shadow: var(--shadow); border-bottom: 1px solid var(--line);
    transform: translateY(-130%); transition: transform 0.3s; z-index: 99;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: 0.9rem 1rem; }
  .nav__cta { margin: 0.4rem 0 0; }
  .nav__toggle { display: block; }
  .nav__toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .fab { display: grid; }
  /* Room for the floating call button, so it never sits on the legal links. */
  .footer__bottom { padding-bottom: 96px; }
  .form__row { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .grid--3, .grid--4, .grid--2, .stats, .gallery { grid-template-columns: 1fr; }
  .hero__trust { gap: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide, .hero__dust, .hero__scroll, .fab { animation: none !important; }
  .hero__slide:first-child { opacity: 1; }
  .reveal, .reveal-zoom { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__inner { transform: none !important; opacity: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   FRICK'S — western / desert vibe additions
   ============================================================ */

/* Dusty film-grain over the whole page (subtle) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Western display accents */
.eyebrow { font-family: var(--font-western); letter-spacing: 2px; }
.hero__badge { font-family: var(--font-western); letter-spacing: 1.5px; }

/* Rugged slab headings: a touch of weight + a hairline canyon underline on section heads */
h1, h2, h3, h4 { letter-spacing: 0.3px; }
.section-head h2 { position: relative; display: inline-block; padding-bottom: 0.5rem; }
.section-head h2::after {
  content: "";
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 74px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--burgundy));
}
.section-head { }

/* Warm the sticky header + give it a hairline desert rule */
.header { border-bottom: 2px solid var(--line); background: rgba(244, 237, 224, 0.94); }
.header.scrolled { box-shadow: 0 6px 22px rgba(60, 28, 12, 0.14); }

/* Buttons: chunkier, western */
.btn { letter-spacing: 1.2px; border-radius: 8px; }
.btn--gold { color: #2a1408; }

/* Card top accent: canyon gradient */
.card::before { background: linear-gradient(90deg, var(--burgundy), var(--gold)); }

/* Trust strip / bands read as maroon leather */
.strip { background: var(--burgundy); border-top: 3px solid var(--burgundy-dark); border-bottom: 3px solid var(--burgundy-dark); }

/* Section divider stars (decorative western touch) */
.wsep { text-align: center; color: var(--gold); letter-spacing: 6px; font-size: 0.9rem; margin: 0.6rem 0 0; }

/* Reviews cards clickable */
a.quote { text-decoration: none; color: inherit; display: block; transition: transform .18s, box-shadow .18s; }
a.quote:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quote__src { display: inline-flex; align-items: center; gap: .35rem; margin-top: .8rem; font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--burgundy); text-transform: uppercase; letter-spacing: .5px; }
.gallery--tall figure { aspect-ratio: 3/4; }

/* Faith scripture line in footer */
.footer__verse { display:block; font-family: var(--font-western); color: var(--caliche); font-size: 0.92rem; letter-spacing: 0.4px; opacity: 0.85; }
