/*
 * Alfa Components — Hero ([alfa_hero])
 *
 * Scoped under .alfa-hero. Tokens come from alfa-components.css (.alfa-c).
 * Contrast (WCAG AA):
 *   white on --alfa-navy-dark overlay ............ > 12:1
 *   --alfa-orange eyebrow on --alfa-navy-dark ..... ~6.5:1
 *   --alfa-navy-dark text on --alfa-orange button . ~6.5:1 (white would be ~2.6:1)
 */

.alfa-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	align-items: center;
	width: 100%;
	background-color: var(--alfa-navy-dark);
	color: var(--alfa-white);
}

/* Layouts ---------------------------------------------------------------- */

.alfa-hero--contained {
	max-width: var(--alfa-max-width);
	margin-inline: auto;
	border-radius: var(--alfa-radius);
}

.alfa-hero--no-image {
	background-image: linear-gradient(135deg, var(--alfa-navy) 0%, var(--alfa-navy-dark) 100%);
}

.alfa-hero--has-image {
	min-height: 440px;
}

@media (min-width: 768px) {
	.alfa-hero--has-image {
		min-height: clamp(480px, 70vh, 640px);
	}
}

/* Media + overlay -------------------------------------------------------- */

.alfa-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.alfa-hero .alfa-hero__img {
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	/* Mobile focal point first; falls back to the desktop one. */
	object-position: var(--alfa-hero-pos-m, var(--alfa-hero-pos, 50% 50%));
}

@media (min-width: 768px) {
	.alfa-hero .alfa-hero__img {
		object-position: var(--alfa-hero-pos, 50% 50%);
	}
}

.alfa-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	/* Mobile: text sits over the whole image -> evenly dark. */
	background: linear-gradient(180deg, rgba(7, 31, 64, 0.78) 0%, rgba(7, 31, 64, 0.9) 100%);
}

@media (min-width: 768px) {
	.alfa-hero__overlay {
		/* Desktop: text column on the left stays darkest. */
		background: linear-gradient(90deg, rgba(7, 31, 64, 0.94) 0%, rgba(7, 31, 64, 0.82) 45%, rgba(7, 31, 64, 0.5) 100%);
	}
}

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

.alfa-hero .alfa-hero__inner {
	position: relative;
	padding-block: clamp(48px, 8vw, 96px);
}

.alfa-hero .alfa-hero__content {
	max-width: 680px;
}

.alfa-hero .alfa-hero__eyebrow {
	margin: 0 0 16px;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--alfa-orange);
}

.alfa-hero .alfa-hero__title {
	margin: 0 0 20px;
	font-family: var(--alfa-font);
	font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--alfa-white);
	overflow-wrap: break-word;
	hyphens: auto;
}

.alfa-hero .alfa-hero__lead {
	max-width: 60ch;
	margin: 0 0 32px;
	font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
}

.alfa-hero .alfa-hero__lead:last-child,
.alfa-hero .alfa-hero__title:last-child {
	margin-bottom: 0;
}

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

.alfa-hero .alfa-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.alfa-hero a.alfa-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid transparent;
	border-radius: var(--alfa-radius);
	font-family: var(--alfa-font);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.alfa-hero a.alfa-hero__btn--primary,
.alfa-hero a.alfa-hero__btn--primary:visited {
	background-color: var(--alfa-orange);
	border-color: var(--alfa-orange);
	color: var(--alfa-navy-dark);
}

.alfa-hero a.alfa-hero__btn--primary:hover {
	background-color: var(--alfa-orange-dark);
	border-color: var(--alfa-orange-dark);
	color: var(--alfa-navy-dark);
}

.alfa-hero a.alfa-hero__btn--secondary,
.alfa-hero a.alfa-hero__btn--secondary:visited {
	background-color: transparent;
	border-color: rgba(255, 255, 255, 0.85);
	color: var(--alfa-white);
}

.alfa-hero a.alfa-hero__btn--secondary:hover {
	background-color: var(--alfa-white);
	border-color: var(--alfa-white);
	color: var(--alfa-navy-dark);
}

/* Orange focus ring from the base CSS would vanish on the orange button. */
.alfa-hero a.alfa-hero__btn:focus-visible {
	outline: 3px solid var(--alfa-white);
	outline-offset: 3px;
}

@media (max-width: 479px) {
	.alfa-hero .alfa-hero__actions {
		flex-direction: column;
	}

	.alfa-hero a.alfa-hero__btn {
		width: 100%;
	}
}

@media (forced-colors: active) {
	.alfa-hero a.alfa-hero__btn {
		border-color: ButtonText;
	}
}
