/**
 * Variant CSS: footer--closing-cta
 *
 * A footer that closes the sale first — a centred CTA band (kicker + large
 * headline + accent button) over a hairline, then a slim bar: brand + contact
 * left, legal links + copyright right. Same always-dark page-foot surface as the
 * sibling footers (contrast is explicit on-dark, never polarity-dependent); the
 * button takes the CTA tokens, accents take --accent. Part of the `footer` role.
 */

body.aibt-universal .universal-footer--closing-cta {
	background: var(--background-dark, #141414);
	color: var(--text-on-dark, #ffffff);
	padding-block: calc(clamp(3rem, 6vw, 5rem) * var(--density, 1));
}

/* ---- Closing CTA band ---- */
body.aibt-universal .universal-footer--closing-cta .universal-footer__cta {
	margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}

/* Footers are always the dark page foot. In LIGHT themes --accent collapses to
   --ink (≈ --background-dark) → invisible on dark. So the kicker uses restrained
   on-dark (like the sibling footers), and only the headline em carries a lifted
   accent that stays legible in every theme. */
body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-kicker {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	font-weight: 600 !important;
	letter-spacing: var(--tracking-widest) !important;
	text-transform: uppercase !important;
	color: var(--text-on-dark, #ffffff) !important;
	opacity: 0.6;
	margin: 0 auto var(--space-sm) auto !important;
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-headline {
	font-family: var(--font-display) !important;
	color: var(--text-on-dark, #ffffff) !important;
	/* Centred headline → keep horizontal margins auto (never left-pin, A8/A9). */
	margin: 0 auto clamp(1.6rem, 3.5vw, 2.4rem) auto !important;
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-headline em {
	/* Lift the accent toward white so it stays legible even when --accent == the
	   dark footer surface (light themes); colored + vivid in dark themes. */
	color: color-mix(in srgb, var(--accent) 62%, var(--on-dark, #ffffff)) !important;
	font-style: italic;
}

/* Accent button. */
body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-btn .wp-block-button__link {
	background: var(--cta-bg-primary, var(--accent)) !important;
	color: var(--cta-text-primary, #ffffff) !important;
	font-family: var(--font-body) !important;
	font-size: var(--text-base) !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em !important;
	padding: 0.85rem 1.9rem !important;
	border-radius: var(--decor-radius-pill, 999px) !important;
	border: none !important;
	transition: background var(--duration-fast, 0.18s) var(--ease-default, ease),
		transform var(--duration-fast, 0.18s) var(--ease-default, ease);
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-btn .wp-block-button__link:hover,
body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-btn .wp-block-button__link:focus-visible {
	background: var(--accent-hover, var(--accent)) !important;
	transform: translateY(-2px);
}

/* ---- Bottom bar ---- */
body.aibt-universal .universal-footer--closing-cta .universal-footer__bar {
	gap: 1rem 2rem !important;
	padding-top: calc(clamp(1.6rem, 3.5vw, 2.2rem) * var(--density, 1));
	border-top: 1px solid color-mix(in srgb, var(--text-on-dark, #ffffff) 14%, transparent);
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__masthead {
	font-family: var(--font-display) !important;
	color: var(--text-on-dark, #ffffff) !important;
	margin: 0 0 0.5rem 0 !important;
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__detail {
	font-family: var(--font-body) !important;
	font-size: var(--text-sm) !important;
	line-height: var(--leading-relaxed) !important;
	color: var(--text-on-dark, #ffffff) !important;
	opacity: 0.62;
	margin: 0 !important;
	max-width: 52ch;
}

/* Legal block: right-aligned on desktop. */
body.aibt-universal .universal-footer--closing-cta .universal-footer__legal {
	text-align: right;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__legal-links {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	color: color-mix(in srgb, var(--text-on-dark, #ffffff) 42%, transparent) !important;
	margin: 0 !important;
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__legal-links a {
	color: var(--text-on-dark, #ffffff) !important;
	opacity: 0.78;
	text-decoration: none;
	transition: color var(--duration-fast, 0.18s) var(--ease-default, ease),
		opacity var(--duration-fast, 0.18s) var(--ease-default, ease);
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__legal-links a:hover {
	color: color-mix(in srgb, var(--accent) 55%, var(--on-dark, #FFFFFF)) !important;
	opacity: 1;
}

body.aibt-universal .universal-footer--closing-cta .universal-footer__copyright {
	font-family: var(--font-body) !important;
	font-size: var(--text-xs) !important;
	color: var(--text-on-dark, #ffffff) !important;
	opacity: 0.55;
	margin: 0 !important;
}

/* Mobile: bar stacks + centres. */
@media (max-width: 600px) {
	body.aibt-universal .universal-footer--closing-cta .universal-footer__bar {
		justify-content: center !important;
		text-align: center;
	}
	body.aibt-universal .universal-footer--closing-cta .universal-footer__detail {
		margin-inline: auto !important;
	}
	body.aibt-universal .universal-footer--closing-cta .universal-footer__legal {
		text-align: center;
		align-items: center;
	}
}

/* Keyboard focus rings — give the CTA + legal links a visible focus indicator. */
body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-btn .wp-block-button__link:focus-visible,
body.aibt-universal .universal-footer--closing-cta .universal-footer__legal-links a:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--accent) 55%, var(--on-dark, #FFFFFF));
	outline-offset: 2px;
	border-radius: var(--decor-radius, 4px);
}

/* Respect reduced-motion — neutralise the CTA lift. */
@media (prefers-reduced-motion: reduce) {
	body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-btn .wp-block-button__link {
		transition: background var(--duration-fast, 0.18s) var(--ease-default, ease);
	}

	body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-btn .wp-block-button__link:hover,
	body.aibt-universal .universal-footer--closing-cta .universal-footer__cta-btn .wp-block-button__link:focus-visible {
		transform: none;
	}
}
