/* ==========================================================================
   Location — loaded only on single-wst-locations.php.

   Kept apart from service.css on purpose: a location page reads as the
   site's inner pages do, not as a service. Lineage of each section:

     banner   .pr-banner, with About's 0.62 wash
     intro    About's lockup centred (no watermark) and one serif summary
              paragraph, on the floor-plan texture
     photos   a ribbon of the page's project photos on ink
     blocks   optional further copy sections, side by side as 2px outlined
              panels (the point tiles' outline, in ink on paper)
     area     copy beside a dark card, the Services contact card's shape
              (ink, radius, faint mark), listing the towns
     reviews  the homepage testimonial band (photo under a 0.90 wash, 2px
              frame, one quote at a time) with arrows in place of its dots
     services the Services pages' cards set light; hover lifts the card,
              zooms its photo and fills its icon ring
     close    About's "Get in touch" card straddling the footer

   .pr-banner, .pr-crumbs, .pr-lockup, .pr-rule, .pr-title, .pr-btn, .pr-cta,
   .pr-prose and [data-reveal] come from prestige-components.css and are NOT
   restated here. Values come from prestige-tokens.css — no hex in this file.
   ========================================================================== */

/* --- Banner -------------------------------------------------------------- */
/* The accessibility floor for white text over this photography. Do not
 * lighten it. */
[data-l="banner"] {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)),
    var(--pr-banner-image);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  /* The header is fixed and out of flow; pad the banner clear of it. */
  padding-top: var(--pr-header-height, 0px);
}

/* --- Intro: heading, summary, then the copy in two columns --------------- */

/* The floor-plan texture, as behind home In the News and the About values. */
[data-l="intro"] {
  position: relative;
  overflow: hidden;
  background: var(--wash-plan), var(--pr-plan-image) center / cover no-repeat, var(--paper);
  padding: var(--section-pad) var(--gutter-page);
}

[data-l="introwrap"] {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 2.2vw, 42px);
  text-align: center;
}

[data-l="lockup"] {
  position: relative;
  max-width: 100%;
  align-items: center;
  text-align: center;
}
[data-l="lockup"] .pr-rule { margin-left: auto; margin-right: auto; }

[data-l="introtitle"] {
  max-width: 18em;
  font-size: var(--display-md);
  line-height: 1;
  text-wrap: balance;
}

/* The summary runs the full width of the columns below it, not at a narrower
   reading measure (BugHerd #127), and both run the site's content width
   (BugHerd #151). */
[data-l="introlead"] { max-width: var(--content-max); }
/* A size up from the testimonial-quote token: beside 18px sans copy the
   serif at 18px read smaller than the body it leads. */
[data-l="introlead"].pr-prose p.pr-prose__lead { font-size: clamp(21px, 1.35vw, 26px); }

/* The rest of the copy, in two columns.
   Multi-column, not a grid: the paragraphs are a continuous read and flow
   from one column to the next. `break-inside` keeps a paragraph whole rather
   than splitting it across the gap (BugHerd #129).
   The container is the site's content width (BugHerd #151 — 1240px read
   narrow on a wide screen); the tighter gap from #128 is kept, so the two
   columns still sit closer than they did. No rule between them (#126). */
[data-l="introbody"] {
  max-width: var(--content-max);
  text-align: left;
  columns: 2;
  column-gap: clamp(28px, 2.6vw, 48px);
}
[data-l="introbody"] > :first-child { margin-top: 0; }
[data-l="introbody"] p { break-inside: avoid; }

/* One column below the tablet breakpoint: two columns of this measure on a
   phone give about four words a line. */
@media (max-width: 991px) {
  [data-l="introbody"] { columns: 1; }
}

/* The page's CTA under the summary. */
[data-l="introactions"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px clamp(28px, 2.6vw, 50px);
}

/* --- Photo ribbon and the testimonials share the rail -------------------- */

/* Track edges line up with the content column; the row bleeds past it. */
[data-l-rail] {
  --pr-l-inset: max(var(--gutter-page), calc((100% - var(--content-max)) / 2));
  --pr-l-gap: clamp(14px, 1.25vw, 24px);
}

