/* ==========================================================================
   Wildlife Services MT — site stylesheet
   Single hand-authored stylesheet. No framework, no preprocessor, no build.
   Everything below is driven by the tokens in :root. Change the tokens, not
   the rules. Component classes are semantic, not brand-specific, so this file
   is meant to be reused as-is across sites.
   ========================================================================== */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
/* height:auto is load-bearing. Content images carry explicit width/height
   attributes for layout stability, and without this the attribute height is
   taken literally once max-width shrinks the width, stretching the image
   vertically on narrow viewports. Anything needing a fixed height (logos, the
   hero, the CTA badge) sets it in its own higher-specificity rule. */
img, picture, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Design tokens ----
   Dark theme: black, charcoal and gray carry the page, tan/gold is the one
   accent, and warm white appears only inside cards. Matches the client's
   "Wildlife Services by Bug Hunters" logo. See docs/BRAND-BRIEF.md.

   CLOSED PALETTE. Every colour value in this file is one of the seven from
   the client's theme mock: #121212 black, #1F1F1F charcoal, #333333 dark
   gray, #C8A04B tan/gold, #E7D9B7 light tan, #F7F5F0 warm white, #FFFFFF.
   Do not introduce an eighth; express hierarchy with weight, size or one of
   these. (rgba white/black overlays for hover and scrims are the exception.)

   Palette roles:
     --brand        gold; buttons, eyebrows, links. Dark grounds only: it is
                    2.45:1 on white. Text on a gold fill is --on-brand.
     --brand-dark   hover/pressed for --brand: light tan. Lighter, not darker:
                    on a dark ground the hover state steps toward the text.
     --deep         black; hero, header, footer, CTA band, dark sections
     --surface      charcoal; the dominant page background
     --surface-warm secondary background for alternating sections
     --surface-alt  raised panels (field notes)
     --line         hairlines and dividers. Decorative only (1.5:1).
     --line-strong  borders that identify a control (inputs, the nav toggle).
                    Gold, because no palette gray clears 3:1 on charcoal.
     --muted        secondary text: light tan, 9.03:1 or better on every dark ground
     --ink          primary text
     --accent       light tan; rules, labels, hover only
   Rough proportion: ~60% black and charcoal, ~20% warm white (cards),
   ~12% gray and line, ~8% gold.

   .card and .project-card are light islands: they redefine these same tokens
   locally (see "Light islands" below), so anything inside them reads the
   light values without its own rules.

   --deep-rgb is --deep as a space-separated triplet, for the hero wash and
   scrims. --ink-rgb is the SHADOW colour (black), not the text colour: it
   feeds the lightbox scrim and drop shadows, which stay dark on any theme.
*/
:root {
  color-scheme: dark;

  --brand:       #C8A04B;
  --brand-dark:  #E7D9B7;
  --on-brand:    #121212;
  --deep:        #121212;
  --surface:     #1F1F1F;
  --surface-warm:#121212;
  --surface-alt: #333333;
  --line:        #333333;
  --line-strong: #C8A04B;
  --muted:       #E7D9B7;
  --ink:         #F7F5F0;
  --accent:      #E7D9B7;

  --deep-rgb: 18 18 18;
  --ink-rgb:  0 0 0;

  /* Text colors used on top of --deep sections and over hero imagery. */
  --on-deep-strong: #F7F5F0;
  --on-deep-soft:   #E7D9B7;
  --on-deep-label:  #C8A04B;
  --on-deep-quiet:  #E7D9B7;

  /* Type — two self-hosted families, headings and body. */
  --font-head: "Barlow Condensed", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-h1:    clamp(2.5rem, 1.6rem + 4.2vw, 4.25rem);
  --step-h2:    clamp(2rem, 1.5rem + 2.2vw, 2.875rem);
  --step-h3:    clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --step-h4:    1.25rem;
  --step-body:  1.0625rem;
  --step-small: 0.9375rem;
  --step-label: 0.75rem;

  --tracking-label: 0.12em;
  --leading-body: 1.6;
  --leading-tight: 1.15;
  --measure: 66ch;

  /* Spacing */
  --space-1: .5rem;  --space-2: 1rem;   --space-3: 1.5rem;
  --space-4: 2rem;   --space-6: 3rem;   --space-8: 4rem;
  --space-12: 6rem;  --space-16: 8rem;

  --radius: 5px;
  --radius-lg: 10px;
  --border: 1px solid var(--line);
  --maxw: 1200px;

  --header-h: 88px;
  --action-bar-h: 62px;
}

/* The header runs shorter on phones, where vertical space is worth more and
   the lockup is smaller anyway. Kept as a token override rather than a rule so
   scroll-padding-top and the mobile nav inset follow it automatically. */
@media (max-width: 560px) {
  :root { --header-h: 80px; }
}

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-3));
}
body {
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--surface);
  padding-bottom: var(--action-bar-h);
}
@media (min-width: 780px) {
  body { padding-bottom: 0; }
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: var(--leading-tight);
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-h1); font-weight: 800; }
h2 { font-size: var(--step-h2); font-weight: 700; }
h3 { font-size: var(--step-h3); font-weight: 700; }
h4 { font-size: var(--step-h4); font-weight: 600; }

p { max-width: var(--measure); }
p.lede { font-size: 1.125rem; color: var(--muted); }

a { text-decoration: none; }
a.text-link {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--brand);
}
a.text-link:hover { color: var(--brand-dark); }

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

/* ---- Fonts (self-hosted, latin subset) ----
   Self-hosted woff2 only. No Google Fonts request, by design: it costs a
   third-party connection, leaks visitor IPs, and is the easiest Lighthouse
   points to give away. Subset to latin and ship only the weights in use.
   Preload the two weights the hero needs, in the <head> of every page.
*/
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/manrope-400.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/manrope-500.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/manrope-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlowcondensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/barlowcondensed-700.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/barlowcondensed-800.woff2") format("woff2");
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
@media (min-width: 780px) {
  .container { padding-inline: var(--space-6); }
}

.section { padding-block: var(--space-8); }
@media (min-width: 780px) {
  .section { padding-block: var(--space-12); }
}
.section--tight { padding-block: var(--space-6); }
.section--surface-warm { background: var(--surface-warm); }
/* Card grids and FAQ blocks both live on the warm band, so pages carrying
   both (flathead, bozeman-big-sky) run two warm sections back to back and read as
   one undivided slab. Rule them apart rather than moving either onto another
   background, which would change card watermark contrast. */
.section--surface-warm + .section--surface-warm { border-top: var(--border); }
.section--line { background: var(--surface-alt); }
.section--deep { background: var(--deep); color: var(--on-deep-strong); }
.section--deep h2, .section--deep h3 { color: var(--on-deep-strong); }
.section--deep p { color: var(--on-deep-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--space-2);
}
.section--deep .eyebrow { color: var(--on-deep-label); }

.eyebrow .ridge {
  display: inline-block;
  width: 22px; height: 8px;
}

.section-head { max-width: 44rem; margin-bottom: var(--space-6); }
.section-head p { color: var(--muted); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--on-brand);
  padding: var(--space-2) var(--space-3);
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-small);
  padding: .85em 1.5em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-secondary:hover { background: rgba(255,255,255,.06); }
