/* =========================================================
   JD Roofing (SW) Ltd
   Design language carried over from the Ace Contractors template:
   near-black ground, amber accent, Barlow Condensed display type,
   square corners throughout.
   ========================================================= */

/* ---------- Brand tokens (change colours here only) ---------- */
:root {
  --bg: #020202;
  --fg: #f0ede8;
  --card: #080808;
  --secondary: #111111;
  --muted: #888480;
  --primary: #f5b800;
  --primary-hover: #ffc81a;
  --on-primary: #020202;
  --border: rgba(240, 237, 232, 0.1);

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 4rem;
  --container: 80rem;
  --gutter: 1.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 768px) {
  :root { --gutter: 3rem; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 0.75rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Type helpers ---------- */
.eyebrow {
  color: var(--primary);
  font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 1rem;
}
.display {
  font-family: var(--font-display);
  font-weight: 900; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.01em;
}
.section-title { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1; }
.lead { color: var(--muted); font-weight: 300; line-height: 1.7; }
.accent { color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
  font-size: 0.875rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  padding: 1rem 2rem; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.2s; }
.btn:hover svg.arrow { transform: translateX(4px); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { border: 1px solid var(--border); color: var(--muted); font-weight: 600; }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--dark { background: var(--on-primary); color: var(--primary); font-weight: 900; }
.btn--dark:hover { background: #1a1a1a; }
.btn--outline-dark { border: 2px solid var(--on-primary); color: var(--on-primary); font-weight: 900; }
.btn--outline-dark:hover { background: var(--on-primary); color: var(--primary); }
.btn--sm { font-size: 0.75rem; padding: 0.625rem 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(2, 2, 2, 0.95);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--border);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand__logo { display: block; height: 2.25rem; width: auto; }
@media (min-width: 768px) { .brand__logo { height: 2.6rem; } }
.brand__mark {
  width: 2rem; height: 2rem; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; font-size: 0.875rem;
}
.brand__name {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  transition: color 0.2s;
}
.brand:hover .brand__name { color: var(--fg); }
.nav { display: none; align-items: center; gap: 1.75rem; }
.nav__link {
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; color: var(--muted);
  transition: color 0.2s;
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--primary); }
.nav__phone { display: inline-flex; align-items: center; gap: 0.4rem; }
.nav__phone svg { width: 13px; height: 13px; }
.nav__phone-num { display: none; }
.menu-toggle { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-right: -0.6rem; }
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.mobile-nav {
  background: var(--card); border-top: 1px solid var(--border);
  padding: 1.5rem var(--gutter); display: flex; flex-direction: column; gap: 1.5rem;
  max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav .nav__link { font-size: 0.875rem; }
@media (max-width: 359px) { .brand__logo { height: 1.9rem; } }
.nav__link, .nav .btn { white-space: nowrap; }
@media (min-width: 1024px) {
  .nav { display: flex; gap: 1.25rem; }
  .menu-toggle, .mobile-nav { display: none !important; }
}
@media (min-width: 1200px) { .nav { gap: 1.75rem; } }
@media (min-width: 1300px) { .nav__phone-num { display: inline; } }

/* ---------- Services mega-menu (desktop) ---------- */
.nav__item { position: relative; display: inline-flex; align-items: center; }
.nav__chev { width: 13px; height: 13px; opacity: 0.65; transform: rotate(90deg); transition: transform 0.2s var(--ease); }
.nav__item--menu > .nav__link { display: inline-flex; align-items: center; gap: 0.3rem; }
.nav__item--menu:hover .nav__chev, .nav__item--menu:focus-within .nav__chev { transform: rotate(-90deg); color: var(--primary); }
/* bridge the gap so the panel doesn't close when the cursor crosses it */
.nav__item--menu::after { content: ""; position: absolute; top: 100%; left: -1rem; right: -1rem; height: 1rem; }
.mega {
  position: absolute; top: calc(100% + 0.75rem); left: 0; z-index: 60;
  min-width: 32rem; background: var(--card); border: 1px solid var(--border);
  padding: 1.5rem; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}
.nav__item--menu:hover .mega, .nav__item--menu:focus-within .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2.5rem; }
.mega__head { font-family: var(--font-body); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }
.mega__link { display: block; padding: 0.4rem 0; font-size: 0.95rem; color: var(--fg); transition: color 0.15s; }
.mega__link:hover { color: var(--primary); }
.mega__all { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--primary); }
.mega__all svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .mega, .nav__chev { transition: none; } }

/* ---------- Services accordion (mobile) ---------- */
.m-acc { border: 0; }
.m-acc__summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; }
.m-acc__summary::-webkit-details-marker { display: none; }
.m-acc__summary .nav__chev { transform: rotate(90deg); }
.m-acc[open] .m-acc__summary .nav__chev { transform: rotate(-90deg); color: var(--primary); }
.m-acc__panel { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.6rem 0 0.25rem; padding-left: 1rem; border-left: 1px solid var(--border); }
.nav__link--sub { font-size: 0.8125rem; color: var(--muted); }
.nav__link--sub:hover { color: var(--primary); }

