/* ============================================================
   Hero section (flexible content layout "hero")
   Design ref: designs/Homepage Design Desktop.jpg (top) +
   Homepage Design Mobile.jpg (top).
   Mobile: full-bleed image on top, centred teal content below,
   description hidden, stacked full-width buttons.
   Desktop (>= 1024px): split - content left, carousel right.
   ============================================================ */

/* Background: the designer's exact export (Emma, 2026-07-24) - hero-bg.jpg,
   a teal field with subtle diagonal light streaks. Applied as an image per her
   instruction ("apply the background as an image - I've attached a JPEG"); it
   is the precise render she designed, so no reconstruction. cover keeps the
   streaks' diagonal angle correct at every hero size and crops the overflow;
   the teal is the fallback colour while the image loads.
   (--color-teal-hero-band-1..4 in main.css are now unused by this component.) */
.hero {
	/* Hero extends beneath the fixed transparent header */
	padding-top: var(--header-height);
	background-color: var(--color-teal-hero);
	background-image: url("../../images/hero-bg.jpg");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.hero__inner {
	display: flex;
	flex-direction: column;
	padding: 0;
}

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

.hero__content {
	order: 2;
	padding: var(--space-lg) var(--container-pad) var(--space-xl);
	text-align: center;
}

/* Hero eyebrow renders larger than the standard 12px eyebrow in the design */
.hero__eyebrow {
	margin-bottom: var(--space-sm);
	font-size: 0.9375rem;
	letter-spacing: 2.25px;
}

/* Hero display heading is larger than the generic heading scale:
   28px mobile / 36px desktop measured from the design */
.hero__heading {
	margin-bottom: var(--space-md);
	font-size: 1.75rem;
	line-height: 1.35;
	color: var(--color-text-on-dark);
}

.hero__text {
	/* Hidden on mobile per the design */
	display: none;
	margin-bottom: var(--space-lg);
	color: var(--color-text-on-dark);
}

.hero__buttons {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.hero__buttons .btn {
	width: 100%;
}

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

.hero__media {
	order: 1;
}

.hero__slider {
	position: relative;
	/* Mobile design crops much taller (~402x390) than the desktop 600x438 slot */
	aspect-ratio: 402 / 390;
	overflow: hidden;
}

@media (min-width: 1024px) {
	.hero__slider {
		aspect-ratio: 600 / 438;
	}
}

.hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.hero__slide.is-active {
	opacity: 1;
}

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

.hero__dots {
	display: none;
	justify-content: center;
	gap: 0.625rem;
	margin-top: var(--space-lg);
}

.hero__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--color-grey);
	opacity: 0.6;
	cursor: pointer;
	transition: background-color var(--transition), opacity var(--transition);
}

.hero__dot.is-active {
	background: var(--color-cream-light);
	opacity: 1;
}

/* Dots hidden on mobile (design shows none there) but shown from tablet up */
@media (min-width: 768px) {
	.hero__dots {
		display: flex;
	}
}

/* ---- Tablet (768-1023px): contained, not full-bleed - image in a padded,
   rounded frame at the desktop crop, content width capped ---- */

@media (min-width: 768px) {
	.hero__inner {
		padding: var(--space-lg) var(--container-pad) 0;
	}

	.hero__media {
		width: 100%;
		max-width: 640px;
		margin-inline: auto;
	}

	.hero__slider {
		aspect-ratio: 600 / 438;
		border-radius: var(--radius-xs);
	}

	.hero__content {
		max-width: 640px;
		margin-inline: auto;
	}

	.hero__buttons {
		flex-direction: row;
		justify-content: center;
	}

	.hero__buttons .btn {
		width: auto;
	}
}

/* ---- Desktop split layout ---- */

@media (min-width: 1024px) {
	.hero__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
		gap: var(--space-lg);
		align-items: center;
		padding: 5rem var(--container-pad);
	}

	.hero__content {
		order: 0;
		padding: 0;
		text-align: left;
	}

	.hero__heading {
		/* Guideline "Heading Large" 32px - also produces the design's 2-line break */
		font-size: var(--text-heading-lg);
		line-height: 1.25;
	}

	.hero__text {
		display: block;
		/* ~530px - reproduces the design's 4-line wrap */
		max-width: 33rem;
	}

	.hero__buttons {
		flex-direction: row;
		/* Reset the tablet rule's justify-content: center - at desktop the content
		   is left-aligned, so the buttons must start at the text's left edge too. */
		justify-content: flex-start;
		gap: var(--space-sm);
	}

	.hero__buttons .btn {
		width: auto;
	}

	.hero__media {
		order: 0;
	}

	.hero__slider {
		border-radius: var(--radius-xs);
	}
}
