/* Audiences block (ffp/audiences) with its children ffp/audience-group and ffp/audience-tile. Design tokens only. */
.ffp-audiences {
	--ffp-tile-line: #214065; /* the design's soft blue hairline on navy */
	padding-top: clamp(3rem, 0.5rem + 8.5vw, 10.6rem);
	padding-bottom: clamp(3rem, 0.5rem + 7.1vw, 9rem);
	color: var(--wp--preset--color--cream);
	background-color: var(--wp--preset--color--navy-700);
}
.ffp-audiences__head { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin: 0 auto; padding-inline: var(--wp--preset--spacing--40); text-align: center; }
.ffp-audiences__head .ffp-heading--center { max-width: 972px; color: var(--wp--preset--color--cream); }
.ffp-audiences__lead {
	max-width: 676px;
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--lead);
	line-height: var(--wp--custom--line-height--lead);
	letter-spacing: var(--wp--custom--letter-spacing--heading);
}
.ffp-audiences__groups { display: flex; flex-direction: column; gap: calc(clamp(2.5rem, 1rem + 3vw, 5rem) + 0.25rem); width: min(calc(100% - 2 * var(--wp--preset--spacing--40)), 1241px); margin: calc(clamp(2rem, 1rem + 2vw, 3.5rem) + 0.25rem) auto 0; }

/* Group (ffp/audience-group): a gold label over a 4-column grid */
.ffp-agroup__label {
	margin: 0 0 1.9rem;
	font-size: calc(var(--wp--preset--font-size--base) * 1.25);
	font-weight: 700;
	line-height: var(--wp--custom--line-height--lead);
	text-align: center;
	background: var(--wp--preset--gradient--gold);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.ffp-agroup--photos .ffp-agroup__label { margin-bottom: 2.5rem; }
.ffp-agroup__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* Tile (ffp/audience-tile): icon + name, or photo + name */
.ffp-atile { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; min-height: 235px; box-sizing: border-box; border: 1px solid var(--ffp-tile-line); text-align: center; }
.ffp-atile__media { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; width: 100%; margin: 0; padding-top: 1.5rem; }
.ffp-atile__media img { display: block; width: auto; height: auto; max-width: 140px; max-height: 110px; }
.ffp-atile__text { margin: 0; padding: 0 1rem 1.9rem; min-height: 3em; box-sizing: content-box; display: flex; align-items: flex-end; justify-content: center; max-width: 230px; font-weight: 700; line-height: 1.5; text-transform: capitalize; color: var(--wp--preset--color--white); }
.ffp-atile--photo { min-height: 374px; border: 2px solid var(--wp--preset--color--gold-dark); background: var(--wp--preset--color--navy-900); overflow: hidden; }
.ffp-atile--photo .ffp-atile__media { position: absolute; inset: 0; padding: 0; }
.ffp-atile--photo .ffp-atile__media img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; transition: transform 0.6s ease; }
.ffp-atile--photo:hover .ffp-atile__media img { transform: scale(1.04); }
.ffp-atile--photo::after { /* fades the photo into navy under the caption */
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 39.4%, var(--wp--preset--color--navy-900) 90%);
	pointer-events: none;
}
.ffp-atile--photo .ffp-atile__text { position: relative; z-index: 1; margin-top: auto; padding-bottom: 2.4rem; max-width: none; }

@media (max-width: 900px) {
	.ffp-agroup__grid { gap: 10px; }
	.ffp-atile__media img { max-width: 100px; max-height: 80px; }
	.ffp-atile { min-height: 200px; }
	.ffp-atile__text { padding-inline: 0.5rem; font-size: 0.875rem; }
	.ffp-atile--photo { min-height: 300px; }
	.ffp-atile--photo .ffp-atile__br { display: none; } /* let the caption wrap by itself in the narrower tiles */
	.ffp-atile--photo .ffp-atile__text { text-wrap: balance; }
}
@media (max-width: 699px) {
	.ffp-agroup__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ffp-atile__br { display: none; }
	.ffp-atile--photo { min-height: 270px; }
	.ffp-atile--photo .ffp-atile__text { padding-bottom: 1rem; }
}