[data-l="railhead"] {
  max-width: var(--content-max);
  margin: 0 auto clamp(32px, 3.13vw, 60px);
  padding: 0 var(--gutter-page);
  box-sizing: content-box;
}
[data-l="railhead"] .pr-sectionhead { align-items: center; text-align: center; }
[data-l="railhead"] .pr-rule { margin-left: auto; margin-right: auto; }
/* The component's eyebrow is ink; on the dark rails it reads in paper, with
   air under it (the negative pull assumes a one-line display title). */
[data-l-rail] .pr-lockup__eyebrow {
  color: var(--paper);
  margin-bottom: clamp(6px, 0.63vw, 12px);
}

[data-l="track"] {
  display: flex;
  gap: var(--pr-l-gap);
  margin: 0;
  padding: 0 var(--pr-l-inset);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pr-l-inset);
  overscroll-behavior-x: contain;
  /* No scrollbar: the row moves itself, swipes, or takes the arrows. */
  scrollbar-width: none;
}
[data-l="track"]::-webkit-scrollbar { display: none; }
[data-l="track"] > li { scroll-snap-align: start; }
/* While gliding, snapping would pull every small step back. */
[data-l-gliding] [data-l="track"] { scroll-snap-type: none; }

[data-l="railnav"] {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(22px, 2.08vw, 40px);
}
[data-l="railnav"][hidden] { display: none; }
[data-l="railprev"],
[data-l="railnext"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: var(--paper);
  background: transparent;
  border: 2px solid var(--paper);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
[data-l="railprev"]:hover,
[data-l="railnext"]:hover { background: var(--paper); color: var(--ink); }
[data-l="railprev"]:disabled,
[data-l="railnext"]:disabled { opacity: .3; cursor: default; background: transparent; color: var(--paper); }
[data-l="railicon"] { width: 22px; height: 22px; }

/* --- Photos -------------------------------------------------------------- */

[data-l="photos"] {
  background: var(--ink);
  padding: var(--section-pad) 0;
}

[data-l="shot"] {
  flex: 0 0 clamp(250px, 24vw, 460px);
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--muted);
}
[data-l="shot"] img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
[data-l="shot"]:hover [data-shot] { transform: scale(1.05); }

/* The photo is a button that opens the viewer; it looks exactly as before. */
[data-l="shotbtn"] {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
[data-l="shotbtn"]:focus-visible { outline-offset: -4px; }

/* --- Photo viewer: the Gallery page's lightbox (gallery.css) ------------- */

[data-l="lightbox"] {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.4vw, 22px);
  padding: clamp(16px, 2vw, 40px);
  /* Darker than the Gallery's 0.92: through that, this page's photo row and
     its arrows showed behind the viewer. */
  background: rgba(0, 0, 0, 0.97);
}
[data-l="lightbox"][hidden] { display: none; }
[data-l="lightbox"] :focus-visible { outline-color: var(--paper); }

/* The counter and close float over the top edge (overlay affordances), so
   they take no height and the photo sits in the true centre of the screen. */
[data-l="lbbar"] {
  position: absolute;
  top: clamp(16px, 2vw, 40px);
  left: clamp(16px, 2vw, 40px);
  right: clamp(16px, 2vw, 40px);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
[data-l="counter"] { color: var(--surface); }

[data-l="lbclose"],
[data-l="lbprev"],
[data-l="lbnext"] {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}
[data-l="lbclose"]:hover,
[data-l="lbprev"]:hover,
[data-l="lbnext"]:hover { background: rgba(255, 255, 255, 0.14); }
[data-l="lbclose"] {
  width: 44px;
  height: 44px;
  font-size: 22px;
  line-height: 1;
}
[data-l="lbprev"],
[data-l="lbnext"] { width: 52px; height: 52px; align-self: center; }
[data-l="arrowprev"],
[data-l="arrownext"] {
  display: block;
  width: 10px;
  height: 10px;
}
[data-l="arrowprev"] {
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(2px, -2px);
}
[data-l="arrownext"] {
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, 2px);
}

[data-l="lbstage"] {
  flex: 0 1 auto;
  margin-block: auto;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 24px);
  min-height: 0;
}
[data-l="lbfigure"] {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
  margin: 0;
}
[data-l="lbimage"] {
  width: 100%;
  max-width: 1280px;
  height: min(76vh, 820px);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: var(--radius-sm);
}

