/* SOYA Hero Video ------------------------------------------------------- */

.shv {
	--shv-height: 88vh;
	--shv-min-height: 520px;
	--shv-overlay: 0.58;
	--shv-accent: #f5b301;
	--shv-on-accent: #14161a;
	--shv-scrim: #080a0e;
	--shv-scrim-rgb: 8, 10, 14;
	--shv-max-width: 1180px;

	/* Inherit the theme's typeface so the header does not look bolted on. */
	font-family: inherit;

	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-height: var(--shv-min-height);
	height: var(--shv-height);
	margin: 0;
	overflow: hidden;
	background-color: var(--shv-scrim);
	isolation: isolate;
}

/*
 * Full-bleed even inside a narrow builder container.
 * 100vw includes the scrollbar, which would cause a horizontal scroll, so JS
 * replaces these with exact pixel values measured from the document width.
 * These declarations are the pre-JS fallback only.
 */
.shv--bleed {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Media ----------------------------------------------------------------- */

.shv__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 0;
}

.shv__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: opacity 900ms ease;
	will-change: opacity;
}

.shv.is-playing .shv__poster {
	opacity: 0;
}

.shv__frame {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(1.02);
	/* JS sets exact px dimensions; these are the no-JS-yet fallback. */
	width: 100vw;
	height: 56.25vw;
	min-width: 177.78vh;
	min-height: 100%;
	opacity: 0;
	transition: opacity 900ms ease;
	pointer-events: none;
}

.shv.is-playing .shv__frame {
	opacity: 1;
}

.shv__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Scrim ----------------------------------------------------------------- */

.shv__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(
			to bottom,
			rgba(var(--shv-scrim-rgb), calc(var(--shv-overlay) * 0.95)) 0%,
			rgba(var(--shv-scrim-rgb), calc(var(--shv-overlay) * 0.35)) 42%,
			rgba(var(--shv-scrim-rgb), calc(var(--shv-overlay) * 1.05)) 100%
		),
		radial-gradient(
			120% 90% at 50% 45%,
			rgba(var(--shv-scrim-rgb), 0) 30%,
			rgba(var(--shv-scrim-rgb), calc(var(--shv-overlay) * 0.8)) 100%
		);
}

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

.shv__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--shv-max-width);
	margin: 0 auto;
	padding: 6rem 1.5rem;
	box-sizing: border-box;
}

.shv__content {
	max-width: 46rem;
	color: #fff;
}

.shv--align-center .shv__inner {
	text-align: center;
}

.shv--align-center .shv__content {
	margin-left: auto;
	margin-right: auto;
}

.shv--align-left .shv__inner {
	text-align: left;
}

.shv__eyebrow {
	margin: 0 0 1rem;
	font-size: clamp(0.75rem, 0.9vw, 0.875rem);
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	/* Lightened where needed so a deep brand colour stays readable on video. */
	color: var(--shv-accent-text, var(--shv-accent));
}

.shv__title {
	margin: 0 0 1.125rem;
	font-size: clamp(2.25rem, 5.2vw, 4.25rem);
	line-height: 1.06;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #fff;
	text-wrap: balance;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.shv__subtitle {
	margin: 0 auto;
	max-width: 38rem;
	font-size: clamp(1rem, 1.4vw, 1.1875rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.86);
	text-wrap: pretty;
}

.shv--align-left .shv__subtitle {
	margin-left: 0;
}

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

.shv__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	margin-top: 2.25rem;
}

.shv--align-center .shv__actions {
	justify-content: center;
}

.shv__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.9375rem 1.75rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.shv__btn:hover {
	transform: translateY(-2px);
}

.shv__btn:focus-visible {
	outline: 3px solid var(--shv-accent-text, var(--shv-accent));
	outline-offset: 3px;
}

.shv__btn--primary {
	background-color: var(--shv-accent-button, var(--shv-accent));
	color: var(--shv-on-accent);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.shv__btn--primary:hover,
.shv__btn--primary:focus {
	filter: brightness(1.06);
	color: var(--shv-on-accent);
}

.shv__btn--ghost {
	background-color: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.55);
	color: #fff;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.shv__btn--ghost:hover {
	background-color: rgba(255, 255, 255, 0.18);
	border-color: #fff;
	color: #fff;
}

.shv__play {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent currentColor;
}

/* Sound toggle ---------------------------------------------------------- */

.shv__sound {
	position: absolute;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	background: rgba(10, 12, 16, 0.4);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #fff;
	cursor: pointer;
	transition: background-color 180ms ease, border-color 180ms ease;
}

.shv__sound:hover {
	background: rgba(10, 12, 16, 0.7);
	border-color: #fff;
}

.shv__sound:focus-visible {
	outline: 3px solid var(--shv-accent-text, var(--shv-accent));
	outline-offset: 3px;
}

/* Speaker glyph, drawn in CSS so there is no icon-font dependency. */
.shv__sound-icon {
	position: relative;
	display: block;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7px 10px 7px 0;
	border-color: transparent currentColor transparent transparent;
	margin-left: -4px;
}

.shv__sound-icon::before {
	content: "";
	position: absolute;
	top: -3px;
	left: 10px;
	width: 4px;
	height: 6px;
	background: currentColor;
}

/* Muted state: a slash across the speaker. */
.shv__sound[aria-pressed="false"] .shv__sound-icon::after {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	width: 22px;
	height: 2px;
	background: currentColor;
	transform: rotate(-45deg);
	transform-origin: center;
}

/* Scroll cue ------------------------------------------------------------ */

.shv__cue {
	position: absolute;
	left: 50%;
	bottom: 1.75rem;
	z-index: 3;
	width: 1.5rem;
	height: 2.5rem;
	margin-left: -0.75rem;
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: 999px;
}

.shv__cue span {
	position: absolute;
	top: 0.4rem;
	left: 50%;
	width: 3px;
	height: 6px;
	margin-left: -1.5px;
	border-radius: 2px;
	background: #fff;
	animation: shv-cue 1.9s ease-in-out infinite;
}

@keyframes shv-cue {
	0%   { transform: translateY(0);     opacity: 1; }
	70%  { transform: translateY(14px);  opacity: 0; }
	100% { transform: translateY(0);     opacity: 0; }
}

/* Lightbox -------------------------------------------------------------- */

.shv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5vh 4vw;
	background: rgba(6, 8, 11, 0.93);
	opacity: 0;
	transition: opacity 220ms ease;
}

.shv-lightbox.is-open {
	opacity: 1;
}

.shv-lightbox__inner {
	position: relative;
	width: 100%;
	max-width: 1100px;
	aspect-ratio: 16 / 9;
	background: #000;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.shv-lightbox__inner iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.shv-lightbox__close {
	position: absolute;
	top: -3rem;
	right: 0;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.shv-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.24);
}

/* Screen reader text (in case the theme does not define it) -------------- */

.shv__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

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

@media (max-width: 782px) {
	.shv {
		height: auto;
		min-height: 72vh;
	}

	.shv__inner {
		padding: 5rem 1.25rem;
	}

	.shv__actions {
		gap: 0.75rem;
	}

	.shv__btn {
		padding: 0.875rem 1.375rem;
		font-size: 0.9375rem;
	}

	.shv__sound {
		right: 1rem;
		bottom: 1rem;
		width: 2.75rem;
		height: 2.75rem;
	}

	.shv__cue {
		display: none;
	}
}

/* Accessibility ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.shv__frame {
		display: none;
	}

	.shv__poster {
		opacity: 1 !important;
	}

	.shv__cue span {
		animation: none;
	}

	.shv__btn:hover {
		transform: none;
	}
}
