/**
 * hero.css — homepage hero.
 * Dark surface with a blue glow (placeholder until a real photo is added).
 * Consumes tokens.css. Mobile-first.
 */

.hero {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	min-height: 34rem;
	min-height: calc(100svh - 4rem); /* fill viewport below the sticky header */
	padding-block: var(--space-8);
	overflow: hidden;
	background-color: #060810; /* deep space */
}

/* ---- Cinematic background: grid + light beams from a glowing eclipse ---- */
.hero__fx {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
}

/* Subtle grid that fades toward the edges */
.hero__grid {
	position: absolute;
	inset: -1px;
	background-image:
		linear-gradient(to right, rgba(186, 215, 247, 0.06) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(186, 215, 247, 0.06) 1px, transparent 1px);
	background-size: 3.5rem 3.5rem;
	-webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 28%, #000 25%, transparent 78%);
	mask-image: radial-gradient(ellipse 75% 60% at 50% 28%, #000 25%, transparent 78%);
}

/* Glowing eclipse orb (the light source) */
.hero__eclipse {
	position: absolute;
	top: 5%;
	left: 50%;
	width: 1.5rem;
	height: 1.5rem;
	transform: translateX(-50%);
	border-radius: 50%;
	background: #05070d;
	box-shadow:
		0 0 1.4rem 0.25rem rgba(147, 197, 253, 0.75),
		0 0 4.5rem 1.2rem rgba(59, 130, 246, 0.45);
	animation: hero-eclipse 8s ease-in-out infinite;
}

/* Light beams fanning down from the eclipse */
.hero__beam {
	position: absolute;
	top: -6%;
	left: 50%;
	width: 36vmin;
	height: 118%;
	transform: translateX(-50%);
	transform-origin: 50% 0%;
	background: conic-gradient(from 180deg at 50% 0%,
		transparent 46%,
		rgba(59, 130, 246, 0.22) 48.5%,
		rgba(147, 197, 253, 0.55) 50%,
		rgba(59, 130, 246, 0.22) 51.5%,
		transparent 54%);
	filter: blur(16px);
	opacity: 0.55;
	animation: hero-beam 9s ease-in-out infinite alternate;
}

.hero__beam--wide {
	width: 58vmin;
	filter: blur(34px);
	opacity: 0.32;
	animation-duration: 13s;
	animation-direction: alternate-reverse;
}

@keyframes hero-beam {
	0%   { transform: translateX(-50%) rotate(-10deg) scaleX(0.8); opacity: 0.35; }
	100% { transform: translateX(-50%) rotate(10deg) scaleX(1.22); opacity: 0.72; }
}

@keyframes hero-eclipse {
	0%, 100% { box-shadow: 0 0 1.4rem 0.25rem rgba(147, 197, 253, 0.75), 0 0 4.5rem 1.2rem rgba(59, 130, 246, 0.45); }
	50%      { box-shadow: 0 0 1.9rem 0.4rem rgba(147, 197, 253, 0.95), 0 0 6rem 1.7rem rgba(59, 130, 246, 0.55); }
}

.hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-5);
	width: 100%;
	max-width: 52rem;
	margin-inline: auto;
	padding-inline: var(--container-pad);
	text-align: center;
}

.hero__kicker {
	margin: 0;
	color: var(--color-brand-bright);
	font-size: var(--fs-300);
	font-weight: var(--fw-semibold);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hero__title {
	margin: 0;
	max-width: 18ch;
	font-size: var(--fs-900);
	line-height: var(--lh-tight);
	background: linear-gradient(180deg, #ffffff 32%, #bcd4f5 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	filter: drop-shadow(0 2px 26px rgba(96, 165, 250, 0.28));
}

/* Subtitle/kicker get a soft glow to read over the beams */
.hero__kicker {
	text-shadow: 0 0 18px rgba(96, 165, 250, 0.35);
}

.hero__subtitle {
	text-shadow: 0 2px 16px rgba(8, 11, 20, 0.6);
}

.hero__subtitle {
	margin: 0;
	max-width: 44rem;
	color: var(--color-text-muted);
	font-size: var(--fs-500);
	line-height: var(--lh-base);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-4);
	margin-top: var(--space-3);
}

/* ---- Optional background photo variant ----
   Add class `hero--has-image` and set --hero-image inline, e.g.:
   <section class="hero hero--has-image" style="--hero-image:url(...)"> */
.hero--has-image {
	background-image:
		linear-gradient(180deg, rgba(10, 13, 20, 0.55) 0%, rgba(10, 13, 20, 0.85) 100%),
		var(--hero-image, none);
	background-size: cover;
	background-position: center;
}

/* ---- Content: staggered entrance + gentle continuous float ---- */
.hero__inner {
	animation: hero-float 7s ease-in-out 1.1s infinite alternate;
}

.hero__kicker {
	animation: hero-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s both;
}

.hero__title {
	animation: hero-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s both;
}

.hero__subtitle {
	animation: hero-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.28s both;
}

.hero__actions {
	animation: hero-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.4s both;
}

@keyframes hero-rise {
	from {
		opacity: 0;
		transform: translateY(26px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes hero-float {
	from {
		transform: translateY(0);
	}

	to {
		transform: translateY(-9px);
	}
}

@media (min-width: 48rem) {
	.hero__subtitle {
		font-size: var(--fs-600);
	}
}