main { padding-top: var(--header-h); }

/* ---------- Image slots (placeholder until the photo exists) ---------- */
.figure { position: relative; width: 100%; overflow: hidden; background: var(--secondary); }
.figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.figure__ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 1rem; text-align: center; border: 1px dashed var(--border);
  font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(136, 132, 128, 0.8); line-height: 1.3;
}
.figure__ph svg { width: 20px; height: 20px; opacity: 0.6; }
.figure.is-loaded .figure__ph { display: none; }
.figure--fill { position: absolute; inset: 0; background: transparent; }
.figure--fill .figure__ph { border: 0; }
.figure--fill .figure__ph span { background: rgba(2, 2, 2, 0.7); padding: 0.5rem 0.75rem; }
[data-parallax] img, [data-parallax] video { transform: scale(1.18); will-change: transform; }
@media (prefers-reduced-motion: reduce) { [data-parallax] img, [data-parallax] video { transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h));
}
/* Small screens: the hero photo or video fills the hero behind the H1, under a dark gradient so the copy stays readable */
.hero__wedge { display: none; position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: var(--primary); }
.hero__media { position: absolute; inset: 0; background: var(--secondary); clip-path: inset(0); } /* clip-path keeps the video inside the hero on mobile Safari */
@media (max-width: 1199px) { .hero__media video { transform: none !important; } } /* no parallax drift behind the H1 on small screens */
.hero__media img { object-position: center 60%; }
.hero__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(2, 2, 2, 0.94) 0%, rgba(2, 2, 2, 0.78) 45%, rgba(2, 2, 2, 0.45) 100%);
}
.hero__media .figure__ph { justify-content: flex-start; padding-top: 1.5rem; }
.hero__bar { position: absolute; top: 0; left: 0; width: 6px; height: 100%; background: var(--primary); }
.hero__content { position: relative; width: 100%; padding-top: 4rem; padding-bottom: 5rem; }
.hero__inner { max-width: 56rem; }
.hero__title { font-size: clamp(3rem, 9vw, 8rem); line-height: 0.9; margin-bottom: 2rem; }
.hero__title .line { display: block; }
.hero__body { font-family: var(--font-body); font-size: 1.125rem; font-weight: 300; line-height: 1.7; max-width: 36rem; margin-bottom: 2.5rem; }
.hero__actions { display: flex; flex-direction: column; gap: 1rem; }
.hero__pause {
  position: absolute; right: var(--gutter); bottom: 1.5rem; z-index: 2; display: none;
  width: 2.75rem; height: 2.75rem; place-items: center;
  background: rgba(2, 2, 2, 0.7); border: 1px solid var(--border); color: var(--fg);
}
.hero__pause svg { width: 16px; height: 16px; }
.hero__pause .icon-play { display: none; }
.hero__pause[aria-pressed="true"] .icon-play { display: block; }
.hero__pause[aria-pressed="true"] .icon-pause { display: none; }
.hero--has-video .hero__pause { display: grid; }
@media (min-width: 640px) { .hero__actions { flex-direction: row; } }
@media (min-width: 768px) { .hero__content { padding-bottom: 7rem; } }
/* Wide screens: image panel on the left inside the amber wedge, black side with the copy on the right */
@media (min-width: 1200px) {
  .hero__wedge, .hero__media { display: block; width: 50%; right: auto; clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%); }
  .hero__media { background: transparent; }
  .hero__media::after { display: none; }
  .hero__media img, .hero__media video { mix-blend-mode: multiply; }
  .hero__media .figure__ph { justify-content: center; padding-top: 1rem; }
  .hero__bar { left: auto; right: 0; }
  .hero__content.container { max-width: none; }
  .hero__inner { max-width: 52rem; width: 50%; margin-left: auto; padding-left: 2rem; }
  .hero__title { font-size: clamp(4rem, 6.4vw, 7.5rem); }
  .hero__pause { right: auto; left: var(--gutter); }
}

/* Headline animation: lines rise in on load. Only runs when JS adds .anim and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .anim .hero__title .line { opacity: 0; transform: translateY(0.4em); animation: rise 0.8s var(--ease) forwards; }
  .anim .hero__title .line:nth-child(2) { animation-delay: 0.12s; }
  .anim .hero__title .line:nth-child(3) { animation-delay: 0.24s; }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Scroll reveal (fail safe: JS removes the hidden state, and a timer forces it) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .anim [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
  .anim [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* ---------- Warranty and accreditation logos (transparent PNGs on black, split by faint white lines) ---------- */
