/* 26 November 2026 (Luke): "add the WIAPS logo back into the accreditations". This is
   homepage-hero-trust-20261124.css as it was before the three-mark change: two marks, the Trustpilot rating,
   then two marks. New name because the live site caches stylesheets for a year. */

/* 24 November 2026: the accreditations and Trustpilot sit on the bottom of the hero video, as on the
   Crawley page (location-hero-trust-20261123). Desktop and tablet only (769px and up), where the video
   plays. Phones keep the docked white row under the hero image.
   25 November 2026 (Luke): smaller cards and an "As seen in:" press row above them, matching the
   Haywards Heath preview (location-hero-cta-20261124). The press row also shows on phones. */
@media (min-width: 769px) {
  body.home-fold {
    /* The press logos grow with screen height: 48px (Daily Star) and 28px (Daily Express) at 900px tall
       or less, up to 70px and 41px on tall screens. */
    --press-star: clamp(48px, calc(48px + (100vh - 900px) * 0.25), 70px);
    --press-express: clamp(28px, calc(28px + (100vh - 900px) * 0.15), 41px);
    /* The same space sits between the press logos and the cards, and under the cards. */
    --trust-space: clamp(26px, 3.6vh, 44px);
    /* 10px top padding, the 18px label, an 8px gap, the logos, a space, the 54px row of cards, a space. */
    --trust-in-hero-height: calc(90px + var(--press-star) + 2 * var(--trust-space));
    /* The space between the call button and "As seen in:". */
    --trust-in-hero-gap: clamp(22px, 3vh, 48px);
    /* The hero's bottom padding before 24 November (homepage-3: 84px, or 96px up to 1100px). */
    --hero-old-bottom: 84px;
    --trust-in-hero-extra: calc(var(--trust-in-hero-height) + var(--trust-in-hero-gap) - var(--hero-old-bottom));
  }

  /* The hero grows at the bottom by the trust area's height plus a gap under the call button, so the
     video is taller and the headline, points and call button stay where they were. */
  body.home-fold .hero {
    padding-bottom: calc(var(--trust-in-hero-height) + var(--trust-in-hero-gap));
  }

  /* A light shade at the foot of the video gives the press logos and cards a calm base. */
  body.home-fold .hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    height: 260px;
    background: linear-gradient(180deg, rgba(10, 16, 58, 0) 0%, rgba(10, 16, 58, 0.5) 100%);
    pointer-events: none;
  }

  /* The existing trust area is pulled up into the bottom of the hero. */
  .trust-dock {
    z-index: 6;
    margin-top: calc(-1 * var(--trust-in-hero-height));
    margin-bottom: 0;
    padding: 0 28px;
  }

  .trust-dock .trust-bar-inner {
    max-width: 1344px;
    margin: 0 auto;
    padding: 10px 0 var(--trust-space);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  /* "As seen in:" on its own line, centred above the Daily Express and Daily Star logos. The white
     Daily Express masthead is served from 769px by the picture element. */
  .trust-dock .trust-bar-press {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 8px 28px;
    margin-bottom: var(--trust-space);
  }

  .trust-dock .trust-bar-press-label {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 0;
    color: #fff;
    font-family: "Inter", sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  }

  .trust-dock .trust-bar-press-logo {
    display: block;
    width: auto;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
  }

  .trust-dock .trust-bar-press-logo--express {
    height: var(--press-express);
  }

  .trust-dock .trust-bar-press-logo--star {
    height: var(--press-star);
  }

  /* Separate white cards with the cyan edge, as on Crawley. Since 25 November they are 164x54px, with a
     170x72px Trustpilot card (the phone size), in a centred row instead of across the full width. */
  .trust-dock .accreditations-logos {
    grid-template-columns: repeat(2, minmax(0, 164px)) 170px repeat(2, minmax(0, 164px));
    justify-content: center;
    gap: 12px 28px;
  }

  .trust-dock .accreditation-logo {
    height: 54px;
    margin: 0;
  }

  .trust-dock .accreditation-logo::before,
  .trust-dock .trust-bar-reviews::before {
    display: none;
  }

  .trust-dock .accreditation-logo-front {
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid rgba(128, 239, 247, 0.9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 26px -10px rgba(0, 0, 0, 0.6);
  }

  .trust-dock .accreditation-logo-back {
    padding: 4px 8px;
    font-size: 11.5px;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 26px -10px rgba(0, 0, 0, 0.6);
  }

  .trust-dock .trust-bar-reviews {
    width: 170px;
    height: 72px;
    margin: -9px 0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 14px 30px -10px rgba(0, 0, 0, 0.65);
  }

  .trust-dock .trust-bar-reviews .trustpilot-widget {
    transform: scale(0.82);
  }

  /* The glint follows the smaller widget. */
  .trust-dock .trust-bar-reviews::after {
    top: 30px;
    left: 18px;
    width: 128px;
    height: 23px;
  }

  /* The navy focus ring would vanish on the dark video. */
  .trust-dock .accreditation-logo:focus-visible {
    outline-color: #80eff7;
  }
}

/* Tablets: fixed press logo sizes and slightly smaller cards, which shrink further so the row still fits
   at 769px. */
@media (min-width: 769px) and (max-width: 1024px) {
  body.home-fold {
    --press-star: 52px;
    --press-express: 30px;
    --trust-space: clamp(26px, 3.2vh, 40px);
    /* 10px top padding, the 16.8px label, a 7px gap, the logos, a space, the 50px row of cards, a space. */
    --trust-in-hero-height: calc(83.8px + var(--press-star) + 2 * var(--trust-space));
  }

  .trust-dock .trust-bar-press {
    gap: 7px 20px;
  }

  .trust-dock .trust-bar-press-label {
    font-size: 14px;
  }

  .trust-dock .accreditations-logos {
    grid-template-columns: repeat(2, minmax(0, 140px)) 150px repeat(2, minmax(0, 140px));
    gap: 10px 18px;
  }

  .trust-dock .accreditation-logo {
    height: 50px;
  }

  .trust-dock .accreditation-logo-front {
    padding: 7px 12px;
  }

  .trust-dock .accreditation-logo-back {
    font-size: 10.5px;
  }

  .trust-dock .trust-bar-reviews {
    width: 150px;
    height: 64px;
    margin: -7px 0;
  }

  .trust-dock .trust-bar-reviews .trustpilot-widget {
    transform: scale(0.74);
  }

  .trust-dock .trust-bar-reviews::after {
    top: 27px;
    left: 16px;
    width: 115px;
    height: 21px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  body.home-fold {
    --hero-old-bottom: 96px;
  }
}

/* Luke, 25 November 2026: a slim cyan bar along the bottom of the hero, "Detecting hidden water leaks since
   2011". It copies the Haywards Heath preview's bar (location.css .founding-strip, with that preview's 7px
   padding and 14px type from 601px), so the text shows in letter-spaced capitals. On desktop it runs straight
   under the video; on phones under the white trust area. */
.founding-strip {
  position: relative;
  z-index: 4;
  padding: 7px 20px;
  background: #80eff7;
  text-align: center;
}

.founding-strip-title {
  margin: 0;
  color: #161e6f;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* On phones the white trust area hangs 20px over what follows it; this cancels that, so the bar starts
   right under it. */
@media (max-width: 768px) {
  .founding-strip {
    margin-top: 20px;
  }
}

@media (max-width: 600px) {
  .founding-strip {
    padding: 6px 10px;
  }

  .founding-strip-title {
    font-size: 11.5px;
    line-height: 1.3;
    letter-spacing: 0.05em;
  }
}

/* Wider gaps between the cards on large screens. */
@media (min-width: 1280px) {
  .trust-dock .accreditations-logos {
    column-gap: 44px;
  }
}

/* Phones: the press row sits on white above the Trustpilot card, with a navy label and the original
   colour logos. The cards keep their size, which already matches Haywards Heath. */
@media (max-width: 768px) {
  .trust-dock .trust-bar-press {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 6px 14px;
    margin-bottom: 16px;
  }

  .trust-dock .trust-bar-press-label {
    grid-column: 1 / -1;
    justify-self: center;
    margin: 0;
    color: #161e6f;
    font-family: "Inter", sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .trust-dock .trust-bar-press-logo {
    display: block;
    width: auto;
  }

  .trust-dock .trust-bar-press-logo--express {
    height: 22px;
  }

  .trust-dock .trust-bar-press-logo--star {
    height: 42px;
  }
}

/* The heading's lines split evenly when one needs to wrap, instead of leaving a word on its own.
   All widths. */
body.home-fold .hero-title {
  text-wrap: balance;
}

/* Luke, 25 November 2026 (his marked-up layout): a small line above the H1, "NON-INVASIVE,
   INSURANCE-APPROVED", the H1 "LEAK DETECTION SERVICES", and a rating line under it, "Rated 4.7★ by 1,600+
   Customers". The two small lines are the same size, 55% of the H1 on desktop. Every line stays on one
   line at every width: in the hero's font the small line is 19.24 times its font size wide, the H1 13.41
   times and the rating line 15.62 times, so on tablets and phones the sizes follow the screen width. */
body.home-fold .hero-eyebrow,
body.home-fold .hero-rating {
  margin: 0;
  color: #fff;
  font-family: "Raleway", sans-serif;
  font-size: 42px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

body.home-fold .hero-eyebrow {
  margin-bottom: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

body.home-fold .hero-title {
  margin-bottom: 8px;
}

/* Full-height figures, as on the site's call buttons: Raleway's default figures sit at mixed heights. */
body.home-fold .hero-rating {
  margin-bottom: 20px;
  font-weight: 800;
  font-variant-numeric: lining-nums;
}

@media (min-width: 1025px) and (max-width: 1200px) {
  body.home-fold .hero-eyebrow,
  body.home-fold .hero-rating {
    font-size: 36px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  body.home-fold .hero-eyebrow,
  body.home-fold .hero-rating {
    font-size: 29px;
  }

  /* 53px would be 2px too wide at 769px. */
  body.home-fold .hero-title {
    font-size: min(53px, calc((100vw - 64px) / 13.41));
  }
}

@media (max-width: 768px) {
  body.home-fold .hero-eyebrow,
  body.home-fold .hero-rating {
    font-size: min(20px, calc((100vw - 56px) / 19.24));
  }

  body.home-fold .hero-rating {
    margin-bottom: 14px;
  }

  body.home-fold .hero-title {
    font-size: min(35px, calc((100vw - 56px) / 13.41));
  }
}

@media (max-width: 480px) {
  body.home-fold .hero-title {
    font-size: min(31px, calc((100vw - 56px) / 13.41));
  }
}

/* Where the hero has a minimum height, it grows by the same extra space, so the video gets taller
   and the headline, points and call button stay where they were. */
@media (min-width: 1025px) {
  body.home-fold .hero {
    min-height: calc(700px + var(--trust-in-hero-extra));
  }
}

@media (min-width: 1280px) {
  body.home-fold .hero {
    min-height: calc(clamp(600px, min(calc(100svh - 160px), calc(50svh + 270px)), 900px) + var(--trust-in-hero-extra));
  }
}
