/* ===== Fonts (self-hosted) ===== */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/barlow-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlow-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlow-condensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/barlow-condensed-700.woff2") format("woff2");
}

/* ===== Design tokens ===== */
:root {
  --ink: #0f1b24;
  --footer: #09121a;
  --panel-dark: #172835;
  --paper: #f5f4ef;
  --white: #ffffff;
  --border: #dedcd3;
  --accent: #13a6c9;
  --accent-ink: #0f1b24;
  --accent-on-dark: #5fd0ea;
  --eyebrow: #0b6e86;
  --muted-light: #4a5560;
  --muted-dark: #c9d3da;

  --font-head: "Barlow Condensed", sans-serif;
  --font-body: "Barlow", sans-serif;

  --radius: 6px;
  --container: 1180px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 1rem;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--eyebrow); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  text-transform: none;
  letter-spacing: 0.01em;
  margin: 0 0 var(--space-2);
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 var(--space-2); }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eyebrow);
  font-size: 0.85rem;
}
section[data-dark] .eyebrow, .on-dark .eyebrow { color: var(--accent-on-dark); }

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 0.85em 1.5em;
  min-height: 44px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #119ab9; text-decoration: none; }
.btn-outline { border-color: var(--accent); color: var(--ink); background: transparent; }
.btn-outline:hover { background: rgba(19, 166, 201, 0.1); text-decoration: none; }
.on-dark.btn-outline { border-color: var(--accent-on-dark); color: var(--white); }
.btn-slim { padding: 0.5em 1.25em; min-height: 36px; font-size: 0.9rem; margin-bottom: var(--space-3); }

/* ===== Header ===== */
.utility-bar {
  background: var(--footer);
  color: var(--muted-dark);
  font-size: 0.85rem;
}
.utility-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.utility-bar a { color: var(--accent-on-dark); }
.utility-bar .license { color: var(--muted-dark); }

.site-header {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
  gap: var(--space-3);
}
.logo { display: flex; align-items: center; }
.logo img { height: 46px; width: auto; display: block; }
.logo:hover { text-decoration: none; }
@media (min-width: 900px) {
  .logo img { height: 52px; }
}

.main-nav { display: none; }
.main-nav > ul { display: flex; align-items: center; gap: var(--space-3); }
.main-nav a {
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
}
.main-nav a:hover { color: var(--accent-on-dark); text-decoration: none; }

.has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--panel-dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: var(--space-1);
  min-width: 260px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  font-size: 0.95rem;
}
.dropdown li a:hover { background: rgba(255,255,255,0.06); }

.menu-toggle {
  display: inline-flex;
  background: none;
  border: 2px solid var(--white);
  color: var(--white);
  border-radius: var(--radius);
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.mobile-nav {
  display: none;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav a {
  display: block;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  padding: 0.9rem var(--space-3);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav details summary {
  cursor: pointer;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  padding: 0.9rem var(--space-3);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav details ul a { padding-left: var(--space-4); font-weight: 500; }

@media (min-width: 900px) {
  .main-nav { display: block; }
  .menu-toggle, .mobile-nav { display: none !important; }
}

/* ===== Sections ===== */
section { padding: var(--space-5) 0; }

/* Long-form legal text (Privacy Policy) - narrower measure than the
   marketing sections for readability, with normal paragraph/heading flow. */
.legal-content { max-width: 70ch; }
.legal-content h2 { margin-top: var(--space-4); }
.legal-content h3 { margin-top: var(--space-3); }
.legal-content p { margin-bottom: var(--space-2); }
[data-dark], .band-dark {
  background: var(--panel-dark);
  color: var(--muted-dark);
}
[data-dark] h1, [data-dark] h2, [data-dark] h3,
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--white); }

/* Service area map backdrop */
.service-area-section {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  min-height: 420px;
  display: flex;
  align-items: center;
}
.service-area-section .container { width: 100%; }
.service-area-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.service-area-card {
  position: relative;
  z-index: 1;
  background: rgba(245, 244, 239, 0.93);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  max-width: 34rem;
}
.county-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-2) 0 var(--space-3);
}
.county-pills li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.service-area-label { font-weight: 600; margin-bottom: 0; }
@media (min-width: 900px) {
  .service-area-card { padding: var(--space-4); }
}