/* Phones: no arrows — a swipe steps (location.js) — so the photo takes the
   full width, dead centre. (Beneath the photo they also sat over the row's
   own arrows, which show faintly through the backdrop.) */
@media (max-width: 767px) {
  [data-l="lbprev"],
  [data-l="lbnext"] { display: none; }
  [data-l="lbimage"] { height: min(70vh, 560px); }
}

/* --- Further sections ---------------------------------------------------- */

[data-l="blocks"] {
  background: var(--paper);
  padding: var(--section-pad) var(--gutter-page) 0;
}

[data-l="blockgrid"] {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.08vw, 40px);
}
[data-l="blockgrid"][data-l-one] { grid-template-columns: minmax(0, 1fr); }

[data-l="block"] {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.08vw, 40px);
  min-width: 0;
  padding: clamp(28px, 3.13vw, 60px);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
}

[data-l="blocktitle"] {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--display-sm);
  line-height: 1.05;
  color: var(--ink);
  text-transform: uppercase;
  text-wrap: balance;
}
[data-l="block"] .pr-rule { margin-top: clamp(18px, 1.46vw, 28px); }

/* The services lists run two to a row inside the panel. */
[data-l="blockbody"] ul { columns: 2; column-gap: clamp(20px, 2.08vw, 40px); }
[data-l="blockbody"] li { break-inside: avoid; }

/* --- Service area: copy left, towns card right --------------------------- */

[data-l="area"] {
  background: var(--paper);
  padding: var(--section-pad) var(--gutter-page);
}

[data-l="areagrid"] {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 96px);
  align-items: center;
}
[data-l="areagrid"][data-l-notowns],
[data-l="areagrid"][data-l-townsonly] { grid-template-columns: minmax(0, 1fr); }

[data-l="areacopy"] {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 2.6vw, 50px);
  min-width: 0;
}
[data-l="areatitle"] { text-wrap: balance; }

[data-l="areacard"] {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 3.33vw, 64px);
  /* Ink with the Services sections' single red glow off the top corner. */
  background:
    radial-gradient(80% 75% at 100% 0%, rgba(222, 38, 38, 0.20) 0%, rgba(222, 38, 38, 0) 60%),
    var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-feature);
}
[data-l="areacard"] > :not([data-l="carddots"]) { position: relative; z-index: 1; }

/* A faint grid of map dots, strongest in the middle of the card and fading
   to nothing at its edges. Decoration only. */
[data-l="carddots"] {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.7px);
  background-size: 22px 22px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 55% 55%, black 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 55% 55%, black 0%, transparent 78%);
  pointer-events: none;
}

/* The eyebrow over the card's heading, in paper on the ink. */
/* The card's head is centred over the town tiles at every width (BugHerd #121, #122). */
[data-l="townseyebrow"] {
  text-align: center;
  color: var(--paper);
  margin-bottom: clamp(6px, 0.63vw, 12px);
}

[data-l="townstitle"] {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--card-title);
  line-height: 1.1;
  color: var(--paper);
  text-align: center;
  text-wrap: balance;
}
[data-l="areacard"] .pr-rule { margin: clamp(18px, 1.46vw, 28px) auto 0; }

/* Each town is a tile. One with its own location page is a link: a 2px
 * paper outline (the Services point tiles') with an arrow, filling paper on
 * hover. A town with no page yet keeps a faint outline and does nothing.
 * This page's own town is the filled tile. */
[data-l="towns"] {
  display: grid;
  /* Two tiles a row, on four half-columns so an odd last tile can sit
     centred under the others at the same width (seven towns). */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: clamp(22px, 2.08vw, 40px) 0 0;
  padding: 0;
  list-style: none;
}
[data-l="town"] { display: flex; min-width: 0; grid-column: span 2; }
[data-l="town"]:last-child:nth-child(odd) { grid-column: 2 / span 2; }

