/* ==========================================================================
   Pieces shared by several blocks (headings, eyebrow, divider...). Each block's
   own layout lives in blocks/<name>/style.css. Only design tokens are used
   (theme.json -> :root vars):
   colors  --wp--preset--color--*      gradient --wp--preset--gradient--gold
   fonts   --wp--preset--font-family--* sizes    --wp--preset--font-size--*
   spacing --wp--preset--spacing--*     line-h   --wp--custom--line-height--*
   ========================================================================== */

/* ---------- Shared pieces ---------- */
.ffp-heading { position: relative; margin: 0; }
.ffp-heading--center { margin-inline: auto; text-align: center; max-width: 773px; }

/* Gold brush underline: an inline format you apply to chosen words (select text > toolbar > "Brush underline").
   The stroke is drawn as the span's own background, so it is exactly as wide as the words it covers and each
   wrapped line gets its own stroke. Placed from the line box, so it works for any heading size; --ffp-lh is the
   heading's line-height and 1.369 is the font's text-box height in em. */
.ffp-brush {
	--ffp-lh: var(--wp--custom--line-height--heading-2);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	padding-bottom: 0.2em; /* room for the stroke inside the span's own box; does not change the line height */
	background: url("../images/brush-underline.svg") no-repeat left bottom calc(0.2em - (var(--ffp-lh) - 1.369) * 0.5em - 7px) / 100% 5px;
}
h1 .ffp-brush { --ffp-lh: var(--wp--custom--line-height--heading-1); }

/* Fraunces semibold sub-heading. */
.ffp-lead {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--lead);
	letter-spacing: var(--wp--custom--letter-spacing--heading);
}

/* 20px body-lead (hero text, stat labels). */
.ffp-medium {
	font-size: var(--wp--preset--font-size--medium);
	line-height: var(--wp--custom--line-height--medium);
}
.ffp-lead--italic { font-style: italic; font-weight: 400; }

/* Fraunces light-italic sub-heading. */
.ffp-lead-italic {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--heading-3);
	font-style: italic;
	font-weight: 300;
	line-height: var(--wp--custom--line-height--heading-3);
	letter-spacing: var(--wp--custom--letter-spacing--heading);
}

/* Small gold eyebrow label. */
.ffp-eyebrow {
	width: fit-content;
	margin-block: 0;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--letter-spacing--label);
	background: var(--wp--preset--gradient--gold);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.ffp-eyebrow.has-text-align-center { margin-inline: auto; }

/* Gold lines + wings emblem divider. */
.ffp-divider { display: flex; align-items: center; justify-content: center; gap: 2.4rem; }
.ffp-divider::before,
.ffp-divider::after { content: ""; flex: 0 1 312px; height: 1px; background: var(--wp--preset--color--gold); }
.ffp-divider--full { width: 100%; max-width: var(--wp--style--global--wide-size, 1240px); margin-inline: auto; }
.ffp-divider--full::before,
.ffp-divider--full::after { flex: 1 1 0; }
.ffp-divider__emblem { margin: 0; flex: none; }
.ffp-divider__emblem img { display: block; width: 129px; height: auto; }

/* ---------- About page pieces ---------- */
/* Dark-gold "ink" gradient for gradient text on cream (story lead, pilot-native lead). */
:root {
	--ffp-gold-ink: linear-gradient(74deg,
		var(--wp--preset--color--gold-dark) 1%,
		color-mix(in srgb, var(--wp--preset--color--gold-dark) 72%, var(--wp--preset--color--navy-900)) 27%,
		color-mix(in srgb, var(--wp--preset--color--gold-dark) 82%, var(--wp--preset--color--navy-900)) 53%,
		color-mix(in srgb, var(--wp--preset--color--gold-dark) 70%, var(--wp--preset--color--navy-900)) 75%,
		var(--wp--preset--color--gold-deep) 96%);
}

/* Outlined button: gold border, gold gradient text (CTA Banner). */
.wp-block-button.is-style-ffp-outline .wp-block-button__link {
	padding: calc(1.0625rem - 2px) calc(1.4375rem - 2px);
	color: transparent;
	background: var(--wp--preset--gradient--gold);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	border: 2px solid var(--wp--preset--color--gold-dark);
}
.wp-block-button.is-style-ffp-outline .wp-block-button__link::after { display: none; }
.wp-block-button.is-style-ffp-outline .wp-block-button__link:hover { border-color: var(--wp--preset--color--gold-light); box-shadow: none; }

/* ---------- Speaking page polish (matches the Figma render) ---------- */
/* Figma draws the Fraunces headings at optical size 36; the browser's automatic size (= font size) is narrower and lighter. */
:is(.ffp-sintro, .ffp-keynotes, .ffp-takeaways, .ffp-audiences, .ffp-sstyle, .ffp-msg, .ffp-invite, .ffp-hero.is-style-tall, .ffp-figma) :is(h1, h2, h3, .ffp-sstyle__title) {
	font-optical-sizing: none;
	font-variation-settings: "opsz" 36;
}
.ffp-hero.is-style-tall.is-style-tall h1 { font-variation-settings: "opsz" 54; } /* measured against the Figma line widths */
/* Button size in the Figma speaking page: 41px sides, 50px tall. */
:is(.ffp-invite, .ffp-hero.is-style-tall) .wp-block-button__link { padding: 0.9rem 2.5625rem; }
/* "ffp-figma" is an optional extra class for a section on that page (set on the block, Advanced > Additional CSS class). */
.ffp-social.ffp-figma { padding-top: clamp(3.5rem, 1rem + 6.3vw, 8.6rem); padding-bottom: clamp(3.5rem, 0.5rem + 7vw, 8.9rem); }

/* Speaking popup select arrow (kept here so the relative URL works when block CSS is inlined). */
.ffp-popup__field select,
.ffp-popup__plugin .ffpf-input select { background-image: url("../images/select-arrow.svg"); }
