/* ============================================================
   Service landing pages — /services/<slug>/
   Loaded after site.css, so the tokens, nav, footer, buttons and the
   quote form all come from there. This file only styles what these
   pages add: a photographic hero, the trade's process, a photo strip,
   and the quote block. Plus the home-page grid's new link wrapper.

   These pages are ad destinations: everything here is static layout,
   one eager image, no script-driven animation. Load speed feeds the
   ads' quality score and therefore the cost of every click.
   ============================================================ */

.svc-page .nav { position: sticky; top: 0; }

/* ---------------- hero ---------------- */
.svc-hero {
  position: relative;
  /* The photograph is the whole first screen below the sticky nav; the
     nav's height is measured by js/hero-pan.js. The floor keeps the copy
     from colliding with itself on a very short window. */
  --nav-h: 78px;
  min-height: 520px;
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  display: grid;
  align-items: end;
  color: #fff;
  background: var(--navy);
  overflow: hidden;
}
.svc-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* favour the top of the picture: the roofline or ceiling, not the
     ground, is what the crop should keep */
  object-position: 50% 28%;
}
/* A hero clip is laid out exactly like the still; the browser keeps the
   poster up until the first frame decodes, so there is no flash. */
.svc-hero__video { background: var(--navy); }
.svc-hero__scrim {
  position: absolute;
  inset: 0;
  /* legible copy over any photograph, without flattening the top of it */
  background:
    linear-gradient(to top, rgba(16, 18, 20, 0.88) 0%, rgba(16, 18, 20, 0.55) 45%, rgba(16, 18, 20, 0.08) 100%);
}
.svc-hero__body {
  position: relative;
  /* the same gutter the rest of the site uses; without it the copy sat
     flush against the left edge of the photograph */
  padding: 120px clamp(20px, 6vw, 96px) clamp(36px, 6vh, 64px);
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: content-box;
}
.svc-hero__eyebrow { color: rgba(255, 255, 255, 0.8); }
.svc-hero__title {
  margin: 10px 0 14px;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.svc-hero__lede {
  max-width: 62ch;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 22px;
}
.svc-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}
.svc-hero__phone {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
}
.svc-hero__phone .tel-psi { color: #ff5a5a; }

/* ---------------- scroll-scrubbed hero ---------------- */
/* The home-page hero markup carrying a service's copy. The overlay there is
   pointer-events: none because nothing in it is clickable; here the quote
   button and phone number are, so only those take pointer events, and the
   long H1 is sized to fit beside them. */
.hero--svc .hero__title { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.05; max-width: 18ch; }
.hero--svc .hero__tagline { max-width: 62ch; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; font-family: inherit; font-style: normal; color: rgba(255, 255, 255, 0.92); }
.hero--svc .svc-hero__actions { margin-top: 22px; pointer-events: auto; }
.hero--svc .hero__scrollcue { margin-top: 28px; }
/* the copy fades with scroll on the home page; keep that, but never let the
   button vanish while it is still the thing to click */
.hero--svc .hero__overlay { opacity: 1; }
.hero--svc .hero__eyebrow, .hero--svc .hero__title, .hero--svc .hero__tagline, .hero--svc .hero__scrollcue {
  opacity: calc(1 - var(--hero-progress, 0) * 2.6);
}
.hero--svc .svc-hero__actions { opacity: calc(1 - var(--hero-progress, 0) * 1.4); }
@media (max-width: 760px) {
  .hero--svc .hero__scrollcue { display: none; }
}

/* ---------------- process ---------------- */
.svc-steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.svc-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 26px 24px;
  background: #fff;
}
.svc-step h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.01em; }

/* Expandable step: the summary carries the number/title/one-liner layout
   the card always had; the long text opens beneath. */
