/*
 * FunnelExec shared layout vocabulary. Every color, size and shadow comes from theme.json presets
 * (var(--wp--preset--*) / var(--wp--custom--*)). Translucent overlays use rgba() because no token exists.
 *
 * Pattern structure:
 *   <section class="wp-block-group alignfull fx-band fx-band--soft">   white | soft | ink, optional --compact
 *     <div class="wp-block-group fx-container"> … </div>                1200px, 24px gutters
 *   </section>
 * Inside: .fx-eyebrow, h2, .fx-lede, .fx-card-grid > .fx-card, core/buttons.
 */

*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
p { text-wrap: pretty; }
a { transition: color 200ms var(--wp--custom--easing); }
.wp-site-blocks { overflow-x: clip; }

/* Visible focus on every interactive element */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--brand);
	outline-offset: 2px;
}

/* ---------- Containers and bands ---------- */
.fx-container {
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 24px;
	width: 100%;
}
.fx-band {
	position: relative;
	padding-block: var(--wp--custom--section-pad);
	margin: 0;
}
.fx-band > .fx-container { position: relative; }
.fx-band--compact { padding-block: var(--wp--custom--section-pad-compact); }
.fx-band--white { background: var(--wp--preset--color--white); }
.fx-band--soft {
	background: var(--wp--preset--color--soft);
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.fx-band--soft + .fx-band--soft { border-top: 0; }
.fx-band--ink {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	overflow: hidden;
}
/* Blueprint grid overlay on ink bands */
.fx-band--ink::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(var(--wp--custom--grid-line-on-dark) 1px, transparent 1px),
		linear-gradient(90deg, var(--wp--custom--grid-line-on-dark) 1px, transparent 1px);
	background-size: 40px 40px;
}
.fx-band--ink.fx-band--flat::before { display: none; }
.fx-band--ink :where(h1, h2, h3, h4) { color: var(--wp--preset--color--white); }
.fx-band--ink :where(p) { color: var(--wp--preset--color--fg-on-dark-2); }
.fx-band--ink .fx-eyebrow { color: var(--wp--preset--color--lit); }
.fx-band--ruled-dark { border-bottom: 1px solid var(--wp--preset--color--ink-700); }
.fx-center { text-align: center; }
.fx-center :where(.fx-lede, h2, .fx-measure) { margin-inline: auto; }

/* ---------- Type helpers ---------- */
.fx-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--eyebrow);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: var(--wp--custom--tracking-eyebrow);
	text-transform: uppercase;
	color: var(--wp--preset--color--brand);
}
.fx-hero-title {
	font-size: clamp(38px, 5vw, 60px);
	line-height: 1.04;
	letter-spacing: -0.025em;
}
.fx-lede {
	font-size: var(--wp--preset--font-size--body-lg);
	line-height: 1.6;
	max-width: 60ch;
}
.fx-measure { max-width: 22ch; }
.fx-mono-note {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--mono-sm);
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--fg-3);
}
.fx-band--ink .fx-mono-note { color: var(--wp--preset--color--fg-on-dark-3); }
.fx-mono-label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 10px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--fg-3);
}
/* Section heading stack: eyebrow → h2 → lede */
.fx-eyebrow + :where(h1, h2) { margin-top: 16px; }
.fx-eyebrow + .fx-hero-title { margin-top: 20px; }
:where(h1, h2) + .fx-lede { margin-top: 18px; }
.fx-hero-title + .fx-lede { margin-top: 24px; }

/* ---------- Grids and cards ---------- */
.fx-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin-top: 40px;
}
.fx-card-grid > * { margin: 0 !important; }
.fx-card,
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	padding: 28px 24px;
	transition: box-shadow 200ms var(--wp--custom--easing), border-color 200ms var(--wp--custom--easing);
}
.fx-card :where(h3) + p { margin-top: 10px; }
.fx-band--ink .fx-card {
	background: var(--wp--preset--color--ink-800);
	border-color: var(--wp--preset--color--ink-700);
}
.fx-split {
	display: flex;
	flex-wrap: wrap;
	gap: 56px;
	align-items: center;
}
.fx-split > * { flex: 1 1 400px; min-width: 0; }

