/* cta — this component's own styles, put in the head by the renderer where it is drawn.
   Colours and sizes only through var(--*), so the design drives these too. */

/* On the primary-coloured band the button is the band's INK, not the page
   background: with a dark palette --bg and --primary are both near black,
   and the call to action would read as plain text. */
.cta--band .btn { background: var(--primary-ink); border-color: var(--primary-ink); color: var(--primary); }
.cta--band .btn:hover { background: color-mix(in srgb, var(--primary-ink) 88%, var(--primary)); }

/* ---------- CTA section ---------- */
.cta--band {
  background: var(--primary);
  color: var(--primary-ink);
  padding-block: var(--space);
}

/* A look with a ground of its own (the band) is the whole band, edge to edge: the section's space is
   taken inside it, on its colour (the drawer's «space» still sets it) — as the hero over its photo. */
.section:has(> .cta--band) { padding-block: 0; }
/* …and the last band before the footer meets it, as a band of a palette of its own does. */
main:has(> .section:last-child > .cta--band) ~ .ftr { margin-top: 0; }
/* …in the page's column (a band of normal or narrow width) it is a card on the section's ground, its corners
   rounded. */
.container .cta--band { border-radius: var(--radius); overflow: hidden; }

.cta-inner { text-align: center; max-width: 640px; margin: 0 auto; }

.cta--band .cta-inner h2 { color: var(--primary-ink); }

.cta--band .cta-inner p { color: color-mix(in srgb, var(--primary-ink) 82%, transparent); margin-bottom: 2rem; }

/* boxed: a photo across the band, the words on a plate of the page's ground in its lower corner — the whole band,
   edge to edge, its height the photo's; no photo: the plate on the surface's band. */
.cta--boxed                     { position: relative; isolation: isolate; display: flex; align-items: flex-end;
                                  min-height: clamp(26rem, 39vw, 35rem); padding-block: clamp(2rem, 6.6vw, 6rem); background: var(--surface); }
.section:has(> .cta--boxed)     { padding-block: 0; }
.cta--boxed .cta-photo          { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
/* …the plate on the page's column: its left edge where the column's words start */
.cta--boxed .cta-inner          { margin: 0 24px 0 calc(max(0px, (100% - var(--container)) / 2) + 24px); max-width: 47.5rem; text-align: left; background: var(--bg);
                                  padding: clamp(1.75rem, 3.3vw, 3rem) clamp(1.75rem, 3.9vw, 3.5rem); }
.cta--boxed .cta-inner h2       { margin-bottom: .6rem; }
.cta--boxed .cta-inner p        { margin-bottom: 1.8rem; color: var(--body-text); }
.cta--boxed:not(.has-photo)     { min-height: 0; }

/* poster: no band — the words very large on the page's ground, from the column's left, the button under them. */
.cta--poster .cta-inner    { text-align: left; max-width: var(--container); margin: 0 auto; }
.cta--poster .cta-inner p  { max-width: 40rem; margin-bottom: 2rem; color: var(--body-text); }