.section--deep .btn-secondary:hover { background: rgba(255,255,255,.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

.tel-link { font-weight: 600; color: inherit; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep);
  border-bottom: var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
}
/* flex: none, or the logo shrinks. It is a flex item of .brand inside a flex
   header, so it inherits flex-shrink: 1 and absorbs any header overflow by
   squashing horizontally while its CSS height holds, which distorts the
   lockup rather than scaling it. At 900px this was compressing 210px of
   artwork into 176px, an aspect of 2.51 against a natural 3.00. That predates
   the size bump; the bump only made it easier to see. */
.brand .brand-logo { width: auto; flex: none; }

.nav-primary {
  display: none;
}
@media (min-width: 1040px) {
  .nav-primary {
    display: flex;
    align-items: center;
    /* --space-3, not --space-4: at 80px the lockup is 240px wide and the full
       row needs 1047px with 32px gaps but only 1015px with 24px. This keeps the
       desktop nav switching on at 1040 instead of pushing it past 1060, which
       would hand a 1024px tablet the hamburger. */
    gap: var(--space-3);
  }
  .nav-primary a {
    font-size: var(--step-small);
    font-weight: 500;
    letter-spacing: .01em;
    color: var(--ink);
    padding: .5em 0;
    border-bottom: 1.5px solid transparent;
    transition: color .15s ease, border-color .15s ease;
  }
  .nav-primary a:hover,
  .nav-primary a[aria-current="page"] {
    border-bottom-color: var(--brand);
    color: var(--brand);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.header-call {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-weight: 600;
  font-size: var(--step-small);
}
@media (min-width: 1040px) {
  .header-call { display: none; }
}
/* Also gone on small phones, where it was costing about 103px of a 312px
   header and squeezing the lockup: the img reset is max-width: 100%, so the
   logo gave up width while its CSS height held and the artwork distorted.
   Nothing is lost by dropping it here. The action bar is on below 780px and
   already pins a full-width Call control to the bottom of every page, so the
   number stays one tap away. */
@media (max-width: 480px) {
  .header-call { display: none; }
}
.header-actions .btn-primary {
  display: none;
}
@media (min-width: 1040px) {
  .header-actions .btn-primary { display: inline-flex; }
}

/* 52px. 44 cleared Apple's tap-target floor but still read as visibly
   smaller than the site's own buttons next to it: the hero .btn measures
   53x53 and the action-bar buttons 61px tall, so a 44px icon-only square
   looked undersized by comparison rather than merely minimal. 52px sits
   almost exactly on the hero button and leaves 14px of padding either side
   of it in the 80px mobile header. Reported small on a real iPhone twice:
   once below the 44px floor, once above it but still visually light next
   to a real button. */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
@media (min-width: 1040px) {
  .nav-toggle { display: none; }
}
.nav-toggle svg { width: 26px; height: 26px; }

.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--deep);
  z-index: 99;
  padding: var(--space-4) var(--space-3);
  display: none;
  overflow-y: auto;
}
.nav-mobile.is-open { display: block; }
.nav-mobile ul { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.nav-mobile ul a {
  display: block;
  padding: var(--space-2) 0;
  border-bottom: var(--border);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
}
.nav-mobile .btn-primary { margin-top: var(--space-4); width: 100%; justify-content: center; }
@media (min-width: 1040px) {
  .nav-mobile { display: none !important; }
}

/* ---- Mobile action bar ---- */
.action-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  height: var(--action-bar-h);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--deep);
  border-top: 1px solid rgba(255,255,255,.1);
}
@media (min-width: 780px) {
  .action-bar { display: none; }
}
.action-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  color: var(--on-deep-strong);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,.1);
}
.action-bar a:last-child { border-right: none; }
.action-bar svg { width: 18px; height: 18px; }

/* Two controls, not three. Email came out: it is a real channel but not worth a
   third of the only UI that follows the reader down every page, and it is still
   on Contact and in the footer. Gold on Request Help so the two are ranked
   rather than merely adjacent, and the full verb phrase because "Request" on its
   own is not an action. */
.action-bar a.action-primary {
  background: var(--brand);
  color: var(--on-brand);
  border-right: none;
}

