/* ============================================================
   Banner — Pass 2 design refresh.
   Full-bleed image (or dark fallback) with gradient overlay,
   clean white H1 in Montserrat, optional intro paragraph
   and CTA. Used by every page that renders <div class="banner">.
   ============================================================ */

.banner {
	position: relative;
	/* Default banner height — used on the homepage. Internal pages get a
	   shorter banner via body:not(.page-home) below since their banners only
	   hold an H1, not the full hero content stack. */
	height: 62vh;
	min-height: 520px;
	width: 100%;
	display: flex;
	align-items: center;
	overflow: hidden;
	/* Dark fallback — shows through when img-content is omitted (e.g. /showroom/). */
	background-color: var(--text-dark);
	color: #fff;
}

/* Internal pages — shorter banner (H1 only, no full hero stack) */
body:not(.page-home) .banner {
	height: 42vh;
	min-height: 340px;
}

/* Background image fills the banner, behind everything else. */
.banner > .img-content {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.banner > .img-content > img,
.banner > .img-content > video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: none; /* drop the old scaleX(-1) mirror */
	pointer-events: none; /* let clicks through to banner-content links */
}

/* Respect reduced-motion preferences — hide the video, fall back to poster. */
@media (prefers-reduced-motion: reduce) {
	.banner > .img-content > video {
		display: none;
	}
}

/* Gradient overlay improves text readability over busy photos.
   Two stacked gradients:
     1. Horizontal — darker on the left (where the centered text sits),
        transparent towards the right so the video stays visible.
     2. A gentle top-to-bottom shade for general video darkening. */
.banner::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to right,
			rgba(0, 0, 0, 0.6) 0%,
			rgba(0, 0, 0, 0.35) 40%,
			rgba(0, 0, 0, 0.05) 75%,
			rgba(0, 0, 0, 0) 100%
		),
		linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.15) 0%,
			rgba(0, 0, 0, 0.2) 50%,
			rgba(0, 0, 0, 0.35) 100%
		);
	z-index: 1;
	pointer-events: none;
}

/* Content sits over the image + gradient. */
.banner > .container {
	position: relative;
	z-index: 2;
	margin-inline: auto;
	padding-inline: var(--spacing-4);
	padding-block: var(--spacing-3);
	width: 100%;
	max-width: 1440px;
}

.banner > .container > .flex {
	display: flex;
	gap: var(--spacing-4);
	flex-wrap: wrap;
	align-items: center;
}

/* Drop the dark red box treatment — content is plain over the gradient now.
   max-width matches the section.flex-column width below the banner so hero
   text wraps at the same line-length as the body content. */
.banner > .container > .flex > .banner-content {
	background-color: transparent;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	max-width: 600px;
	width: 100%;
}

.banner-content h1 {
	font-family: 'Montserrat', 'Inter', sans-serif;
	color: #fff;
	font-weight: 600;
	/* Override base.css's --heading (up to 5.23rem) — too large for the
	   narrower 600px hero column, was wrapping to 4 lines. This clamp
	   targets 3 lines with the existing copy. */
	font-size: clamp(2.25rem, 3.4vw, 3.5rem);
	line-height: 1.1;
	letter-spacing: -0.018em;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
	margin: 0;
}

/* Keep the .text-primary accent (used on the homepage banner) but make it
   white-with-opacity so it reads as a tonal accent over the photo, not a
   competing colour. */
.banner-content .text-primary {
	color: #fff;
	opacity: 0.78;
}

.banner-content p {
	color: rgba(255, 255, 255, 0.94);
	font-size: var(--text);
	line-height: 1.45;
	margin: 0;
	max-width: 60ch;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* Hide the empty second flex column from the existing templates. */
.banner > .container > .flex > div:empty {
	display: none;
}

/* CTAs inside the banner — give them room without losing the button style. */
.banner-content .button {
	margin-top: 0.5rem;
}

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

@media (max-width: 991px) {
	.banner {
		height: 55vh;
		min-height: 460px;
	}
	body:not(.page-home) .banner {
		height: 38vh;
		min-height: 300px;
	}
}

@media (max-width: 767px) {
	/* Homepage banner stays taller — full hero content (H1 + intro + CTA). */
	body.page-home .banner {
		height: auto;
		min-height: 440px;
		align-items: center;
	}
	/* Internal pages get the 50% shorter banner — H1 only. */
	body:not(.page-home) .banner {
		height: auto;
		min-height: 220px;
		align-items: center;
	}
	/* Match the section padding (var(--spacing-4)) so banner content
	   aligns with the section heading below on mobile. */
	.banner > .container {
		padding-inline: var(--spacing-4);
		padding-block: var(--spacing-2);
	}
	.banner-content h1 {
		line-height: 1.12;
	}
}
