/**
 * Home hero — full-width landing hero with background photo, dark overlay for
 * contrast, headline/subheadline and primary/secondary CTA buttons.
 *
 * Reuses the theme's --mytheme-* design tokens from responsive.css. Degrades to
 * a solid dark background when no image is set, and stacks the CTA buttons
 * vertically below 768px.
 *
 * @package my-theme
 */

.home-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: clamp(30rem, 78vh, 46rem);
	padding: clamp(3rem, 9vw, 6rem) 0;
	/* Solid dark fallback keeps the headline legible when no photo is set. */
	background-color: #101a24;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	overflow: hidden;
	isolation: isolate;
}

/* Semi-transparent dark overlay between the photo and the text. A vertical
   gradient deepens the base so the CTAs stay readable over busy images. */
.home-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		180deg,
		rgba(6, 12, 18, 0.55) 0%,
		rgba(6, 12, 18, 0.62) 45%,
		rgba(6, 12, 18, 0.78) 100%
	);
}

/* When no image is set, the flat dark base needs no photo overlay. */
.home-hero--no-image .home-hero__overlay {
	background: linear-gradient(
		180deg,
		rgba(16, 26, 36, 0.2) 0%,
		rgba(16, 26, 36, 0.45) 100%
	);
}

.home-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 46rem;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	color: #ffffff;
}

.home-hero__title {
	margin: 0 0 clamp(0.75rem, 2vw, 1.25rem);
	font-size: clamp(2.25rem, 6vw, 4rem);
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #ffffff;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.home-hero__subtitle {
	margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
	max-width: 40rem;
	font-size: clamp(1.0625rem, 2.2vw, 1.375rem);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.92);
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: clamp(0.75rem, 2vw, 1rem);
}

.home-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: var(--mytheme-touch, 44px);
	padding: 0.9rem 1.9rem;
	border-radius: var(--mytheme-radius, 12px);
	border: 2px solid transparent;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition:
		transform var(--mytheme-duration, 220ms) var(--mytheme-ease, ease),
		background-color var(--mytheme-duration, 220ms) var(--mytheme-ease, ease),
		box-shadow var(--mytheme-duration, 220ms) var(--mytheme-ease, ease),
		color var(--mytheme-duration, 220ms) var(--mytheme-ease, ease);
}

.home-hero__btn-icon {
	display: inline-flex;
	align-items: center;
}

.home-hero__btn--primary {
	background-color: var(--mytheme-accent, #c8281e);
	border-color: var(--mytheme-accent, #c8281e);
	color: #ffffff;
	box-shadow: var(--mytheme-shadow-lg, 0 16px 40px rgba(0, 0, 0, 0.25));
}

.home-hero__btn--primary:hover,
.home-hero__btn--primary:focus-visible {
	background-color: var(--mytheme-accent-dark, #a71d15);
	border-color: var(--mytheme-accent-dark, #a71d15);
	color: #ffffff;
	transform: translateY(-2px);
}

.home-hero__btn--secondary {
	background-color: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.85);
	color: #ffffff;
}

.home-hero__btn--secondary:hover,
.home-hero__btn--secondary:focus-visible {
	background-color: #ffffff;
	border-color: #ffffff;
	color: var(--color-navy-deep, #141824);
	transform: translateY(-2px);
}

.home-hero__btn:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.9);
	outline-offset: 3px;
}

/* --- Responsive: stack CTAs vertically on small screens ------------------- */
@media (max-width: 767px) {
	.home-hero {
		min-height: clamp(26rem, 88vh, 38rem);
	}

	.home-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.home-hero__btn {
		width: 100%;
	}
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.home-hero__btn {
		transition: none;
	}

	.home-hero__btn--primary:hover,
	.home-hero__btn--primary:focus-visible,
	.home-hero__btn--secondary:hover,
	.home-hero__btn--secondary:focus-visible {
		transform: none;
	}
}