/* ---- Hero (full-bleed image + directional --deep gradient wash) ---- */
.hero {
  position: relative;
  color: var(--on-deep-strong);
  min-height: min(90vh, 820px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* <picture> is only a wrapper; it has to fill .hero-media or the img's
   height:100% resolves against an auto-height box and collapses. */
.hero-media picture { display: block; width: 100%; height: 100%; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* 70% keeps the technician in frame when the container crops horizontally
     (only happens on phones). 30% vertical centres the story span: the soffit
     opening sits at 16% of the source and the mountain base at 66%, and at
     3.12:1 the container only shows 57% of the height. Anything nearer
     "center" crops the opening off on a wide display. */
  object-position: 70% 30%;
}
/* Two layers of the same colour, so their alphas combine as 1-(1-a1)(1-a2).
   The linear ramp sets the overall mood; the elliptical pool is anchored on
   the copy block and does the actual legibility work. Splitting the job this
   way is what lets the wash come down from 0.86 to 0.58: the snowfield sits
   directly behind the lede, and a linear ramp heavy enough to cover it also
   flattens the mountain and the trees. Measured worst case 5.57:1.
   Re-check with tools/check-hero-contrast.mjs after any change here. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 42% 62% at 30% 50%,
      rgb(var(--deep-rgb) / 0.72) 0%,
      rgb(var(--deep-rgb) / 0.55) 40%,
      rgb(var(--deep-rgb) / 0.26) 70%,
      rgb(var(--deep-rgb) / 0.11) 85%,
      rgb(var(--deep-rgb) / 0.00) 100%),
    linear-gradient(90deg,
      rgb(var(--deep-rgb) / 0.58) 0%,
      rgb(var(--deep-rgb) / 0.52) 30%,
      rgb(var(--deep-rgb) / 0.26) 55%,
      rgb(var(--deep-rgb) / 0.04) 80%,
      rgb(var(--deep-rgb) / 0.00) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-copy {
  max-width: 640px;
  padding-block: var(--space-8);
}
/* Cream, not gold, wherever the copy sits over the photograph: gold is a
   midtone and measures 2.87:1 over the snowfield on a phone even under the
   scrim. The split layout at 900px+ puts the copy on solid --deep, where the
   gold eyebrow the mock shows holds 7.66:1 (see the split-hero block). */
.hero .eyebrow { color: var(--on-deep-strong); }
.hero h1 {
  color: var(--on-deep-strong);
  font-size: clamp(2.75rem, 1.5rem + 5vw, 4.75rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}
.hero p.lede { color: var(--on-deep-strong); margin-bottom: var(--space-4); max-width: 34rem; }
.hero .btn-row { margin-bottom: var(--space-3); }
.hero .tel-link {
  display: inline-flex; align-items: center; gap: .5em;
  color: var(--on-deep-strong); font-size: 1.05rem; font-weight: 600;
}
.hero .tel-link svg { width: 18px; height: 18px; }

/* Accent rule */
.accent-rule {
  border: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0 0 var(--space-3);
}
.hero .accent-rule { margin-bottom: var(--space-4); }

/* On narrow screens the copy overlays the whole frame, so there is no clear
   zone to protect and the pool is no help: the wash has to be near uniform.
   62% is the crop that keeps both the technician and the soffit opening in
   the 43-74% column band a 390px viewport shows. 0.64/0.70/0.76 is the
   lightest ramp that still holds 4.5:1 on every run with margin, and it
   recovers about a third more visible detail than the 0.78 to 0.82 wash it
   replaces. It is still a heavy wash. The real fix is to stop putting copy
   on top of the photograph at this width. */
@media (max-width: 760px) {
  .hero-media img { object-position: 62% center; }
  .hero-media::after {
    background: linear-gradient(180deg,
      rgb(var(--deep-rgb) / 0.67) 0%,
      rgb(var(--deep-rgb) / 0.72) 40%,
      rgb(var(--deep-rgb) / 0.78) 100%);
  }
  .hero-copy { max-width: 100%; }
}

/* Page header (non-hero pages) */
.page-header {
  background: var(--surface-warm);
  border-bottom: var(--border);
  padding-block: var(--space-6);
}
.page-header h1 { margin-bottom: var(--space-1); }
.page-header p.lede { margin: 0; }

/* Breadcrumbs */
.breadcrumbs {
  font-size: var(--step-label);
  color: var(--muted);
  margin-bottom: var(--space-2);
}
.breadcrumbs a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .sep { margin: 0 .4em; }

/* ---- Grids ---- */
.grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Service card ---- */
.card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.card h3 { font-size: 1.3rem; }
.card p { color: var(--muted); font-size: var(--step-small); }
.card .card-link {
  margin-top: var(--space-2);
  font-weight: 600;
  color: var(--brand);
  font-size: var(--step-small);
}
.card .card-link:hover { color: var(--brand-dark); }

/* Only a card that is actually a link gets an affordance.

   The services index renders a service with a detail page as <a class="card">
   and one without as <div class="card">. Before this rule the two were visually
   identical except for the "More on this" arrow, so the whole burden of telling
   an interactive object from an inert one fell on one line of small copy. People
   click the inert ones and read the nothing that happens as a broken site.

   Border colour rather than a drop shadow, because this system builds depth from
   1px rules and flat surfaces and has no shadow token. The 2px lift is the only
   movement; prefers-reduced-motion flattens the transition to 0.01ms above.
   Focus is left to the global :focus-visible ring so keyboard and mouse do not
   drift apart. */
a.card {
  transition: border-color .18s ease, transform .18s ease;
}
a.card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
a.card:hover .card-link { color: var(--brand-dark); }

/* ---- Feature points (flagship product / signature-offering section) ---- */
.feature-points {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
@media (min-width: 640px) {
  .feature-points { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .feature-points { grid-template-columns: repeat(3, 1fr); }
}
.feature-point {
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: var(--space-2);
}
.feature-point h4 { color: var(--on-deep-strong); font-size: 1rem; margin-bottom: .3rem; }
.feature-point p { color: var(--on-deep-soft); font-size: var(--step-small); margin: 0; }
.attribution-note {
  margin-top: var(--space-4);
  font-size: var(--step-label);
  color: var(--on-deep-quiet);
  max-width: var(--measure);
}
.attribution-note a { color: var(--on-deep-soft); text-decoration: underline; }

/* ---- Collection cards (projects, work, portfolio, menu, listings) ---- */
.project-card {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.project-card .project-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
}
.project-card .project-strip img,
.project-card .project-strip .img-placeholder {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.img-placeholder {
  background: var(--surface-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: var(--step-label);
  text-align: center;
  padding: var(--space-1);
}
.project-card .project-body { padding: var(--space-3); }
.project-card .project-location {
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand);
}
.project-card h3 { font-size: 1.2rem; margin-top: .3rem; }
.project-card p { color: var(--muted); font-size: var(--step-small); margin-top: .4rem; }
.project-tag {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--step-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .25em .8em;
}
.project-sequence {
  margin-top: var(--space-2);
  font-size: var(--step-label);
  color: var(--muted);
}

/* ---- Featured collection-item showcase ---- */
.project-feature {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 820px) {
  .project-feature { grid-template-columns: 1.5fr 1fr; gap: var(--space-6); }
}
.feature-hero a { display: block; }
.feature-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: var(--border);
}
.feature-body .project-location {
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand);
}
.feature-body h2 { font-size: var(--step-h3); margin: .3rem 0 var(--space-2); }
.feature-body p { color: var(--muted); font-size: var(--step-small); }
.feature-callout {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--accent);
  background: var(--surface-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.feature-callout strong {
  display: block;
  font-family: var(--font-head);
  color: var(--ink);
  margin-bottom: .25rem;
}
.feature-body .project-tag { margin-top: var(--space-3); }

.field-seq-head {
  margin: var(--space-8) 0 var(--space-3);
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.field-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) {
  .field-grid { grid-template-columns: repeat(3, 1fr); }
}
.field-grid figure { margin: 0; }
.field-grid a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--border);
}
.field-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.field-grid a:hover img { transform: scale(1.04); }
.field-grid figcaption {
  margin-top: .5rem;
  font-size: var(--step-label);
  line-height: 1.4;
  color: var(--muted);
}
.field-grid .is-flashing a { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.field-grid .is-flashing figcaption { color: var(--accent); }
.field-grid .is-flashing figcaption b { font-weight: 700; }

/* Collapsible extra photo rows: show exactly one row, expand for the rest.
   Pure-CSS checkbox toggle (one row = 2 tiles mobile, 3 desktop). With CSS
   or JS off, the checkbox is inert and every photo simply shows. */
.seq-toggle {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (max-width: 719px) {
  .seq-toggle:not(:checked) ~ .field-grid figure:nth-child(n+3) { display: none; }
}
@media (min-width: 720px) {
  .seq-toggle:not(:checked) ~ .field-grid figure:nth-child(n+4) { display: none; }
}
.field-more-btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-top: var(--space-4);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--ink);
  padding: .55em 1em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background .2s ease;
}
.field-more-btn:hover { background: var(--surface-warm); }
.field-more-btn::after {
  content: "";
  width: .45em;
  height: .45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-.12em) rotate(45deg);
}
.seq-toggle:checked ~ .field-more-btn::after { transform: translateY(.12em) rotate(-135deg); }
.seq-toggle:focus-visible ~ .field-more-btn { outline: 2px solid var(--brand); outline-offset: 2px; }
.field-more-btn .m-close { display: none; }
.seq-toggle:checked ~ .field-more-btn .m-open { display: none; }
.seq-toggle:checked ~ .field-more-btn .m-close { display: inline; }

/* ---- Before / During / After module ---- */
.bda {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
@media (min-width: 640px) {
  .bda { grid-template-columns: repeat(3, 1fr); }
}
.bda figure { margin: 0; }
.bda .img-placeholder,
.bda img { aspect-ratio: 4/3; width: 100%; }
.bda figcaption {
  margin-top: .5rem;
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Paired content images ----
   Two captioned figures side by side inside a prose column, stacking under
   720px via .grid-2. Used where one image cannot carry the point on its own
   and a second application says more than a wider crop of the first. */
/* .content-img is the same frame for a lone prose image. */
.media-pair img,
.content-img {
  width: 100%;
  border-radius: 10px;
  border: var(--border);
}
.media-pair figcaption {
  margin-top: .5rem;
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgb(var(--ink-rgb) / .92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 85vh; max-width: 90vw; width: auto; border-radius: var(--radius); }
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,.1);
  color: var(--on-deep-strong);
  border: none;
  border-radius: 999px;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,.2); }
.lightbox-close { top: var(--space-3); right: var(--space-3); }
.lightbox-prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox-caption {
  position: absolute;
  bottom: var(--space-3);
  left: 0; right: 0;
  text-align: center;
  color: var(--on-deep-strong);
  font-size: var(--step-small);
  padding-inline: var(--space-6);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--deep);
  color: var(--on-deep-strong);
  padding-block: var(--space-8);
}
.site-footer a { color: var(--on-deep-soft); }
.site-footer a:hover { color: var(--brand); }
.footer-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 780px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: var(--space-6); }
}
.footer-logo {
  height: 68px;
  width: auto;
  margin-bottom: var(--space-3);
}
.footer-brand p { color: var(--on-deep-soft); font-size: var(--step-small); }
.footer-col h4 { color: var(--brand); font-size: var(--step-label); letter-spacing: var(--tracking-label); text-transform: uppercase; margin-bottom: var(--space-2); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: .5rem; font-size: var(--step-small); }
.footer-statement {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,.15);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  line-height: 1.2;
  color: var(--on-deep-strong);
}
.footer-cred {
  margin-top: var(--space-2);
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--on-deep-label);
}
.footer-bottom {
  margin-top: var(--space-6);
  font-size: var(--step-label);
  color: var(--on-deep-quiet);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  justify-content: space-between;
}

/* ---- Brand motif divider (swap the SVG/shape per brand) ---- */
.ridge-divider {
  height: 28px;
  width: 100%;
  color: var(--line);
}
.section--deep .ridge-divider { color: rgba(255,255,255,.15); }

/* ---- CTA band (--deep, sits directly before the footer) ---- */
.cta-band {
  position: relative;
  background: var(--deep);
  color: var(--on-deep-strong);
  overflow: hidden;
}
.cta-band .container {
  position: relative;
  z-index: 1;
  padding-block: var(--space-12);
  text-align: center;
}
.cta-band h2 { color: var(--on-deep-strong); }
.cta-band p { color: var(--on-deep-soft); margin: var(--space-2) auto var(--space-4); }
.cta-band .btn-row { justify-content: center; }
.cta-band .accent-rule { margin: 0 auto var(--space-3); }
.cta-band .ridge-bg {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 120px;
  color: rgba(255,255,255,.06);
  z-index: 0;
}

/* ---- Contact page ---- */
.contact-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 780px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-method {
  display: block;
  padding: var(--space-3);
  border: var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
}
.contact-method h3 { font-size: 1.1rem; }
.contact-method .value { color: var(--brand); font-weight: 600; font-size: 1.1rem; }

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Wildlife Services MT — site-specific extensions
   Additive only. Nothing above this line was edited.
   ========================================================================== */

/* ---- Third family: IBM Plex Mono carries every field-guide label ---- */
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibmplexmono-500.woff2") format("woff2");
}

:root {
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --deep-2: #333333;        /* secondary dark surface */
  --brand-bright: #C8A04B;  /* logo gold, graphics; same value as --brand */
}

/* Eyebrows read as inspection-report metadata, not as small headings. */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
}