/* ---------- Buttons ---------- */
.wp-block-buttons { gap: 12px; }
.fx-band .wp-block-buttons { margin-top: 32px; }
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	transition: background-color 200ms var(--wp--custom--easing), border-color 200ms var(--wp--custom--easing), color 200ms var(--wp--custom--easing);
}
.wp-block-button.is-style-secondary .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--border);
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--ink);
	background: transparent;
}
.wp-block-button.is-style-secondary-dark .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--white);
	border: 1px solid rgba(255, 255, 255, 0.4);
}
.wp-block-button.is-style-secondary-dark .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--white);
	background: rgba(255, 255, 255, 0.06);
}

/* ---------- Footer ---------- */
.fx-footer {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--fg-on-dark-2);
}
.fx-footer > .fx-container { padding-block: 64px 32px; }
.fx-footer__top {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--wp--preset--color--ink-700);
}
.fx-footer__brand { flex: 1 1 280px; min-width: 0; }
.fx-footer__brand img { display: block; height: 24px; width: auto; }
.fx-footer__brand p { margin-top: 18px; font-size: 15px; line-height: 1.6; color: var(--wp--preset--color--fg-on-dark-2); max-width: 36ch; }
.fx-footer__col { flex: 0 1 160px; }
.fx-footer__col .fx-mono-label { color: var(--wp--preset--color--fg-on-dark-3); }
.fx-footer__col ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.4; }
.fx-footer a { color: var(--wp--preset--color--fg-on-dark-2); }
.fx-footer a:hover { color: var(--wp--preset--color--white); }
.fx-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	margin-top: 24px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--mono-sm);
	font-weight: 500;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--fg-on-dark-3);
}
/* The paragraphs themselves, or the global paragraph color (fg-2, 1.7:1 on the footer) wins: 6.1:1 (Derek's site changes 1.11). */
.fx-footer__bottom p { color: var(--wp--preset--color--fg-on-dark-3); }
/* The platform logos' trademark line (Derek's site changes 1.18): its own row, in sentence case. */
.fx-footer__bottom .fx-footer__trademarks { flex-basis: 100%; margin: 0; font-family: var(--wp--preset--font-family--sans); font-weight: 400; letter-spacing: 0; font-size: 12px; line-height: 1.5; }

/* ---------- Entrance motion: opacity + 4px rise, once per section ---------- */
@media (prefers-reduced-motion: no-preference) {
	.fx-js .fx-band > .fx-container {
		opacity: 0;
		transform: translateY(4px);
		transition: opacity 300ms var(--wp--custom--easing), transform 300ms var(--wp--custom--easing);
	}
	.fx-js .fx-band.is-visible > .fx-container { opacity: 1; transform: none; }
}
/* Never hide content in the editor */
.editor-styles-wrapper .fx-band > .fx-container { opacity: 1 !important; transform: none !important; }

/* Final CTA band: slightly shorter than a standard section (design: clamp(56px, 7vw, 88px)) */
.fx-cta-final { padding-block: clamp(56px, 7vw, 88px); }

/* Plain pages and posts */
.fx-prose .wp-block-post-title { font-size: var(--wp--preset--font-size--h-2); margin-bottom: 24px; }
.fx-prose .wp-block-post-content > * + * { margin-top: 1em; }
.fx-prose .wp-block-post-content :where(h2, h3) { margin-top: 1.6em; }

