/* Laid out on the page grid (.le-grid): the stack in the left seven columns, the image in the right five. */
.le-page-hero {
	align-items: end;
	padding-block: 6rem 1.5rem;
	color: var(--le-200);
	background: var(--le-black);
}

/* Items are spaced by the stack, so removing one closes the gap it would have left. */
.le-page-hero__stack {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	grid-column: 1 / span 7;
	/* The text keeps its designed measure inside those columns (Gear Sales' one-line title is the widest). */
	max-width: 40.8125rem;
}

.le-page-hero--no-image .le-page-hero__stack {
	grid-column: 1 / -1;
	max-width: 61.375rem;
}

.le-page-hero__eyebrow {
	color: var(--le-blue);
	text-box: trim-both cap alphabetic;
}

.le-page-hero__title {
	/* The widget's Title width, per screen: tablet falls back to desktop, mobile to tablet (see the media queries). */
	max-width: var(--le-title-max-desktop, none);
	color: var(--le-100);
}

@media (max-width: 1023px) {
	.le-page-hero__title {
		max-width: var(--le-title-max-tablet, var(--le-title-max-desktop, none));
	}
}

@media (max-width: 880px) {
	.le-page-hero__title {
		max-width: var(--le-title-max-mobile, var(--le-title-max-tablet, var(--le-title-max-desktop, none)));
	}
}

.le-page-hero__subheading {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3125rem;
	letter-spacing: -0.0113rem;
	color: var(--le-100);
	text-box: trim-both cap alphabetic;
}

.le-page-hero__copy {
	max-width: 21rem;
	text-box: trim-both cap alphabetic;
}

.le-page-hero__image {
	grid-column: 8 / -1;
	aspect-ratio: 569 / 515;
}

.le-page-hero__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Phones: the stack, then the image full width beneath it at its natural shape (the mobile mockup crops it to a short band; the user preferred it uncropped). */
@media (max-width: 880px) {
	.le-page-hero {
		row-gap: 1.5rem;
		padding-block: 3rem 0.75rem;
	}

	.le-page-hero__stack,
	.le-page-hero__image {
		grid-column: 1 / -1;
	}

	.le-page-hero__stack {
		max-width: none;
	}
}

/*
 * "Full-width image below": the eyebrow, then the title across the left eight columns with the
 * subheading, text and button in the right four, and the image from edge to edge underneath.
 */
.le-page-hero--below {
	padding-block: 6rem 0;
}

.le-page-hero__top {
	align-items: start;
	row-gap: 1.5rem;
	padding-bottom: 1.5rem;
}

.le-page-hero--below .le-page-hero__eyebrow {
	grid-column: 1 / -1;
}

.le-page-hero--below .le-page-hero__title {
	--le-title-adjust: var(--le-title-adjust-desktop, 0rem);
	grid-column: 1 / span 8;
	/* The usual H1 size plus the Title size slider; the line height keeps the H1's proportion (about 0.78). */
	font-size: calc(var(--le-h1-size) + var(--le-title-adjust));
	line-height: calc(var(--le-h1-leading) + var(--le-title-adjust) * 0.78);
}

.le-page-hero__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	grid-column: 9 / -1;
}

.le-page-hero--below .le-page-hero__subheading + .le-page-hero__copy {
	margin-top: -0.375rem;
}

.le-page-hero--below .le-page-hero__copy {
	max-width: none;
}

.le-page-hero--below .le-page-hero__image {
	aspect-ratio: 1440 / 680;
	overflow: clip;
}

/* The image slides up into its frame as the title's words do, following on from them (--le-image-delay, set by the
   template from the title's word count), and a cyan cover on it (as base.css's image reveal) draws up off it as it
   comes. */
.le-page-hero__slide {
	position: relative;
	height: 100%;
}

.le-js .le-page-hero--below:has(.le-page-hero__title[data-le-reveal]) .le-page-hero__slide {
	transform: translateY(100%);
	transition: transform 1.2s var(--le-ease-out) var(--le-image-delay, 0s);
}

.le-js .le-page-hero--below:has(.le-page-hero__title[data-le-reveal]) .le-page-hero__slide::after {
	position: absolute;
	z-index: 1;
	inset: 0;
	background: var(--le-blue);
	transform-origin: 50% 0;
	transition: transform 0.65s cubic-bezier(0.85, 0, 0.15, 1) var(--le-image-delay, 0s);
	content: "";
}

.le-js .le-page-hero--below:has(.le-page-hero__title.is-revealed) .le-page-hero__slide {
	transform: none;
}

.le-js .le-page-hero--below:has(.le-page-hero__title.is-revealed) .le-page-hero__slide::after {
	transform: scaleY(0);
}

@media (prefers-reduced-motion: reduce) {
	.le-js .le-page-hero--below .le-page-hero__slide {
		transform: none;
		transition: none;
	}

	.le-js .le-page-hero--below .le-page-hero__slide::after {
		content: none;
	}
}

/* ?image-reveal=none: the image still slides up, without its cover. */
[data-le-image-reveal-style="none"] .le-page-hero--below:has(.le-page-hero__title[data-le-reveal]) .le-page-hero__slide::after {
	content: none;
}

@media (max-width: 1023px) {
	.le-page-hero--below .le-page-hero__title,
	.le-page-hero__aside {
		grid-column: 1 / -1;
	}

	.le-page-hero--below .le-page-hero__title {
		--le-title-adjust: var(--le-title-adjust-tablet, 0rem);
	}

	.le-page-hero__aside {
		max-width: 28rem;
	}
}

@media (max-width: 880px) {
	.le-page-hero--below .le-page-hero__title {
		--le-title-adjust: var(--le-title-adjust-mobile, 0rem);
	}

	/* As in the Rental & Dry Hires mobile mockup: the image sits inside the gutters, taller than wide. */
	.le-page-hero--below {
		padding-block: 3rem var(--le-gutter);
	}

	.le-page-hero--below .le-page-hero__image {
		aspect-ratio: 369 / 419;
		margin-inline: var(--le-gutter);
	}
}
