/* ==========================================================================
   theme.css — the only CSS in this theme that is not a port of the mockups.

   Also: the Contact Form 7 adjustments for the request card, and a third
   cost card (bottom).

   The mockups carry no skip link (they have no <main id>, and WordPress
   injects one of its own on block themes). We suppress WordPress' and render
   our own inside the header part so there is exactly one, styled with the
   mockup's tokens.
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-text);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* --- Contact Form 7 in the request card ----------------------------------
   Selectors are deliberately specific: CF7's own stylesheet styles
   .wpcf7 form.invalid .wpcf7-response-output with a coloured border.
   CF7 wraps the form in div.wpcf7, which would become the card's grid item and
   break the form/thank-you crossfade (closing-cta.css stacks .request-form and
   .request-thanks in one grid cell). display: contents hands the form back. */
.request-card > .wpcf7 { display: contents; }

.request-form .wpcf7-form-control-wrap { display: block; }

.request-form .wpcf7-not-valid-tip {
  margin-top: 0.3rem;
  font-size: var(--step--1);
  color: var(--red);
}

.request-card .wpcf7 form.request-form .wpcf7-response-output {
  margin: var(--sp-2) 0 0;
  padding: 0;
  border: 0;
  font-size: var(--step--1);
  color: var(--red);
}

/* Success is shown by the thank-you panel, not CF7's line. */
.request-card .wpcf7 form.request-form.sent .wpcf7-response-output { display: none; }

.request-form .wpcf7-spinner { display: none; }

/* --- Cost band with three ranges -----------------------------------------
   The mockup's .cost__ranges is two columns; the client has three price bands.
   Same breakpoint as service-page.css, where it stacks to one column. */
@media (min-width: 861px) {
  .cost__ranges:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Visually hidden, still read and indexed: the fallback H1 on a page with no hero. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero without a photo (required, but ACF does not enforce required on block
   save): one column instead of an empty photo column. */
.hero--no-photo { grid-template-columns: minmax(0, 1fr); }

/* Problem list with a single item (the repeater's min of 2 is not enforced on
   block save): one card-width column, not one card stretched across the page. */
.suspects__list:has(> :only-child) { grid-template-columns: minmax(0, 22rem); }

/* Map embeds fill the mockup's map boxes (.contact-map, .loc-map size them). */
.contact-map > .map-embed,
.loc-map > .map-embed {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius-lg);
}

/* Muted text darkened a touch: the mockup's #7d766e measures 3.88 to 4.48 on
   the site's three backgrounds, under the 4.5 AA minimum. #726b64 passes on all
   three (4.55 to 5.25) and reads the same. */
:root { --ink-mute: #726b64; }

/* Team group shot on phones: the mockup's 200px min-height, through the 16:9
   aspect ratio, forced the photo to 356px wide, so 360px screens scrolled
   sideways. The aspect ratio alone sets the height at these widths. */
@media (max-width: 900px) {
  .team__photo { min-height: 0; }
}

/* Booking card (2026-10-16): the client moved appointments to Microsoft
   Bookings, so the request card beside the closing pitch and the contact
   details now holds one button to that page. It keeps the card's look. */
.booking-card { align-content: start; }
.booking-card .request-form__title { margin-bottom: var(--sp-3); }
.booking-card__body {
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: var(--sp-5);
}
.booking-card__btn { justify-self: stretch; }
.booking-card__note {
  margin-top: var(--sp-3);
  font-size: var(--step--1);
  color: var(--ink-mute);
  text-align: center;
}

/* No booking link set: no card, so the pitch or the details take the width. */
.closing__inner:not(:has(> .request-card)),
.contact__grid:not(:has(> .request-card)) { grid-template-columns: minmax(0, 1fr); }

/* --- Keyboard and assistive tech (no change at rest) --------------------- */

/* Escape hides an open desktop submenu until the pointer or focus moves on
   (site.js adds is-dismissed). Same hidden state as nav.css's resting one. */
@media (min-width: 901px) {
  .has-sub.is-dismissed > .site-nav__sub {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
  }
}

/* A closed FAQ answer is only squeezed to zero height, so its links still took
   Tab. Hidden as well, after the closing slide has run. Scripts only: the
   no-JS state is unchanged. */
.js .faq__a {
  visibility: hidden;
  transition: max-height 0.3s var(--ease), visibility 0s linear 0.3s;
}
.js .faq__item.is-open .faq__a {
  visibility: visible;
  transition: max-height 0.3s var(--ease), visibility 0s;
}

/* Before/after arrows: proof.css hides them with visibility, so a keyboard
   could never reach them to reveal them. Transparent and click-through at
   rest instead; hover or focus inside the pair shows them as before. */
.ba__btn {
  visibility: visible;
  pointer-events: none;
}
.ba:hover .ba__btn,
.ba:focus-within .ba__btn { pointer-events: auto; }

/* The gallery strip clips its tiles, which cut off the focus ring */
.gallery__item:focus-visible { outline-offset: -3px; }

/* Less motion asked for: anchor jumps and the strips' arrow scrolls jump
   rather than glide (common.css, reviews.css, proof.css set smooth). */
@media (prefers-reduced-motion: reduce) {
  html,
  .reviews__track,
  .ba__viewport { scroll-behavior: auto; }
}

/* Full-bleed photo margins (.whyshop__photo, .general__media) ran a few pixels
   past the window between about 631 and 655px wide. clip, not hidden: hidden
   would make body a scroll container and unpin the sticky header. */
body { overflow-x: clip; }

/* --- Footer legal row ------------------------------------------------------
   The service-area line spans the last two footer columns, and when it is
   longer than the mockup's its width was shared into those auto tracks,
   widening them, so the wordmark wrapped and the columns shifted left. Sized
   out of the track maths, it wraps inside its span instead. Stretch, because
   a contained box has no width of its own to shrink to. */
@media (min-width: 861px) {
  .site-footer__note--b {
    contain: inline-size;
    justify-self: stretch;
  }
}