/* ---------- FAQ (pattern funnelexec/faq): core/details items; funnelexec-core adds FAQPage schema ---------- */
.fx-faq__list { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--wp--preset--color--border); }
.fx-faq__item { border-bottom: 1px solid var(--wp--preset--color--border); padding-block: 4px; }
.fx-faq__item summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-block: 18px;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--body-lg);
	color: var(--wp--preset--color--ink);
}
.fx-faq__item summary::-webkit-details-marker { display: none; }
.fx-faq__item summary::after {
	content: "+";
	flex: none;
	font-family: var(--wp--preset--font-family--mono);
	color: var(--wp--preset--color--brand);
}
.fx-faq__item[open] summary::after { content: "\2212"; }
.fx-faq__item summary:focus-visible { outline: 2px solid var(--wp--preset--color--brand); outline-offset: 4px; }
.fx-faq__item > :not(summary) { max-width: 68ch; margin: 0 0 18px; color: var(--wp--preset--color--fg-2); }
.fx-band--ink .fx-faq__list, .fx-band--ink .fx-faq__item { border-color: var(--wp--preset--color--ink-700); }
.fx-band--ink .fx-faq__item summary { color: var(--wp--preset--color--white); }
.fx-band--ink .fx-faq__item > :not(summary) { color: var(--wp--preset--color--fg-on-dark-2); }

/* "Illustrative" tag, only where a graphic shows invented figures or example statuses (Derek's site changes
   1.3, 2026-10-30): small and faint, no border. #7d8c96 is 4.6:1 on the #11252f panels (WCAG AA); not fainter. */
.fx-illustrative {
	display: inline-block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 9px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #7d8c96; /* no token */
	padding: 0;
}
/* On a white panel #7d8c96 is only 3.5:1, so light surfaces use Text 3 (#66747e, 4.8:1) to stay AA. */
.fx-hiw-panel .fx-illustrative { color: var(--wp--preset--color--fg-3); }

/* Lights switch on the animated diagrams (funnelexec_lights_switch(), Derek's site changes 1.4): the word,
   a switch and the current state. Off: grey switch, "Off". On: violet switch, "On". It sits at the right of
   the diagram head, with the Illustrative tag (where there is one) at the left. */
.fx-lights {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	height: 32px;
	margin-left: auto;
	padding: 0 12px 0 14px;
	background: transparent;
	border: 1px solid var(--wp--preset--color--ink-700);
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--fg-on-dark-2);
	cursor: pointer;
	transition: border-color 200ms var(--wp--custom--easing);
}
.fx-lights:hover { border-color: var(--wp--preset--color--fg-on-dark-3); }
.fx-lights:focus-visible { outline: 2px solid var(--wp--preset--color--lit); outline-offset: 2px; }
.fx-lights__track {
	position: relative;
	width: 30px;
	height: 16px;
	border-radius: 999px;
	background: #3a4d58; /* no token: the switch's off track */
	transition: background-color 200ms var(--wp--custom--easing);
}
.fx-lights__track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #c9d2d8; /* no token */
	transition: transform 200ms var(--wp--custom--easing), background-color 200ms var(--wp--custom--easing);
}
.fx-lights__state { min-width: 3ch; font-weight: 600; color: var(--wp--preset--color--white); }
.fx-lights[aria-checked="true"] { border-color: var(--wp--preset--color--brand); }
.fx-lights[aria-checked="true"] .fx-lights__track { background: var(--wp--preset--color--brand); }
.fx-lights[aria-checked="true"] .fx-lights__track::after { transform: translateX(14px); background: var(--wp--preset--color--white); }
@media (prefers-reduced-motion: reduce) {
	.fx-lights, .fx-lights__track, .fx-lights__track::after { transition: none; }
}

/* ---------- Testimonial photo (review r2 2.2): a round photo before the cite, in any quote block ---------- */
blockquote:has(> .fx-quote-photo) {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	column-gap: 16px;
	row-gap: 20px;
	align-items: center;
}
blockquote:has(> .fx-quote-photo) > p { grid-column: 1 / -1; margin: 0; }
blockquote:has(> .fx-quote-photo) > .fx-quote-photo { grid-column: 1; margin: 0; }
blockquote:has(> .fx-quote-photo) > .fx-quote-photo img { display: block; width: 56px; height: 56px; }
blockquote:has(> .fx-quote-photo) > cite { grid-column: 2; margin: 0; }