/* Sits above the hero and overlaps it by 2px, so nothing from the hero video can show along the seam */
.accreditations {
  position: relative; z-index: 2; margin-top: -2px; background: var(--bg);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.accreditations__list { display: grid; grid-template-columns: repeat(2, 1fr); }
.accreditations__list li {
  display: flex; align-items: center; justify-content: center;
  height: 9.5rem; padding: 1.5rem 1rem;
}
/* Phones and tablets: 2 x 2 grid, a cross of faint lines between the four logos */
.accreditations__list li:nth-child(odd) { border-right: 1px solid rgba(240, 237, 232, 0.16); }
.accreditations__list li:nth-child(-n+2) { border-bottom: 1px solid rgba(240, 237, 232, 0.16); }
.accreditations__list img { height: 76px; width: auto; max-width: 100%; object-fit: contain; }
.accreditations__list img.logo--wide { height: 54px; } /* CHAS is a wide logo: smaller so it carries the same weight */
/* Desktop: one row of four, faint lines between each logo */
@media (min-width: 768px) {
  .accreditations__list { grid-template-columns: repeat(4, 1fr); }
  .accreditations__list li { height: 10rem; border-bottom: 0 !important; border-right: 1px solid rgba(240, 237, 232, 0.16); }
  .accreditations__list li:last-child { border-right: 0; }
  .accreditations__list img { height: 96px; }
  .accreditations__list img.logo--wide { height: 72px; }
}

/* ---------- Assurances checklist under the logos: one line per point, three across on wide screens ---------- */
.assurances { border-bottom: 1px solid var(--border); background: var(--card); }
.assurances__list { display: flex; flex-direction: column; gap: 0.9rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.assurances__list li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 0.875rem; font-weight: 500; letter-spacing: 0.02em; color: var(--fg); line-height: 1.4;
}
.assurances__list svg {
  width: 1.25rem; height: 1.25rem; flex-shrink: 0; padding: 0.2rem;
  background: var(--primary); color: var(--on-primary);
}
@media (min-width: 1200px) {
  .assurances__list { flex-direction: row; justify-content: space-between; align-items: center; gap: 2rem; }
  .assurances__list li { white-space: nowrap; align-items: center; }
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
/* The first section under a page hero sits closer: the hero already has its own bottom padding */
.page-hero + .section { padding-top: 3rem; }
@media (min-width: 768px) { .page-hero + .section { padding-top: 4rem; } }
.section--card { background: var(--card); }
.section--rule { border-top: 1px solid var(--border); }
.section-head { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 3.5rem; }
.section-head .lead { max-width: 24rem; font-size: 0.875rem; }
@media (min-width: 768px) {
  .section { padding: 7rem 0; }
  .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

/* ---------- Services grid ---------- */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.service-card { display: flex; flex-direction: column; height: 100%; background: var(--card); transition: background-color 0.2s; }
.service-card:hover { background: var(--secondary); }
.service-card .figure { aspect-ratio: 4 / 3; }
.service-card__body { padding: 2rem; display: flex; flex-direction: column; flex: 1; }
.service-card__title { font-size: 1.5rem; margin-bottom: 0.75rem; transition: color 0.2s; }
.service-card:hover .service-card__title { color: var(--primary); }
.service-card__text { font-size: 0.875rem; color: var(--muted); font-weight: 300; line-height: 1.7; flex: 1; }
.more {
  margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--primary);
}
.more svg { width: 14px; height: 14px; transition: transform 0.2s; }
.service-card:hover .more svg { transform: translateX(4px); }
.service-card--all { background: var(--primary); color: var(--on-primary); justify-content: center; }
.service-card--all:hover { background: var(--primary-hover); }
.service-card--all .service-card__title, .service-card--all:hover .service-card__title { color: var(--on-primary); font-size: 2rem; }
.service-card--all .service-card__text { color: rgba(2, 2, 2, 0.75); font-weight: 400; }
.service-card--all .more { color: var(--on-primary); }
.service-card--all:hover { background: var(--primary); } /* card is no longer one link, so no whole-card hover */
.service-card__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-top: 1.5rem; }
.service-card__actions .more { margin-top: 0; }
.service-card__actions .more:hover svg { transform: translateX(4px); }
.services-grid > [data-reveal] { height: 100%; }
/* Phones: compact two-up tiles, photo and title only, so seven services don't become one long column */
@media (max-width: 639px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card__body { padding: 0.875rem 0.875rem 1rem; }
  .service-card__title { font-size: 1.125rem; line-height: 1.05; margin-bottom: 0.5rem; }
  .service-card__text { display: none; }
  .service-card .more { margin-top: auto; font-size: 0.625rem; gap: 0.35rem; }
  .service-card .more svg { width: 12px; height: 12px; }
  .service-card .figure__ph { font-size: 0.5rem; padding: 0.5rem; }
  .service-card--all .service-card__title, .service-card--all:hover .service-card__title { font-size: 1.375rem; }
  .service-card__actions { margin-top: auto; gap: 0.75rem; width: 100%; }
  .service-card__actions .btn { width: 100%; padding: 0.75rem 0.25rem; font-size: 0.625rem; letter-spacing: 0.04em; white-space: nowrap; }
  .service-card__actions .btn svg { display: none; } /* no room for the arrow in a half-width tile */
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

/* The smaller services as one sentence of links under the four main tiles */
.services-also { max-width: 46rem; margin-top: 2rem; color: var(--muted); font-size: 1.05rem; line-height: 2; }
.services-also a { padding: 0.2rem 0; color: var(--fg); text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 5px; transition: color 0.2s; }
.services-also a:hover { color: var(--primary); }
.services-also .services-also__urgent { color: var(--primary); font-weight: 600; }

/* ---------- Key numbers strip ---------- */
.stats { border-bottom: 1px solid var(--border); }
.stats__list { display: grid; grid-template-columns: repeat(2, 1fr); }
.stats__list li { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.75rem 1rem 1.75rem 0; }
.stats__list li:nth-child(odd) { border-right: 1px solid var(--border); }
.stats__list li:nth-child(even) { padding-left: 1.25rem; }
.stats__list li:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
.stats__num { color: var(--primary); font-size: clamp(2.75rem, 9vw, 4.75rem); line-height: 0.85; }
.stats__num small { font-size: 0.42em; margin-left: 0.08em; }
.stats__label { max-width: 15rem; color: var(--muted); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; line-height: 1.45; }
@media (min-width: 900px) {
  .stats__list { grid-template-columns: repeat(4, 1fr); }
  .stats__list li, .stats__list li:nth-child(even) { padding: 2.75rem 1.75rem; border-bottom: 0; border-right: 0; }
  .stats__list li + li { border-left: 1px solid var(--border); }
  .stats__list li:first-child { padding-left: 0; }
}

/* ---------- Payment promise band ---------- */
.promise { background: var(--primary); color: var(--on-primary); }
.promise__grid { display: grid; gap: 2.5rem; padding-top: 4.5rem; padding-bottom: 4.5rem; }
@media (min-width: 900px) { .promise__grid { grid-template-columns: 1.1fr 1fr; gap: 4.5rem; align-items: center; padding-top: 6.5rem; padding-bottom: 6.5rem; } }
.promise .promise__eyebrow { color: var(--on-primary); opacity: 0.65; }
.promise__title { font-size: clamp(2.75rem, 7vw, 5.25rem); line-height: 0.9; max-width: 11ch; }
.promise__lede { max-width: 34rem; margin: 1.5rem 0 2rem; font-size: 1.05rem; font-weight: 500; line-height: 1.65; }
.promise__steps { counter-reset: promise; display: grid; gap: 1px; background: rgba(2, 2, 2, 0.2); border: 1px solid rgba(2, 2, 2, 0.2); }
.promise__steps li { counter-increment: promise; display: grid; grid-template-columns: 2.75rem 1fr; padding: 1.1rem 1.25rem; background: var(--primary); font-size: 0.92rem; line-height: 1.5; }
.promise__steps li::before { content: counter(promise, decimal-leading-zero); grid-row: span 2; font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.promise__steps strong { display: block; margin-bottom: 0.2rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.promise__quote { margin: 1.25rem 0 0; padding: 1.3rem 1.4rem; background: var(--on-primary); color: var(--fg); }
.promise__quote blockquote { margin: 0; font-size: 0.95rem; line-height: 1.6; }
.promise__quote figcaption { margin-top: 0.7rem; color: var(--primary); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }

/* Before/after sliders straight under a section heading need no extra gap */
.section-head + .ba-grid { margin-top: 0; }

/* ---------- Review platform logos (Checkatrade, TrustATrader): compact band between services and projects ---------- */
.review-logos { border-top: 1px solid var(--border); background: var(--card); }
.review-logos__inner { display: flex; flex-direction: column; gap: 1.75rem; padding-top: 3rem; padding-bottom: 3rem; }
.review-logos__head .eyebrow { margin-bottom: 0.5rem; }
.review-logos__title { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1; }
.review-logos__list { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid rgba(240, 237, 232, 0.16); }
.review-logos__slot { display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.review-logos__slot + .review-logos__slot { border-left: 1px solid rgba(240, 237, 232, 0.16); }
.review-logos__link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; max-width: 17rem; height: 100%;
  padding: 1.25rem 1rem; background: var(--fg); color: #1a1a19; transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.review-logos__link:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--primary); }
.review-logos__link img { height: 1.75rem; width: auto; max-width: 100%; }
.review-logos__link img.is-round { height: 3.75rem; }
.review-logos__score { font-size: 0.8125rem; font-weight: 600; text-align: center; line-height: 1.35; }
.review-logos__score b { font-size: 1.125rem; display: block; }
@media (min-width: 900px) {
  .review-logos__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 3rem; }
  .review-logos__list { flex: 0 1 40rem; }
  .review-logos__slot { padding: 1.5rem 2rem; }
}

/* ---------- Project carousel ---------- */
.carousel { position: relative; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 85%; gap: 1px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--border); border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__slide { scroll-snap-align: start; background: var(--card); }
.carousel__slide .figure { aspect-ratio: 4 / 3; }
.carousel__caption { padding: 1.25rem 1.5rem; }
.carousel__caption h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.carousel__caption p { font-size: 0.8125rem; color: var(--muted); font-weight: 300; }
.carousel__controls { display: flex; gap: 0.5rem; }
.carousel__btn {
  width: 3rem; height: 3rem; display: grid; place-items: center; border: 1px solid var(--border); color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.carousel__btn:hover { border-color: var(--primary); color: var(--primary); }
.carousel__btn svg { width: 18px; height: 18px; }
@media (min-width: 640px) { .carousel__track { grid-auto-columns: calc(50% - 0.5px); } }
@media (min-width: 1024px) { .carousel__track { grid-auto-columns: calc(33.333% - 0.67px); } }

/* ---------- Project strip: every Our Work photo in an endless loop (markup from build.py) ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.marquee__track { display: flex; gap: 1rem; width: max-content; animation: marquee var(--marquee-duration, 300s) linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track, .marquee.is-paused .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translate3d(calc(-50% - 0.5rem), 0, 0); } }
.marquee__item { flex: 0 0 auto; width: 17rem; background: var(--card); }
@media (min-width: 640px) { .marquee__item { width: 20rem; } }
@media (min-width: 1024px) { .marquee__item { width: 23rem; } }
.marquee__link { display: block; }
.marquee__item .figure { aspect-ratio: 4 / 3; }
.marquee__item .figure img { transition: transform 0.6s var(--ease); }
.marquee__link:hover .figure img { transform: scale(1.05); }
.marquee__caption { padding: 1.1rem 1.25rem 1.25rem; }
.marquee__title { font-size: 1.2rem; margin-bottom: 0.25rem; transition: color 0.2s; }
.marquee__caption p + p { font-size: 0.8125rem; color: var(--muted); font-weight: 300; }
.marquee__link:hover .marquee__title, .marquee__link:focus-visible .marquee__title { color: var(--primary); }
.marquee__link:focus-visible { outline-offset: -3px; }
.marquee__all { margin-top: 2.5rem; }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter); -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; }
  .marquee__item { scroll-snap-align: start; }
  .marquee__item[aria-hidden="true"] { display: none; }
  .marquee__link:hover .figure img { transform: none; }
}

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.review-card { background: var(--card); padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; margin: 0; }
.review-card__stars { color: var(--primary); letter-spacing: 0.15em; font-size: 0.875rem; }
.review-card blockquote { margin: 0; font-size: 1rem; line-height: 1.6; font-weight: 300; flex: 1; }
.review-card figcaption { font-size: 0.8125rem; color: var(--muted); }
.review-card figcaption strong { color: var(--fg); display: block; font-weight: 600; }
.review-card figcaption a { color: var(--primary); }
.reviews-more { margin-top: 1.5rem; font-size: 0.875rem; color: var(--muted); }
.reviews-more a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 768px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Intro / who we are ---------- */
.intro__grid { display: grid; gap: 4rem; align-items: center; }
.intro__title { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; margin-bottom: 2rem; }
.intro__copy p { margin-bottom: 1.5rem; }
.ticks { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 2rem 0 2.5rem; }
.ticks li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.875rem; color: var(--muted); font-weight: 300; }
.ticks li::before { content: ""; width: 6px; height: 6px; background: var(--primary); flex-shrink: 0; margin-top: 0.5rem; }
.framed { position: relative; max-width: 36rem; width: 100%; margin: 0 auto; }
.framed .figure { aspect-ratio: 4 / 3; position: relative; z-index: 1; }
.framed::before { content: ""; position: absolute; left: -1rem; bottom: -1rem; width: 6rem; height: 6rem; background: var(--primary); }
.framed::after { content: ""; position: absolute; right: -1rem; top: -1rem; width: 6rem; height: 6rem; border: 2px solid var(--primary); }
@media (min-width: 480px) { .ticks { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .intro__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Locations ---------- */
.areas-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.areas-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: var(--bg); padding: 1rem 1.25rem; font-size: 0.875rem; font-weight: 500; transition: background-color 0.2s, color 0.2s;
}
.areas-list li { display: flex; } /* each tile fills its row, even when a neighbour wraps to two lines */
.areas-list li > a { flex: 1; }
.areas-list a::after { content: "\203A"; color: var(--primary); font-size: 1.25rem; line-height: 1; }
.areas-list a:hover { background: var(--secondary); color: var(--primary); }
.areas__more { margin-top: 2rem; }
.text-link { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }
.areas-list a.areas-list__other { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.areas-list a.areas-list__other::after { color: var(--on-primary); }
.areas-list a.areas-list__other:hover { background: var(--primary-hover); color: var(--on-primary); }
/* 17 towns + the "Get a Free Quote" tile = 18, which divides evenly into 2, 3 and 6 columns */
@media (min-width: 640px) { .areas-list { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .areas-list { grid-template-columns: repeat(6, 1fr); } }

/* ---------- CTA band ---------- */
.cta-band { background: var(--primary); padding: 4rem 0; }
.cta-band__inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 2rem; text-align: center; }
.cta-band__title { font-size: clamp(2rem, 5vw, 4rem); color: var(--on-primary); line-height: 1; }
.cta-band__actions { display: flex; flex-direction: column; gap: 1rem; flex-shrink: 0; width: 100%; }
@media (min-width: 640px) { .cta-band__actions { flex-direction: row; width: auto; } }
@media (min-width: 900px) { .cta-band__inner { flex-direction: row; text-align: left; } }

/* ---------- Map ---------- */
.map-section { border-top: 1px solid var(--border); }
.map-section__grid { display: grid; }
.map-section__info { padding: 4rem var(--gutter); }
.map-section__info address { font-style: normal; color: var(--muted); font-weight: 300; margin: 1rem 0 1.5rem; line-height: 1.8; }
.map-section__frame { min-height: 320px; position: relative; background: var(--secondary); }
.map-section__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(0.92) contrast(0.9); }
@media (min-width: 900px) {
  .map-section__grid { grid-template-columns: minmax(20rem, 1fr) 2fr; }
  .map-section__info { padding: 5rem 3rem; }
  .map-section__frame { min-height: 420px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--card); border-top: 1px solid var(--border); }
.footer__grid { display: grid; gap: 3rem; padding-top: 4rem; padding-bottom: 4rem; }
.footer__brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.footer__logo { display: block; height: 2.75rem; width: auto; }
.footer__nap { font-style: normal; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: var(--muted); font-weight: 300; }
.footer__nap a, .footer__nap span { display: flex; align-items: flex-start; gap: 0.75rem; }
.footer__nap a:hover { color: var(--primary); }
.footer__nap svg { width: 14px; height: 14px; color: var(--primary); flex-shrink: 0; margin-top: 0.3rem; }
.footer__heading { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 1.25rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer__links a { font-size: 0.875rem; color: var(--muted); font-weight: 300; transition: color 0.2s; }
.footer__links a:hover { color: var(--primary); }
.footer__links span { font-size: 0.875rem; color: var(--muted); font-weight: 300; }
.footer__links--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1.5rem; }
.footer__creds { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.footer__creds li { border: 1px solid var(--border); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.35rem 0.6rem; color: var(--muted); }
.bottom-bar { border-top: 1px solid var(--border); }
.bottom-bar .container {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-top: 1.5rem; padding-bottom: 1.5rem; text-align: center;
}
.bottom-bar__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1.5rem; }
.bottom-bar p, .bottom-bar a { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.bottom-bar a:hover { color: var(--primary); }
.bottom-bar .bottom-bar__brand { color: var(--primary); font-weight: 600; }
.bottom-bar .bottom-bar__reg { flex-basis: 100%; text-transform: none; letter-spacing: 0.02em; line-height: 1.5; }
.bottom-bar__credit { white-space: nowrap; }
@media (min-width: 640px) { .bottom-bar__legal { justify-content: flex-start; } }
.bottom-bar .bottom-bar__brand:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-bar .container { flex-direction: row; text-align: left; }
}
@media (min-width: 640px) { .footer__col--services, .footer__col--areas { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.1fr 0.8fr 2fr 1.5fr; }
  .footer__col--services, .footer__col--areas { grid-column: auto; }
}

/* =========================================================
   Generated inner pages (services, areas, hubs, blog, about)
   ========================================================= */
.page-hero { border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; top: 0; left: 0; width: 6px; height: 100%; background: var(--primary); }
.page-hero .container { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: rgba(240, 237, 232, 0.25); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current] { color: var(--fg); }
.page-hero__title { font-size: clamp(2.5rem, 6vw, 4.5rem); margin: 1.5rem 0; max-width: 18ch; }
.page-hero__lede { font-size: 1.125rem; max-width: 42rem; margin-bottom: 2rem; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.page-hero__media { position: relative; margin-top: 3rem; }
.page-hero__media .figure { aspect-ratio: 21 / 9; }
.page-hero__media::before { content: ""; position: absolute; left: -0.75rem; top: 0; bottom: 0; width: 6px; background: var(--primary); z-index: 1; }
.trust-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.trust-row li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.trust-row li::before { content: ""; width: 6px; height: 6px; background: var(--primary); }

.article { padding: 4rem 0 6rem; }
.article__grid { display: grid; gap: 3rem; grid-template-columns: minmax(0, 1fr); } /* minmax(0) lets wide tables scroll instead of stretching the page on phones */
.article__aside { display: flex; flex-direction: column; gap: 2rem; }
.toc { border: 1px solid var(--border); padding: 1.5rem; }
.toc__title, .aside-cta__title { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--primary); margin-bottom: 1rem; }
.toc ol { display: flex; flex-direction: column; gap: 0.6rem; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 0.75rem; font-size: 0.875rem; color: var(--muted); }
.toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-display); font-weight: 900; color: var(--primary); }
.toc a:hover { color: var(--fg); }
.aside-cta { background: var(--card); border: 1px solid var(--border); padding: 1.5rem; }
.aside-cta p { font-size: 0.875rem; color: var(--muted); font-weight: 300; margin-bottom: 1.25rem; }
.aside-cta .btn { width: 100%; }
.aside-cta__phone { display: block; text-align: center; margin-top: 1rem; color: var(--primary); font-weight: 600; }
@media (min-width: 1024px) {
  .article__grid { grid-template-columns: 17rem minmax(0, 1fr); gap: 4rem; }
  .article__aside { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}

.prose { max-width: 46rem; color: var(--muted); font-weight: 300; line-height: 1.75; }
.prose > * + * { margin-top: 1.25rem; }
.prose h2 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; color: var(--fg); font-size: clamp(1.75rem, 3.5vw, 2.25rem); line-height: 1.05; margin-top: 3.5rem; }
.prose h3 { color: var(--fg); font-size: 1.0625rem; font-weight: 600; margin-top: 2rem; }
.prose > :first-child { margin-top: 0; } /* the section's own padding already spaces the opening heading */
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul li, .prose ol li { position: relative; padding-left: 1.5rem; margin-top: 0.6rem; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; background: var(--primary); }
.prose ol { counter-reset: steps; }
.prose ol li { counter-increment: steps; padding-left: 2.5rem; }
.prose ol li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; font-family: var(--font-display); font-weight: 900; color: var(--primary); font-size: 1.125rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 32rem; }
.prose th, .prose td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--fg); font-weight: 600; background: var(--card); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.prose tr:last-child td { border-bottom: 0; }
.prose details { border-top: 1px solid var(--border); padding: 1rem 0; margin-top: 0; }
.prose details:last-of-type { border-bottom: 1px solid var(--border); }
.prose summary { cursor: pointer; color: var(--fg); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; color: var(--primary); font-size: 1.25rem; line-height: 1; }
.prose details[open] summary::after { content: "\2212"; }
.prose details p { margin-top: 0.75rem; }
.also-serve { border: 1px solid var(--border); background: var(--card); padding: 1.5rem; margin-top: 3.5rem; }
.also-serve h2 { margin-top: 0; font-size: 1.5rem; }
.also-serve ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; }
.also-serve li { padding-left: 0 !important; margin-top: 0 !important; }
.also-serve li::before { display: none; }