.section--deep-2 { background: var(--deep-2); color: var(--on-deep-strong); }
.section--deep-2 h2, .section--deep-2 h3, .section--deep-2 h4 { color: var(--on-deep-strong); }
.section--deep-2 p { color: var(--on-deep-soft); }
.section--deep-2 .eyebrow { color: var(--brand); }

/* ---- Four-up grid (8 wildlife problems, 4 process steps) ---- */
@media (min-width: 720px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---- Hero: photo right, copy left at desktop ----
   Overrides the full-bleed default. Below 900px it falls back to the stacked
   wash, which the base rules already handle. */
@media (min-width: 900px) {
  .hero { min-height: 0; }
  .hero-media {
    position: absolute;
    inset: 0 0 0 50%;
    z-index: 0;
  }
  .hero-media img { object-position: center; }
  .hero-media::after {
    background: linear-gradient(90deg,
      rgb(var(--deep-rgb) / 1) 0%,
      rgb(var(--deep-rgb) / 0.55) 14%,
      rgb(var(--deep-rgb) / 0.00) 42%);
  }
  .hero { background: var(--deep); }
  .hero-copy { max-width: 46%; padding-block: var(--space-12); }
  .hero .eyebrow { color: var(--brand); }
}

/* ---- Watermark: the parent site floats its spider, this floats the bat ---- */
.watermark { position: relative; overflow: hidden; }
.watermark::before {
  content: "";
  position: absolute;
  right: -4%;
  top: 50%;
  transform: translateY(-50%);
  width: min(46rem, 62%);
  aspect-ratio: 1;
  background: url("/assets/logo/v2/mark-cream.webp") no-repeat center / contain;
  opacity: .05;
  pointer-events: none;
  z-index: 0;
}
.section--deep .watermark::before, .watermark.on-deep::before { opacity: .07; }
.watermark > * { position: relative; z-index: 1; }
@media (max-width: 760px) { .watermark::before { display: none; } }

/* ---- Field note: the label block used on problem and location pages ---- */
.field-note {
  border-left: 3px solid var(--brand-bright);
  background: var(--surface-alt);
  padding: var(--space-3);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.field-note .eyebrow { color: var(--muted); margin-bottom: .4rem; }
.field-note p { margin: 0; }
.field-note.is-caution { border-left-color: var(--accent); }

/* ---- Numbered process steps ---- */
.steps { display: grid; gap: var(--space-4); counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { border-top: 2px solid var(--brand-bright); padding-top: var(--space-2); }
.step .step-n {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: var(--tracking-label);
  color: var(--brand);
  display: block;
  margin-bottom: .3rem;
}
.section--deep .step .step-n, .section--deep-2 .step .step-n { color: var(--brand-bright); }
.step h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.step p { font-size: var(--step-small); color: var(--muted); margin: 0; }
.section--deep .step p, .section--deep-2 .step p { color: var(--on-deep-soft); }

/* ---- Process rail: the compact form of Inspect / Remove / Exclude / Restore ----

   The full .steps stepper was on eleven pages. Repeating a substantial section
   verbatim on every species page cost a screen of scrolling to restate something
   the reader had already met, and it made the page types start to feel
   structurally identical. The rail keeps the branded vocabulary and the dark
   band, which is the visual marker for "this is the process," and gives up the
   four paragraphs.

   The full stepper still runs on the homepage and the services index, where the
   four steps are the subject rather than a reminder.

   Numbers use --brand-bright, the logo gold. It is text on --deep here,
   matching .section--deep .step .step-n above. */
.process-rail {
  background: var(--deep);
  color: var(--on-deep-strong);
  padding-block: var(--space-4);
}
.process-rail .eyebrow {
  color: var(--on-deep-label);
  margin-bottom: var(--space-3);
}
.rail-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-3);
}
.rail-steps li {
  border-top: 2px solid var(--brand-bright);
  padding-top: var(--space-1);
  font-weight: 600;
  font-size: var(--step-small);
}
.rail-n {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: var(--tracking-label);
  color: var(--brand-bright);
  margin-right: .45rem;
}
.rail-note {
  color: var(--on-deep-soft);
  font-size: var(--step-small);
  max-width: var(--measure);
  margin-top: var(--space-3);
  margin-bottom: 0;
}
@media (min-width: 720px) {
  .rail-steps { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Signs list ---- */
.signs { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.signs li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--muted);
  max-width: var(--measure);
}
.signs li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 8px; height: 8px;
  background: var(--brand-bright);
  border-radius: 1px;
}

/* ---- Entry-points diagram ----
   A photographic plate with numbered pins, paired with a numbered list. The
   numbers are the only thing tying the two together, so the list marker and
   the pin share one treatment.

   All of this text used to be baked into the image. At the 342px mobile width
   that put roughly 115 words at 2 to 3 real pixels of cap height, unreadable
   on the device most of the audience uses and invisible to search. Keep it as
   live text. See docs/ENTRY-POINTS-REBUILD.md. */
.entry-points {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 900px) {
  .entry-points {
    grid-template-columns: 1fr 0.85fr;
    gap: var(--space-6);
  }
}

.entry-points-lead {
  color: var(--muted);
  max-width: var(--measure);
  margin-bottom: var(--space-4);
}

.entry-points-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: entry-point;
}
.entry-points-list li {
  counter-increment: entry-point;
  position: relative;
  padding-left: 2.75rem;
  color: var(--muted);
  max-width: var(--measure);
}
.entry-points-list b { color: var(--ink); }

/* The list marker and the plate pin are deliberately identical. */
.entry-points-list li::before,
.entry-points-pin {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  /* Dark gray, not --deep: a black disc on the charcoal page loses its edge. */
  background: var(--surface-alt);
  color: var(--on-deep-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  line-height: 1;
}
.entry-points-list li::before {
  content: counter(entry-point);
  position: absolute;
  left: 0;
  top: 0;
}

.entry-points-plate { position: relative; margin: 0; }
.entry-points-plate img {
  width: 100%;
  border-radius: 10px;
  border: var(--border);
}
/* Pins are placed as percentages of the plate so they track it at any width.
   Coordinates are per-instance data, so they ride on the element as custom
   properties rather than as inline style declarations. */
.entry-points-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  border: 2px solid var(--on-deep-strong);
  box-shadow: 0 1px 4px rgb(var(--ink-rgb) / .35);
}

/* ---- Entry-point plate: hovering either half highlights the other ----

   The marker and the pin are already drawn identically, so the pairing is
   stated statically and nothing here carries information. This only emphasises
   a correspondence the reader can already see, which is why it is safe to make
   it CSS on hover devices: if :has() is unsupported the section is exactly
   what it was. Touch has no hover, so main.js marks a tapped item and its pin
   with .is-active instead (the block after this one); with JS off, touch
   simply gets the static pairing.

   Deliberately not keyboard-reachable. Making the six list items focusable
   would add six tab stops that go nowhere, which costs a keyboard user more
   than the highlight gives them.

   :has() is needed in both directions because the list lives in
   .entry-points-copy and the pins live in the figure, so no sibling or
   descendant combinator can reach across. */
