/* ==========================================================================
   Components
   ========================================================================== */

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.85em 1.6em;
  font-family: var(--font-ui);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              background-color .22s var(--ease), color .22s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--alert { background: var(--grad-alert); color: #fff; }
.btn--alert:hover { color: #fff; }

.btn--field { background: var(--field-deep); color: var(--on-dark); }
.btn--field:hover { background: var(--ink); color: var(--on-dark); }

.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn--ghost:hover { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }

.btn--wide { width: 100%; justify-content: center; }

/* --- Header --------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(35 31 32 / 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid transparent;
  border-image: var(--grad-reticle) 1;
}

.site-header__bar {
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: 0.7rem;
}

.site-header__logo { flex: none; display: flex; align-items: center; gap: 0.75rem; }
.site-header__logo img { height: 52px; width: auto; }
@media (max-width: 60rem) { .site-header__logo img { height: 40px; } }

/* "Powered by Mosquito & Pest Authority" — the co-brand lockup, recoloured to a
   light knockout so it reads on the dark header/footer while the mosquito and
   tick icons keep their colour. Sits beside the mark as a subordinate
   endorsement rather than competing with the wordmark. */
.site-header__logo .powered-by-mark {
  height: 42px;
  width: auto;
  align-self: center;
}
@media (max-width: 60rem) { .site-header__logo .powered-by-mark { height: 32px; } }
@media (max-width: 48rem) { .site-header__logo .powered-by-mark { display: none; } }

.powered-by-mark--footer {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom: 0.85rem;
}

.site-nav { margin-left: auto; }
.site-nav__list { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
@media (max-width: 64rem) { .site-nav { display: none; } }

.site-nav__link {
  display: block; padding: 0.7rem 0.85rem;
  font-family: var(--font-ui); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--on-dark-soft); text-decoration: none;
  border-radius: var(--r-sm);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.site-nav__link:hover, .site-nav__link[aria-current="page"] { color: var(--patrol-green); background: rgb(255 255 255 / 0.06); }

.site-nav__item { position: relative; }
.site-nav__panel {
  position: absolute; top: 100%; left: 0; min-width: 17rem;
  background: var(--ink); border: 1px solid rgb(255 255 255 / 0.10);
  border-radius: var(--r-md); padding: 0.5rem;
  box-shadow: var(--shadow-lg);
  list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.site-nav__item:hover .site-nav__panel,
.site-nav__item:focus-within .site-nav__panel { opacity: 1; visibility: visible; transform: translateY(0); }
.site-nav__panel a {
  display: block; padding: 0.6rem 0.8rem; border-radius: var(--r-sm);
  font-family: var(--font-ui); font-size: 0.92rem; letter-spacing: 0.04em;
  color: var(--on-dark-soft); text-decoration: none;
}
.site-nav__panel a:hover { background: rgb(255 255 255 / 0.08); color: var(--patrol-green); }

.site-header__cta { display: flex; align-items: center; gap: 0.75rem; flex: none; }
@media (max-width: 40rem) { .site-header__cta .btn { display: none; } }

.phone-link {
  font-family: var(--font-head); font-size: 1.22rem; letter-spacing: 0.03em;
  color: var(--on-dark); text-decoration: none; white-space: nowrap;
}
.phone-link:hover { color: var(--patrol-green); }

.nav-toggle {
  display: none; margin-left: auto;
  background: transparent; border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: var(--r-sm); color: var(--on-dark);
  padding: 0.55rem 0.7rem; cursor: pointer;
}
@media (max-width: 64rem) { .nav-toggle { display: block; } }

.mobile-nav { display: none; background: var(--ink); border-top: 1px solid rgb(255 255 255 / 0.1); }
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0.5rem 0 1.25rem; }
.mobile-nav a {
  display: block; padding: 0.75rem var(--gutter);
  font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--on-dark-soft); text-decoration: none;
}
.mobile-nav a:hover { color: var(--patrol-green); background: rgb(255 255 255 / 0.05); }
.mobile-nav .is-child { padding-left: calc(var(--gutter) + 1.25rem); font-size: 0.9rem; opacity: 0.85; }

/* --- Hero ----------------------------------------------------------------- */

/* The typographic hero that lived here — a reticle drawn in gradients, no
   photograph — was replaced by the photo slider further down in Aug 2026.
   `.hero__actions` is the only part still rendered: each slide reuses it for
   its button row, so it stays under the old name rather than being renamed
   and touching four call sites in pages.mjs for nothing. */
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
/* --- Cards ---------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.5rem;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.card h3 { font-size: var(--step-1); margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--field-green); }

.card--dark { background: rgb(255 255 255 / 0.05); border-color: rgb(255 255 255 / 0.14); color: var(--on-dark-soft); }
a.card--dark:hover { border-color: var(--patrol-green); background: rgb(255 255 255 / 0.08); }

.card__thumb { margin: -1.5rem -1.5rem 1.25rem; border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden; aspect-ratio: 3 / 2; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* --- Stat strip ----------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1.5rem; }
.stat__num { font-family: var(--font-head); font-size: var(--step-3); color: var(--patrol-green); line-height: 1; }
.stat__label { font-family: var(--font-ui); font-size: var(--step--1); letter-spacing: 0.09em; text-transform: uppercase; color: var(--on-dark-soft); }

/* --- Breadcrumbs ---------------------------------------------------------- */

.crumbs { font-family: var(--font-ui); font-size: var(--step--1); letter-spacing: 0.05em; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 0.4rem; opacity: 0.55; }
.crumbs a { color: inherit; opacity: 0.8; }
.crumbs a:hover { opacity: 1; }

/* --- Prose ---------------------------------------------------------------- */

.prose h2 { margin-top: 2em; padding-top: 0.2em; }
.prose h3 { margin-top: 1.6em; font-size: var(--step-1); }
.prose ul, .prose ol { padding-left: 1.3em; max-width: var(--measure); }
.prose li + li { margin-top: 0.4em; }
.prose > :first-child { margin-top: 0; }

/* --- FAQ ------------------------------------------------------------------ */

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; padding: 1.05rem 0; list-style: none;
  font-family: var(--font-head); font-size: var(--step-1);
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--heading);
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3em; color: var(--field-green); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: 1.15rem; }
.faq details > div > :last-child { margin-bottom: 0; }