[data-l="townlink"] {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  font-size: var(--body);
  line-height: 1.2;
  color: var(--paper);
  text-decoration: none;
  border: 2px solid var(--hairline);
  border-radius: var(--radius-sm);
  /* Ink, so the card's dot grid does not show through the tiles. */
  background: var(--ink);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
[data-l="townlink"] > span { min-width: 0; }
a[data-l="townlink"] { border-color: var(--paper); font-weight: 700; }

[data-l="townicon"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--surface);
  transition: color .2s ease;
}
[data-l="townarrow"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: auto;
  transition: transform .2s ease;
}
a[data-l="townlink"]:hover,
a[data-l="townlink"]:focus-visible { background: var(--paper); color: var(--ink); }
a[data-l="townlink"]:hover [data-l="townicon"],
a[data-l="townlink"]:focus-visible [data-l="townicon"] { color: var(--accent); }
a[data-l="townlink"]:hover [data-l="townarrow"],
a[data-l="townlink"]:focus-visible [data-l="townarrow"] { transform: translateX(4px); }

/* This page's own town. */
[data-l-here] [data-l="townlink"] {
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}
[data-l-here] [data-l="townicon"] { color: var(--accent); }

/* --- Testimonials: the homepage's band (home.css), arrows for its dots --- */

[data-l="reviews"] {
  background:
    linear-gradient(rgba(0, 0, 0, 0.90), rgba(0, 0, 0, 0.90)),
    var(--pr-reviews-image) center / cover no-repeat,
    var(--ink);
  box-shadow: var(--shadow-band);
  padding: clamp(40px, 5.57vw, 107px) clamp(16px, 5.05vw, 97px) clamp(40px, 4.84vw, 93px);
}

[data-l="reviewframe"] {
  border: 2px solid var(--paper);
  border-radius: clamp(12px, 1.30vw, 25px);
  padding: clamp(44px, 6vw, 120px) clamp(20px, 2.03vw, 39px) clamp(40px, 4.17vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-l="reviewhead"] { align-items: center; text-align: center; }
[data-l="reviewhead"] .pr-lockup__eyebrow {
  color: var(--paper);
  margin-bottom: clamp(6px, 0.63vw, 12px);
}

/* All slides in one grid cell: the frame is as tall as the longest quote. */
[data-l="reviewstack"] {
  display: grid;
  width: 100%;
}
[data-l="reviewslide"] {
  grid-area: 1 / 1;
  /* Every quote starts at the top, right under the title (BugHerd #131). */
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility .32s;
}
[data-l="reviewslide"][data-active="1"] {
  opacity: 1;
  visibility: visible;
}

/* Wider than the homepage's 949px: these quotes run long (one is ~1,400
   characters), and every line saved comes off the band's height. */
[data-l="quote"] {
  margin: clamp(20px, 1.77vw, 34px) 0 0;
  max-width: 1240px;
}
[data-l="quote"] p {
  margin: 0;
  font-size: var(--quote);
  line-height: var(--leading-quote);
  color: var(--paper);
  text-align: center;
  text-wrap: pretty;
}

[data-l="client"] {
  margin-top: clamp(26px, 2.60vw, 50px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--client-name);
  line-height: 1.1;
  color: var(--paper);
  text-transform: uppercase;
  text-align: center;
}
[data-l="clienttitle"] {
  display: block;
  margin-top: 8px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--surface);
}

/* The arrows sit where the homepage's dots do, in the rail's round buttons. */
[data-l="reviewnav"] {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(26px, 2.40vw, 46px);
}
[data-l="reviewnav"][hidden] { display: none; }
[data-l="reviewprev"],
[data-l="reviewnext"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: var(--paper);
  background: transparent;
  border: 2px solid var(--paper);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
[data-l="reviewprev"]:hover,
[data-l="reviewnext"]:hover { background: var(--paper); color: var(--ink); }

/* --- Services grid -------------------------------------------------------- */
/* The Services pages' cards (service.css: svcard) set light: paper card,
   surface border, ink words; the ring fills ink on hover. Hover lifts the one
   card and zooms its photo; nothing else dims (bailey, 2026-10-22). */

[data-l="services"] {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: clamp(56px, 6.25vw, 120px);
}
[data-l="serviceshead"] { margin-bottom: clamp(28px, 2.6vw, 50px); }
[data-l="serviceshead"] .pr-sectionhead { align-items: center; text-align: center; }
[data-l="serviceshead"] .pr-rule { margin-left: auto; margin-right: auto; }

/* Flex, not grid, so a short last row sits centred (eleven services). */
[data-l="servicegrid"] {
  --pr-l-cols: 3;
  --pr-l-sgap: clamp(16px, 1.25vw, 24px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pr-l-sgap);
  margin: 0;
  padding: 0;
  list-style: none;
}
[data-l="servicecell"] {
  display: flex;
  flex: 0 0 calc((100% - (var(--pr-l-cols) - 1) * var(--pr-l-sgap)) / var(--pr-l-cols));
  min-width: 0;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}

[data-l="service"] {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  transition: box-shadow .5s ease, border-color .4s ease;
}

[data-l="servicephoto"] {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--surface);
}
[data-l="servicephoto"] img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

