/* GH Plumbing & Heating Services: this site's own styles (loads after the kit's). */

/* The phone header: the wide lockup was squeezed sideways by the flex row and ran into the call icon.
   Keep its shape, and keep it clear of the two buttons. */
@media (max-width: 639px) {
  .nav-logo-lg { width: auto; height: auto; max-height: 3.5rem; max-width: calc(100vw - 9.75rem); object-fit: contain; flex-shrink: 0; }
  .site-header.is-scrolled .nav-logo-lg { max-height: 2.75rem; }

  /* The home page's service cards ride a swipe rail on a phone (the page was 15,900px tall there). */
  #hero ~ #services .grid.gap-4 { display: flex; gap: 0.9rem; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -1rem; padding: 0 1rem 0.6rem; scrollbar-width: none; }
  #hero ~ #services .grid.gap-4::-webkit-scrollbar { display: none; }
  #hero ~ #services .grid.gap-4 > * { flex: 0 0 80%; scroll-snap-align: start; }
}

/* ---- A tighter page (the audit: 11,400px on a laptop and 15,900px on a phone against rivals' 6,900 and
   10,700). Home sections only (`#hero ~`): less air between them, shorter photos, the before and after
   side by side. The inner pages keep the kit's rhythm. */
#hero ~ section[data-ground] { padding-block: 3.5rem; }
@media (min-width: 640px) { #hero ~ section[data-ground] { padding-block: 4.75rem; } }
#hero ~ .on-brand { padding-block: 4rem; }

@media (min-width: 640px) {
  #hero ~ #services article > div:first-child { aspect-ratio: 16 / 10; }
  #work .rail > figure { aspect-ratio: 1 / 1; }
  #work .max-w-5xl.grid { max-width: 44rem; }
}
@media (max-width: 639px) {
  #work .rail > figure { aspect-ratio: 1 / 1; }
  #work .max-w-5xl.grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  /* How it works: a compact list on a phone, the icon beside its words, no big numeral. */
  #steps ol { margin-top: 1.5rem; gap: 0.7rem; }
  #steps li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 0.9rem; align-items: start; padding: 1rem 1.1rem; }
  #steps li .step-num { display: none; }
  #steps li > span:nth-of-type(2) { grid-row: 1 / span 2; }
  #steps li .display { margin-top: 0; padding-right: 0; font-size: 1.1rem; }
  #steps li p { margin-top: 0.2rem; }
}
#steps ol { margin-top: 2rem; }
#steps li { padding-block: 1.25rem; }

/* ---- The pull quote (Mike, 7 Oct: "feels too much", the old version was easier to absorb): one sentence in
   display capitals at a calmer size, the stars and the credit as before, no oversized quote mark. */
#hero ~ .on-brand .quote-mark { display: none; }
#hero ~ .on-brand blockquote .display { max-width: 48ch; margin-inline: auto; font-size: clamp(1.4rem, 2.5vw, 2.05rem); line-height: 1.18; letter-spacing: 0.012em; text-transform: uppercase; text-wrap: balance; }
#hero ~ .on-brand { padding-block: 3.25rem; }
@media (min-width: 640px) { #hero ~ .on-brand { padding-block: 4.25rem; } }

/* ---- The phone footer: no pages bar (nav.footerPages: false); the quote button is as wide as the three
   icons beneath it (3 columns of 6.5rem with 0.5rem gaps, less the icons' own side room). */
@media (max-width: 767px) {
  #siteFooter .md\:hidden > a.btn { width: 17rem; max-width: 100%; }
}

/* ---- Four service cards: one row of four on a laptop (the audit: too long), photos 4:3. */
@media (min-width: 1024px) {
  #hero ~ #services .grid.gap-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #hero ~ #services .grid.gap-4 > * { grid-column: auto; }
  #hero ~ #services article > div:first-child { aspect-ratio: 4 / 3; }
}

/* The row footer's email must fit its column at 1024px (the gate caught it 12px over). */
@media (min-width: 768px) and (max-width: 1279px) {
  #siteFooter a[href^="mailto"] { white-space: normal; overflow-wrap: anywhere; }
}

/* ---- Contact (7 Oct): the map moves out of the contact card on a laptop into its own "Where we work" section, so
   the card is just contact details and the short stepped form. Phones already had it that way. */
@media (min-width: 1024px) {
  #areas { display: block; }
  #areas > .shell { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 4rem; align-items: center; }
  #areas > .shell > div { max-width: none; margin-top: 0; }
  #contact div:has(> .ph-coverage) { display: none; }
}

/* The guarantee strip under the hero: two by two on a phone and a tablet, one row from a laptop (the four tiles
   made 3 + 1 at tablet widths). */
@media (max-width: 1023px) {
  section[aria-label="Accreditations"] ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; width: 100%; max-width: 26rem; margin-inline: auto; }
  section[aria-label="Accreditations"] ul > li { width: auto; }
}