@media (hover: hover) {
  .entry-points-list li { transition: color .18s ease; }
  .entry-points-list li::before,
  .entry-points-pin { transition: background-color .18s ease, transform .18s ease; }

  .entry-points-pin:hover,
  .entry-points:has(.entry-points-list li:nth-child(1):hover) .entry-points-pin:nth-of-type(1),
  .entry-points:has(.entry-points-list li:nth-child(2):hover) .entry-points-pin:nth-of-type(2),
  .entry-points:has(.entry-points-list li:nth-child(3):hover) .entry-points-pin:nth-of-type(3),
  .entry-points:has(.entry-points-list li:nth-child(4):hover) .entry-points-pin:nth-of-type(4),
  .entry-points:has(.entry-points-list li:nth-child(5):hover) .entry-points-pin:nth-of-type(5),
  .entry-points:has(.entry-points-list li:nth-child(6):hover) .entry-points-pin:nth-of-type(6) {
    background: var(--brand);
    color: var(--on-brand);
    transform: translate(-50%, -50%) scale(1.18);
    z-index: 2;
  }

  .entry-points-list li:hover::before,
  .entry-points:has(.entry-points-pin:nth-of-type(1):hover) .entry-points-list li:nth-child(1)::before,
  .entry-points:has(.entry-points-pin:nth-of-type(2):hover) .entry-points-list li:nth-child(2)::before,
  .entry-points:has(.entry-points-pin:nth-of-type(3):hover) .entry-points-list li:nth-child(3)::before,
  .entry-points:has(.entry-points-pin:nth-of-type(4):hover) .entry-points-list li:nth-child(4)::before,
  .entry-points:has(.entry-points-pin:nth-of-type(5):hover) .entry-points-list li:nth-child(5)::before,
  .entry-points:has(.entry-points-pin:nth-of-type(6):hover) .entry-points-list li:nth-child(6)::before {
    background: var(--brand);
    color: var(--on-brand);
  }

  .entry-points-list li:hover,
  .entry-points:has(.entry-points-pin:nth-of-type(1):hover) .entry-points-list li:nth-child(1),
  .entry-points:has(.entry-points-pin:nth-of-type(2):hover) .entry-points-list li:nth-child(2),
  .entry-points:has(.entry-points-pin:nth-of-type(3):hover) .entry-points-list li:nth-child(3),
  .entry-points:has(.entry-points-pin:nth-of-type(4):hover) .entry-points-list li:nth-child(4),
  .entry-points:has(.entry-points-pin:nth-of-type(5):hover) .entry-points-list li:nth-child(5),
  .entry-points:has(.entry-points-pin:nth-of-type(6):hover) .entry-points-list li:nth-child(6) {
    color: var(--ink);
  }
}

/* Tap pairing, set by main.js. Outside the hover query so touch gets it; the
   pin's ::after widens its tap target to 44px without changing the drawing. */
.entry-points-list li,
.entry-points-pin { cursor: pointer; }
.entry-points-pin::after { content: ""; position: absolute; inset: -8px; }
.entry-points-pin.is-active {
  background: var(--brand);
  color: var(--on-brand);
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 2;
}
.entry-points-list li.is-active { color: var(--ink); }
.entry-points-list li.is-active::before {
  background: var(--brand);
  color: var(--on-brand);
}

/* ---- FAQ ---- */
.faq { border-top: var(--border); }
.faq details { border-bottom: var(--border); }
.faq summary {
  cursor: pointer;
  padding: var(--space-3) 2.5rem var(--space-3) 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: .5rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--brand);
  font-size: 1.4rem;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding-bottom: var(--space-3); }
.faq details p { color: var(--muted); margin: 0; }
.faq summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Service-area lists ---- */
.area-list {
  display: flex; flex-wrap: wrap; gap: .5rem;
  list-style: none; margin: 0; padding: 0;
}
.area-list li {
  font-family: var(--font-mono);
  font-size: var(--step-small);
  border: var(--border);
  border-radius: var(--radius);
  padding: .35rem .7rem;
  color: var(--muted);
}
.section--deep .area-list li, .section--deep-2 .area-list li {
  border-color: rgba(255,255,255,.22);
  color: var(--on-deep-soft);
}

/* ---- Location service-area map ----
   Inline SVG on /flathead/ and /bozeman-big-sky/, generated (not hand-drawn) by
   tools/map/build-maps.py from Natural Earth data. Only existing tokens plus
   opacity, so the closed palette stays closed. No JS, no animation. */
.map-layout { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 900px) {
  .map-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 500px); gap: var(--space-8); }
}
.area-map { margin: 0; }
/* Full-bleed on phones: the container gutter is ~12% of a 390 screen, and
   the town labels need that width to clear 13px. */
@media (max-width: 779px) {
  .area-map { margin-inline: calc(-1 * var(--space-3)); }
  .area-map-svg rect.am-edge { display: none; }
}
.area-map-svg { display: block; width: 100%; height: auto; }
.am-ground { fill: var(--deep); }
.am-edge { fill: none; stroke: var(--line); stroke-width: 1.5; }
.am-wash { fill: var(--brand); fill-opacity: .07; stroke: var(--brand); stroke-opacity: .55;
  stroke-width: 1.5; stroke-dasharray: 1 6; stroke-linecap: round; }
.am-border path { fill: none; stroke: var(--muted); stroke-opacity: .3; stroke-width: 1.25; stroke-dasharray: 8 5; }
.am-road path { fill: none; stroke: var(--muted); stroke-opacity: .22; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.am-river path { fill: none; stroke: var(--muted); stroke-opacity: .4; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.am-lake path { fill: var(--surface-alt); stroke: var(--muted); stroke-opacity: .45; stroke-width: 1; }
.am-town { fill: var(--brand); stroke: var(--deep); stroke-width: 2; }
.am-base-ring { fill: none; stroke: var(--brand); stroke-width: 1.5;
  transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
/* main.js puts a <button> inside each town pill to drive the ring. The
   button takes over the pill's padding so the pill keeps its exact size and
   the list does not shift when the script runs. */
.area-list li.has-control { padding: 0; transition: border-color .15s, color .15s; }
.area-list li.has-control button {
  font: inherit; color: inherit; background: none; border: 0; margin: 0;
  padding: .35rem .7rem; border-radius: inherit; cursor: pointer;
}
.area-list li.has-control:hover,
.area-list li.has-control:focus-within,
.area-list li.is-chosen { border-color: var(--brand); color: var(--ink); }
.area-list li.has-control button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.area-map-svg text { paint-order: stroke; stroke: var(--deep); stroke-width: 5px; stroke-linejoin: round; }
.am-name { font-family: var(--font-body); font-weight: 700; font-size: 22px; fill: var(--on-deep-strong); }
.am-name--base { font-weight: 800; font-size: 25px; fill: var(--brand); }
.am-label text { font-family: var(--font-head); text-transform: uppercase; }
.am-sym { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* Landmarks sit a step behind the towns: smaller, dimmer, thin marks. */
/* Water labels sit on the feature. On a lake the halo is the lake fill, so
   it does not cut a dark box into the water. */
.am-label--lake text, .am-label--river text { font-family: var(--font-body); text-transform: none;
  font-style: italic; font-weight: 500; font-size: 15px; fill: var(--muted); }
.am-label--lake text { fill-opacity: .8; stroke: var(--surface-alt); stroke-width: 3px; }
.am-label--river text { fill-opacity: .6; }
.am-label--range text { font-weight: 600; font-size: 13px; letter-spacing: .22em; fill: var(--muted); fill-opacity: .4; }
.am-label--range .am-sym { stroke: var(--muted); stroke-opacity: .35; stroke-width: 1.1; }
.am-label--park text, .am-label--pointer text { font-weight: 700; font-size: 14px; letter-spacing: .14em; fill: var(--brand); fill-opacity: .7; }
.am-label--pointer .am-sym { stroke: var(--brand); stroke-opacity: .7; stroke-width: 1.5; }
.am-label--border text { font-weight: 600; font-size: 13px; letter-spacing: .5em; fill: var(--muted); fill-opacity: .3; }
.am-route rect { fill: var(--deep); stroke: var(--muted); stroke-opacity: .3; stroke-width: 1; }
.am-route text { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .06em;
  fill: var(--muted); fill-opacity: .65; stroke: none; }

/* ---- Contact form (posts to Web3Forms, no backend here) ---- */
.form { display: grid; gap: var(--space-3); max-width: 40rem; }
.form label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}
.form input, .form textarea, .form select {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--deep);
  color: var(--ink);
}
.form textarea { resize: vertical; min-height: 8rem; }
.form input:focus-visible, .form textarea:focus-visible, .form select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.form .form-row { display: grid; gap: var(--space-3); }
@media (min-width: 620px) { .form .form-row { grid-template-columns: 1fr 1fr; } }
.form .form-note { font-size: var(--step-small); color: var(--muted); margin: 0; }
.form button { justify-self: start; }

/* ---- Prose blocks on inner pages ---- */
.prose > * + * { margin-top: var(--space-3); }
.prose h2 { margin-top: var(--space-6); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-4); }

/* The accent rule is the logo gold. Light tan (--accent) stays reserved for
   caution labels and small markers. */
.accent-rule { background: var(--brand-bright); }

/* Split hero: keep the headline to two lines at desktop rather than three
   with an orphan. */
@media (min-width: 900px) {
  .hero h1 { font-size: clamp(2.6rem, 1rem + 3.1vw, 3.9rem); }
  .hero-copy { max-width: 44%; }
}

/* Breadcrumbs sit outside .container in the page template, which left them
   flush against the viewport edge. Match the container geometry instead. */
.breadcrumbs {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-3);
  padding-top: var(--space-3);
}
@media (min-width: 780px) {
  .breadcrumbs { padding-inline: var(--space-6); }
}

