/* ==========================================================================
   FinWisePoint — Why founder-led (dedicated page).
   Loaded after styles.css and ../services/service.css (which supply the shared
   header dropdowns, the .svc-hero entrance and the .svc-prose typography).

   Layout: rich prose on the LEFT, the client-supplied Lottie (WhyFounderLed.json)
   on the RIGHT. The figure is position:sticky (see .wfl-fig) and is SCROLL-SCRUBBED
   by the inline script in index.html — Lottie frame = scroll progress through the
   tall .wfl-body (NOT autoplayed by script.js). It pins while the body scrolls and
   releases inside the white section, never overlaying the navy contact band below.
   ========================================================================== */

.wfl-body { padding-block: clamp(3rem, 7vw, 5.5rem); }

.wfl-grid {
  max-width: none;
  width: auto;   /* reset .container's width:100% so the margins below size the box — prevents overflow on wide screens */
  margin-left: max(calc((100vw - var(--container)) / 2 + var(--gutter)), var(--gutter));
  margin-right: var(--gutter);
  padding-inline: 0;
  display: grid;
  grid-template-columns: minmax(0, 64ch) 1fr;   /* matches the service-page prose measure */
  column-gap: var(--gutter);
  align-items: start;
}

/* animated figure — STICKY, so as you scroll the white section the animation
   spans the full visible height (top blue band to bottom blue band) instead of
   leaving a gap. Sized by HEIGHT (<= ~90vh) so the Lottie FITS at its correct
   proportions — the cards/words are adjusted to the width, never oversized or
   cropped — and the figure-bottom always sits above the fold, so it can never
   reach the navy section. Width follows the portrait aspect (up to 560, the
   service-page animation width, on taller screens). */
.wfl-fig {
  position: sticky;
  top: clamp(24px, 2vh, 56px);
  align-self: start;
  display: flex;
  justify-content: center;
}
.wfl-lottie {
  height: min(90vh, 996px);     /* fits the viewport: sticky never reaches the navy */
  width: auto;                  /* derived from the 1080x1920 aspect: fits the width */
  aspect-ratio: 1080 / 1920;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
}
.wfl-lottie svg { display: block; width: 100%; height: 100%; }
@media (max-width: 1024px) {
  .wfl-grid { grid-template-columns: 1fr; gap: clamp(2.2rem, 6vw, 3.5rem); }
  .wfl-fig { position: static; }
  .wfl-lottie { height: auto; width: min(100%, 460px); }
}

/* pull-quote inside the prose */
.wfl-quote {
  margin: clamp(2.6rem, 5vw, 4rem) 0 0;
  padding-left: clamp(1.1rem, 2vw, 1.6rem);
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  max-width: 24ch;
}

@media (max-width: 760px) {
  /* The slide-based Lottie (Founder / LED / Service with large type) overflows
     its narrow box and reads as broken on a phone — remove it here; the rich
     prose stands on its own. Desktop/tablet keep the sticky scrubbed figure. */
  .wfl-fig { display: none; }
}