.svc-step { display: block; padding: 0; }
.svc-step__details { background: #fff; }
.svc-step__summary {
  display: grid;
  grid-template-columns: 44px 1fr 24px;
  gap: 16px;
  padding: 26px 24px;
  cursor: pointer;
  list-style: none;
}
.svc-step__summary::-webkit-details-marker { display: none; }
.svc-step__summary:hover { background: #fafafa; }
.svc-step__summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.svc-step__head { min-width: 0; }
.svc-step__chev {
  width: 10px; height: 10px; margin-top: 8px; justify-self: end;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 180ms ease;
}
.svc-step__details[open] .svc-step__chev { transform: rotate(225deg); margin-top: 14px; }
.svc-step__more { padding: 0 24px 26px 84px; }
.svc-step__more p { margin: 0; font-size: 15px; line-height: 1.65; color: #333; max-width: 68ch; }
@media (max-width: 760px) {
  .svc-step__summary { grid-template-columns: 36px 1fr 20px; padding: 20px 18px; }
  .svc-step__more { padding: 0 18px 22px 18px; }
}
@media (prefers-reduced-motion: reduce) { .svc-step__chev { transition: none; } }
.svc-step__n {
  margin: 0;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.svc-step__d { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* ---------------- quote ---------------- */
.svc-quote .lede a { color: inherit; font-weight: 600; }
.svc-quote__box { margin-top: 22px; }

@media (max-width: 760px) {
  .svc-hero { min-height: 72svh; }
  .svc-hero__body { padding-top: 96px; }
  .svc-steps { grid-template-columns: 1fr; }
}

/* ---------------- work reel: every job photograph, at the foot ----------------
   One height for every slide (--reel-h); a landscape shot runs wider. The
   slide in the middle is full size, the rest rest at scale(.78) and are
   brought up by js/work-reel.js as they approach the middle. */
.svc-reel {
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}
.svc-reel .section__inner {
  padding: 0 clamp(20px, 6vw, 96px);
}
.svc-reel .section__title {
  margin-bottom: 10px;
}
.svc-reel .lede {
  margin-bottom: 28px;
}
.reel {
  --reel-h: clamp(240px, 40vh, 460px);
  position: relative;
}
.reel__rail {
  display: flex;
  align-items: center;
  gap: 18px;
  height: calc(var(--reel-h) + 32px);
  padding: 16px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  outline: none;
}
.reel__rail::-webkit-scrollbar {
  display: none;
}
.reel__rail:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.reel__slide {
  position: relative;
  flex: 0 0 auto;
  height: var(--reel-h);
  aspect-ratio: var(--ar, 4 / 3);
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #2a3442;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  scroll-snap-align: center;
  cursor: pointer;
  transform: scale(0.78);
  opacity: 0.55;
  will-change: transform, opacity;
}
/* The first photograph snaps to the left edge, the rest to the middle. */
.reel__slide:first-child {
  scroll-snap-align: start;
}
.reel__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel__slide.is-on {
  cursor: zoom-in;
}
.reel__phase {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(29, 39, 51, 0.92);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
}
.reel__phase--after {
  background: var(--accent);
}

.reel__arrow {
  position: absolute;
  top: calc(16px + var(--reel-h) / 2);
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.reel__arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.reel__arrow--prev {
  left: clamp(12px, 3vw, 40px);
}
.reel__arrow--next {
  right: clamp(12px, 3vw, 40px);
}

/* The caption for whichever photograph is in the middle. Fixed height so
   the page does not jump as captions of different lengths come and go. */
.reel__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  min-height: 72px;
  margin: 14px auto 0;
  padding: 0 clamp(20px, 6vw, 96px);
  color: #fff;
}
.reel__cap {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}
.reel__job {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}
.reel__text {
  color: rgba(255, 255, 255, 0.72);
}
.reel__meta {
  margin: 0;
  flex: 0 0 auto;
  text-align: right;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}
.reel__count {
  display: block;
  margin-bottom: 6px;
}
.reel__open {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.reel__open:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 760px) {
  .reel {
    --reel-h: min(62vw, 300px);
  }
  .reel__rail {
    gap: 12px;
  }
  .reel__arrow {
    display: none;
  }
  .reel__foot {
    flex-direction: column;
    gap: 8px;
    min-height: 96px;
  }
  .reel__meta {
    text-align: left;
  }
  .reel__count {
    display: inline;
    margin: 0 12px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reel__rail {
    scroll-behavior: auto;
  }
}

/* ---------------- reveal hero: the photograph first, the copy on scroll ----------------
   The section is taller than the screen; its stage sticks under the nav
   while the section scrolls by, and --pan (0..1, set by js/hero-pan.js)
   lifts the copy in over the later part of that scroll. On a
   .svc-hero--pan page the photograph also slides up, top edge to bottom
   edge, over the whole scroll. With no script --pan defaults to 1 and the
   finished state simply shows. */
.svc-hero--reveal {
  --pan: 1;
  --travel: 0.6;               /* screens of scroll beyond the stage */
  --stage-h: calc(100vh - var(--nav-h));
  --stage-h: calc(100svh - var(--nav-h));
  display: block;
  /* the base hero clips; a clipping ancestor stops the stage sticking */
  overflow: visible;
  min-height: 0;
  height: calc(var(--stage-h) * (1 + var(--travel)));
}
.svc-hero--pan {
  --travel: 1;
}
.svc-hero--reveal .svc-hero__stage {
  position: sticky;
  top: var(--nav-h);
  height: var(--stage-h);
  display: grid;
  align-items: end;
  overflow: hidden;
}
.svc-hero--pan .svc-hero__img {
  /* The photograph at its own proportions (portrait, 3:4) so the pan runs
     from its top edge to its bottom edge; on a narrow screen that would be
     shorter than the stage, so it is at least 1.4 stages tall and cropped
     at the sides instead. */
  --img-h: max(calc(var(--stage-h) * 1.4), calc(100vw * 4 / 3));
  height: var(--img-h);
  object-position: 50% 50%;
  /* --pan-start (set on the section) is how far down the picture the pan
     opens; the scroll covers the rest of the way to the bottom edge. */
  --at: calc(var(--pan-start, 0) + var(--pan) * (1 - var(--pan-start, 0)));
  transform: translateY(calc(var(--at) * (var(--stage-h) - var(--img-h))));
  will-change: transform;
}
.svc-hero--reveal .svc-hero__scrim {
  opacity: calc(0.1 + var(--pan) * 0.9);
}
.svc-hero--reveal .svc-hero__body {
  --in: clamp(0, (var(--pan) - 0.4) / 0.45, 1);
  opacity: var(--in);
  transform: translateY(calc((1 - var(--in)) * 48px));
}
.svc-hero--reveal .svc-hero__cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: calc(1 - var(--pan) * 4);
  pointer-events: none;
}
.svc-hero--reveal .svc-hero__cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 34px;
  margin: 10px auto 0;
  background: currentColor;
  opacity: 0.7;
  animation: svc-cue 1.6s ease-in-out infinite;
}
@keyframes svc-cue {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

/* The quote button is the one thing meant to pop on every page. */
.svc-hero .btn {
  background: var(--accent);
  border-color: var(--accent);
}
.svc-hero .btn:hover {
  background: #b00000;
  border-color: #b00000;
}

/* Lettering over a pale photograph: navy and ink on a cream fade, so the
   words read against a white house or a bright room. */
.svc-hero--light {
  color: var(--ink);
}
.svc-hero--light .svc-hero__scrim {
  background:
    linear-gradient(to top, rgba(247, 246, 243, 0.96) 0%, rgba(247, 246, 243, 0.78) 40%, rgba(247, 246, 243, 0) 100%);
}
.svc-hero--light .svc-hero__eyebrow { color: var(--navy); }
.svc-hero--light .svc-hero__title { color: var(--navy); }
.svc-hero--light .svc-hero__lede { color: #2b3137; }
.svc-hero--light .svc-hero__phone { color: var(--ink); }
.svc-hero--light .svc-hero__phone .tel-psi { color: var(--accent); }
.svc-hero--light .svc-hero__cue { color: rgba(16, 18, 20, 0.75); }

@media (prefers-reduced-motion: reduce) {
  .svc-hero--reveal { height: auto; min-height: clamp(520px, 78vh, 760px); }
  .svc-hero--reveal .svc-hero__stage { position: relative; top: 0; height: auto; min-height: clamp(520px, 78vh, 760px); }
  .svc-hero--pan .svc-hero__img { height: 100%; transform: none; }
  .svc-hero--reveal .svc-hero__cue { display: none; }
}

/* ---------------------------------------------------------------
   Other work we do — every service page links to the rest.
   --------------------------------------------------------------- */
.svc-more {
  display: block;
  background: #f4f5f6;
}
.svc-more__list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.svc-more__list a {
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(29, 39, 51, 0.12);
  border-radius: 6px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.svc-more__list a:hover,
.svc-more__list a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------------------------------------------------------------
   Location pages (areas/*, service-area): body copy, town zones,
   and the job cards — each card names the town it was built in.
   --------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.area-body__inner { max-width: 760px; }
.area-body .lede { margin-top: 18px; }
.area-zones .section__inner { max-width: 960px; }
.area-zone { padding: 28px 0; border-bottom: 1px solid rgba(29, 39, 51, 0.12); }
.area-zone h3 { margin: 0 0 8px; font-size: clamp(22px, 2.4vw, 30px); color: var(--navy); }
.area-zone__group { margin-top: 16px; }
.area-zone__group p:last-child { margin: 6px 0 0; line-height: 1.7; }
.area-note {
  margin-top: 28px;
  padding: 18px 20px;
  background: #f4f5f6;
  border-left: 3px solid var(--accent);
}
.area-jobs__grid {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.area-job {
  background: #fff;
  border: 1px solid rgba(29, 39, 51, 0.12);
  border-radius: 6px;
  overflow: hidden;
}
.area-job__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.area-job__body { padding: 16px 18px 20px; }
.area-job__town {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.area-job__title { margin: 6px 0 8px; font-size: 18px; color: var(--navy); }
.area-job__desc { margin: 0; font-size: 15px; line-height: 1.55; opacity: 0.85; }
.area-also { margin-top: 22px; }
.area-also a { color: var(--navy); font-weight: 600; }