/* The bat gets one place per page where it runs at a size that reads. It is
   3:1, so it needs more width than the v1 square badge did to carry the same
   presence: 150px is about 49px tall, and half of its 312px source. */
.cta-band .cta-mark {
  width: 150px;
  height: auto;
  margin: 0 auto var(--space-3);
}
@media (max-width: 560px) { .cta-band .cta-mark { width: 120px; } }

/* Full lockup in the header: the v2 "Wildlife Services by Bug Hunters" logo,
   gold on --deep. This is the only height declaration for the logo.

   It is inline SVG (tools/build-logo-svg.mjs), not an <img>, so the bat's
   wings can move and the gold comes from --brand through currentColor. The
   viewBox is cropped to the artwork at rest (1915x931, 2.06:1), so the box
   is the art: 72px inside the 88px header leaves 8px above and below, and
   58px inside the 80px phone header leaves 11px. aspect-ratio pins the width
   in case a browser sizes an auto-width inline SVG from its width attribute.

   overflow: visible, because the wing tips leave the viewBox during the
   wingbeat: 6.6px above at 72px (5.3px at 58px), inside the 7.5px and
   10.5px of slack. That margin is about 1px on desktop: re-check it if the
   header height or the logo height changes. */
.brand .brand-logo {
  height: 72px;
  aspect-ratio: 1915 / 931;
  overflow: visible;
  color: var(--brand);
}
@media (max-width: 560px) { .brand .brand-logo { height: 58px; } }

/* ---- Header logo wingbeat ----
   From the refined v2 vendor package
   (../Wildlife_Services_Animated_Logo_Refined_v2_Porkbun), adapted for the
   header. Plays once, on the first page view of a browser session: main.js
   adds .ws-logo--play and removes it on animationend. Three diminishing
   beats in 2.55s, ending at identity so the rest pose is the static logo
   exactly. The head, ears, torso and tail never move.

   Each keyframe is matrix(a, b, c, d) about the shoulder: a < 1 folds the
   wing toward the body, b swings the tip up (upstroke) or down (downstroke),
   c and d flex the membrane a little. Upstrokes peak at 12, 38 and 64%,
   downstrokes at 22, 48 and 75%. The per-keyframe timing functions make the
   downstrokes snap and the upstrokes float. Both wings are the same motion
   mirrored (b and c negated).

   Two package choices are dropped on purpose. The opacity fade-in: the
   class arrives from deferred JS after first paint, so a fade that starts
   at opacity 0 would show the logo, blank it, then bring it back. And the
   .23s start delay, which only existed to follow that fade.

   Each wing group sits inside a positioner whose translate() puts its pivot
   at (0,0); transform-box: view-box plus origin 0 0 transforms about that
   point. Change either and the wings detach from the body. */
.ws-wing { transform-box: view-box; transform-origin: 0 0; }

.ws-logo--play .ws-wing--left  { animation: ws-flap-left  2.55s linear both; }
.ws-logo--play .ws-wing--right { animation: ws-flap-right 2.55s linear both; }

@keyframes ws-flap-left {
    0% { transform: matrix(1, 0, 0, 1, 0, 0);             animation-timing-function: cubic-bezier(.24, .02, .62, .35); }
   12% { transform: matrix(.70, .32, -.025, .87, 0, 0);   animation-timing-function: cubic-bezier(.14, .72, .28, 1); }
   22% { transform: matrix(.99, -.16, .01, 1, 0, 0);      animation-timing-function: cubic-bezier(.24, .02, .62, .35); }
   38% { transform: matrix(.66, .36, -.025, .84, 0, 0);   animation-timing-function: cubic-bezier(.14, .72, .28, 1); }
   48% { transform: matrix(1, -.18, .01, 1, 0, 0);        animation-timing-function: cubic-bezier(.24, .02, .62, .35); }
   64% { transform: matrix(.75, .29, -.018, .9, 0, 0);    animation-timing-function: cubic-bezier(.14, .72, .28, 1); }
   75% { transform: matrix(.98, -.10, .005, .99, 0, 0);   animation-timing-function: cubic-bezier(.28, .05, .45, 1); }
   90% { transform: matrix(.96, .065, 0, .98, 0, 0);      animation-timing-function: cubic-bezier(.24, .8, .36, 1); }
  100% { transform: matrix(1, 0, 0, 1, 0, 0); }
}
@keyframes ws-flap-right {
    0% { transform: matrix(1, 0, 0, 1, 0, 0);             animation-timing-function: cubic-bezier(.24, .02, .62, .35); }
   12% { transform: matrix(.70, -.32, .025, .87, 0, 0);   animation-timing-function: cubic-bezier(.14, .72, .28, 1); }
   22% { transform: matrix(.99, .16, -.01, 1, 0, 0);      animation-timing-function: cubic-bezier(.24, .02, .62, .35); }
   38% { transform: matrix(.66, -.36, .025, .84, 0, 0);   animation-timing-function: cubic-bezier(.14, .72, .28, 1); }
   48% { transform: matrix(1, .18, -.01, 1, 0, 0);        animation-timing-function: cubic-bezier(.24, .02, .62, .35); }
   64% { transform: matrix(.75, -.29, .018, .9, 0, 0);    animation-timing-function: cubic-bezier(.14, .72, .28, 1); }
   75% { transform: matrix(.98, .10, -.005, .99, 0, 0);   animation-timing-function: cubic-bezier(.28, .05, .45, 1); }
   90% { transform: matrix(.96, -.065, 0, .98, 0, 0);     animation-timing-function: cubic-bezier(.24, .8, .36, 1); }
  100% { transform: matrix(1, 0, 0, 1, 0, 0); }
}
/* main.js already skips the class under reduced motion; this is the belt. */
@media (prefers-reduced-motion: reduce) {
  .ws-logo--play .ws-wing { animation: none; }
}

/* ---- Wildlife problem card watermark ----
   Treatment C from the approved preview: the illustration anchored bottom
   right at 30%. The warm duotone is baked into the -card.webp derivative
   (see tools/build-problem-art.mjs), so there is no runtime filter to paint.

   v1 carried an owner-granted AA exception here (copy over the art at about
   3:1). Under the v2 theme the card copy is #333333 on #F7F5F0 and the worst
   run over the art measures 6.58:1, so the exception is no longer used. Do
   not raise the opacity past .30 without re-measuring with
   tools/check-card-contrast.mjs, which composites the real webp pixels.

   Two things still protect the copy. The art is bottom-right anchored so the
   heading never touches it, and it stays at .30 so the light passages, which
   are most of each drawing, barely register at all. */
.card--art { position: relative; overflow: hidden; min-height: 210px; padding-right: 34%; }
.card-art {
  position: absolute;
  right: -8%;
  bottom: -10%;
  width: 62%;
  height: auto;
  opacity: .30;
  pointer-events: none;
  z-index: 0;
}
/* Lift the copy above the watermark without giving .card itself a stacking
   context, which would clip the focus ring against overflow: hidden. */
.card--art > h3,
.card--art > p,
.card--art > .card-link { position: relative; z-index: 1; }

@media (max-width: 560px) {
  .card--art { min-height: 156px; padding-right: 30%; }
  .card-art { width: 52%; right: -6%; bottom: -8%; }
}

/* ---- Service card illustrations ----
   Full-colour art above the heading on /services/, from
   tools/build-service-art.mjs. Every file is the same 9:4 box flattened onto
   the island's warm white, so it needs no frame and a row's headings line up. */
.card-illo {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: var(--space-2);
}

/* ---- Problem page illustration band ----
   The same drawing at full strength on warm white, the way the mock shows the
   drawings. A light island (see the end of this file): the linework is
   #121212, so on a dark band its silhouette would vanish into the ground.
   Copy left, illustration right; stacked on narrow screens. */
