/**
 * Home hero — tema scuro brand; tipografia ampia (ispirazione layout “full width”);
 * ombre CTA a più strati (glow tipo gradiente).
 */

.home-hero {
	position: relative;
	isolation: isolate;
	min-height: clamp(28rem, 85svh, 52rem);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: stretch;
	padding: clamp(4.5rem, 14vh, 9rem) clamp(1rem, 5vw, 4rem) clamp(2.25rem, 7vh, 5rem);
	overflow: hidden;
	background-color: #171a23;
	color: #fff8f0;
	color: var(--color-text, #fff8f0);
}

/* Hero a filo sotto la navbar fissa e alta quanto il viewport */
.site-main--home .home-hero {
	margin-top: calc(-1 * var(--widen-site-header-h, 4.75rem));
	min-height: 100svh;
	min-height: 100dvh;
	padding-top: var(--widen-site-header-h, 4.75rem);
	padding-bottom: clamp(2.25rem, 6vh, 4rem);
	transition: margin-top 0.38s cubic-bezier(0.22, 1, 0.36, 1), padding-top 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

html.widen-header-bar-hidden .site-main--home .home-hero {
	margin-top: 0;
	padding-top: clamp(2rem, 5vh, 3rem);
}

.home-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		var(--widen-glow-red-tr, radial-gradient(ellipse 78% 58% at 100% 0%, rgba(251, 54, 64, 0.26), transparent 62%)),
		var(--widen-glow-red-bl, radial-gradient(ellipse 72% 54% at 0% 100%, rgba(251, 54, 64, 0.18), transparent 65%)),
		var(--widen-glow-red-br, radial-gradient(ellipse 55% 48% at 100% 100%, rgba(251, 54, 64, 0.1), transparent 68%)),
		var(--widen-glow-cool-tl, radial-gradient(ellipse 95% 72% at 14% 18%, rgba(127, 198, 229, 0.12), transparent 58%)),
		var(--color-bg, #171a23);
}

.home-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.7;
}

.home-hero--has-video .home-hero__media {
	background:
		radial-gradient(ellipse 78% 58% at 100% 0%, rgba(251, 54, 64, 0.12), transparent 62%),
		radial-gradient(ellipse 72% 54% at 0% 100%, rgba(251, 54, 64, 0.08), transparent 65%),
		var(--color-bg, #171a23);
}

.home-hero--has-video .home-hero__overlay {
	background: linear-gradient(
		105deg,
		rgba(23, 26, 35, 0.52) 0%,
		rgba(23, 26, 35, 0.34) 48%,
		rgba(23, 26, 35, 0.2) 100%
	);
}

/* Desktop / mobile: due file distinti da Personalizza */
.home-hero__video--desktop {
	display: none;
}

.home-hero__video--mobile {
	display: block;
}

@media (min-width: 52rem) {
	.home-hero__video--desktop {
		display: block;
	}

	.home-hero__video--mobile {
		display: none;
	}
}

/* Solo desktop caricato: mostralo ovunque */
.home-hero--has-video:not(:has(.home-hero__video--mobile)) .home-hero__video--desktop {
	display: block;
}

/* Solo mobile caricato: mostralo ovunque */
.home-hero--has-video:not(:has(.home-hero__video--desktop)) .home-hero__video--mobile {
	display: block;
}

.home-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		105deg,
		rgba(23, 26, 35, 0.88) 0%,
		rgba(23, 26, 35, 0.68) 48%,
		rgba(23, 26, 35, 0.45) 100%
	);
}

/* Blocco testi quasi full-bleed (come reference agenzia) */
.home-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: min(96vw, 92rem);
	margin-right: auto;
}

.home-hero__eyebrow {
	margin: 0 0 1rem;
	font-size: clamp(0.6875rem, 1.1vw, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #ffffff;
	color: var(--color-text, #ffffff);
	opacity: 0.92;
}

.home-hero__title {
	margin: 0 0 clamp(1rem, 2.5vw, 1.75rem);
	font-size: clamp(2rem, 2.8vw + 2vmin, 4.5rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: #fff8f0;
	color: var(--color-text, #fff8f0);
}

.home-hero__lead {
	margin: 0 0 2rem;
	font-size: clamp(1.125rem, 2.35vw, 1.5rem);
	line-height: 1.55;
	font-weight: 500;
	color: #fff8f0;
	color: var(--color-text, #fff8f0);
	max-width: min(42em, 90vw);
}

.home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem 1rem;
}

.home-hero__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.35rem;
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: 999px;
	border: 1px solid transparent;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

/* CTA primaria: solo scala rossi (gradiente + glow, niente blu) */
.home-hero__btn--primary {
	color: #ffffff;
	background: linear-gradient(135deg, #ff5c64 0%, #fb3640 42%, #e62d36 78%, #b82228 100%);
	border-color: rgba(255, 255, 255, 0.12);
	box-shadow:
		0 0 0 1px rgba(255, 120, 125, 0.35),
		0 3px 20px rgba(251, 54, 64, 0.45),
		0 8px 36px rgba(220, 40, 50, 0.38),
		0 0 48px rgba(251, 54, 64, 0.35);
}

.home-hero__btn--primary:hover,
.home-hero__btn--primary:focus-visible {
	color: #ffffff;
	background: linear-gradient(135deg, #ff6a72 0%, #ff4a52 40%, #fb3640 75%, #c92830 100%);
	box-shadow:
		0 0 0 1px rgba(255, 140, 145, 0.4),
		0 4px 26px rgba(251, 54, 64, 0.55),
		0 12px 48px rgba(200, 35, 45, 0.45),
		0 0 64px rgba(251, 54, 64, 0.42);
	transform: translateY(-1px);
}

.home-hero__btn--secondary {
	color: #fff8f0;
	color: var(--color-text, #fff8f0);
	background: rgba(23, 26, 35, 0.45);
	border-color: rgba(127, 198, 229, 0.45);
	box-shadow:
		0 0 0 1px rgba(127, 198, 229, 0.25),
		0 0 20px rgba(127, 198, 229, 0.3),
		0 8px 28px rgba(251, 54, 64, 0.18),
		0 0 48px rgba(127, 198, 229, 0.12);
}

.home-hero__btn--secondary:hover,
.home-hero__btn--secondary:focus-visible {
	border-color: #7fc6e5;
	border-color: var(--color-accent-cool, #7fc6e5);
	box-shadow:
		0 0 0 1px rgba(127, 198, 229, 0.45),
		0 0 28px rgba(127, 198, 229, 0.42),
		0 10px 36px rgba(251, 54, 64, 0.25),
		0 0 64px rgba(180, 100, 210, 0.2);
	transform: translateY(-1px);
}

.home-hero__btn--primary:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 3px;
}

.home-hero__btn--secondary:focus-visible {
	outline: 2px solid #7fc6e5;
	outline: 2px solid var(--color-accent-cool, #7fc6e5);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.home-hero__btn {
		transition: none;
	}

	.home-hero__btn--primary:hover,
	.home-hero__btn--secondary:hover,
	.home-hero__btn--primary:focus-visible,
	.home-hero__btn--secondary:focus-visible {
		transform: none;
	}

	.home-hero__video {
		display: none;
	}
}
