/* =============================================================================
   Mueller's Home Hero — home-hero.css
   Version: 1.0.6

   Only classes prefixed with mrp-hero- are styled here.
   No generic element selectors (section, div, img, h1, h2, p, a, button).
   ============================================================================= */

/* ── Custom properties ──────────────────────────────────────────────────────── */
:root {
	--mrp-hero-slide-transition: opacity 0.8s ease;
	--mrp-hero-img-transition:   transform 8s ease;
	--mrp-hero-overlay-l:        rgba(0, 0, 0, 0.72);
	--mrp-hero-overlay-m:        rgba(0, 0, 0, 0.42);
	--mrp-hero-overlay-r:        rgba(0, 0, 0, 0.16);
}

/* ── Prevent full-width homepage sections from creating page-level overflow ── */
/*
 * The hero and showroom sections intentionally use 100vw to escape the
 * WordPress content column. Some desktop browsers include the vertical
 * scrollbar in 100vw, producing a small horizontal page scrollbar.
 *
 * Clip only the homepage viewport. Nested horizontal components such as the
 * mobile brand-logo strip retain their own overflow-x:auto behavior.
 */
body.mrp-home-fullbleed-page {
	overflow-x: hidden;
	overflow-x: clip;
}

/* ── Unblock ancestor overflow so the hero breakout is not clipped ─────────── */
/*
 * The negative margin-left on .mrp-hero shifts the element left of its
 * containing block's left edge.  If any ancestor between the body and the
 * hero has overflow:hidden — which the WordPress block editor adds
 * automatically to Group blocks that carry a background colour, background
 * image, or border-radius — that ancestor clips the breakout and produces
 * a white strip on the left equal to the ancestor's left inset.
 *
 * Setting overflow:visible on the two most common WordPress wrappers
 * (.wp-site-blocks and any Group block that wraps the hero) removes the
 * clip.  The body already carries overflow-x:clip (above) which is the
 * correct scrollport boundary and prevents a horizontal scrollbar.
 *
 * .mrp-home-sections-brands has its own overflow:hidden for the ticker
 * animation; that rule is more specific and is unaffected by this override.
 */
body.mrp-home-fullbleed-page .wp-site-blocks {
	overflow: visible;
}

body.mrp-home-fullbleed-page .wp-block-group:has(.mrp-hero) {
	overflow: visible;
}

/* ── Visually hidden H1 ─────────────────────────────────────────────────────── */
.mrp-hero__sr-title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Hero wrapper ───────────────────────────────────────────────────────────── */
/*
   Full-bleed technique: breaks out of narrow content columns.
   margin-top: 0 — relies on body.mrp-premium-has-header padding-top
   from the header plugin to position content below the fixed header.
   The transparent fixed header visually overlays the top of the hero.
*/
.mrp-hero {
	position: relative;
	/*
	 * !important on the three full-bleed properties defeats two WordPress
	 * layout mechanisms that can override them:
	 *
	 *  1. Constrained-layout rule — generated by WordPress for every direct
	 *     child of an .is-layout-constrained ancestor that is not .alignfull:
	 *       :root :where(.is-layout-constrained) >
	 *         :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	 *           max-width: var(--wp--style--global--content-size);
	 *           margin-left: auto !important;
	 *           margin-right: auto !important;
	 *         }
	 *     This completely overrides calc(50% - 50vw) without !important.
	 *
	 *  2. Root-padding-aware rule (WP 6.1+) — if the theme enables
	 *     useRootPaddingAwareAlignments, a padding-left is added to the
	 *     .wp-site-blocks wrapper; !important on max-width ensures our
	 *     100vw declaration is never capped to content-size.
	 */
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	margin-top: 0;
	min-height: 100vh;    /* fallback for browsers that do not support svh */
	min-height: 100svh;
	overflow: hidden;
	background: #0a0a0a; /* visible until first image loads */
}