/* Hero slideshow */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  min-height: clamp(480px, 78vh, 760px);
  display: flex;
  align-items: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; background: var(--ink); }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide picture, .hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 36, 0.55);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: clamp(20rem, 70vw, 50rem);
  padding: var(--space-3);
  background: rgba(9, 18, 26, 0.78);
  border-radius: var(--radius);
}
@media (min-width: 900px) {
  .hero-content { padding: var(--space-4); }
}
.hero .hero-content, .service-hero .hero-content {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.hero .hero-actions, .service-hero .hero-actions { justify-content: center; }
.hero p.lede, .service-hero p.lede {
  color: var(--muted-dark);
  font-size: 1.15rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
@media (min-width: 900px) {
  /* Homepage hero only: a touch wider so "...farm, or ranch." doesn't orphan
     its last word onto a 3rd line at full desktop width. */
  .hero p.lede { max-width: 66ch; }
}
.rotating-word {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.05em 0.45em;
  border-radius: 6px;
  transition: opacity 0.25s ease;
}
.rotating-word.is-fading { opacity: 0; }
.hero h1, .service-hero h1 { text-shadow: 0 2px 10px rgba(0,0,0,0.35); }

/* Service page hero: same treatment as the homepage hero (photo backdrop,
   tint, text panel), but deliberately shorter so the two never look
   interchangeable. */
.service-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  min-height: clamp(280px, 42vh, 420px);
  display: flex;
  align-items: center;
}
.service-hero .breadcrumb { margin-bottom: var(--space-2); }

/* Mid-page photo banner with a headline/body overlay (e.g. CCTV+PtP farm
   story) - reuses .hero-bg/.hero-slide/.hero-overlay for the image/scrim,
   just a standalone section rather than the full page-top hero. */
.feature-banner {
  position: relative;
  overflow: hidden;
  color: var(--white);
  min-height: clamp(320px, 46vh, 460px);
  display: flex;
  align-items: center;
}
.feature-banner-tall { min-height: clamp(340px, 48vh, 480px); }
.feature-banner .container { position: relative; text-align: center; }
.feature-banner h2 { text-shadow: 0 2px 10px rgba(0,0,0,0.35); text-transform: uppercase; }
.feature-banner-logo { max-width: 385px; margin: 0 auto var(--space-2); }
.feature-banner-logo picture, .feature-banner-logo img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.5)) drop-shadow(0 0 14px rgba(255,255,255,0.25));
}
.contact-title { text-transform: uppercase; }
.feature-banner p {
  max-width: 65ch;
  margin: var(--space-2) auto 0;
  font-size: 1.1rem;
  color: var(--muted-dark);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.photo-placeholder {
  background: repeating-linear-gradient(45deg, #1d2e3b, #1d2e3b 10px, #223548 10px, #223548 20px);
  border: 2px dashed var(--accent-on-dark);
  color: var(--accent-on-dark);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  min-height: 220px;
  padding: var(--space-2);
}
.photo-placeholder.on-light {
  background: repeating-linear-gradient(45deg, #ece9e0, #ece9e0 10px, #e2ded2 10px, #e2ded2 20px);
  border-color: var(--eyebrow);
  color: var(--eyebrow);
}
.card-photo { aspect-ratio: 4 / 3; }
.card-photo picture { display: block; height: 100%; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Credentials strip */
.credentials-strip { background: var(--white); border-bottom: 1px solid var(--border); padding: var(--space-4) 0; }
.credentials-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.credential-item { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; border-left: 3px solid var(--accent); padding-left: var(--space-2); }

.brand-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-3);
}
.brand-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}
.brand-logo-item picture, .brand-logo-item img {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.brand-name { font-family: var(--font-head); font-weight: 600; margin: 0; }
.brand-desc { margin: 0; color: var(--muted-light); text-align: left; font-size: 0.95rem; }

/* Alternating brand-showcase rows (logos or a photo, paired with text) */
.equipment-logos { margin-top: var(--space-3); }
.equipment-logos + .equipment-logos { margin-top: var(--space-2); }
.showcase-grid { display: grid; gap: var(--space-3); align-items: center; }
.showcase-media picture, .showcase-media img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.showcase-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}
.showcase-logo-item {
  width: 110px;
  height: 110px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: var(--space-3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.showcase-logo-item picture, .showcase-logo-item img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (hover: hover) {
  .showcase-logo-item:hover {
    transform: scale(1.25);
    box-shadow: 0 8px 20px rgba(15, 27, 36, 0.18);
    position: relative;
    z-index: 1;
  }
}
.showcase-text h3 { margin-bottom: var(--space-2); }
.showcase-text p:last-child { margin-bottom: 0; }
@media (min-width: 800px) {
  .showcase-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .showcase-row-reverse .showcase-media { order: 2; }
  .showcase-row-reverse .showcase-text { order: 1; }
}

/* Card grids */
.card-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card .photo-placeholder { min-height: 160px; border-radius: 0; }
.card-body { padding: var(--space-3); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-body h3 { margin: 0; }
.card-body .card-link { margin-top: auto; font-family: var(--font-head); font-weight: 700; }

/* Steps */
.steps-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.step { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3); }
.step .step-num { font-family: var(--font-head); font-weight: 700; color: var(--accent); font-size: 0.9rem; }

/* FAQ */
details.faq { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-1); }
details.faq summary { font-family: var(--font-head); font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
details.faq[open] summary { color: var(--eyebrow); }
.faq-badge { float: right; width: 64px; margin: 0 0 var(--space-2) var(--space-2); }
.faq-badge picture, .faq-badge img { width: 100%; height: auto; display: block; }
/* Accordion photo gallery */
.gallery-accordion {
  display: flex;
  gap: 4px;
  height: 230px;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 0;
  padding: 0;
  border: 0;
}
.gallery-item {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: flex 0.4s ease;
}
.gallery-item picture, .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; z-index: 1; }
@media (hover: hover) {
  .gallery-accordion:hover .gallery-item { flex: 0.6; }
  .gallery-accordion:hover .gallery-item:hover { flex: 3; }
}
@media (min-width: 700px) {
  .gallery-accordion { height: 360px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 18, 26, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-3);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

.service-areas-map {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.projects-stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin: var(--space-3) 0;
  padding: var(--space-3);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.projects-stat-number {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  white-space: nowrap;
}
.projects-stat-desc {
  color: var(--ink);
  max-width: 42ch;
}
.referral-callout {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}
.referral-callout h3 { margin: 0 0 0.25rem; }
.referral-callout p { margin: 0; color: var(--muted-light); }
@media (min-width: 700px) {
  .referral-callout { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: var(--muted-light); padding: var(--space-2) 0 0; }
.breadcrumb a { color: var(--muted-light); }
[data-dark] .breadcrumb, [data-dark] .breadcrumb a { color: var(--muted-dark); }


/* Forms */
.field { margin-bottom: var(--space-2); display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
}
.field textarea { min-height: 120px; }
.services-field fieldset { border: 0; padding: 0; margin: 0; }
.services-field legend { font-weight: 600; font-size: 0.95rem; padding: 0; margin-bottom: 0.5rem; }
.checkbox-grid { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
@media (min-width: 500px) {
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
}
.checkbox-option { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; font-size: 0.95rem; cursor: pointer; }
.checkbox-option input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  flex: none;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--accent);
}
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-grid { display: grid; gap: var(--space-2); grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}
.form-status { margin-top: var(--space-2); font-weight: 600; }
.form-status[data-state="success"] { color: #2e8b57; }
.form-status[data-state="error"] { color: #c0392b; }

/* Footer */
.site-footer { background: var(--footer); color: var(--muted-dark); padding: var(--space-5) 0 var(--space-3); }
.footer-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin-bottom: var(--space-4); }
.footer-grid h4 { color: var(--white); font-size: 1rem; margin-bottom: var(--space-2); }
.footer-grid a { color: var(--muted-dark); }
.footer-grid a:hover { color: var(--accent-on-dark); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-2);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
}
.footer-notice { font-size: 0.72rem; color: #8a98a3; margin-top: var(--space-1); }
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.cta-band { background: var(--ink); color: var(--white); text-align: center; }
.cta-band .hero-actions { justify-content: center; }

.preview-banner {
  background: #5a3b00;
  color: #ffe9b3;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.5rem var(--space-2);
}
.preview-banner a { color: #fff; text-decoration: underline; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