.coming-soon { text-align: left; max-width: 40rem; }
.coming-soon .btn { margin-top: 2rem; }

.card-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 2rem; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Contact page ---------- */
.contact__grid { display: grid; gap: 3rem; }
.contact__list { display: flex; flex-direction: column; gap: 1.5rem; margin: 2rem 0; }
.contact__label { display: block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); font-weight: 600; margin-bottom: 0.25rem; }
.contact__value { font-style: normal; font-size: 1.125rem; }
.contact__value--big { font-family: var(--font-display); font-weight: 900; font-size: 2.5rem; line-height: 1; }
.contact__map { position: relative; min-height: 420px; background: var(--secondary); }
.contact__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(0.92) contrast(0.9); }
/* Click-to-load map: a placeholder until the visitor asks for Google Maps */
.map-load { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center;
  background-color: var(--secondary);
  background-image: linear-gradient(rgba(240, 237, 232, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(240, 237, 232, 0.05) 1px, transparent 1px);
  background-size: 48px 48px; }
.map-load__inner { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; max-width: 22rem; }
.map-load__inner > svg { width: 34px; height: 34px; color: var(--primary); }
.map-load__addr { color: var(--fg); font-weight: 500; line-height: 1.5; }
.map-load__note { color: var(--muted); font-size: 0.75rem; }
.map-load iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(0.92) contrast(0.9); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1fr 1.4fr; } }