.problem-art {
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
.problem-art .eyebrow { color: var(--muted); }
.problem-art h2 { color: var(--ink); margin: .2em 0 .4em; }
.problem-art p { color: var(--muted); margin: 0; }
.problem-art img { width: 100%; height: auto; }
@media (min-width: 780px) {
  .problem-art { grid-template-columns: 1fr 1fr; gap: var(--space-6); padding: var(--space-6); }
}

/* ---- Trust rail ----
   A thin credentials strip directly under the hero, on --surface (charcoal)
   so it separates from the black hero above. Every claim in it is
   already on /about/ and in the footer: this is placement, not a new
   assertion.

   Two layouts, because one does not serve both. A phone gets a stacked list
   with the accent dot as a bullet on every item: a 2-up grid measured 196px
   tall at 390px, and a wrapped single row measured 156px with a bullet on
   three items out of four, which reads as a mistake. Above 780px it is one
   row and the dot becomes a separator, so the first item drops it.

   The list carries class="trust-list" only so the reset bites: the reset
   selector is ul[class], so a bare <ul> keeps the UA 1em block margin and
   40px indent. That measured as 16px of unexplained padding on the band.
*/
.trust-rail {
  background: var(--surface);
  border-bottom: var(--border);
  padding-block: var(--space-2);
}
.trust-rail ul {
  display: grid;
  gap: var(--space-1);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}
.trust-rail li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: var(--space-1);
  vertical-align: .18em;
}
@media (min-width: 780px) {
  .trust-rail { padding-block: var(--space-3); }
  .trust-rail ul {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-1) var(--space-3);
    font-size: var(--step-small);
  }
  .trust-rail li:first-child::before { display: none; }
  .trust-rail li::before { margin-right: var(--space-3); }
}

/* ---- Contextual CTA row ----
   One action directly under the page header on the deep landing pages, so
   the first conversion point is not the band at the foot of the page. Held
   to a single line and two controls on purpose: the question carries the
   page-specific part, the button keeps the site-wide "Request Help" label.
   Questions are kept near 40 characters so they hold one line at 390px. */
.page-cta {
  background: var(--surface);
  border-bottom: var(--border);
  padding-block: var(--space-3);
}
.page-cta .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.page-cta p {
  margin: 0;
  max-width: none;
  font-weight: 600;
}
.page-cta .tel-link { color: var(--brand); }
.page-cta .tel-link:hover { color: var(--brand-dark); }
@media (min-width: 780px) {
  .page-cta .container { flex-wrap: nowrap; justify-content: space-between; }
}

/* ---- One set of contact controls on phones ----
   Below 780px the action bar keeps Call and Request Help on screen the whole
   time, so the in-page copies only repeat it: the hero's Request Help and
   phone link, the page-cta strip, and the CTA band's buttons. The band keeps
   its heading and line, which now lead straight into the bar under them.
   Contact-page methods and the hero's "Identify the problem" stay: they are
   not duplicates. Page-specific ?problem= links survive through main.js,
   which hands their href to the action bar. Breakpoint matches .action-bar. */
@media (max-width: 779px) {
  .hero .btn-primary[href^="/contact/"],
  .hero .tel-link,
  .page-cta,
  .cta-band .btn-row { display: none; }
  .cta-band p { margin-bottom: 0; }
}

/* ---- Campaign modal ----
   Rendered by assets/js/campaigns.js. Tokens only: the component owns the
   brand and campaigns cannot pass colours, radii or dimensions.

   The offer figure uses --brand, gold on the dark panel (6.19:1).

   A native <dialog> in the top layer, so no z-index is needed here. It sits
   above the sticky header (100) and the fixed action bar (90) by construction.

   Entry motion is a CSS animation rather than a transition driven from JS,
   and the panel's own base state is the visible one. A transition cannot run
   across display:none to block, so driving one means adding a class a frame
   after showModal; an animation just runs when the element enters the
   rendering tree. That keeps the timing out of JS, and means no code path can
   leave the panel stuck invisible over a live scroll lock. Where animations
   are unsupported the property is ignored and the panel is already visible,
   and the prefers-reduced-motion reset collapses the duration to nothing,
   which lands on the same end state. */
.campaign {
  padding: 0;
  border: none;
  background: none;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  overflow: auto;
  /* The dialog is the click-outside surface, so it fills the viewport and
     centres the panel rather than sizing to it. */
  display: flex;
  align-items: center;
  justify-content: center;
  /* This is the initial focus target (see campaigns.js), a container rather
     than a control, so it should never show a ring of its own. Explicit
     rather than assumed: a plain element with tabindex="-1" typically gets
     no default outline on focus, but this removes any doubt. */
  outline: none;
}
.campaign::backdrop {
  background: rgb(var(--deep-rgb) / .82);
  animation: campaign-fade 200ms ease both;
}
@keyframes campaign-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.campaign-inner {
  position: relative;
  width: min(100%, 860px);
  margin: auto;
  /* Charcoal, so the black brand panel beside it still reads as a panel. */
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgb(var(--ink-rgb) / .18);
  overflow: hidden;
  /* Every viewport, not only phones. 640 comfortably clears the panel's
     natural height (~560-600px), so this is dormant on an ordinary window and
     only engages on a short one, where it leaves visible scrim above and
     below instead of letting the panel become the whole window. */
  max-height: min(92vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: campaign-rise 200ms ease both;
}
@keyframes campaign-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Brand panel. Gold lockup on --deep, which is the one place the mark is
   the subject rather than the furniture. Capped at 205px displayed: the source
   is 493x240, so that is 2.4x. */
.campaign-brand {
  background: var(--deep);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}
.campaign-logo {
  width: min(58%, 200px);
  height: auto;
  margin: 0 auto var(--space-3);
}
.campaign-brand-note {
  margin: 0;
  font-family: var(--font-head);
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--on-deep-label);
}

.campaign-body { padding: var(--space-4) var(--space-4) var(--space-6); }

.campaign-eyebrow {
  margin: 0 0 var(--space-2);
  font-size: var(--step-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand);
}
.campaign-headline {
  margin: 0 0 var(--space-2);
  font-family: var(--font-head);
  font-size: var(--step-h2);
  font-weight: 800;
  line-height: var(--leading-tight);
  text-transform: uppercase;
  color: var(--ink);
}
.campaign-text {
  margin: 0 0 var(--space-3);
  /* Narrower than the headline measure on purpose: at 46ch the paragraph ran
     as wide as the headline above it and the two stopped reading as a
     hierarchy. */
  max-width: 38ch;
  color: var(--muted);
}

/* The CTA and its opt-out are one decision, so they sit together rather than
   as two separate bands. */
.campaign-actions { display: flex; flex-direction: column; align-items: flex-start; }
.campaign-primary { display: inline-flex; }
.campaign-secondary {
  margin-top: var(--space-2);
  padding: var(--space-1) 0;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.campaign-secondary::after { content: " \2192"; }
.campaign-secondary:hover { color: var(--ink); }

/* Offer footer: label, code control and small print as one compact group. The
   rule is the group's own top edge, not a separator between two halves of the
   panel. */
.campaign-offer {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: var(--border);
}
.campaign-code-label {
  margin: 0 0 var(--space-1);
  font-size: var(--step-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}
.campaign-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: 20rem;
  padding: .5rem .75rem;
  background: var(--deep);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.campaign-chip:hover { border-color: var(--brand); }
.campaign-code {
  font-family: var(--font-mono);
  font-size: var(--step-body);
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--brand);
  /* Still real text: anyone can select it rather than use the button. */
  user-select: text;
}
.campaign-copy {
  flex: none;
  padding: 0;
  background: none;
  border: none;
  font-size: var(--step-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}
.campaign-chip:hover .campaign-copy { color: var(--brand); }
.campaign-copy.is-copied { color: var(--brand); }

.campaign-terms {
  margin: var(--space-2) 0 0;
  font-size: var(--step-label);
  line-height: 1.5;
  color: var(--muted);
}

/* 44px tap target, per the site's other controls. */
/* 44px on touch, where it is the primary escape and sits on the dark brand
   panel. Desktop takes it down to 40 and gives it a quiet border instead of
   weight, so it reads as available rather than as the loudest control on the
   panel. */
.campaign-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 999px;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--on-deep-soft);
  cursor: pointer;
}
.campaign-close:hover { border-color: var(--brand-bright); color: var(--on-deep-strong); }
.campaign-close:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 2px;
}