/* --- Town / pest index ---------------------------------------------------- */

.link-grid { columns: 3 14rem; column-gap: 2rem; list-style: none; margin: 0; padding: 0; }
.link-grid li { break-inside: avoid; margin-bottom: 0.55rem; }
.link-grid a { font-family: var(--font-ui); letter-spacing: 0.03em; text-decoration: none; }
.link-grid a:hover { text-decoration: underline; }

/* --- Callout / quote ------------------------------------------------------ */

.callout {
  border-left: 4px solid var(--field-green);
  background: var(--surface-warm);
  padding: 1.2rem 1.4rem;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.callout > :last-child { margin-bottom: 0; }
.band--patrol .callout, .band--field .callout {
  background: rgb(255 255 255 / 0.06); border-left-color: var(--patrol-green);
}

/* --- Footer --------------------------------------------------------------- */

/* Hero slider. Scroll-snap track so it works as a swipeable carousel with no
   JavaScript at all; slider.js only adds the arrows, dots and auto-advance.

   The scrim runs left-to-right rather than bottom-up, because the copy sits
   left and the photograph should stay readable on the right. The dark plateau
   extends to 48% so it covers the full text column even on the wildlife slide,
   which blows out to white sky. Measured 7:1 or better on all four. */
.hero-slider { position: relative; background: var(--ink); overflow: hidden; }
.hero-slider__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none;
}
.hero-slider__track::-webkit-scrollbar { display: none; }

.hero-slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start;
  min-height: clamp(27rem, 43vw, 35rem);
  display: flex; align-items: flex-end;
}
.hero-slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgb(23 20 21 / 0.95) 0%, rgb(35 31 32 / 0.91) 48%,
                           rgb(35 31 32 / 0.50) 68%, rgb(35 31 32 / 0.14) 100%),
    linear-gradient(0deg, rgb(35 31 32 / 0.70) 0%, rgb(35 31 32 / 0) 55%);
}
/* z-index matters: ::after is generated as the last child, so without it the
   scrim paints on top of the copy and washes it out. */
