/* ══════════════════════════════════════════════════════════════════════════
   floom-cta.css — the closing call to action

   Five streams of fund data travel in from off-screen and converge on one
   point; the invitation sits at that point. Each stream is a labelled head
   riding its own curve, trailing the path it has covered — so the section
   reads as data arriving, not as a decorative line draw.

   Geometry is built in JS at pixel scale (see floom-cta.js): the SVG viewBox
   equals its rendered box, so nothing here scales the coordinate space.
   ══════════════════════════════════════════════════════════════════════════ */

.final-cta{
  position: relative;
  /* Its own ground. While it holds the middle of the window the whole page
     fades into this colour around it ([data-fl-dark], floom-motion). */
  background: var(--fl-ink);
  color: #faf6f1;
}

/* The pinned frame. One viewport tall so the convergence always lands in
   view; ScrollTrigger holds it while the streams travel. */
.cta-stage{
  position: relative;
  height: 100svh;
  min-height: 520px;
  overflow: clip;              /* never `hidden` — that would create a scroll
                                  container and break the pin */
}

/* ── the weave ─────────────────────────────────────────────────────────── */
.cta-weave{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.cta-maskrect{ x: 0; y: 0; width: 100%; height: 100%; }

.cta-strand{
  fill: none;
  stroke: var(--accent-display, #ff3c00);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: .8;
}
.cta-head{
  fill: #ff8a4d;
  opacity: 0;
}
.cta-head-lead{ fill: #FFFFFF; }   /* the stream that runs ahead of the field */
.cta-node{
  fill: #FFFFFF;
  opacity: 0;
  filter: drop-shadow(0 0 14px rgba(255,60,0,.75));
}

/* ── travelling labels ─────────────────────────────────────────────────── */
.cta-labels{
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cta-label{
  position: absolute;
  top: 0; left: 0;
  transform: translate(-50%, -50%);   /* JS supplies the per-stream offset */
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(250,246,241,.62);
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}
.cta-label-lead{ color: #FFFFFF; }

/* ── what sits at the convergence point ───────────────────────────────────
   The body starts at the 50% line, which is exactly where every curve ends,
   so the headline reads as growing out of the node. */
.cta-body{
  position: absolute;
  /* Columns 7–11 of the grid: the stage is full-width and the grid centred
     in it, so column 7 starts half a gap right of the middle. The streams
     converge just short of that edge (floom-cta.js). */
  left: calc(50% + var(--fl-col-gap) / 2);
  top: 50%;
  transform: translateY(-50%);
  width: calc((var(--fl-wrap) + var(--fl-col-gap)) * 5 / 12 - var(--fl-col-gap));
  text-align: left;               /* the page sets its own; the copy grows
                                     rightward out of the convergence node */
  opacity: 0;
}
.cta-body h2{
  font-family: var(--font-display);
  font-size: var(--fl-head-size);
  font-weight: var(--fl-head-weight);
  letter-spacing: var(--fl-head-track);
  line-height: var(--fl-head-lead);
  text-transform: uppercase;
  margin: 0;
  color: #faf6f1;
  text-wrap: balance;
}
.cta-body h2 .at{ color: var(--accent); }   /* Orange — 4.99:1 on the ink
   ground. Light Orange is a fill in this system, not a text colour. */
.cta-body p{
  margin: round(clamp(12px, 1.6vw, 16px), 4px) 0 0;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.3;
  color: #c5c5c5;                       /* 8.6:1 */
  max-width: 40ch;
}
/* The button is the site's own — .ap-btn .ap-btn-solid, the same control the
   hero and the nav carry, with the same label swap on hover. It used to be a
   one-off here: a DASHED outline with a separate orange chip holding the
   arrow, which read as an unfinished placeholder rather than as the page's
   primary action. Nothing of it is kept; a second button style is a second
   thing to keep in step, and this one had already fallen out of step.

   All this section still owns is where it sits. */
.cta-body .ap-btn{ margin-top: round(clamp(20px, 2.6vw, 32px), 4px); }

/* ── narrow ────────────────────────────────────────────────────────────────
   The convergence needs horizontal room to read as convergence. Below the
   breakpoint the weave drops to a backdrop and the copy takes the column. */
@media (max-width: 900px){
  .cta-stage{ height: auto; min-height: 0; padding: round(clamp(72px, 12vh, 120px), 8px) 0; }
  /* No streams. Without the pinned run nothing moves them, and the finished
     fan meets the stage's middle — on a phone, the middle of the words — so
     it either crossed the paragraph or, masked off it, left a stray sliver
     under the button. The words, on the ink, are the section here. */
  .cta-weave, .cta-labels{ display: none; }
  .cta-body{
    position: relative;
    left: auto; top: auto;
    transform: none;
    opacity: 1;
    width: var(--fl-wrap-8);   /* columns 3–10; 2–11 on a tablet, all twelve on a phone */
    margin-inline: auto;
  }
}

/* Reduced motion: the streams are simply already there. */
@media (prefers-reduced-motion: reduce){
  .cta-body{ opacity: 1; }
  .cta-body .ap-btn{ transition: none; }
}