/* ---------- Photos inside page copy ---------- */
.prose-figure { margin: 2.5rem 0; }
.prose-figure img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--secondary); }
.prose-figure figcaption { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--muted); border-left: 3px solid var(--primary); padding-left: 0.75rem; }

/* ---------- Our Work: shared caption ---------- */
.work-caption { padding: 1.25rem 1.5rem 1.5rem; background: var(--card); }
.work-caption h3 { font-size: 1.375rem; line-height: 1.1; }
.work-caption__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.8125rem; color: var(--muted); }
.work-caption__tags a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.work-caption__tags a:hover { color: var(--primary-hover); }

/* ---------- Our Work: before / after slider ---------- */
.ba-grid { display: grid; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 900px) { .ba-grid { grid-template-columns: repeat(2, 1fr); } }
.ba { margin: 0; border: 1px solid var(--border); }
.ba__frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--secondary); user-select: none; touch-action: pan-y; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--primary); pointer-events: none; }
.ba__handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 2.75rem; height: 2.75rem; transform: translate(-50%, -50%);
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23020202' stroke-width='2.5'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 1.25rem no-repeat;
}
.ba__tag { position: absolute; top: 1rem; padding: 0.35rem 0.6rem; background: rgba(2, 2, 2, 0.75); color: var(--fg); font-family: var(--font-display); font-weight: 900; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; pointer-events: none; }
.ba__tag--before { left: 1rem; }
.ba__tag--after { right: 1rem; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba__range:focus-visible + .ba__handle, .ba__frame:has(.ba__range:focus-visible) .ba__handle::after { outline: 3px solid var(--fg); outline-offset: 2px; }

/* ---------- Our Work: filters and gallery ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.chip { font: inherit; font-size: 0.8125rem; font-weight: 500; padding: 0.55rem 1rem; color: var(--fg); background: transparent; border: 1px solid var(--border); cursor: pointer; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.work-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 2rem; }
@media (min-width: 640px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }
.work-card { margin: 0; display: flex; flex-direction: column; background: var(--card); }
.work-card[hidden] { display: none; }
.work-card .figure { aspect-ratio: 4 / 3; }
.work-card .work-caption { flex: 1; }

/* ---------- In-page images on service and area pages (placed by build.py) ---------- */
.pfig { margin: 2.5rem 0; }
.pfig img { display: block; width: 100%; object-fit: cover; background: var(--secondary); }
.pfig figcaption { margin-top: 0.75rem; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); border-left: 3px solid var(--primary); padding-left: 0.75rem; }
.pfig--wide img { aspect-ratio: 16 / 9; }
.pfig--side img { aspect-ratio: 4 / 5; }
.pfig__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.pfig__pair img { aspect-ratio: 1 / 1; }
.pfig.ba { border: 0; }
.pfig.ba .ba__frame { aspect-ratio: 4 / 3; }
.pfig.ba figcaption { margin-top: 0.75rem; }
@media (min-width: 768px) {
  .prose .pfig--side { float: right; width: 42%; margin: 0.4rem 0 1.25rem 2rem; }
  .prose .pfig--wide { margin: 3rem 0; }
  .prose h2, .prose .pfig--wide, .prose .pfig--pair, .prose .table-wrap, .prose details, .prose .also-serve { clear: both; }
}

/* ---------- Area page testimonial ---------- */
.testimonial { margin: 2rem 0; padding: 1.75rem 1.5rem; border-left: 4px solid var(--primary); background: var(--secondary); }
.testimonial blockquote { margin: 0 0 1rem; }
.testimonial blockquote p { margin: 0; font-size: 1.0625rem; line-height: 1.6; font-style: italic; }
.testimonial figcaption { font-size: 0.8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.testimonial figcaption strong { color: var(--fg); }
.testimonial__job::before { content: "\2022"; margin-right: 0.75rem; color: var(--primary); }
.testimonial__src { flex-basis: 100%; }
.testimonial__src a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
