/**
 * Site UI: back-to-top control, and button hover states.
 *
 * BUTTON HOVER lives here because Elementor would not generate it. Both native
 * routes were tried and both wrote without error while producing no CSS at all:
 * per-element `hover` on the e-button, and a `hover` block on the global
 * btn-primary / btn-outline classes. Verified by enumerating every stylesheet
 * and finding zero :hover rules matching the buttons. Until that is understood,
 * the hover is defined here so it actually works.
 *
 * Colours follow the site's own button system: #05D16E fill, #24F08D on hover
 * for the solid variant, and the hollow variant filling green with ink text.
 */

/* ── Button hover ─────────────────────────────────────────────────────────── */

.elementor .btn-primary,
.elementor .btn-outline {
	transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.elementor .btn-primary:hover,
.elementor .btn-primary:focus-visible {
	background-color: #24F08D;
	border-color: #24F08D;
	color: #30303C;
}

/* Hollow: the border must travel with the fill, or it reads as a stray outline. */
.elementor .btn-outline:hover,
.elementor .btn-outline:focus-visible {
	background-color: #05D16E;
	border-color: #05D16E;
	color: #30303C;
}

/* ── Back to top ──────────────────────────────────────────────────────────── */

/* Hidden until the page has been scrolled; back-to-top.js toggles is-visible.
   Kept out of the tab order and hidden from assistive tech while invisible, so
   it is not a phantom stop for keyboard and screen-reader users. */
.back-to-top {
	position: fixed;
	inset-block-end: 28px;
	inset-inline-end: 28px;
	z-index: 900;

	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;

	border: 2px solid #05D16E;
	border-radius: 50%;
	background-color: #05D16E;
	color: #30303C;
	cursor: pointer;

	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease,
		visibility .25s ease, background-color .3s ease, border-color .3s ease;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
	background-color: #24F08D;
	border-color: #24F08D;
}

.back-to-top svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* Clear of the thumb on small screens, and a little tighter. */
@media (max-width: 767px) {
	.back-to-top {
		inset-block-end: 18px;
		inset-inline-end: 18px;
		width: 42px;
		height: 42px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.back-to-top { transition: opacity .25s ease, visibility .25s ease; transform: none; }
	.back-to-top.is-visible { transform: none; }
}

@media print {
	.back-to-top { display: none; }
}
