/* =====================================================
   HERO SYSTEM — shared shell + layout archetypes
   Used by Projects (split experience), News (editorial), Careers (centered)
===================================================== */

:root {
	--hero-paper: #eaf8fd;
	--hero-paper-deep: #f4fcfe;
	--hero-ink: #1f1e23;
	--hero-muted: #656171;
	--hero-brand: #23a0c6;
	--hero-brand-deep: #17677f;
	--hero-brand-soft: rgba(42, 190, 236, 0.12);
	--hero-band-pad-y: clamp(72px, 9vw, 96px);
	--hero-scrim-x: linear-gradient(
		90deg,
		rgba(8, 8, 12, 0.78) 0%,
		rgba(8, 8, 12, 0.38) 38%,
		rgba(8, 8, 12, 0.14) 58%,
		rgba(8, 8, 12, 0.32) 100%
	);
	/* Centered copy — uniform horizontal tint (no lateral fade) */
	--hero-scrim-x-centered: linear-gradient(
		90deg,
		rgba(8, 8, 12, 0.72) 0%,
		rgba(8, 8, 12, 0.72) 100%
	);
	/* Vertical scrim only — dark hero ends dark (About / Services pattern) */
	--hero-scrim-y: linear-gradient(
		180deg,
		rgba(8, 8, 12, 0.45) 0%,
		transparent 28%,
		transparent 62%,
		rgba(8, 8, 12, 0.72) 100%
	);
}

/* —— Shell —— */
.hero-shell {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	align-items: stretch;
	background: #1F1E23;
	color: #fff;
}

.hero-shell__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.hero-shell__media :is(img, video) {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-shell__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: var(--hero-scrim-x), var(--hero-scrim-y);
}

/* —— Hero CTAs (match About / Home on dark) —— */
.hero-shell .h2-btn {
	min-height: 44px;
	padding: 12px 26px;
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
}

