/* 50-location-form.css - lead form in the location page hero
   These pages are the destination for paid search, so the form sits beside
   the headline rather than behind the callback modal. Mirrors the homepage
   promo card, dark head with the offer, form on white beneath. */

/* Two columns only when a form is present; without one the hero is unchanged. */
/* .svc-hero__content is inlined critical CSS with max-width:680px,
   margin-inline:auto and text-align:center, which is right for a centred
   hero but wrong here: it squeezed the grid into 680px and left the copy
   column about 120px wide. These three overrides release the container so
   the layout matches the homepage hero, copy left, card right. */
.svc-hero__content.loc-hero--split{
  display:grid;
  grid-template-columns:1fr 520px;
  gap:var(--space-10);
  align-items:center;
  /* The shared hero rule sets padding 0 top / space-12 bottom, which suits a
     centred hero whose content sits low. Here a tall form card is centred in
     the row, so with no top padding it rides up against the nav while keeping
     space beneath. Matching the top to the bottom balances it. */
  padding-top:var(--space-12);
  max-width:var(--container-max);
  margin-inline:auto;
  text-align:left;
  width:100%;
}
.loc-hero__copy{min-width:0;}
/* The shared hero rules centre these; the split layout needs them ranged left. */
.loc-hero--split .svc-hero__heading,
.loc-hero--split .svc-hero__tagline{text-align:left;}
.loc-hero--split .svc-hero__actions{justify-content:flex-start;}

/* ---- Form card ---- */
.loc-form{
  background:var(--color-bg-white);
  border-radius:var(--radius-lg);
  box-shadow:0 24px 60px rgba(0,0,0,.28);
  overflow:hidden;
  width:100%;
}

.loc-form__head{
  background:var(--color-navy);
  padding:var(--space-6) var(--space-6) var(--space-5);
  text-align:center;
}
.loc-form__eyebrow{
  display:inline-block;
  background:var(--color-cta);color:#fff;
  font-size:var(--text-xs);font-weight:var(--weight-bold);
  letter-spacing:var(--tracking-wide);text-transform:uppercase;
  padding:var(--space-1) var(--space-3);
  border-radius:var(--radius-full);
  margin-bottom:var(--space-3);
}
.loc-form__heading{
  font-family:var(--font-heading);
  font-size:var(--text-xl);
  font-weight:var(--weight-extrabold);
  line-height:1.15;
  letter-spacing:var(--tracking-tight);
  color:#fff;
  margin:0 0 var(--space-2);
  text-wrap:balance;
}
.loc-form__sub{
  font-size:var(--text-sm);
  font-weight:var(--weight-semibold);
  color:var(--color-action);
  margin:0;
}

.loc-form__body{padding:var(--space-6);}
.loc-form__embed{
  border:1px solid var(--color-border);
  border-radius:var(--radius-md);
  padding:var(--space-4);
  background:var(--color-bg-alt);
}
/* HubSpot renders inside an iframe that sizes itself; keep it contained. */
.loc-form__embed iframe{width:100%!important;max-width:100%!important;border:0;display:block;}

.loc-form__disclaimer{
  margin:var(--space-4) 0 0;
  font-size:.6875rem;
  line-height:1.5;
  color:var(--color-text-muted);
}
.loc-form__disclaimer a{color:var(--color-text-muted);text-decoration:underline;}

/* ---- Responsive ----
   The form moves above the copy on narrow screens: someone arriving from an
   ad should reach it without scrolling past the headline. */
@media (max-width:1100px){
  .svc-hero__content.loc-hero--split{
    display:flex;
    flex-direction:column;
    gap:var(--space-8);
    text-align:center;
  }
  .loc-hero--split .svc-hero__heading,
  .loc-hero--split .svc-hero__tagline{text-align:center;}
  .loc-hero--split .svc-hero__actions{justify-content:center;}
  /* Copy first, then the form. Putting the form above the heading was the
     original instinct for ad traffic, but it left the page opening on a form
     with no context: a visitor landing from a search sees a card before they
     see which city they are on. Heading, sub-heading, then the form reads
     properly and the form is still within the first screen or two. */
  .loc-hero__copy{order:1;}
  .loc-form{order:2;max-width:600px;margin-inline:auto;}
}

@media (max-width:700px){
  .loc-form__head{padding:var(--space-5);}
  .loc-form__body{padding:var(--space-5);}
  .loc-form__embed{padding:var(--space-3);}
}


