/* styles/sections/closing-lines.css
 * Closing CTA line breaks as the Product Teams frames draw them (vM9MM, yxxV8, QNL50): the
 * byline breaks where its "\n" is at every width; the heading's break holds on D and W, and on
 * M (no break in yxxV8) the heading wraps greedily. */
@layer sections {
  /* The frames stroke the band's bottom hairline inside its height: one pixel less below */
  .closing-cta--lines {
    --closing-pad-bottom: calc(var(--section-xs) - 1px);
    --closing-heading-lh: 34px;
    --closing-deck-lh: 24px;
  }

  .closing-cta--lines .closing-cta__deck {
    white-space: pre-line;
  }

  @media (width < 900px) {
    .closing-cta--lines .closing-cta__heading {
      text-wrap: wrap;
    }

    .closing-cta--lines .closing-cta__heading br {
      display: none;
    }
  }

  /* Whole-pixel pitches as the frames set them: heading 34 and byline 24 on M, 59 and 28 on D,
     74 and 28 on W */
  /* 608 and 624 at 1440 (the split default holds the heading at 608 and starves the byline
     below 1440); both give way together */
  @media (width >= 900px) {
    .closing-cta--lines {
      --closing-columns: minmax(0, 608fr) minmax(0, 624fr);
      /* The heading scales with its column below 1440 so the drawn first line ("Put the why in
         front", 7.95em wide) always fits before the break: 56 (h1) from about 1170 */
      --closing-heading-size: min(var(--t-h1-size), (100vw - 208px) * 0.058);
      --closing-heading-lh: round(nearest, 1.05em, 1px);
      --closing-deck-lh: 28px;
    }
  }

  @media (width >= 1680px) {
    .closing-cta--lines {
      --closing-columns: minmax(0, 608px) minmax(0, 1fr);
      --closing-heading-size: var(--t-display-sm-size);
      --closing-heading-lh: 74px;
    }
  }
}