.hero-shell .h2-btn--cyan {
	background: var(--h2-cyan, var(--cyan, #2abeec));
	color: #fff;
	border-color: var(--h2-cyan, var(--cyan, #2abeec));
}

.hero-shell .h2-btn--cyan:hover,
.hero-shell .h2-btn--cyan:focus-visible {
	background: var(--h2-cyan-deep, #23a0c6);
	border-color: var(--h2-cyan-deep, #23a0c6);
	color: #fff;
}

.hero-shell .h2-btn--outline {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.82);
}

.hero-shell .h2-btn--outline:hover,
.hero-shell .h2-btn--outline:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	border-color: #fff;
	color: #fff;
}

/* —— Editorial content band — hard cut below hero —— */
.hero-band {
	background: var(--hero-paper);
	color: var(--hero-ink);
}

.hero-shell__frame {
	position: relative;
	z-index: 2;
	width: 100%;
}

/* —— Proof rail (Projects aside) —— */
.hero-proof-rail {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2.5vw, 28px);
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.hero-proof-rail div {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.hero-proof-rail dt {
	margin: 0;
	font-size: clamp(22px, 2.4vw, 32px);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: #fff;
}

.hero-proof-rail dd {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.72);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* —— Split (Experience variant ~70svh) —— */
.hero--split.hero--split-experience {
	min-height: min(70svh, 720px);
}

.hero--split.hero--split-experience .hero-shell__frame {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: clamp(28px, 4vh, 48px);
	min-height: min(70svh, 720px);
	padding-top: calc(var(--h2-nav-h, var(--nav-h)) + clamp(48px, 8vh, 88px));
	padding-bottom: clamp(32px, 5vh, 56px);
}

.hero--split.hero--split-experience .hero-shell__scrim {
	background: var(--hero-scrim-x), var(--hero-scrim-y);
}

/* —— Editorial (~60svh) —— */
.hero--editorial {
	min-height: min(60svh, 620px);
}

.hero--editorial .hero-shell__frame {
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: var(--h2-max);
	margin: 0 auto;
	padding: calc(var(--h2-nav-h, var(--nav-h)) + clamp(36px, 6vh, 64px)) var(--h2-pad) clamp(40px, 6vh, 64px);
	min-height: min(60svh, 620px);
}

.hero--editorial .hero-shell__scrim {
	background: var(--hero-scrim-x), var(--hero-scrim-y);
}

.hero--editorial .hero-shell__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(20px, 3vh, 28px);
	max-width: min(720px, 100%);
}

.hero--editorial .hero-shell__copy h1 {
	margin: 0;
	font-family: var(--font);
	font-size: clamp(40px, 5.2vw, 58px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.hero--editorial .hero-shell__copy h1 span {
	display: block;
}

.hero--editorial .hero-shell__lead {
	margin: 0;
	font-size: clamp(17px, 1.6vw, 22px);
	font-weight: 500;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.92);
	max-width: 58ch;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.hero--editorial .hero-shell__copy h1 .cyan,
.hero--editorial .hero-shell__copy h1 .hero-accent {
	color: var(--hero-brand);
}

/* —— Centered (~55svh) —— */
.hero--centered {
	min-height: min(55svh, 560px);
	text-align: center;
}

.hero--centered .hero-shell__media :is(img, video) {
	object-position: center 30%;
}

.hero--centered .hero-shell__scrim {
	background: var(--hero-scrim-x-centered), var(--hero-scrim-y);
}

.hero--centered .hero-shell__frame {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	max-width: var(--h2-max);
	margin: 0 auto;
	padding: calc(var(--h2-nav-h, var(--nav-h)) + clamp(28px, 5vh, 48px)) var(--h2-pad) clamp(36px, 5vh, 52px);
	min-height: min(55svh, 560px);
	gap: clamp(16px, 2.5vh, 24px);
}

.hero--centered .hero-shell__copy {
	max-width: min(560px, 100%);
}

.hero--centered .hero-shell__copy h1 {
	margin: 0;
	font-family: var(--font);
	font-size: clamp(32px, 4.6vw, 58px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: #fff;
}

.hero--centered .hero-shell__copy h1 span {
	display: block;
}

.hero--centered .hero-shell__copy h1 .hero-accent {
	color: var(--hero-brand);
}

.hero--centered .hero-shell__lead {
	margin: 0;
	font-size: clamp(15px, 1.4vw, 18px);
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
}

.hero-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero-chips li {
	padding: 7px 14px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: var(--radius-pill);
	background: rgba(31, 30, 35, 0.35);
}

@media (max-width: 768px) {
	.hero--split.hero--split-experience {
		min-height: auto;
	}

	.hero--split.hero--split-experience .hero-shell__frame {
		min-height: auto;
		padding-top: calc(var(--h2-nav-h, var(--nav-h)) + 24px);
		padding-bottom: 36px;
	}

	.hero-proof-rail {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.hero--editorial {
		min-height: auto;
	}

	.hero--editorial .hero-shell__frame {
		min-height: auto;
		padding-top: calc(var(--h2-nav-h, var(--nav-h)) + 20px);
		padding-bottom: 36px;
	}

	.hero--centered {
		min-height: auto;
	}

	.hero--centered .hero-shell__frame {
		min-height: auto;
		padding-top: calc(var(--h2-nav-h, var(--nav-h)) + 20px);
	}
}

/* =====================================================
   UNIFIED HERO ENTRANCE — rise-in + stagger (all pages)
===================================================== */
:root {
	--hero-rise-duration: 0.9s;
	--hero-rise-distance: 18px;
	--hero-rise-ease: var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

@keyframes hero-rise-in {
	to {
		opacity: 1;
		transform: none;
	}
}

/* Shared initial state + animation */
.hero-shell .hero-shell__copy h1 span,
.hero-shell .hero-shell__lead,
.hero-shell .hero-shell__copy .h2-btn,
.hero-shell .hero-proof-rail div,
.news-hero-kicker,
.news-hero-story .insights-featured-tag,
.news-hero-story h1,
.news-hero-story-actions,
.careers-hero-copy h1,
.careers-hero-copy p,
.careers-hero-copy .h2-btn,
.h2-hero-copy :is(h1, .h2-hero-heading),
.h2-hero-copy p,
.h2-hero-tagline,
.h2-hero-aside,
.h2-hero-actions .h2-btn,
.about-hero-copy h1,
.about-hero-copy p,
.about-hero-tagline,
.about-hero-aside,
.about-hero-actions .h2-btn,
.about-masthead h1 .about-line span,
.about-masthead-lead,
.svc-hero-copy,
.svc-hero-aside,
.svc-detail-hero .pd-breadcrumb,
.svc-detail-hero h1 span,
.svc-detail-hero-lead,
.svc-detail-hero .btn-primary,
.pd-breadcrumb,
.pd-hero h1,
.pd-meta,
.cd-breadcrumb,
.cd-hero h1,
.cd-meta,
.cd-hero-facts,
.cd-hero-aside,
.id-breadcrumb,
.id-hero h1,
.id-meta {
	opacity: 0;
	transform: translateY(var(--hero-rise-distance));
	animation: hero-rise-in var(--hero-rise-duration) var(--hero-rise-ease) forwards;
}

/* Stagger — hero-shell / careers */
.hero-shell .hero-shell__copy h1 span:nth-child(1) { animation-delay: 0.1s; }
.hero-shell .hero-shell__copy h1 span:nth-child(2) { animation-delay: 0.2s; }
.careers-hero-copy h1 { animation-delay: 0.1s; }
.careers-hero-copy p { animation-delay: 0.32s; }
.careers-hero-copy .h2-btn { animation-delay: 0.44s; }

/* Stagger — news featured story */
.news-hero-kicker { animation-delay: 0.12s; }
.news-hero-story .insights-featured-tag { animation-delay: 0.2s; }
.news-hero-story h1 { animation-delay: 0.3s; }
.news-hero-story-actions { animation-delay: 0.42s; }

/* Stagger — home */
.h2-hero-copy :is(h1, .h2-hero-heading) { animation-delay: 0.12s; }
.h2-hero-copy p { animation-delay: 0.45s; }
.h2-hero-aside { animation-delay: 0.55s; }

/* Stagger — about */
.about-hero-copy h1 { animation-delay: 0.12s; }
.about-masthead h1 .about-line:nth-child(1) span { animation-delay: 0.12s; }
.about-masthead h1 .about-line:nth-child(2) span { animation-delay: 0.22s; }
.about-hero-copy p,
.about-hero-tagline,
.about-masthead-lead { animation-delay: 0.45s; }
.about-hero-aside { animation-delay: 0.55s; }

/* Stagger — services listing */
.svc-hero-copy { animation-delay: 0.12s; }
.svc-hero-aside { animation-delay: 0.28s; }

/* Stagger — service detail */
.svc-detail-hero .pd-breadcrumb { animation-delay: 0.12s; }
.svc-detail-hero h1 span:nth-child(1) { animation-delay: 0.22s; }
.svc-detail-hero h1 span:nth-child(2) { animation-delay: 0.32s; }
.svc-detail-hero-lead { animation-delay: 0.42s; }
.svc-detail-hero .btn-primary { animation-delay: 0.54s; }

/* Stagger — project detail */
.pd-breadcrumb { animation-delay: 0.12s; }
.pd-hero h1 { animation-delay: 0.24s; }
.pd-meta { animation-delay: 0.4s; }

/* Stagger — career detail */
.cd-breadcrumb { animation-delay: 0.12s; }
.cd-hero h1 { animation-delay: 0.24s; }
.cd-meta { animation-delay: 0.36s; }
.cd-hero-facts { animation-delay: 0.4s; }
.cd-hero-aside { animation-delay: 0.42s; }

/* Stagger — insight detail */
.id-breadcrumb { animation-delay: 0.12s; }
.id-hero h1 { animation-delay: 0.24s; }
.id-meta { animation-delay: 0.38s; }

@media (prefers-reduced-motion: reduce) {
	.hero-shell [class*="animation"],
	.hero-shell .hero-shell__copy h1 span,
	.hero-shell .hero-shell__lead,
	.hero-shell .hero-shell__copy .h2-btn,
	.hero-shell .hero-proof-rail div,
	.news-hero-kicker,
	.news-hero-story .insights-featured-tag,
	.news-hero-story h1,
	.news-hero-story-actions,
	.careers-hero-copy h1,
	.careers-hero-copy p,
	.careers-hero-copy .h2-btn,
	.h2-hero-copy :is(h1, .h2-hero-heading),
	.h2-hero-copy p,
	.h2-hero-tagline,
	.h2-hero-aside,
	.h2-hero-actions .h2-btn,
	.about-hero-copy h1,
	.about-hero-copy p,
	.about-hero-tagline,
	.about-hero-aside,
	.about-hero-actions .h2-btn,
	.about-masthead h1 .about-line span,
	.about-masthead-lead,
	.svc-hero-copy,
	.svc-hero-aside,
	.svc-detail-hero .pd-breadcrumb,
	.svc-detail-hero h1 span,
	.svc-detail-hero-lead,
	.svc-detail-hero .btn-primary,
	.pd-breadcrumb,
	.pd-hero h1,
	.pd-meta,
	.cd-breadcrumb,
	.cd-hero h1,
	.cd-meta,
	.cd-hero-facts,
	.cd-hero-aside,
	.id-breadcrumb,
	.id-hero h1,
	.id-meta {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

[data-hero-slot="mobile"] {
	display: none !important;
}

@media (max-width: 767px) {
	[data-hero-slot="desktop"] {
		display: none !important;
	}

	[data-hero-slot="mobile"] {
		display: block !important;
	}
}