/* ── Slide track ────────────────────────────────────────────────────────────── */
.mrp-hero__track {
	position: absolute;
	inset: 0;
}

/* ── Individual slides ──────────────────────────────────────────────────────── */
.mrp-hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	pointer-events: none;
	transition: var(--mrp-hero-slide-transition);
}

.mrp-hero__slide--active {
	opacity: 1;
	pointer-events: auto;
}

/* ── Media container ────────────────────────────────────────────────────────── */
.mrp-hero__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

/* ── Hero image: Ken Burns slow zoom ────────────────────────────────────────── */
/*
   Base state: starts at scale(1.04) with no transition.
   This means when --active is REMOVED the image snaps instantly back to
   scale(1.04) (hidden, so no visible jump). The slow zoom only plays
   in the "entering" direction when --active is ADDED.
*/
.mrp-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--mrp-hero-pos-d, center center);
	transform: scale(1.04);
	transition: none;
}

.mrp-hero__slide--active .mrp-hero__img {
	transform: scale(1.0);
	transition: var(--mrp-hero-img-transition);
}

/* ── Dark gradient overlay ──────────────────────────────────────────────────── */
.mrp-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		105deg,
		var(--mrp-hero-overlay-l) 0%,
		var(--mrp-hero-overlay-m) 45%,
		var(--mrp-hero-overlay-r) 100%
	);
}

/* ── Slide content: positioned lower-left on desktop ───────────────────────── */
.mrp-hero__content {
	position: absolute;
	bottom: 18%;
	left: 8%;
	max-width: 620px;
	z-index: 5;
}

/* ── Text elements: base / inactive state ───────────────────────────────────── */
/*
   No transition defined here — when --active is removed the element snaps
   instantly back to opacity:0 + translateY(28px).
   The animation only plays when the parent gains --active (see below).
*/
.mrp-hero__eyebrow,
.mrp-hero__promo,
.mrp-hero__title,
.mrp-hero__desc,
.mrp-hero__cta,
.mrp-hero__fine-print {
	opacity: 0;
	transform: translateY(28px);
}

/* ── Text stagger reveal: only plays in the "entering" direction ─────────────── */
.mrp-hero__slide--active .mrp-hero__eyebrow {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.6s ease 0.30s, transform 0.6s ease 0.30s;
}

.mrp-hero__slide--active .mrp-hero__promo {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.6s ease 0.45s, transform 0.6s ease 0.45s;
}

.mrp-hero__slide--active .mrp-hero__title {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.6s ease 0.50s, transform 0.6s ease 0.50s;
}

.mrp-hero__slide--active .mrp-hero__desc {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.6s ease 0.70s, transform 0.6s ease 0.70s;
}

.mrp-hero__slide--active .mrp-hero__cta {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.6s ease 0.90s, transform 0.6s ease 0.90s;
}

.mrp-hero__slide--active .mrp-hero__fine-print {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.6s ease 1.05s, transform 0.6s ease 1.05s;
}