[data-l="servicefoot"] {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.04vw, 20px);
  padding: clamp(18px, 1.46vw, 28px);
}

[data-l="servicering"] {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(44px, 2.92vw, 56px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--surface);
  transition: background-color .4s ease, border-color .4s ease;
}
[data-l="serviceicon"] {
  width: 50%;
  height: 50%;
  color: var(--ink);
  transition: color .4s ease;
}

[data-l="servicename"] {
  flex: 0 1 auto;
  min-width: 0;
  padding-bottom: 4px;
  font-family: var(--font-display);
  font-size: var(--card-title);
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
  /* The red underline, drawn in on hover. */
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 2px;
  transition: background-size .5s cubic-bezier(.22, .61, .36, 1);
}

[data-l="servicearrow"] {
  flex: none;
  margin-left: auto;
  width: 24px;
  height: 24px;
  color: var(--ink);
  opacity: .5;
  transform: translateX(-6px);
  transition: transform .45s ease, opacity .45s ease;
}

[data-l="servicecell"]:hover,
[data-l="servicecell"]:focus-within { transform: translateY(-6px); }
[data-l="servicecell"]:hover [data-l="service"],
[data-l="servicecell"]:focus-within [data-l="service"] { box-shadow: var(--shadow-tile-hover); }
[data-l="servicecell"]:hover [data-shot],
[data-l="servicecell"]:focus-within [data-shot] { transform: scale(1.06); }
[data-l="servicecell"]:hover [data-l="servicering"],
[data-l="servicecell"]:focus-within [data-l="servicering"] { background: var(--ink); border-color: var(--ink); }
[data-l="servicecell"]:hover [data-l="serviceicon"],
[data-l="servicecell"]:focus-within [data-l="serviceicon"] { color: var(--paper); }
[data-l="servicecell"]:hover [data-l="servicename"],
[data-l="servicecell"]:focus-within [data-l="servicename"] { background-size: 100% 2px; }
[data-l="servicecell"]:hover [data-l="servicearrow"],
[data-l="servicecell"]:focus-within [data-l="servicearrow"] { opacity: 1; transform: translateX(0); }

/* --- Closing card -------------------------------------------------------- */

[data-l="close"] {
  background: var(--paper);
  padding: 0 var(--gutter-page);
}

/* The card straddles the footer edge: site.js overwrites margin-bottom with
   the measured half-height. This is the pre-JS value, as on About. */
[data-l="ctawrap"] {
  position: relative;
  z-index: 5;
  padding-top: clamp(64px, 6.25vw, 120px);
  margin-bottom: clamp(-128px, -6.67vw, -52px);
}

[data-l="cta-row"] {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 2.4vw, 44px);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-cta);
  padding: clamp(32px, 4.84vw, 93px) clamp(24px, 4.06vw, 78px);
}