/* Centred last row (7 tiles = 4 + 3) */
.ffp-agroup--center .ffp-agroup__grid { display: flex; flex-wrap: wrap; justify-content: center; }
.ffp-agroup--center .ffp-atile { flex: 0 0 calc((100% - 3 * 14px) / 4); }
@media (max-width: 899px) { .ffp-agroup--center .ffp-atile { flex-basis: calc((100% - 10px) / 2); } }
/* Plain icons (no box), e.g. on the sky band */
.ffp-atile--plain { border: 0; min-height: 0; }
.ffp-atile--plain .ffp-atile__media { flex: none; padding-top: 0; min-height: 96px; }
.ffp-atile--plain .ffp-atile__text { padding-bottom: 0; margin-top: 0.9rem; }
/* Light style: cream band, gold outlines, navy text, bold serif group label */
.ffp-audiences.is-style-light { color: var(--wp--preset--color--navy-700); background-color: var(--wp--preset--color--cream); padding-top: clamp(3rem, 0.5rem + 4vw, 6.6rem); }
.ffp-audiences.is-style-light .ffp-audiences__head .ffp-heading--center { color: var(--wp--preset--color--navy-700); }
.ffp-audiences.is-style-light .ffp-audiences__lead { max-width: 949px; background: var(--ffp-gold-ink); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.ffp-audiences.is-style-light .ffp-agroup__label { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--lead); font-weight: 700; letter-spacing: var(--wp--custom--letter-spacing--heading); -webkit-text-fill-color: var(--wp--preset--color--navy-700); background: none; color: var(--wp--preset--color--navy-700); }
.ffp-audiences.is-style-light .ffp-atile { min-height: 307px; border: 2px solid var(--wp--preset--color--gold-dark); }
.ffp-audiences.is-style-light .ffp-atile__text { max-width: 230px; color: var(--wp--preset--color--navy-700); }
.ffp-audiences.is-style-light .ffp-atile__media img { max-width: 150px; max-height: 120px; }

.ffp-audiences.is-style-light { padding-top: clamp(3rem, 0.5rem + 7vw, 9.1rem); padding-bottom: clamp(3rem, 0.5rem + 9vw, 11.7rem); }
.ffp-audiences.is-style-light .ffp-agroup__grid { row-gap: 20px; }
.ffp-atile--plain .ffp-atile__text { max-width: 285px; }

@media (max-width: 699px) {
	.ffp-audiences.is-style-light .ffp-atile { min-height: 230px; }
	.ffp-audiences.is-style-light .ffp-atile__media img { max-width: 100px; max-height: 80px; }
}

/* ==========================================================================
   Flowing copy between the groups (Mastermind page). When centred paragraphs, a heading or a button
   sit among the groups, the stack uses a tighter 16px rhythm and the lead may run wide (break lines with <br>).
   ========================================================================== */
.ffp-audiences__groups:has(> p, > h2, > h3, > .wp-block-buttons) { gap: 1rem; margin-top: calc(clamp(1.5rem, 1rem + 1vw, 2rem) + 0.25rem); }
.ffp-audiences:has(.ffp-audiences__groups > :is(p, h2, h3, .wp-block-buttons)) .ffp-audiences__lead { max-width: 1140px; }
.ffp-audiences__groups > p { margin: 0 auto; max-width: 865px; text-align: center; font-size: var(--wp--preset--font-size--base); line-height: var(--wp--custom--line-height--body); }
.ffp-audiences__groups > p.ffp-big { max-width: 1117px; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--lead); line-height: var(--wp--custom--line-height--lead); letter-spacing: var(--wp--custom--letter-spacing--heading); }
.ffp-audiences__groups > :is(h2, h3) { margin: 0 auto; max-width: 1214px; text-align: center; font-family: var(--wp--preset--font-family--heading); font-weight: 400; letter-spacing: var(--wp--custom--letter-spacing--heading); font-size: var(--wp--preset--font-size--heading-2); line-height: var(--wp--custom--line-height--heading-2); }
.ffp-audiences__groups > .wp-block-buttons { justify-content: center; margin-top: 0.5rem; }
.ffp-audiences__groups > .ffp-agroup { margin-block: 1.75rem 0.5rem; }
.ffp-audiences__groups > .ffp-agroup + p,
.ffp-audiences__groups > .ffp-agroup + :is(h2, h3) { margin-top: 1.25rem; }
.ffp-audiences.is-style-light .ffp-audiences__groups > :is(p, h2, h3) { color: var(--wp--preset--color--navy-700); }
.ffp-audiences__groups > p.ffp-tight { max-width: 1100px; }