.hero-slide__inner {
  position: relative; z-index: 1;
  padding-block: clamp(3rem, 4vw, 5rem);
  max-width: 62rem;
}
/* Keep the copy clear of the arrows, which only exist at this width. */
@media (min-width: 48rem) { .hero-slide__inner { padding-right: 3.5rem; } }
.hero-slide .eyebrow { color: var(--patrol-green); }
/* The slide sits on dark ground, so the ghost button must not inherit the
   light-surface body colour. */
.hero-slide__inner { color: var(--on-dark); }
.hero-slide .btn--ghost { color: var(--on-dark); border-color: rgb(255 255 255 / 0.45); }
.hero-slide .btn--ghost:hover { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.hero-slide__title {
  color: var(--on-dark); max-width: 18ch; margin: 0.35rem 0 0.9rem;
  font-size: var(--step-3);
}
.hero-slide__line { color: var(--on-dark-soft); max-width: 52ch; margin: 0; }
.hero-slide .hero__actions { margin-top: 1.75rem; }

/* Controls */
.hero-slider__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 2.9rem; height: 2.9rem;
  color: var(--on-dark); cursor: pointer;
  background: rgb(35 31 32 / 0.55); border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 50%;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.hero-slider__arrow:hover { background: var(--field-deep); border-color: var(--patrol-green); }
.hero-slider__arrow--prev { left: 0.9rem; }
.hero-slider__arrow--next { right: 0.9rem; }
@media (max-width: 48rem) { .hero-slider__arrow { display: none; } }

.hero-slider__dots {
  position: absolute; z-index: 2; bottom: 1.1rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.6rem;
}
.hero-slider__dot {
  width: 2.25rem; height: 4px; padding: 0; cursor: pointer;
  background: rgb(255 255 255 / 0.35); border: 0; border-radius: 2px;
  transition: background-color .2s var(--ease);
}
.hero-slider__dot[aria-selected="true"] { background: var(--patrol-green); }
.hero-slider__dot:hover { background: rgb(255 255 255 / 0.6); }

@media (prefers-reduced-motion: reduce) {
  .hero-slider__track { scroll-behavior: auto; }
}

.site-footer { background: var(--grad-patrol); color: var(--on-dark-soft); }
.site-footer h4 {
  font-size: var(--step--1); letter-spacing: 0.16em; color: var(--patrol-green);
  margin-bottom: 1rem;
}
.site-footer a { color: var(--on-dark-soft); text-decoration: none; }
.site-footer a:hover { color: var(--patrol-green); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.5rem; }

/* Territory accordions. 35 towns across three counties, collapsed by county so
   the footer stays short. Native <details> — keyboard accessible for free — and
   the same "+" that rotates to "×" as the FAQ, in patrol green because this
   sits on dark ground. */
.footer-areas__group { border-top: 1px solid rgb(255 255 255 / 0.12); }
.footer-areas__group:last-of-type { border-bottom: 1px solid rgb(255 255 255 / 0.12); }
.footer-areas summary {
  cursor: pointer; padding: 0.62rem 0; list-style: none;
  font-family: var(--font-ui); font-size: var(--step--1);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.footer-areas summary::-webkit-details-marker { display: none; }
.footer-areas summary:hover { color: var(--patrol-green); }
.footer-areas summary::after {
  content: "+"; font-size: 1.3em; line-height: 1; color: var(--patrol-green);
  transition: transform .2s var(--ease);
}
.footer-areas__group[open] summary::after { transform: rotate(45deg); }
.footer-areas__count { color: var(--on-dark-soft); opacity: 0.65; }
.footer-areas ul { padding: 0.1rem 0 0.85rem; }
@media (prefers-reduced-motion: reduce) {
  .footer-areas summary::after { transition: none; }
}
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 2.25rem; }
.site-footer__legal {
  margin-top: 2.75rem; padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
  font-size: var(--step--1);
}

/* --- Sticky mobile call bar ----------------------------------------------- */

.callbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  display: none; gap: 1px;
  background: rgb(255 255 255 / 0.15);
}
.callbar a {
  flex: 1; padding: 0.95rem; text-align: center;
  font-family: var(--font-ui); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; color: #fff;
}
.callbar a:first-child { background: var(--grad-alert); }
.callbar a:last-child { background: var(--field-deep); }
@media (max-width: 48rem) {
  .callbar { display: flex; }
  body { padding-bottom: 3.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .btn:hover, a.card:hover { transform: none; }
}

/* --- Forms ---------------------------------------------------------------- */

/* Wufoo is embedded rather than reimplemented: the form carries reCAPTCHA and a
   per-page-load idstamp, so posting to it from our own markup gets rejected.
   The trade-off is that the iframe's internals cannot be themed, so the card
   around it does the visual work instead. */
.form-card { background: var(--surface-warm); }

/* Tally embed. The form lives in an iframe, so our field CSS cannot reach it —
   the type, colours, focus ring and 4px radii that make it look like ours are
   configured on the Tally form itself. What is left here is the frame: full
   width, no border, and a min-height so the card does not collapse in the
   moment before embed.js measures the content and sizes it. */
.tally-embed { margin-top: 1.25rem; }
.tally-embed__frame {
  display: block; width: 100%; border: 0; background: transparent;
}
/* embed.js sets src once it runs, and sizes the frame from there. Until then
   — or for good, if the script is blocked — there is no src, and an empty
   600px box helps nobody: hide it and let the fallback link do the work. No
   min-height either, or the frame cannot shrink to fit and scrolls inside. */
.tally-embed__frame:not([src]) { display: none; }
.tally-embed__fallback {
  margin: 0.85rem 0 0;
  font-size: var(--step--1); color: var(--body-soft);
}

/* --- Reviews -------------------------------------------------------------- */

.stars { display: inline-flex; gap: 2px; color: var(--star, #D9A441); }
/* Sized in em so the row scales with its container, but the SVGs also carry
   width/height attributes — if this stylesheet ever fails to load, they render
   at 16px rather than expanding to fill the viewport. */
.stars svg { width: 1em; height: 1em; display: inline-block; }
.stars--lg { font-size: 1.5rem; }

.rating-hero {
  display: flex; flex-wrap: wrap; gap: 2rem 3rem;
  align-items: flex-end; justify-content: space-between;
}
.rating-hero h1 { margin-bottom: 0; }

.rating-score {
  display: grid; justify-items: start; gap: 0.5rem;
  padding: 1.4rem 1.75rem;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: var(--r-md);
}
.rating-score__num {
  font-family: var(--font-head); font-size: 3.4rem; line-height: 0.9;
  color: var(--on-dark); letter-spacing: 0.01em;
}
.rating-score__count {
  font-family: var(--font-ui); font-size: var(--step--1);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-soft);
}
.rating-score .btn { margin-top: 0.5rem; }

/* Masonry-ish: the lead review spans two columns and sets the tone; the rest
   sit beside it. Falls back to a plain single column below 46rem. */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1rem, 0.6rem + 1.4vw, 1.75rem);
  align-items: start;
}
@media (min-width: 60rem) {
  .review-grid { grid-template-columns: repeat(3, 1fr); }
  .review--feature { grid-column: span 2; }
}

