/*
 * BF Base: global CSS shared by every page. Mobile first; wider screens add rules with min-width.
 * Colours, fonts and spacing only through theme.json tokens (var(--wp--preset--…)). No hex values.
 * Breakpoints: 768px (tablet), 1024px (desktop).
 */

*,
*::before,
*::after { box-sizing: border-box; }

body { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; }
.bfb-icon { flex: 0 0 auto; vertical-align: middle; }

:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; }

.screen-reader-text,
.bfb-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Container used inside full-width sections. */
.bfb-wrap {
	width: 100%;
	max-width: calc(var(--wp--style--global--wide-size) + var(--wp--preset--spacing--40) * 2);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--40);
}

/* A section block: full width, vertical rhythm from the one token. */
.bfb-section { margin-block: 0; padding-block: var(--wp--custom--section); }
.bfb-section--alt { background: var(--wp--preset--color--surface-alt); }
.bfb-section--dark { background: var(--wp--preset--color--dark); color: var(--wp--preset--color--on-dark); }
/* Full-width section blocks sit edge to edge: no block gap between them. */
.wp-block-post-content > .alignfull { margin-block: 0; }

/* Section heading group (eyebrow + title + intro). */
.bfb-head { max-width: 46rem; margin-bottom: var(--wp--preset--spacing--50); }
.bfb-head--center { margin-inline: auto; text-align: center; }
.bfb-eyebrow {
	margin: 0 0 var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.bfb-section--dark .bfb-eyebrow { color: currentColor; opacity: 0.85; }
.bfb-head h2 { margin: 0; }
.bfb-head p { margin: var(--wp--preset--spacing--30) 0 0; color: var(--wp--preset--color--muted); }
.bfb-section--dark .bfb-head p { color: inherit; opacity: 0.85; }

/* Buttons used by theme blocks (core buttons get the same look from theme.json). */
.bfb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	min-height: 48px; padding: 0.8em 1.6em;
	border: 1px solid transparent; border-radius: var(--wp--custom--radius--pill);
	font: 600 var(--wp--preset--font-size--sm) / 1.2 var(--wp--preset--font-family--body);
	text-decoration: none; cursor: pointer;
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition), border-color var(--wp--custom--transition);
}
.bfb-btn--primary { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--on-primary); }
.bfb-btn--primary:hover { background: var(--wp--preset--color--primary-hover); color: var(--wp--preset--color--on-primary); }
.bfb-btn--outline { border-color: currentColor; color: var(--wp--preset--color--primary); background: transparent; }
.bfb-btn--outline:hover { background: var(--wp--preset--color--primary); border-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--on-primary); }
.bfb-btn--light { border-color: currentColor; color: var(--wp--preset--color--on-dark); background: transparent; }
.bfb-btn--light:hover { background: var(--wp--preset--color--on-dark); color: var(--wp--preset--color--dark); }

.bfb-link-arrow {
	display: inline-flex; align-items: center; gap: 0.4em;
	font-weight: 600; font-size: var(--wp--preset--font-size--sm); text-decoration: none;
}
.bfb-link-arrow .bfb-icon { transition: transform var(--wp--custom--transition); }
.bfb-link-arrow:hover .bfb-icon { transform: translateX(3px); }

/* Editor-only hint printed by bfb_editor_hint(). */
.bfb-hint {
	padding: var(--wp--preset--spacing--40);
	border: 1px dashed var(--wp--preset--color--muted);
	background: var(--wp--preset--color--surface-alt);
	color: var(--wp--preset--color--ink);
	font: var(--wp--preset--font-size--sm) / 1.5 var(--wp--preset--font-family--body);
}

/* Plain pages and posts. */
.bfb-main { padding-block: var(--wp--preset--spacing--60); }
.bfb-main--flush { padding-block: 0; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