/* ── Hero legibility ──
   Mirrors the treatment on the service heroes (05-hero.css): the photograph
   is lifted and slightly desaturated so it reads as a backdrop, and the type
   carries a soft white glow so it stays legible wherever the image happens to
   be dark. Scoped to this template so it does not alter other heroes. */
.page-template-location-page .svc-hero__bg{
  filter:brightness(1.16) saturate(.82) contrast(.95);
}


/* Hero copy ranged left. The shared hero rules centre the heading and
   tagline; in the split layout they should sit against the left edge of
   their column, above the buttons. */
.loc-hero__copy--left,
.loc-hero__copy--left .svc-hero__heading,
.loc-hero__copy--left .svc-hero__tagline{
  text-align:left;
}
.loc-hero__copy--left .svc-hero__tagline{margin-inline:0;}

@media(max-width:1100px){
  /* Stacked layout re-centres everything, so the override comes off. */
  .loc-hero__copy--left,
  .loc-hero__copy--left .svc-hero__heading,
  .loc-hero__copy--left .svc-hero__tagline{text-align:center;}
  .loc-hero__copy--left .svc-hero__tagline{margin-inline:auto;}
}


/* ── Collapsed form ──
   The HubSpot form runs to nine fields plus a consent block, far taller than
   the hero can carry. The embed is cross-origin so its internals cannot be
   restyled, but the wrapper is ours: cap it, fade the cut so it reads as
   "more below" rather than clipped, and release the cap on first interaction.

   The height is a pixel value rather than a field count because nothing on
   this side can see inside the iframe. 300px lands around the fourth field
   on a typical render. */
.loc-form__embed--collapsed{
  position:relative;
  max-height:300px;
  overflow:hidden;
  transition:max-height .45s var(--ease-out);
}
.loc-form__embed--collapsed.is-open{
  max-height:2200px;
  overflow:visible;
}

/* Fade over the cut. Above the iframe visually, but must not eat clicks. */
.loc-form__embed--collapsed::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:90px;
  pointer-events:none;
  background:linear-gradient(to bottom, rgba(242,244,245,0) 0%, var(--color-bg-alt) 85%);
  transition:opacity .3s var(--ease-out);
}
.loc-form__embed--collapsed.is-open::after{opacity:0;}

.loc-form__expand{
  display:block;
  width:100%;
  margin-top:var(--space-3);
  padding:var(--space-3);
  background:none;
  border:1px solid var(--color-border-strong);
  border-radius:var(--radius-full);
  font-family:var(--font-heading);
  font-size:var(--text-sm);
  font-weight:var(--weight-semibold);
  color:var(--color-text-primary);
  cursor:pointer;
  transition:background-color var(--duration-base) var(--ease-out);
}
.loc-form__expand:hover{background:var(--color-bg-alt);}
.loc-form__expand.is-hidden{display:none;}

@media (prefers-reduced-motion:reduce){
  .loc-form__embed--collapsed{transition:none;}
}


/* ── Hero type legibility ──
   The copy stays vertically centred with the form card, so it rises and falls
   as the form collapses and expands. Pinning it to the bottom would keep it
   over the opaque part of the overlay, but leaves a large gap above it in the
   collapsed state, which is what most visitors see.

   Legibility is carried by the type instead. This hero runs close to 1000px
   because of the form card, so the shared overlay has faded to near-nothing
   by the time it reaches the heading. A stronger, wider glow holds the text
   against open sky without touching the photograph or the composition. */
.page-template-location-page .svc-hero__heading{
  text-shadow:
    0 0 6px  rgba(255,255,255,1),
    0 0 16px rgba(255,255,255,.98),
    0 0 34px rgba(255,255,255,.92),
    0 0 60px rgba(255,255,255,.75),
    0 0 90px rgba(255,255,255,.5);
}
.page-template-location-page .svc-hero__tagline{
  text-shadow:
    0 0 6px  rgba(255,255,255,1),
    0 0 14px rgba(255,255,255,.95),
    0 0 28px rgba(255,255,255,.8),
    0 0 48px rgba(255,255,255,.55);
}


/* A flat 10% white wash over the whole hero, layered on top of the existing
   gradient. The gradient covers the lower half; this lifts the upper half
   too, where the heading sits when the form is collapsed. */
.page-template-location-page .svc-hero__bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.40);
  pointer-events:none;
}