/*
 * Info cards section (sections/info-cards.php). The template's doc comment lists which
 * settings give which look. Figma "Updated" page 83:59, at 1440:
 *
 *   --left      Find us 83:686, Book 83:792: left heading, 40px to the cards, 24px gaps.
 *   --centred   Parties 83:509 (steps): centred heading, 44px to the cards, 32px gaps.
 *   --band      a centred section with an intro / text / buttons: Parties 83:471,
 *               83:484, 83:493, What's On 83:579, Book 83:769, 83:778. 64px padding,
 *               32px between every block, cards 24px apart side by side, 32px between rows.
 *   --text-left / --highlight   from the Alignment and "Details as a big line" fields (see the template).
 *   --cols-1 / --cols-2 / --cols-3   cards per row.
 *   --numbered  "1 - " in front of each title (steps).
 *
 * Context rules (the section next to it changes the space) are at the end.
 */

/* ---------- Section padding ---------- */

/* Find us 83:686: Figma stretched the frame and centred the content, so the heading sits
   62.5px below the section top and the cards end 110.5px above the CTA band. */
.pe-info-cards--left {
	padding-block: clamp(2rem, 4.34vw, 3.906rem) clamp(3rem, 7.67vw, 6.906rem);
}

/* The new bands: 64px above and below. */
.pe-info-cards.pe-info-cards--band {
	padding-block: clamp(3rem, 4.44vw, 4rem);
}

/* ---------- Heading and the text around the cards ---------- */

.pe-info-cards__heading {
	margin: 0;
}

.pe-info-cards--centred .pe-info-cards__heading {
	text-align: center;
}

/* Every block after the heading is 32px below the one before it (the band rhythm). */
.pe-info-cards__intro,
.pe-info-cards__details,
.pe-info-cards__after,
.pe-info-cards__small-print {
	margin: 2rem 0 0;
}

/* Nunito 27.2 / 39.5. */
.pe-info-cards__intro {
	font-size: var(--pe-text-intro);
}

/* Nunito 24 / 34.8: Parties start times, Book notes, What's On paragraphs. */
.pe-info-cards__details,
.pe-info-cards__after {
	font-size: clamp(1.0625rem, 1.67vw, 1.5rem);
	line-height: 1.45;
}

/* What's On "Day and time coming soon.": Fredoka 600 30 / 34.5, always centred. */
.pe-info-cards--highlight .pe-info-cards__details {
	font-family: var(--pe-font-display);
	font-size: clamp(1.375rem, 2.08vw, 1.875rem);
	font-weight: 600;
	line-height: 1.15;
}

/* Paragraphs typed into "Text under the cards" (blank line = new paragraph): 32px apart. */
.pe-info-cards__after p {
	margin: 0 0 2rem;
}

.pe-info-cards__after > :last-child {
	margin-bottom: 0;
}

/* Buttons: 64px tall, 24px apart. The width follows the label, but never under 230px
   (Parties "Book a party"), the same as the text band's buttons. */
.pe-info-cards__buttons {
	gap: 1.5rem;
	margin-top: 2rem;
}

.pe-info-cards__buttons .pe-button {
	min-width: 14.375rem;
	min-height: 4rem;
}

/* The band centres its text; --text-left puts it back on the left (heading and
   highlight stay centred). */
.pe-info-cards--band .pe-info-cards__intro,
.pe-info-cards--band .pe-info-cards__details,
.pe-info-cards--band .pe-info-cards__after,
.pe-info-cards--band .pe-info-cards__small-print {
	text-align: center;
}

.pe-info-cards--band .pe-info-cards__buttons {
	justify-content: center;
}

.pe-info-cards--band.pe-info-cards--text-left .pe-info-cards__intro,
.pe-info-cards--band.pe-info-cards--text-left .pe-info-cards__details,
.pe-info-cards--band.pe-info-cards--text-left .pe-info-cards__after,
.pe-info-cards--band.pe-info-cards--text-left .pe-info-cards__small-print {
	text-align: left;
}

.pe-info-cards--band.pe-info-cards--text-left .pe-info-cards__buttons {
	justify-content: flex-start;
}

.pe-info-cards.pe-info-cards--highlight .pe-info-cards__details {
	text-align: center;
}

/* ---------- Card grid ---------- */

.pe-info-cards__grid {
	--pe-info-cards-cols: 3;

	display: grid;
	grid-template-columns: repeat(var(--pe-info-cards-cols), minmax(0, 1fr));
	gap: 1.5rem;
	margin-top: 2.5rem;
}

.pe-info-cards--cols-2 .pe-info-cards__grid {
	--pe-info-cards-cols: 2;
}

.pe-info-cards--cols-1 .pe-info-cards__grid {
	--pe-info-cards-cols: 1;
}

/* Steps: 32px between the cards, 44px under the heading. */
.pe-info-cards--centred .pe-info-cards__grid {
	gap: 2.5rem 2rem;
	margin-top: 2.75rem;
}

