/* ──────────────────────────────────────────────────────────────────────────
   Fymera Scroll Hero — porting vanilla del componente HeroReveal.
   Palette Fymera: nero/grafite, magenta, viola, blu elettrico.
   Tutto è prefissato .fsh- per non collidere col tema (Blocksy).
   ──────────────────────────────────────────────────────────────────────── */
.fsh-hero {
	--fsh-bg: #08080c;
	--fsh-ink: #ffffff;
	--fsh-ink-soft: rgba(255, 255, 255, 0.74);
	--fsh-magenta: #ff2d9b;
	--fsh-violet: #9b4dff;
	--fsh-blue: #2f7bff;
	--fsh-grad: linear-gradient(100deg, var(--fsh-magenta), var(--fsh-violet) 52%, var(--fsh-blue));

	position: relative;
	width: 100%;
	height: calc(var(--fsh-scroll-vh, 320) * 1vh);
	background: var(--fsh-bg);
	color: var(--fsh-ink);
	isolation: isolate;
	margin: 0;
}

.fsh-sticky {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	width: 100%;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
}

.fsh-media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	background: var(--fsh-bg);
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
}

/* Il fermo-immagine finale è nascosto di default; mostrato solo in modalità statica. */
.fsh-final {
	display: none;
}
.fsh-hero[data-mode="static"] .fsh-video {
	display: none;
}
.fsh-hero[data-mode="static"] .fsh-final {
	display: block;
}

.fsh-scrim {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(130% 95% at 50% 100%,
			rgba(0, 0, 0, 0.78) 0%,
			rgba(0, 0, 0, 0.34) 42%,
			rgba(0, 0, 0, 0) 70%),
		linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 16%);
}

.fsh-foreground {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(20px, 3.4vh, 38px);
	padding-block-end: clamp(56px, 11vh, 140px);
	padding-inline: 24px;
	text-align: center;
	pointer-events: none;
}

.fsh-copy-stack {
	position: relative;
	width: min(960px, 92vw);
	min-height: clamp(8.5rem, 22vh, 12rem);
	pointer-events: none;
}

.fsh-phase {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(12px, 1.6vh, 20px);
	opacity: 0;
	will-change: opacity, transform;
}

.fsh-title {
	margin: 0;
	font-weight: 600;
	font-size: clamp(2rem, 5.2vw, 4.25rem);
	line-height: 1.04;
	letter-spacing: -0.02em;
	text-wrap: balance;
	color: var(--fsh-ink);
	text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
}

.fsh-subtitle {
	margin: 0;
	font-weight: 400;
	font-size: clamp(1rem, 1.9vw, 1.375rem);
	line-height: 1.5;
	max-width: 62ch;
	color: var(--fsh-ink-soft);
	text-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
}

.fsh-cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	will-change: opacity, transform;
}

.fsh-cta-primary,
.fsh-cta-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: clamp(0.95rem, 1.1vw, 1.05rem);
	line-height: 1;
	padding: 0.95em 1.6em;
	border-radius: 14px;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.fsh-cta-primary {
	color: #fff;
	background: var(--fsh-grad);
	box-shadow: 0 10px 30px -8px rgba(255, 45, 155, 0.55), 0 4px 14px -6px rgba(47, 123, 255, 0.5);
}
.fsh-cta-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 40px -8px rgba(255, 45, 155, 0.7), 0 6px 20px -6px rgba(47, 123, 255, 0.6);
}

.fsh-cta-ghost {
	color: var(--fsh-ink);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.28);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.fsh-cta-ghost:hover {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.55);
	background: rgba(255, 255, 255, 0.09);
}

.fsh-cta-primary:focus-visible,
.fsh-cta-ghost:focus-visible {
	outline: 2px solid var(--fsh-blue);
	outline-offset: 3px;
}

.fsh-scroll-hint {
	position: absolute;
	left: 50%;
	bottom: clamp(18px, 3vh, 30px);
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	pointer-events: none;
	color: var(--fsh-ink-soft);
}
.fsh-scroll-hint-text {
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}
.fsh-scroll-hint-line {
	width: 1px;
	height: 34px;
	transform-origin: top;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
	animation: fshHintPulse 1.8s ease-in-out infinite;
}
@keyframes fshHintPulse {
	0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
	50% { transform: scaleY(1); opacity: 1; }
}

.fsh-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.fsh-scroll-hint-line { animation: none; }
	.fsh-cta-primary,
	.fsh-cta-ghost { transition: none; }
}
