/*
 * BP Builder — structural CSS. Brand-neutral on purpose: grid, spacing
 * mechanics, visibility, reveal. Every visual decision (type, colour,
 * buttons, cards) belongs to the theme and arrives through tokens and atom
 * classes. The fallbacks here only make an un-themed site readable.
 */

.bp-doc { display: block; }

/* Sections ------------------------------------------------------------- */
.bp-section { position: relative; }
.bp-section-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.bp-section-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-overlay-dark .bp-section-bg::after,
.bp-overlay-light .bp-section-bg::after { content: ""; position: absolute; inset: 0; }
.bp-overlay-dark .bp-section-bg::after { background: rgba(0, 0, 0, .55); }
.bp-overlay-light .bp-section-bg::after { background: rgba(255, 255, 255, .72); }
.bp-has-bg > .bp-container,
.bp-has-bg > .bp-section-inner { position: relative; z-index: 1; }

.bp-container {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--bp-container-default, 75rem);
	margin-inline: auto;
	padding-inline: var(--bp-gutter, 1.25rem);
}
.bp-w-full { padding-inline: 0; }

.bp-tone-dark { color: var(--bp-on-dark, #fff); }
.bp-align-center { text-align: center; }
.bp-align-center .bp-buttons { justify-content: center; }

/* Rows and columns ----------------------------------------------------- */
.bp-rows { display: flex; flex-direction: column; gap: var(--bp-row-gap, 2.5rem); }
.bp-row {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--bp-gap-md, 2rem);
	align-items: start;
}
.bp-valign-center { align-items: center; }
.bp-valign-bottom { align-items: end; }
.bp-col { min-width: 0; }
.bp-span-3  { grid-column: span 3; }
.bp-span-4  { grid-column: span 4; }
.bp-span-5  { grid-column: span 5; }
.bp-span-6  { grid-column: span 6; }
.bp-span-7  { grid-column: span 7; }
.bp-span-8  { grid-column: span 8; }
.bp-span-12 { grid-column: span 12; }

@media (max-width: 781px) {
	.bp-row { grid-template-columns: minmax(0, 1fr); }
	.bp-row > .bp-col { grid-column: 1 / -1; }
}
@media (min-width: 782px) and (max-width: 1023px) {
	.bp-row > .bp-span-3 { grid-column: span 6; }
}

/* Elements ------------------------------------------------------------- */
.bp-el { min-width: 0; }
.bp-col > .bp-el:last-of-type { margin-bottom: 0; }
.bp-heading { margin: 0; }
.bp-rich > :first-child { margin-top: 0; }
.bp-rich > :last-child { margin-bottom: 0; }
.bp-ta-left { text-align: left; }
.bp-ta-center { text-align: center; }
.bp-ta-right { text-align: right; }

.bp-buttons { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.bp-justify-left { justify-content: flex-start; }
.bp-justify-center { justify-content: center; }
.bp-justify-right { justify-content: flex-end; }

.bp-figure { margin: 0; }
.bp-media { overflow: hidden; }
.bp-media img { display: block; width: 100%; height: auto; }
.bp-media[class*="bp-ar-"] img { height: 100%; object-fit: cover; }
.bp-figure figcaption { font-size: .875em; opacity: .75; margin-top: .5rem; }
.bp-figure figcaption:empty { display: none; }

.bp-list { margin: 0; padding-left: 1.25em; }
.bp-list li + li { margin-top: .4em; }
.bp-list-check { list-style: none; padding-left: 0; }
.bp-list-check li { position: relative; padding-left: 1.75em; }
.bp-list-check li::before {
	content: ""; position: absolute; left: .15em; top: .35em;
	width: .9em; height: .5em;
	border-left: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(-45deg); color: var(--bp-check, currentColor);
}

.bp-card { display: flex; flex-direction: column; height: 100%; }
.bp-card-media img { display: block; width: 100%; height: auto; }
.bp-card-title { margin: 1rem 0 .5rem; }
.bp-card-text { margin: 0 0 1rem; }
.bp-card-link { margin-top: auto; }
.bp-card-boxed { border: 1px solid rgba(0, 0, 0, .12); border-radius: .5rem; overflow: hidden; }
.bp-card-boxed .bp-card-body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }

/* Neutral fallbacks, replaced by the theme's token classes. */
.bp-h-display { font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.05; }
.bp-h-1 { font-size: clamp(2.2rem, 4.5vw, 3.25rem); line-height: 1.1; }
.bp-h-2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); line-height: 1.15; }
.bp-h-3 { font-size: 1.5rem; line-height: 1.25; }
.bp-h-4 { font-size: 1.2rem; line-height: 1.3; }
.bp-h-eyebrow { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.bp-btn { display: inline-flex; align-items: center; padding: .75rem 1.25rem; border-radius: .375rem; font-weight: 600; text-decoration: none; }
.bp-btn-primary { background: #111; color: #fff; }
.bp-btn-secondary { border: 1px solid currentColor; color: inherit; }
.bp-btn-link { text-decoration: underline; color: inherit; }

/* Visibility ----------------------------------------------------------- */
@media (max-width: 781px) { .bp-hide-mobile { display: none !important; } }
@media (min-width: 782px) { .bp-hide-desktop { display: none !important; } }

/* Reveal --------------------------------------------------------------- */
.bp-js [data-bp-anim] { opacity: 0; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.bp-js [data-bp-anim="fade-up"] { transform: translateY(24px); }
.bp-js [data-bp-anim="fade-in-left"] { transform: translateX(-32px); }
.bp-js [data-bp-anim="fade-in-right"] { transform: translateX(32px); }
.bp-js [data-bp-anim="zoom-in"] { transform: scale(.94); }
.bp-js [data-bp-anim].bp-in,
.bp-reveal-all [data-bp-anim] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.bp-js [data-bp-anim] { opacity: 1; transform: none; transition: none; }
}

/* Image focal point and zoom, per screen size. Values arrive as custom
   properties on the image (see BP_Builder_Render_Context::focus_output). A
   size that is not set falls back to the next wider one. Zoom scales the
   image from its focal point, so the element around it must clip. */
img.bp-focus {
	--bp-x: var(--bp-fx, 50%); --bp-y: var(--bp-fy, 50%); --bp-z: var(--bp-fz, 1);
	object-position: var(--bp-x) var(--bp-y);
}
@media (max-width: 1023px) {
	img.bp-focus { --bp-x: var(--bp-fx-t, var(--bp-fx, 50%)); --bp-y: var(--bp-fy-t, var(--bp-fy, 50%)); --bp-z: var(--bp-fz-t, var(--bp-fz, 1)); }
}
@media (max-width: 781px) {
	img.bp-focus { --bp-x: var(--bp-fx-m, var(--bp-fx-t, var(--bp-fx, 50%))); --bp-y: var(--bp-fy-m, var(--bp-fy-t, var(--bp-fy, 50%))); --bp-z: var(--bp-fz-m, var(--bp-fz-t, var(--bp-fz, 1))); }
}
img.bp-focus.bp-zoom { transform: scale(var(--bp-z)); transform-origin: var(--bp-x) var(--bp-y); }
.bp-focus-clip { overflow: hidden; }