@media (min-width: 700px) {
  /* 34/66. The brand panel holds one graphic and a line of type, so at 40 it
     was mostly empty while the offer copy was the side that wanted room. The
     close control moves onto the light panel once the brand panel no longer
     spans the full width. */
  .campaign-inner {
    display: grid;
    grid-template-columns: 34fr 66fr;
    align-items: stretch;
  }
  .campaign-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-4) var(--space-3);
  }
  /* A percentage here resolves against the panel's padded content box, not the
     panel, which is why an earlier 78% came out smaller than the mobile rule
     it was meant to beat. The cap is what actually sets the size: 205px is
     about 70% of the 34% panel. */
  .campaign-logo { width: min(90%, 205px); }
  .campaign-body { padding: var(--space-4) var(--space-6); }
  .campaign-close {
    width: 40px;
    height: 40px;
    border-color: var(--line);
    color: var(--muted);
  }
  .campaign-close:hover { border-color: var(--brand); color: var(--brand); }
  .campaign-close:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
}

@media (max-width: 699px) {
  /* Stacked, not shrunk. The brand panel is capped so the dismissal is always
     reachable without scrolling on a short phone. */
  .campaign { align-items: flex-end; }
  .campaign-inner {
    /* The base rule centres with margin:auto, and an auto margin beats
       align-items. Zeroing the bottom one is what actually pins the sheet. */
    margin-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    /* Below 700 the base cap's 640px ceiling does nothing useful (a phone is
       never that tall in the address-bar-visible state that matters here), so
       this drops the ceiling and lets 92vh alone govern the sheet. */
    max-height: 92vh;
  }
  .campaign-brand { padding: var(--space-4) var(--space-3); }
  .campaign-logo { width: min(52%, 168px); margin-bottom: var(--space-2); }
  .campaign-body { padding: var(--space-4) var(--space-3) var(--space-4); }
  .campaign-actions { align-items: stretch; }
  .campaign-primary { width: 100%; justify-content: center; }
  .campaign-secondary { width: 100%; text-align: center; min-height: 44px; }
  .campaign-chip { max-width: none; padding: .625rem .75rem; }
}

/* ---- Campaign reopen tab ----
   Appears once the modal has been dismissed, and on later visits while the
   campaign is still live. It is the way back to the offer without the modal
   firing at anyone twice.

   Gold and the site's own label type, not the parent's coupon red, so it
   reads as furniture of this site rather than an advertisement stuck onto it.

   The width is the constraint, and it is not obvious. The page is left-aligned
   and full-bleed below about 1264px, where the hero copy starts 48px in, so
   anything past 48px wide clips the front of the h1. Measured: at a 17px face
   the tab grew to 59px and took 11px off the headline. min-width 44 plus the
   narrow inline padding is what holds it under that, and the type has to live
   inside that budget. Check the rendered width, not just the look, after any
   change to the face or the padding here.

   z-index 95 puts it above the action bar (90) and below the mobile nav (99)
   and header (100), so an open nav covers it rather than competing with it. */
.campaign-tab {
  position: fixed;
  top: 50%;
  z-index: 95;
  min-width: 44px;
  /* Physical, not logical: the shorthand stays top/right/bottom/left whatever
     the writing mode, so the second value is what sets the tab's width. */
  padding: var(--space-3) var(--space-1);
  background: var(--brand);
  color: var(--on-brand);
  border: none;
  font-family: var(--font-head);
  font-size: var(--step-small);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  writing-mode: vertical-rl;
  cursor: pointer;
  box-shadow: 0 2px 10px rgb(var(--ink-rgb) / .18);
  animation: campaign-tab-in 220ms ease both;
}
@keyframes campaign-tab-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.campaign-tab:hover,
.campaign-tab:focus-visible { background: var(--brand-dark); }

/* Left edge reads bottom to top, which is the usual convention for a tab on
   this side. The rotation flips the box, so the radius is specified against
   the rotated element rather than the screen. */
.campaign-tab--left {
  left: 0;
  transform: translateY(-50%) rotate(180deg);
  border-radius: var(--radius) 0 0 var(--radius);
}
.campaign-tab--right {
  right: 0;
  transform: translateY(-50%);
  border-radius: var(--radius) 0 0 var(--radius);
}

/* Below the action-bar breakpoint the edge tab stops being free: measured at
   390px it sat over 20px of the h1 and the hero paragraph, and obscuring the
   copy to advertise an offer is the wrong trade. On a phone it docks above the
   action bar instead, which is furniture the layout already reserves room for
   (body carries padding-bottom: var(--action-bar-h)), so it covers nothing and
   reads as part of the same fixed set rather than something stuck on top. */
@media (max-width: 779px) {
  .campaign-tab--left,
  .campaign-tab--right {
    top: auto;
    bottom: calc(var(--action-bar-h) + var(--space-2));
    left: var(--space-2);
    right: auto;
    transform: none;
    writing-mode: horizontal-tb;
    min-height: 44px;
    padding: .625rem 1rem;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgb(var(--ink-rgb) / .28);
  }
}

/* ---- Campaign confirmation on /contact/ ----
   Acknowledges an offer carried in from a campaign CTA, so the code never has
   to be typed. Quiet by design: the form is the job, this is a receipt. */
.campaign-active {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--surface-warm);
  border: var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
}
.campaign-active-label {
  font-size: var(--step-label);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand);
}
.campaign-active-offer { margin-top: .25rem; font-weight: 600; }
.campaign-active-code {
  margin-top: .25rem;
  font-family: var(--font-mono);
  font-size: var(--step-small);
  color: var(--muted);
}
.campaign-active-code strong { color: var(--ink); font-weight: 600; }
.campaign-active-terms {
  margin-top: var(--space-2);
  font-size: var(--step-label);
  line-height: 1.5;
  color: var(--muted);
}

/* ---- Light islands ----
   Cards are the warm-white panels in the dark theme, as in the mock. They
   redefine the palette tokens locally, so every rule inside a card (headings,
   --muted copy, --brand links, borders) reads the light values with no rules
   of its own. --border has to be restated: a custom property that references
   another is resolved where it is declared, so the :root value already holds
   the dark --line.

   Gold does not clear AA on warm white (2.24:1) and the palette has no dark
   gold, so inside an island --brand is black and links carry the gold as an
   underline: decoration, not text, so the ratio does not apply to it. */
.card,
.project-card,
.problem-art {
  color-scheme: light;
  --brand:        #121212;
  --brand-dark:   #333333;
  --on-brand:     #F7F5F0;
  --surface:      #F7F5F0;
  --surface-warm: #FFFFFF;
  --surface-alt:  #E7D9B7;
  --line:         #E7D9B7;
  --line-strong:  #333333;
  --muted:        #333333;
  --ink:          #121212;
  --border: 1px solid var(--line);
  color: var(--ink);
}
.card .card-link {
  text-decoration: underline;
  text-decoration-color: #C8A04B;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a.card:hover { border-color: #C8A04B; }

/* ---- Heritage + service areas (homepage, before the CTA band) ----
   Type carries this section: no image, no card. The headline is the one
   oversized element on the page after the hero; the gold full stop is its
   only accent. Uppercase is CSS-only so the source and screen readers keep
   sentence case. The two region blocks are whole-block links on the dark
   ground, ruled apart with a hairline rather than boxed, so they read as
   reference information under the statement rather than as more cards. */
.heritage .accent-rule { margin-bottom: var(--space-3); }
.heritage .eyebrow { display: flex; }
.heritage-title {
  font-size: clamp(2.5rem, 0.5rem + 10vw, 6.25rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--space-3);
}
.heritage-dot { color: var(--brand-bright); }
.heritage-lede {
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--muted);
}
.heritage-areas {
  display: grid;
  margin-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,.15);
}
.heritage-area {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  padding-block: var(--space-4);
  text-decoration: none;
}
.heritage-area + .heritage-area { border-top: 1px solid rgba(255,255,255,.15); }
.heritage-region {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brand);
}
.heritage-base {
  font-family: var(--font-head);
  font-size: var(--step-h3);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--ink);
}
.heritage-towns {
  max-width: 34rem;
  font-size: var(--step-small);
  color: var(--muted);
}
.heritage-link {
  margin-top: var(--space-1);
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color .15s, text-decoration-color .15s;
}
.heritage-area:hover .heritage-link,
.heritage-area:focus-visible .heritage-link {
  color: var(--brand-dark);
  text-decoration-color: currentColor;
}
.heritage-area:focus-visible { outline-offset: 4px; border-radius: var(--radius); }
@media (min-width: 780px) {
  .heritage-areas { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .heritage-area + .heritage-area { border-top: 0; }
  .heritage-area { padding-block: var(--space-4) 0; }
}