.review {
  position: relative;
  margin: 0;
  display: grid; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
/* A quiet green edge, not a heavy left bar — the old one made every card
   shout equally and the page read as a striped wall. */
.review::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad-reticle);
}
.review blockquote {
  margin: 0; font-size: var(--step-0); line-height: 1.6; color: var(--body);
}
.review blockquote::before { content: "\201C"; }
.review blockquote::after  { content: "\201D"; }

.review--feature blockquote { font-size: var(--step-1); line-height: 1.55; }
.review--feature { padding: 2rem 2rem 1.6rem; }

.review figcaption { display: flex; align-items: center; gap: 0.75rem; }
.review__avatar {
  flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--field-deep); color: var(--on-dark);
  font-family: var(--font-ui); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.04em;
}
.review__id { display: grid; }
.review__who {
  font-family: var(--font-ui); font-weight: 600; letter-spacing: 0.03em;
  color: var(--heading);
}
.review__meta {
  font-family: var(--font-ui); font-size: var(--step--1); color: var(--body-soft);
}

.review__tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  list-style: none; margin: 0; padding: 0.9rem 0 0;
  border-top: 1px solid var(--rule);
}
.review__tags li {
  font-family: var(--font-ui); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--field-deep);
  background: var(--surface-warm);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}
