/* Call-to-action band (sections/cta-band.php).
   --wave  (Background: Sage): the wavy sage band SVG fills the section and an ink wave
           shapes its bottom edge into the footer; 545px tall at 1440.
   --plain (any other background): centred content; 371px tall at 1440 (Parties). */
.pe-cta-band .pe-container {
	position: relative; /* above the band and the flower */
	text-align: center;
}

.pe-cta-band__heading {
	margin: 0;
}

/* 30.9px / 43.2px at 1440. */
.pe-cta-band__text {
	margin: 1.02rem 0 0;
	font-size: clamp(1.125rem, 2.144vw, 1.929rem);
	line-height: 1.4;
}

.pe-cta-band__buttons {
	justify-content: center;
	margin-top: 1.75rem; /* 28px under the heading (Parties) */
}

/* Figma draws these buttons at a fixed width: 365px (Parties), 276px (wave band). */
.pe-cta-band .pe-button {
	min-width: min(22.8125rem, 100%);
}

/* ---------- Wave band ---------- */

/* The SVG is transparent above its top wave, so the page's cream shows there
   instead of the .pe-bg-sage fill. */
.pe-cta-band.pe-cta-band--wave {
	overflow: hidden; /* the bottom-left flower hangs 41px below the band */
	padding-block: clamp(7rem, 14.6vw, 13.14rem) clamp(4rem, 8.04vw, 7.23rem); /* 210px / 116px */
	background: none;
}

/* After a coloured section, that colour shows above the top wave instead, so the two
   sections meet on the wave (Parties 83:3239 sits under the yellow FAQ band). */
.pe-bg-yellow + .pe-cta-band.pe-cta-band--wave { background: var(--pe-yellow); }
.pe-bg-peach + .pe-cta-band.pe-cta-band--wave { background: var(--pe-peach); }
.pe-bg-peach-light + .pe-cta-band.pe-cta-band--wave { background: var(--pe-peach-light); }
.pe-bg-aqua-light + .pe-cta-band.pe-cta-band--wave { background: var(--pe-aqua-light); }
.pe-bg-aqua + .pe-cta-band.pe-cta-band--wave { background: var(--pe-aqua); }
.pe-bg-lilac + .pe-cta-band.pe-cta-band--wave { background: var(--pe-lilac); }

/* The band covers the whole section: at 1440 it is drawn at its natural 1440×547
   (top aligned); when the section is relatively taller (phones) it grows and its
   sides are cropped, so the sage always sits behind the text. */
.pe-cta-band .pe-cta-band__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 0;
}

/* The wavy bottom edge: the wave shape's top 110px (at 1440) covers the bottom of
   the sage band and of the left flower, as in Figma (83:624). The shape
   (wave-shape-ink.svg) has the footer's colour, so the band melts into the footer. It is placed from the
   bottom of the section, so on phones, where the band is relatively taller, the edge
   still sits at the bottom. The rest of the shape is clipped by the section. */
.pe-cta-band .pe-cta-band__bottom {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: calc(-110 / 1440 * 100%); /* a % margin is a share of the width */
}

/* 343px flower, 54px from the left, its bottom 41px past the band (clipped). */
.pe-cta-band__flower {
	--pe-cta-flower: clamp(13rem, 23.82vw, 21.4375rem);

	position: absolute;
	left: calc(var(--pe-cta-flower) * 0.1574);
	bottom: calc(var(--pe-cta-flower) * -0.121);
	width: var(--pe-cta-flower);
}

.pe-cta-band--wave .pe-cta-band__buttons {
	margin-top: 1.02rem; /* 16px under the text */
}

.pe-cta-band--wave .pe-button {
	min-width: min(17.25rem, 100%);
}

@media (max-width: 767px) {
	.pe-cta-band__flower {
		display: none;
	}
}