/* ── Eyebrow ────────────────────────────────────────────────────────────────── */
.mrp-hero__eyebrow {
	display: block;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
	margin: 0 0 0.75rem;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── Title (H2) ─────────────────────────────────────────────────────────────── */
.mrp-hero__title {
	display: block;
	font-size: clamp(2rem, 4.5vw, 4rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff;
	line-height: 1.05;
	margin: 0 0 1rem;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── Description ────────────────────────────────────────────────────────────── */
.mrp-hero__desc {
	display: block;
	font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.6;
	margin: 0 0 1.75rem;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── CTA link: sharp rectangular outline button ─────────────────────────────── */
.mrp-hero__cta {
	display: inline-block;
	padding: 0.875rem 2.25rem;
	border: 2px solid #ffffff;
	color: #ffffff;
	background: transparent;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	transition: background 0.2s ease, color 0.2s ease;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.mrp-hero__cta:hover {
	background: #ffffff;
	color: #000000;
}

.mrp-hero__cta:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ── Promotion badge ───────────────────────────────────────────────────────────────── */
.mrp-hero__promo {
	display: inline-block;
	background: rgba(255, 255, 255, 0.92);
	color: #111111;
	padding: 0.3125rem 0.875rem;
	font-size: 0.875rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
	margin: 0 0 1rem;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── CTA primary variant (filled light) ───────────────────────────────────────── */
.mrp-hero__cta--primary {
	background: #ffffff;
	color: #000000;
	border-color: #ffffff;
}

.mrp-hero__cta--primary:hover {
	background: rgba(255, 255, 255, 0.85);
	color: #000000;
}

/* ── CTA secondary variant: inherits .mrp-hero__cta transparent + white border ───── */

/* ── CTA actions row ──────────────────────────────────────────────────────────────────── */
.mrp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	margin: 0 0 1rem;
}

/* ── Fine print ──────────────────────────────────────────────────────────────────────── */
.mrp-hero__fine-print {
	display: block;
	font-size: 0.6875rem;
	color: rgba(255, 255, 255, 0.55);
	line-height: 1.5;
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── Prev / Next buttons (mounted on sides) ─────────────────────────────────── */
.mrp-hero__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #ffffff;
	font-size: 2rem;
	line-height: 1;
	width: 3rem;
	height: 3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.mrp-hero__btn:hover {
	background: rgba(0, 0, 0, 0.65);
	border-color: rgba(255, 255, 255, 0.55);
}

.mrp-hero__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.mrp-hero__btn--prev {
	left: 1.5rem;
}

.mrp-hero__btn--next {
	right: 1.5rem;
}

/* ── Controls bar: pagination dots + pause/play (bottom-right) ──────────────── */
.mrp-hero__controls {
	position: absolute;
	bottom: 2rem;
	right: 2rem;
	display: flex;
	align-items: center;
	gap: 0.625rem;
	z-index: 10;
}

/* ── Pagination dots ────────────────────────────────────────────────────────── */
.mrp-hero__pagination {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.mrp-hero__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.55);
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mrp-hero__dot:hover {
	border-color: #ffffff;
}

.mrp-hero__dot--active {
	background: #ffffff;
	border-color: #ffffff;
	transform: scale(1.35);
}

.mrp-hero__dot:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ── Pause / Play button ─────────────────────────────────────────────────────── */
.mrp-hero__pause-btn {
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: rgba(255, 255, 255, 0.72);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.3rem 0.625rem;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s ease, border-color 0.2s ease;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.mrp-hero__pause-btn:hover {
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.7);
}

.mrp-hero__pause-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ── Fallback: no images available ─────────────────────────────────────────── */
.mrp-hero__fallback {
	position: relative;
	width: 100%;
	min-height: 100vh;   /* fallback */
	min-height: 100svh;
	background: #111111;
	display: flex;
	align-items: flex-end;
}

/*
   Static content inside the fallback — text is always visible,
   no animation needed since there is no carousel state.
*/
.mrp-hero__content--static .mrp-hero__eyebrow,
.mrp-hero__content--static .mrp-hero__promo,
.mrp-hero__content--static .mrp-hero__title,
.mrp-hero__content--static .mrp-hero__desc,
.mrp-hero__content--static .mrp-hero__cta,
.mrp-hero__content--static .mrp-hero__fine-print {
	opacity: 1;
	transform: none;
}

/* ── Mobile breakpoint ──────────────────────────────────────────────────────── */
@media (max-width: 48rem) {

	/* ── Hero: fill the screen ──────────────────────────────────────────────── */
	.mrp-hero {
		min-height: 100vh;    /* fallback */
		min-height: 100svh;
	}

	/* ── Media container: allow blur pseudo to extend past edges ────────────── */
	.mrp-hero__media {
		overflow: visible;
		isolation: isolate; /* scope ::before / img z-indexes within media */
	}

	/* ── Blurred-fill background layer (behind the contained image) ─────────── */
	.mrp-hero__media::before {
		content: "";
		position: absolute;
		inset: -2rem;
		background-image: var(--mrp-hero-bg-image);
		background-size: cover;
		background-position: var(--mrp-hero-pos-m, center center);
		background-repeat: no-repeat;
		filter: blur(18px) brightness(0.48);
		transform: scale(1.08);
		z-index: 0;
	}

	/* ── Sharp contained image: above blur, below overlay ───────────────────── */
	.mrp-hero__img {
		position: relative;
		z-index: 1;
		object-fit: contain;
		object-position: var(--mrp-hero-pos-m, center center);
		transform: none; /* disable Ken Burns on mobile */
	}

	/* Disable Ken Burns active state on mobile */
	.mrp-hero__slide--active .mrp-hero__img {
		transform: none;
	}

	/* ── Dark readability overlay: above media, below text ──────────────────── */
	.mrp-hero__overlay {
		z-index: 2;
	}

	/* ── Content: anchored just below the overlaid fixed header ─────────────── */
	.mrp-hero__content {
		top: calc(var(--mrp-header-height, 64px) + 1.25rem);
		bottom: auto;
		left: 1rem;
		right: 1rem;
		width: auto;
		max-width: none;
		box-sizing: border-box;
		z-index: 5;
	}

	/* ── Typography ─────────────────────────────────────────────────────────── */
	.mrp-hero__title {
		font-size: clamp(2rem, 9vw, 2.75rem);
		line-height: 1.05;
	}

	.mrp-hero__desc {
		font-size: clamp(0.9375rem, 4vw, 1.0625rem);
		line-height: 1.5;
	}

	/* ── CTA buttons: constrained width, 48px touch target ─────────────────── */
	.mrp-hero__actions {
		flex-direction: column;
		align-items: flex-start;
	}

	.mrp-hero__cta {
		width: min(100%, 230px);
		min-height: 48px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* ── Prev / Next: bottom navigation zone ────────────────────────────────── */
	.mrp-hero__btn {
		top: auto;
		transform: none;
		bottom: 4.5rem;    /* fallback */
		bottom: calc(4.5rem + env(safe-area-inset-bottom));
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.5rem;
		z-index: 10;
	}

	.mrp-hero__btn--prev {
		left: 1rem;
	}

	.mrp-hero__btn--next {
		right: 1rem;
	}

	/* ── Pagination + Pause: centred between arrows ──────────────────────────── */
	.mrp-hero__controls {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
		bottom: 1.25rem;    /* fallback */
		bottom: calc(1.25rem + env(safe-area-inset-bottom));
		z-index: 10;
	}
}

/* ── prefers-reduced-motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	/* Slide crossfade: quicker opacity only, no Ken Burns */
	.mrp-hero__slide {
		transition: opacity 0.3s ease;
	}

	/* Image: no slow zoom */
	.mrp-hero__img,
	.mrp-hero__slide--active .mrp-hero__img {
		transform: none;
		transition: none;
	}

	/* Text: no translateY — only opacity */
	.mrp-hero__eyebrow,
	.mrp-hero__promo,
	.mrp-hero__title,
	.mrp-hero__desc,
	.mrp-hero__cta,
	.mrp-hero__fine-print {
		transform: none;
	}

	/* All text fades in together without stagger or movement */
	.mrp-hero__slide--active .mrp-hero__eyebrow,
	.mrp-hero__slide--active .mrp-hero__promo,
	.mrp-hero__slide--active .mrp-hero__title,
	.mrp-hero__slide--active .mrp-hero__desc,
	.mrp-hero__slide--active .mrp-hero__cta,
	.mrp-hero__slide--active .mrp-hero__fine-print {
		transition: opacity 0.3s ease;
	}
}