[data-l="ctacopy"] {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 0.94vw, 18px);
  flex: 1 1 420px;
  min-width: 0;
}
[data-l="ctacopy"] .pr-prose { max-width: 786px; }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1199px) {
  [data-l="servicegrid"] { --pr-l-cols: 2; }
  [data-l="areagrid"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 991px) {
  /* Titles and copy centre at tablet and below. */
  [data-l="areagrid"] { grid-template-columns: minmax(0, 1fr); }

  [data-l="lockup"] p { text-align: center; }


  [data-l="areacopy"] { align-items: center; text-align: center; }
  [data-l="blockgrid"] { grid-template-columns: minmax(0, 1fr); }
  [data-l="block"] { text-align: center; }
  /* Centred copy, but a list still reads down its left edge, sitting
     centred as a block. */
  [data-l="areabody"] ul,
  [data-l="blockbody"] ul {
    display: inline-block;
    max-width: 100%;
    text-align: left;
  }
  [data-l="areacard"] { width: 100%; max-width: 640px; margin: 0 auto; box-sizing: border-box; }

  [data-l="cta-row"] {
    flex-direction: column;
    text-align: center;
  }
  /* In a column the 420px basis becomes a HEIGHT. */
  [data-l="ctacopy"] { flex: 0 0 auto; }
}

@media (max-width: 575px) {
  /* Services on phones, as on the Services pages: one compact row per
     service — a small photo beside the ring, name and arrow — so eleven
     cards are not a long scroll; no lift, which a tap would only jolt. */
  [data-l="servicegrid"] { --pr-l-cols: 1; --pr-l-sgap: 10px; }
  [data-l="service"] { flex-direction: row; align-items: stretch; }
  [data-l="servicephoto"] { flex: 0 0 34%; aspect-ratio: auto; min-height: 88px; }
  [data-l="servicephoto"] img { position: absolute; inset: 0; }
  [data-l="servicefoot"] { flex: 1 1 auto; padding: 14px 16px; }
  [data-l="servicename"] { font-size: 20px; }
  [data-l="servicecell"]:hover,
  [data-l="servicecell"]:focus-within { transform: none; }

  /* Four-line banner titles at the 44px token floor: step down on phones. */
  [data-l="banner"] .pr-banner__title { font-size: clamp(32px, 9.5vw, 44px); }

  [data-l="shot"] { flex-basis: 78vw; }

  /* Panels: lighter padding so the copy is not a narrow column inside a
     padded section; the list sits centred as a block, its items left. */
  [data-l="block"] { padding: 28px 20px; border-radius: var(--radius-sm); }
  [data-l="blockbody"] ul { columns: 1; }
  [data-l="areabody"] li + li,
  [data-l="blockbody"] li + li { margin-top: 8px; }

  /* The towns card runs nearly edge to edge so two tiles fit a whole town
     name ("Hendersonville") on one line. */
  [data-l="areacard"] {
    width: calc(100% + var(--gutter-page));
    max-width: none;
    margin-left: calc(var(--gutter-page) / -2);
    margin-right: calc(var(--gutter-page) / -2);
    padding: 28px 14px;
    border-radius: var(--radius-sm);
  }
  [data-l="towns"] { gap: 8px; }
  [data-l="townlink"] {
    gap: 7px;
    min-height: 50px;
    padding: 0 10px;
    font-size: 15px;
    border-radius: 12px;
  }
  [data-l="townicon"] { width: 16px; height: 16px; }
  [data-l="townarrow"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  [data-l="track"] { scroll-behavior: auto; }
}

/* --- Banner: eyebrow over the town (BugHerd #125) ------------------------ */
/* The home Portfolio pair: the light sans eyebrow over the display title. */
[data-l="bannertitle"] { display: flex; flex-direction: column; }
[data-l="bannereyebrow"] {
  color: var(--paper);
  text-transform: none;
  margin-bottom: 0.1em;
}
@media (max-width: 991px) {
  [data-l="bannertitle"] { align-items: center; }
}

/* --- Testimonials on a phone (BugHerd #141, #142) ------------------------ */
/* Stacking every quote in one cell keeps the band still on desktop, but on a
   phone the longest quote is a full screen tall and a short one sat in a sea
   of black. Here only the active quote takes up room. The arrows move up
   to the right, above the quote, so they stay put while the band changes
   height from quote to quote (BugHerd #142). They sit CENTRED under the
   heading, not against the right edge (BugHerd #149). */
@media (max-width: 767px) {
  [data-l="reviewslide"]:not([data-active="1"]) { display: none; }
  [data-l="reviewframe"] { padding-top: clamp(32px, 9vw, 44px); }
  [data-l="reviewhead"] { order: 0; }
  [data-l="reviewnav"] {
    order: 1;
    align-self: center;
    margin-top: clamp(16px, 4vw, 24px);
  }
  [data-l="reviewstack"] { order: 2; }
  [data-l="reviewprev"],
  [data-l="reviewnext"] { width: 44px; height: 44px; }
}
