/* ==========================================================================
   Tranquility Hero Banner — Frontend Styles
   ========================================================================== */

.tqh-hero {
	--tqh-h-desktop: 830px;
	--tqh-h-tablet: 700px;
	--tqh-h-mobile: 100vh;
	--tqh-overlay: 0.45;
	--tqh-divider: #ffffff;
	--tqh-btn-bg: #A8B9AA;
	--tqh-btn-hover: #201D1A;
	--tqh-btn-text: #FFFFFF;

	position: relative;
	width: 100%;
	height: var(--tqh-h-desktop);
	min-height: var(--tqh-h-desktop);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #111; /* prevents any flash-of-white before poster loads */
	contain: layout paint; /* helps avoid CLS from injected media */
}

/* ---------- Background layer (video + poster + overlay) ---------- */

.tqh-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.tqh-hero__poster,
.tqh-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.tqh-hero__poster {
	z-index: 1;
}

.tqh-hero__video {
	z-index: 2;
	opacity: 0;
	transition: opacity 0.6s ease;
}

/* Once JS confirms playback has actually started, fade the video in over the poster */
.tqh-hero.is-playing .tqh-hero__video {
	opacity: 1;
}

.tqh-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 3;
	background: #000;
	opacity: var(--tqh-overlay);
	pointer-events: none;
}

/* ---------- Content ---------- */

.tqh-hero__content {
	position: relative;
	z-index: 4;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 24px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.tqh-hero__label {
	margin: 0 0 14px;
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: #ffffff;
}

.tqh-hero__title {
	margin: 0;
	font-family: "Libre Baskerville", Georgia, serif;
	font-size: 72px;
	font-weight: 400;
	line-height: 1.1;
	color: #ffffff;
}

.tqh-hero__divider {
	display: block;
	width: 60px;
	height: 1px;
	margin: 22px auto;
	background-color: var(--tqh-divider);
	opacity: 0.85;
}

.tqh-hero__body {
	margin: 0 0 34px;
	max-width: 700px;
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.6;
	color: #ffffff;
}

/* ---------- Buttons ---------- */

.tqh-hero__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	justify-content: center;
}

.tqh-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 18px 36px;
	border-radius: 12px;
	background-color: var(--tqh-btn-bg);
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
	color: var(--tqh-btn-text);
	transition: color 0.4s ease, box-shadow 0.4s ease;
	isolation: isolate;
}

.tqh-btn:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

/* Left-to-right premium reveal: a pseudo-element slides in from the left */
.tqh-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--tqh-btn-hover);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.4s ease;
	z-index: -1;
}

.tqh-btn:hover::before,
.tqh-btn:focus-visible::before {
	transform: scaleX(1);
}

.tqh-btn__label {
	position: relative;
	z-index: 1;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.tqh-hero {
		height: var(--tqh-h-tablet);
		min-height: var(--tqh-h-tablet);
	}
	.tqh-hero__title {
		font-size: 56px;
	}
	.tqh-hero__body {
		font-size: 18px;
	}
}

@media (max-width: 640px) {
	.tqh-hero {
		height: var(--tqh-h-mobile);
		min-height: var(--tqh-h-mobile);
	}
	.tqh-hero__title {
		font-size: 38px;
	}
	.tqh-hero__body {
		font-size: 16px;
	}
	.tqh-hero__buttons {
		flex-direction: column;
		width: 100%;
		max-width: 320px;
	}
	.tqh-btn {
		width: 100%;
	}
}

/* Respect reduced-motion preference: keep the video but drop the hover slide to an instant swap */
@media (prefers-reduced-motion: reduce) {
	.tqh-btn::before,
	.tqh-hero__video {
		transition: none;
	}
}