/* Sentence case names (the design does not capitalise every word on some tiles) */
.ffp-agroup--sentence .ffp-atile__text { text-transform: none; }

/* Plain icons on a navy/cream section: three icons spaced like the design, vertically centred in a fixed band so the names line up */
.ffp-audiences .ffp-agroup--plain .ffp-agroup__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 8.75rem; }
.ffp-audiences .ffp-agroup--plain .ffp-atile { flex: 0 0 240px; }
.ffp-audiences .ffp-agroup--plain .ffp-atile__media { height: 84px; min-height: 0; }
.ffp-audiences .ffp-agroup--plain .ffp-atile__media img { max-width: 120px; max-height: 84px; }
.ffp-audiences .ffp-agroup--plain .ffp-atile__text { max-width: 200px; margin-top: 1.05rem; }

/* Framed: plain icons inside one gold frame, the label sits on the frame's top edge */
.ffp-agroup--framed { position: relative; border: 2px solid var(--wp--preset--color--gold-dark); padding: 3.8rem 1.5rem 3.2rem; }
.ffp-agroup--framed .ffp-agroup__label {
	position: absolute;
	top: 0;
	left: 50%;
	z-index: 1;
	margin: 0;
	padding: 0 1.9rem;
	transform: translate(-50%, -50%);
	width: max-content;
	max-width: calc(100% - 2rem);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 400;
	line-height: var(--wp--custom--line-height--lead);
	letter-spacing: var(--wp--custom--letter-spacing--heading);
	background: var(--wp--preset--color--cream);
	-webkit-text-fill-color: var(--wp--preset--color--navy-700);
	color: var(--wp--preset--color--navy-700);
}
.ffp-audiences:not(.is-style-light) .ffp-agroup--framed .ffp-agroup__label { background: var(--wp--preset--color--navy-700); -webkit-text-fill-color: var(--wp--preset--color--cream); color: var(--wp--preset--color--cream); }
.ffp-agroup--framed .ffp-agroup__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.2rem 5.625rem; }
.ffp-agroup--framed .ffp-atile { flex: 0 0 250px; }
.ffp-agroup--framed .ffp-atile__media { height: 82px; min-height: 0; }
.ffp-agroup--framed .ffp-atile__media img { max-width: 110px; max-height: 82px; }
.ffp-agroup--framed .ffp-atile__text { max-width: 240px; margin-top: 1.7rem; font-size: var(--wp--preset--font-size--base); }

/* Outlined: four gold-outlined boxes with an icon and a serif name (CTA) */
.ffp-agroup--outlined .ffp-agroup__grid { gap: 12px; }
.ffp-agroup--outlined .ffp-atile { min-height: 247px; border: 2px solid var(--wp--preset--color--gold-dark); }
.ffp-agroup--outlined .ffp-atile__media { flex: none; height: 106px; margin-top: 3.1rem; padding: 0; }
.ffp-agroup--outlined .ffp-atile__media img { max-width: 112px; max-height: 106px; }
.ffp-agroup--outlined .ffp-atile__text {
	flex: 1 1 auto;
	align-items: center;
	max-width: none;
	margin: 0;
	padding: 0.5rem 1rem 1.5rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	line-height: var(--wp--custom--line-height--lead);
	letter-spacing: var(--wp--custom--letter-spacing--heading);
}
.ffp-audiences.is-style-light .ffp-agroup--outlined .ffp-atile__text { color: var(--wp--preset--color--navy-700); }