/* Band: 32px between rows (and between full-width rows), 24px side by side. */
.pe-info-cards.pe-info-cards--band .pe-info-cards__grid {
	gap: 2rem 1.5rem;
	margin-top: 2rem;
}

/* ---------- Cards ---------- */

/* .pe-card's 32px padding; Figma keeps the 1px beige border on the coloured cards too. */
.pe-info-cards .pe-info-cards__card {
	border-color: var(--pe-beige);
}

/* A card with a link (Book play passes): the whole card is the <a>. The cue
   ("Book now →") sits at the bottom, so the cues line up when texts differ. */
.pe-info-cards__card--link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.pe-info-cards__cue {
	margin-top: auto;
	padding-top: 1rem;
	font-family: var(--pe-font-display);
	font-size: var(--pe-text-body);
	font-weight: 600;
	line-height: 1.2;
}

.pe-info-cards__card--link:hover .pe-info-cards__cue,
.pe-info-cards__card--link:focus-visible .pe-info-cards__cue {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Title: Fredoka 34.5 / 41.4 (h3), 16px above the text. */
.pe-info-cards__title {
	margin: 0 0 1rem;
}

.pe-info-cards__title:last-child {
	margin-bottom: 0;
}

/* Price: a second title line, same type, no gap ("Standard / $790"). */
.pe-info-cards__price {
	display: block;
}

.pe-info-cards__text,
.pe-info-cards__list {
	margin: 0;
}

/* Bullets: Nunito 22.9 / 33.2, the text 34px in from the card padding, no gap
   between items. */
.pe-info-cards__list {
	padding-left: 2.145rem;
	list-style: disc;
}

.pe-info-cards__text + .pe-info-cards__list {
	margin-top: 1rem;
}

/* ---------- Context: the section next to it changes the space ---------- */

/* Book 83:792 "Before you book", after the "Planning a celebration?" text band: 65.5px
   above the heading, 36px to the cards, 137.5px under them (Figma centres the content
   in a taller frame). */
.pe-text-band + .pe-info-cards--left {
	padding-block: clamp(2rem, 4.55vw, 4.094rem) clamp(3rem, 9.55vw, 8.594rem);
}

.pe-text-band + .pe-info-cards--left .pe-info-cards__grid {
	margin-top: 2.25rem;
}

/* Book 83:769 "General admission": the aqua wave (wave divider "shape-aqua") starts
   32px under the note. */
.pe-info-cards.pe-info-cards--band:has(+ .pe-wave-divider--shape-aqua) {
	padding-bottom: 2rem;
}

/* Book 83:778 "Play more, pay less", under that wave: the aqua band is 893px tall with
   the content centred, 144.5px above and below. */
.pe-wave-divider--shape-aqua + .pe-info-cards.pe-info-cards--band {
	padding-block: clamp(4rem, 10.03vw, 9.031rem);
}

/* What's On 83:579: the aqua carries on 52px past Figma's 64px before the "aqua-out"
   wave, so 116px under the button. */
.pe-info-cards.pe-info-cards--band:has(+ .pe-wave-divider--aqua-out) {
	padding-bottom: clamp(4rem, 8.06vw, 7.25rem);
}

/* (Parties steps 83:509 before the yellow FAQs: the bottom space comes from
   section-faq.css, `.pe-section:has(+ .pe-faq.pe-faq--wave)`.) */

/* ---------- Smaller screens ---------- */

/* Steps: Figma's cards are a fixed 241px; the content alone is about 196px. Only on
   wide screens, where the cards sit side by side as in Figma. */
@media (min-width: 1024px) {
	.pe-info-cards--numbered .pe-info-cards__card {
		min-height: 15.0625rem;
	}

	/* Figma rounds each text box up to whole pixels, so a one-line card (title + one
	   line of text) is 158px there and 157 here. Over five full-width rows (Book
	   83:769) that adds up, so give the band's cards Figma's height. */
	.pe-info-cards--band .pe-info-cards__card {
		min-height: 9.875rem;
	}
}

@media (max-width: 1023px) {
	.pe-info-cards--cols-3 .pe-info-cards__grid {
		--pe-info-cards-cols: 2;
	}

	/* An odd number of cards in two columns: the last one takes the full row instead
	   of leaving a hole next to it. */
	.pe-info-cards--cols-3 .pe-info-cards__card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

@media (max-width: 767px) {
	.pe-info-cards .pe-info-cards__grid {
		--pe-info-cards-cols: 1;
	}

	.pe-info-cards.pe-info-cards .pe-info-cards__grid {
		gap: 1.25rem;
	}

	.pe-info-cards .pe-info-cards__card {
		padding: 1.5rem;
	}
}

/* Smallest phones: one full-width button per row. */
@media (max-width: 479px) {
	.pe-info-cards__buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.pe-info-cards__buttons .pe-button {
		width: 100%;
		min-width: 0;
	}
}
