/* HLM lead form layout (Jakob, 2026-11-11). The form draws its own white card (max 440px wide), so the theme's white
   .form-wrap box behind it goes, and each wrap is sized to the card. Loaded only on pages with a form. */
.flex-layer--md-stylized-form .form-wrap,
.flex-layer--md-stylized-form.style--2 .form-wrap,
.flex-layer--md-stylized-form.style--4 .form-wrap { background: transparent; max-width: 430px; padding: 0; margin-left: auto; margin-right: auto; }
.flex-layer--md-stylized-form [data-hlm-form] { display: block; width: 100%; }

/* Homepage hero (style--1): the form sat in a wide white strip under the headline. Now it sits to the right of a
   smaller headline on desktop and under it on phones and tablets. */
.flex-layer--md-stylized-form.style--1 .content-wrap { max-width: 640px; margin-left: 0; }
@media (min-width: 992px) {
  .flex-layer--md-stylized-form.style--1 .form-inner {
    display: grid; grid-template-columns: minmax(0, 1fr) 430px; column-gap: clamp(32px, 4vw, 72px); align-items: end;
    padding-top: clamp(220px, 22vw, 340px) !important; padding-bottom: 56px !important;
  }
  .flex-layer--md-stylized-form.style--1 .content-wrap { max-width: none; margin: 0 0 24px; }
  .flex-layer--md-stylized-form.style--1 .form-wrap { margin: 0; max-width: none; }
  .flex-layer--md-stylized-form.style--1 .title.title48 { font-size: clamp(30px, 1.2vw + 20px, 40px); line-height: 1.15; }
  .flex-layer--md-stylized-form.style--1 .intro-content.title24 { font-size: clamp(18px, .4vw + 14px, 21px); }
}

/* Service and town pages (style--3): the red "You Ask. We Respond." label sits on the form card's top edge.
   The card's 7px corners tuck 8px into the label so no photo shows in the corner notches. */
.flex-layer--md-stylized-form.style--3 .form-wrap-heading { border-radius: 12px 12px 0 0; padding-bottom: 14px !important; margin-bottom: -8px; }
.flex-layer--md-stylized-form.style--3 [data-hlm-form] { position: relative; z-index: 1; }

/* Homepage hero photo: keep every face in view at every width (Jakob, 2026-11-11: a head was cut off under the nav
   on wide screens). The photo is square; heads start 29.7% down it, chins end 49.7% down, faces span 18%-80.5% across.
   Wide screens (photo as wide as the screen): the first head sits 24px under the nav, unless that would leave a gap at
   the bottom, in which case the photo sits on the bottom. capture/qa/hero-faces.mjs checks this per width. */
/* The form card sits over the right of the group (faces 59.5%-80.5% across, chins down to 46% of the photo), so the
   card starts under those chins: photo top + 46% of its height + 16px (Jakob, 2026-11-11: "move the card down"). */
@media (min-width: 1255px) {
  .flex-layer--md-stylized-form.style--1 .background-image { background-position: 50% max(100px - 29.7vw, 100%) !important; }
  .flex-layer--md-stylized-form.style--1 .form-inner { padding-top: calc(168px + 16.3vw) !important; }
}
@media (min-width: 992px) and (max-width: 1254.98px) {
  /* Top-anchored here: the lower card makes this hero nearly as tall as the photo, and bottom-anchoring pushed the
     faces back down behind the card. */
  .flex-layer--md-stylized-form.style--1 .background-image { background-position: 50% calc(88px - 29.7vw) !important; }
  .flex-layer--md-stylized-form.style--1 .form-inner { padding-top: calc(104px + 16.3vw) !important; }
}
/* Headline sits level with the middle of the form card, not on the bottom (Jakob, 2026-11-12: too much open space). */
@media (min-width: 992px) {
  .flex-layer--md-stylized-form.style--1 .form-inner { align-items: center !important; }
}
/* Phones: a tall, narrow hero cropped the crew at both sides. The photo now shows the whole crew across the top
   (1.5x the screen width, faces centred), fades into black, and the headline starts under their chins. */
@media (max-width: 991.98px) {
  .flex-layer--md-stylized-form.style--1 .background-image {
    background-size: 150% auto !important; background-position: 47.75% calc(80px - 44.55vw) !important; background-color: #000;
  }
  .flex-layer--md-stylized-form.style--1 .shadow {
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 0, rgba(0, 0, 0, .15) calc(80px + 30vw), rgba(0, 0, 0, .8) calc(100px + 40vw), #000 calc(90px + 70vw)) !important;
  }
  .flex-layer--md-stylized-form.style--1 .form-inner { padding-top: calc(112px + 34vw) !important; }
}

/* Phones: a smaller homepage headline so the form starts higher. */
@media (max-width: 991.98px) {
  .flex-layer--md-stylized-form.style--1 .title.title48 { font-size: clamp(28px, 4vw + 14px, 36px); line-height: 1.12; }
  .flex-layer--md-stylized-form.style--1 .intro-content.title24 { font-size: 18px; }
}