/* Compact photo tiles (add the class "is-compact" to the group): 307px tall, fading into the section navy, caption centred in the lower band */
.ffp-agroup.is-compact .ffp-atile--photo { min-height: 307px; }
.ffp-agroup.is-compact .ffp-atile--photo::after { background: linear-gradient(180deg, transparent 32.7%, var(--wp--preset--color--navy-700) 88.5%); }
.ffp-agroup.is-compact .ffp-atile--photo .ffp-atile__text { align-items: center; min-height: 4.5em; padding: 0 1.25rem 2rem; max-width: none; }
.ffp-agroup.is-compact .ffp-agroup__grid { row-gap: 19px; }

@media (max-width: 900px) {
	.ffp-agroup--outlined .ffp-agroup__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ffp-audiences .ffp-agroup--plain .ffp-agroup__grid { column-gap: 3rem; }
	.ffp-agroup--framed .ffp-agroup__grid { column-gap: 2rem; }
}
@media (max-width: 699px) {
	.ffp-agroup--framed { padding-inline: 0.75rem; }
	.ffp-agroup--framed .ffp-agroup__label { font-size: var(--wp--preset--font-size--medium); width: calc(100% - 1.5rem); text-align: center; }
	.ffp-agroup--framed .ffp-atile { flex-basis: 100%; }
	.ffp-audiences .ffp-agroup--plain .ffp-atile { flex-basis: 100%; }
	.ffp-agroup.is-compact .ffp-atile--photo { min-height: 250px; }
}

/* Section starts right under a hero that already carries the spacing; a 797px copy width; first group needs no extra top margin */
.ffp-audiences.is-flush-top { padding-top: 0; }
@media (max-width: 1099px) { .ffp-audiences.is-flush-top { padding-top: 3rem; } }
.ffp-audiences__groups > p.ffp-narrow { max-width: 797px; }
.ffp-audiences__groups > .ffp-agroup:first-child { margin-top: 0; }

/* Light style: plain tiles keep no box, the framed label is a regular serif on the cream gap */
.ffp-audiences.is-style-light .ffp-atile--plain { border: 0; min-height: 0; }
.ffp-audiences.is-style-light .ffp-agroup--framed .ffp-agroup__label { font-weight: 400; background: var(--wp--preset--color--cream); -webkit-text-fill-color: var(--wp--preset--color--navy-700); color: var(--wp--preset--color--navy-700); }
.ffp-audiences.is-style-light .ffp-agroup--framed .ffp-atile__media { height: 82px; }
.ffp-audiences.is-style-light .ffp-agroup--framed .ffp-atile__media img { max-width: 110px; max-height: 82px; }
.ffp-audiences.is-style-light .ffp-agroup--framed .ffp-atile__text { max-width: 240px; margin-top: 1.7rem; font-size: var(--wp--preset--font-size--base); }

.ffp-agroup--framed .ffp-atile { flex-basis: 260px; }
.ffp-agroup--framed .ffp-atile__text, .ffp-audiences.is-style-light .ffp-agroup--framed .ffp-atile__text { padding-inline: 0; max-width: 250px; }
.ffp-agroup--framed .ffp-agroup__grid { column-gap: 5rem; }

/* Phone: the framed label becomes a plain line inside the top of the box (it would otherwise cover the whole top edge) */
@media (max-width: 699px) {
	.ffp-agroup--framed .ffp-agroup__label,
	.ffp-audiences.is-style-light .ffp-agroup--framed .ffp-agroup__label { position: static; transform: none; width: auto; max-width: none; margin: 0 0 1.5rem; padding: 0; background: none; text-align: center; }
	.ffp-agroup--framed { padding-top: 1.75rem; }
}

/* Tablet and phone: let leads and closing lines wrap naturally (the <br> breaks are for the wide desktop layout) */
@media (max-width: 900px) {
	.ffp-audiences__lead br,
	.ffp-audiences__groups > p br,
	.ffp-psplit__lead br,
	.ffp-psplit .ffp-heading br,
	.ffp-value .ffp-heading br { display: none; }
}
@media (max-width: 699px) {
	.ffp-agroup.is-compact .ffp-atile--photo .ffp-atile__text { padding-inline: 0.5rem; padding-bottom: 1.25rem; }
}
