/* Designer review, wave 2 (2026-11).
 * 1. Hero overlay: neutral black gradient instead of the blue wash, for text contrast.
 * 2. Form card: no light border; a soft drop shadow so it floats over the photo.
 * 3. Form height follows its content (step 1 and step 2). The desktop hero grows
 *    with the form, so step 2 never runs under the next section.
 * 4. No divider line or small caption text at the bottom of the hero.
 * Loaded last so it overrides the earlier layers.
 */

/* ---------- 1. Hero overlay ---------- */
.reference-hero .hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .48) 48%, rgba(0, 0, 0, .34) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .45) 100%) !important;
}
.reference-hero .hero-photo { filter: saturate(.92) !important; }

/* Option: mirror the photo so the house sits behind the form, not behind the copy.
 * Turn on with <section class="hero reference-hero hero-mirrored">. */
.reference-hero.hero-mirrored .hero-photo { transform: scaleX(-1); }

@media (max-width: 700px) {
  .reference-hero .hero-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .62) 55%, rgba(0, 0, 0, .88) 100%) !important;
  }
}

/* ---------- 2. Floating form card ---------- */
.form-shell .funnel,
.form-shell .funnel.is-expanded,
.form-shell .funnel.is-calendar,
.form-shell .funnel.is-result {
  border: 0 !important;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, .18),
    0 24px 60px rgba(0, 0, 0, .45) !important;
}

/* ---------- 3. Form height follows its content ---------- */
.form-shell .funnel,
.form-shell .funnel.is-expanded,
.form-shell .funnel.is-calendar,
.form-shell .funnel.is-result {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 24px !important;
}
.form-shell .funnel.is-expanded form,
.form-shell .funnel.is-expanded .form-fields,
.form-shell .funnel.is-expanded [id$='qualification'] { flex: none !important; }

@media (width > 700px) {
  /* The hero fills the window at least, and grows when the form needs more room. */
  .reference-hero { height: auto !important; min-height: calc(100svh - 73px) !important; }
  .reference-hero .hero-layout { padding-block: 32px !important; }
}

/* ---------- Phone field: "+1" prefix matches the number text ---------- */
.form-shell .funnel .dial-prefix { font-size: 14px !important; }
/* Same media as the 16px iOS focus-zoom rule on inputs in viewport-fit.css. */
@media (max-width: 1100px), (any-pointer: coarse) {
  .form-shell .funnel .dial-prefix { font-size: 16px !important; }
}

/* ---------- 4. Bottom of the hero ---------- */
.reference-hero .hero-location { display: none !important; }
.reference-hero > .section-curve .curve-line { display: none; }

/* ---------- 5. Browser autofill ---------- */
/* Autofill (and its hover preview) paints its own background and text colour.
   On the dark starter-kit section that made the email unreadable. Keep our colours. */
#starter-email:-webkit-autofill,
#starter-email:-webkit-autofill:hover,
#starter-email:-webkit-autofill:focus {
  -webkit-text-fill-color: #15394b;
  caret-color: #15394b;
  -webkit-box-shadow: 0 0 0 1000px #f8fcfd inset;
  box-shadow: 0 0 0 1000px #f8fcfd inset;
  transition: background-color 9999s ease-out 0s;
}
#starter-email:autofill { background: #f8fcfd; color: #15394b; }

/* ---------- 6. "Back to questions" arrow ---------- */
/* The text arrow glyph rendered small and sat low. Use a drawn arrow sized to the text. */
.funnel .step-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.funnel .step-header .back-link span {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.funnel .step-header .back-arrow { flex-shrink: 0; }

/* ---------- 7. Starter Kit sign-up ---------- */
/* Honeypot: real visitors never see or fill it. */
#starter-signup .starter-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#starter-signup .button:disabled { opacity: .7; cursor: progress; }
/* Marketing consent: unticked by default, guides are sent either way. */
#starter-signup .starter-consent { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 2px; font-size: 13px; font-weight: 400; line-height: 1.5; cursor: pointer; }
#starter-signup .starter-consent input { flex-shrink: 0; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #d9b878; cursor: pointer; }

/* ---------- 8. Promise heading lined up with the card ---------- */
/* Client: line the heading up with the card border. The figure and the
   heading share one width, and the heading starts at the card's drawn edge
   (about 2% inside the image). */
#offer-conditions .promise-result { --promise-card-w: 420px; }
@media (max-width: 700px) { #offer-conditions .promise-result { --promise-card-w: 300px; } }
#offer-conditions .promise-card-visual { max-width: var(--promise-card-w); }
#offer-conditions .promise-result > .eyebrow,
#offer-conditions .promise-result .promise-title {
  max-width: var(--promise-card-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(min(100%, var(--promise-card-w)) * .02);
}
