/**
 * H&H Hero-Slider – front end. Mobile first.
 * Uses the H&H theme design tokens when available, with fallbacks.
 */

.hhmr-hero-wrap {
	--hhmr-hs-orange: var(--hhmr-color-orange, #e35205);
	--hhmr-hs-orange-hi: var(--hhmr-color-orange-hi, #ff6a1a);
	--hhmr-hs-black: var(--hhmr-color-black, #000);
	--hhmr-hs-engine: var(--hhmr-color-engine, #1a1817);
	--hhmr-hs-chrome: var(--hhmr-color-chrome-light, #c2c4c7);
	--hhmr-hs-white: var(--hhmr-color-white, #fff);
	--hhmr-hs-display: var(--hhmr-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
	--hhmr-hs-body: var(--hhmr-font-body, "Barlow", system-ui, sans-serif);
	--hhmr-hs-gutter: var(--hhmr-gutter, clamp(20px, 5vw, 64px));
	--hhmr-hs-max: var(--hhmr-container, 1320px);
	--hhmr-hs-ease: cubic-bezier(0.2, 0.7, 0.1, 1);
	background: var(--hhmr-hs-engine);
	color: var(--hhmr-hs-white);
	font-family: var(--hhmr-hs-body);
}

.hhmr-hero {
	position: relative;
	background: var(--hhmr-hs-black);
	isolation: isolate;
}

/* Slides are stacked in one grid cell. Each slide shows its photo completely
   (never cropped) over the full width: on smartphones and tablets the text
   sits in its own panel below the photo, on large screens on the photo. */
.hhmr-hero__viewport {
	position: relative;
	display: grid;
	width: 100%;
}

/* Slides ---------------------------------------------------------------- */

.hhmr-hero__slide {
	position: relative;
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	background: var(--hhmr-hs-black);
	transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.hhmr-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.9s ease, visibility 0s;
	z-index: 1;
}

.hhmr-hero__media {
	display: block;
	margin: 0;
}

.hhmr-hero__media img {
	display: block;
	width: 100%;
	height: auto;
}

.hhmr-hero__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	max-width: calc(var(--hhmr-hs-max) + 2 * var(--hhmr-hs-gutter));
	margin: 0 auto;
	padding: 32px var(--hhmr-hs-gutter) 40px;
}

.hhmr-hero__copy {
	max-width: 40rem;
}

/* Typography -------------------------------------------------------------- */

.hhmr-hero__kicker {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	font-family: var(--hhmr-hs-body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--hhmr-hs-orange-hi);
}

.hhmr-hero__kicker::before {
	content: "";
	flex: 0 0 28px;
	height: 3px;
	background: currentColor;
}

.hhmr-hero__title {
	margin: 0;
	font-family: var(--hhmr-hs-display);
	font-size: clamp(2.5rem, 11.5vw, 3.75rem);
	font-weight: 800;
	line-height: 0.92;
	letter-spacing: -0.005em;
	text-transform: uppercase;
	text-wrap: balance;
	color: var(--hhmr-hs-white);
}

.hhmr-hero__text {
	max-width: 34ch;
	margin: 16px 0 0;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.9);
}

.hhmr-hero__points {
	display: grid;
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.hhmr-hero__points li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.4;
}

.hhmr-hero__points .hhmr-icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	color: var(--hhmr-hs-orange-hi);
	stroke-width: 2.5;
}

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

.hhmr-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

.hhmr-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 26px;
	border: 2px solid transparent;
	border-radius: 2px;
	font-family: var(--hhmr-hs-display);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hhmr-hero__btn--primary {
	flex: 1 1 100%;
	background: var(--hhmr-hs-orange);
	border-color: var(--hhmr-hs-orange);
	color: var(--hhmr-hs-black);
}

.hhmr-hero__btn--ghost {
	flex: 1 1 100%;
	border-color: rgba(255, 255, 255, 0.85);
	color: var(--hhmr-hs-white);
}

.hhmr-hero__btn--primary:hover,
.hhmr-hero__btn--primary:focus-visible {
	background: var(--hhmr-hs-white);
	border-color: var(--hhmr-hs-white);
	color: var(--hhmr-hs-black);
}

.hhmr-hero__btn--ghost:hover,
.hhmr-hero__btn--ghost:focus-visible {
	background: var(--hhmr-hs-white);
	border-color: var(--hhmr-hs-white);
	color: var(--hhmr-hs-black);
}

.hhmr-hero a:focus-visible,
.hhmr-hero button:focus-visible {
	outline: 3px solid var(--hhmr-hs-orange-hi);
	outline-offset: 3px;
}

/* Offer plate ------------------------------------------------------------ */

.hhmr-hero__offer {
	align-self: stretch;
	padding: 16px 20px 18px;
	background: rgba(0, 0, 0, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-top: 4px solid var(--hhmr-hs-orange);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.hhmr-hero__offer p {
	margin: 0;
}

.hhmr-hero__offer-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hhmr-hs-orange-hi);
}

.hhmr-hero__offer-title {
	margin-top: 4px !important;
	font-family: var(--hhmr-hs-display);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

.hhmr-hero__offer-price {
	margin-top: 6px !important;
	font-family: var(--hhmr-hs-display);
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: lining-nums tabular-nums;
}

.hhmr-hero__offer-note {
	margin-top: 8px !important;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--hhmr-hs-chrome);
}

.hhmr-hero__offer-link {
	display: inline-block;
	margin-top: 12px;
	font-weight: 600;
	color: var(--hhmr-hs-white);
	text-decoration: underline;
	text-decoration-color: var(--hhmr-hs-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.hhmr-hero__offer-link:hover {
	color: var(--hhmr-hs-orange-hi);
}

/* Controls: selection bar below the photo, each entry with progress ----- */

.hhmr-hero__controls {
	position: relative;
	z-index: 3;
	display: none;
	align-items: center;
	gap: 4px;
	padding: 10px var(--hhmr-hs-gutter);
	background: var(--hhmr-hs-black);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hhmr-hero.is-ready .hhmr-hero__controls {
	display: flex;
}

.hhmr-hero__ctrl {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 2px;
	color: var(--hhmr-hs-white);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.hhmr-hero__ctrl:hover {
	border-color: var(--hhmr-hs-orange-hi);
	color: var(--hhmr-hs-orange-hi);
}

.hhmr-hero__ctrl .hhmr-icon {
	width: 20px;
	height: 20px;
}

.hhmr-hero__toggle {
	margin-right: 4px;
}

.hhmr-hero__toggle .hhmr-hero__icon-play,
.hhmr-hero.is-paused .hhmr-hero__toggle .hhmr-hero__icon-pause {
	display: none;
}

.hhmr-hero.is-paused .hhmr-hero__toggle .hhmr-hero__icon-play {
	display: block;
}

.hhmr-hero__lanes {
	display: flex;
	flex: 1 1 auto;
	align-items: stretch;
	gap: 4px;
	min-width: 0;
	margin: 0 4px;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	/* Fades the right edge so further entries are recognisable. */
	-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
	mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.hhmr-hero__lanes::-webkit-scrollbar {
	display: none;
}

.hhmr-hero__lanes li {
	flex: 1 0 auto;
	margin: 0;
}

.hhmr-hero__lane {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 6px 14px 10px;
	background: rgba(255, 255, 255, 0.06);
	border: 0;
	border-radius: 2px;
	font-family: var(--hhmr-hs-display);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--hhmr-hs-chrome);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hhmr-hero__lane:hover {
	background: rgba(255, 255, 255, 0.14);
	color: var(--hhmr-hs-white);
}

.hhmr-hero__lane[aria-current="true"] {
	background: rgba(255, 255, 255, 0.1);
	color: var(--hhmr-hs-white);
}

.hhmr-hero__lane::before,
.hhmr-hero__lane-fill {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
}

.hhmr-hero__lane::before {
	right: 0;
	background: rgba(255, 255, 255, 0.25);
}

.hhmr-hero__lane-fill {
	width: 0;
	background: var(--hhmr-hs-orange);
}

.hhmr-hero__lane[aria-current="true"] .hhmr-hero__lane-fill {
	width: 100%;
}

.hhmr-hero.is-playing .hhmr-hero__lane[aria-current="true"] .hhmr-hero__lane-fill {
	animation: hhmr-lane-fill var(--hhmr-hero-interval, 4000ms) linear forwards;
}

.hhmr-hero.is-hover .hhmr-hero__lane[aria-current="true"] .hhmr-hero__lane-fill {
	animation-play-state: paused;
}

@keyframes hhmr-lane-fill {
	from {
		width: 0;
	}

	to {
		width: 100%;
	}
}

.hhmr-hero__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Entrance of the active slide copy: one orchestrated sequence ----------- */

.hhmr-hero.is-ready .hhmr-hero__slide .hhmr-hero__copy > *,
.hhmr-hero.is-ready .hhmr-hero__slide .hhmr-hero__offer {
	opacity: 0;
	transform: translateY(18px);
}

.hhmr-hero.is-ready .hhmr-hero__slide.is-active .hhmr-hero__copy > *,
.hhmr-hero.is-ready .hhmr-hero__slide.is-active .hhmr-hero__offer {
	opacity: 1;
	transform: none;
	transition: opacity 0.7s var(--hhmr-hs-ease), transform 0.9s var(--hhmr-hs-ease);
}

.hhmr-hero.is-ready .hhmr-hero__slide.is-active .hhmr-hero__copy > :nth-child(1) {
	transition-delay: 0.2s;
}

.hhmr-hero.is-ready .hhmr-hero__slide.is-active .hhmr-hero__copy > :nth-child(2) {
	transition-delay: 0.3s;
}

.hhmr-hero.is-ready .hhmr-hero__slide.is-active .hhmr-hero__copy > :nth-child(3) {
	transition-delay: 0.42s;
}

.hhmr-hero.is-ready .hhmr-hero__slide.is-active .hhmr-hero__copy > :nth-child(4) {
	transition-delay: 0.52s;
}

.hhmr-hero.is-ready .hhmr-hero__slide.is-active .hhmr-hero__copy > :nth-child(5) {
	transition-delay: 0.62s;
}

.hhmr-hero.is-ready .hhmr-hero__slide.is-active .hhmr-hero__offer {
	transition-delay: 0.75s;
}

/* Fixed feature slots ----------------------------------------------------- */

.hhmr-hero-features {
	max-width: calc(var(--hhmr-hs-max) + 2 * var(--hhmr-hs-gutter));
	margin: 0 auto;
	padding: 8px var(--hhmr-hs-gutter) 24px;
}

.hhmr-hero-features__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin: 0;
	padding: 0;
	list-style: none;
}

.hhmr-hero-features__item {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	margin: 0;
	padding: 20px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hhmr-hero-features__item:first-child {
	border-top: 0;
}

.hhmr-hero-features__title a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--hhmr-hs-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.hhmr-hero-features__title a:hover,
.hhmr-hero-features__title a:focus-visible {
	color: var(--hhmr-hs-orange-hi);
}

.hhmr-hero-features__icon {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	color: var(--hhmr-hs-orange-hi);
	stroke-width: 1.5;
}

.hhmr-hero-features__title {
	margin: 0;
	font-family: var(--hhmr-hs-display);
	font-size: 1.3125rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--hhmr-hs-white);
}

.hhmr-hero-features__text {
	margin: 6px 0 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--hhmr-hs-chrome);
}

/* ≥ 600px ------------------------------------------------------------------ */

@media (min-width: 600px) {
	.hhmr-hero__btn--primary,
	.hhmr-hero__btn--ghost {
		flex: 0 0 auto;
	}

	.hhmr-hero-features__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 40px;
	}

	.hhmr-hero-features__item:nth-child(2) {
		border-top: 0;
	}
}

/* Tablets and small laptops: 16:9 photo, text panel below ---------------- */

@media (min-width: 768px) {
	.hhmr-hero__inner {
		padding-top: 40px;
	}

	.hhmr-hero__title {
		font-size: clamp(3rem, 6.5vw, 4.5rem);
	}

	.hhmr-hero__points {
		grid-template-columns: repeat(2, max-content);
		column-gap: 32px;
	}

	.hhmr-hero__offer {
		max-width: 360px;
	}

	.hhmr-hero__lane {
		font-size: 1.0625rem;
	}
}

@media (min-width: 1024px) {
	.hhmr-hero-features {
		padding-top: 32px;
		padding-bottom: 40px;
	}

	.hhmr-hero-features__list {
		grid-template-columns: none;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
		column-gap: 0;
	}

	.hhmr-hero-features__item {
		padding: 8px 28px;
		border-top: 0;
		border-left: 1px solid rgba(255, 255, 255, 0.12);
	}

	.hhmr-hero-features__item:first-child {
		padding-left: 0;
		border-left: 0;
	}
}

/* Large screens: photo over the full width, text on the photo ----------- */

@media (min-width: 1200px) {
	.hhmr-hero__slide {
		display: block;
	}

	/* Photo, text and selection bar fit into the first screen. */
	.hhmr-hero__media img {
		height: min(56.25vw, calc(100svh - var(--hhmr-header-height, 120px) - var(--wp-admin--admin-bar--height, 0px) - 66px));
		min-height: 460px;
		object-fit: cover;
		object-position: center;
	}

	/* Darkens only the left text area so the copy stays readable. */
	.hhmr-hero__media {
		position: relative;
	}

	.hhmr-hero__media::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.65) 32%, rgba(0, 0, 0, 0) 60%);
		pointer-events: none;
	}

	.hhmr-hero__inner {
		position: absolute;
		inset: 0;
		z-index: 1;
		justify-content: center;
		gap: 20px;
		max-width: none;
		margin: 0;
		padding: 40px 50% 40px max(var(--hhmr-hs-gutter), calc((100vw - var(--hhmr-hs-max)) / 2));
		text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 2px 18px rgba(0, 0, 0, 0.5);
	}

	.hhmr-hero__title {
		font-size: clamp(2.75rem, 4vw, 5rem);
	}

	.hhmr-hero__points {
		grid-template-columns: repeat(2, max-content);
	}

	.hhmr-hero__offer {
		max-width: 360px;
		text-shadow: none;
	}

	.hhmr-hero__btn {
		text-shadow: none;
	}

	.hhmr-hero__controls {
		padding-left: max(var(--hhmr-hs-gutter), calc((100vw - var(--hhmr-hs-max)) / 2));
		padding-right: max(var(--hhmr-hs-gutter), calc((100vw - var(--hhmr-hs-max)) / 2));
	}

	.hhmr-hero__lanes {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.hhmr-hero__lanes li {
		flex: 1 1 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hhmr-hero__slide,
	.hhmr-hero__slide.is-active,
	.hhmr-hero__media img,
	.hhmr-hero.is-ready .hhmr-hero__slide .hhmr-hero__copy > *,
	.hhmr-hero.is-ready .hhmr-hero__slide .hhmr-hero__offer {
		transition: none !important;
		transform: none !important;
	}

	.hhmr-hero.is-ready .hhmr-hero__slide .hhmr-hero__copy > *,
	.hhmr-hero.is-ready .hhmr-hero__slide .hhmr-hero__offer {
		opacity: 1;
	}
}

@media (forced-colors: active) {
	.hhmr-hero__lane::before,
	.hhmr-hero__lane-fill {
		forced-color-adjust: none;
		background: CanvasText;
	}

	.hhmr-hero__lane[aria-current="true"] .hhmr-hero__lane-fill {
		background: Highlight;
	}
}
