/**
 * Homepage interactive hero — scoped to .hero-interactive only.
 * Enqueued on is_front_page() via inc/hero-interactive.php (not global style.css).
 */

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


/* Full-width backdrop (100% avoids 100vw scrollbar asymmetry) */
.hero-interactive,
.wp-site-blocks > .alignfull.hero-interactive,
.wp-site-blocks > section.alignfull.hero-interactive,
main.studio-home > .wp-block-template-part:has(.hero-interactive) {
	width: 100% !important;
	max-width: 100% !important;
	margin-inline: 0 !important;
	box-sizing: border-box;
}

.hero-interactive {
	--hero-gutter-left: max(
		var(--wp--style--root--padding-left, 1.5rem),
		calc((100vw - var(--wp--style--global--wide-size, 1200px)) / 2)
	);
	--hero-gutter-right: max(
		var(--wp--style--root--padding-right, 1.5rem),
		calc((100vw - var(--wp--style--global--wide-size, 1200px)) / 2)
	);
	position: relative;
	min-height: 80vh;
	min-height: 80svh;
	display: flex;
	flex-direction: column;
	padding-left: var(--hero-gutter-left);
	padding-right: var(--hero-gutter-right);
	overflow: hidden;
	isolation: isolate;
	color: var(--wp--preset--color--base);
	box-sizing: border-box;
}

/* Nested section from template part markup — fill the breakout wrapper */
.wp-block-template-part > .hero-interactive {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
}

.hero-interactive::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	z-index: 5;
	background: linear-gradient(90deg, var(--wp--preset--color--contrast) 0%, #3d3d3d 55%, #5a5a5a 100%);
}

/* Backdrop layers */
.hero-interactive__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* Video — always-on background */
.hero-interactive__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	z-index: 0;
}

.hero-interactive__video {
	position: absolute;
	inset: -6%;
	width: 112%;
	height: 112%;
	object-fit: cover;
	object-position: center;
	filter: saturate(0.92) contrast(1.1) brightness(0.84);
	opacity: 0;
	transition: opacity 0.65s ease;
	will-change: opacity;
}

.hero-interactive__video.is-active {
	opacity: 1;
	z-index: 1;
}

/* Poster visible while inactive clip buffers */
.hero-interactive__video.is-buffering {
	opacity: 0.35;
}

.hero-interactive:not(.is-video-fallback) .hero-interactive__video.is-active {
	animation: hero-video-drift 22s ease-in-out infinite alternate;
}

@keyframes hero-video-drift {
	0% { transform: scale(1.05) translate(0, 0); }
	100% { transform: scale(1.1) translate(-1.2%, -0.8%); }
}

.hero-interactive__backdrop.is-video-fallback .hero-interactive__media {
	display: none;
}

/* Domain posters on backdrop: hero-assets.php inline CSS */
.hero-interactive__backdrop.is-video-fallback[data-active-domain="none"] {
	background: linear-gradient(145deg, rgba(14, 26, 31, 0.97) 0%, rgba(24, 46, 56, 0.9) 100%) !important;
}

/* Domain tint overlays (video shows through) */
.hero-interactive__layer {
	position: absolute;
	inset: 0;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.55s ease;
	pointer-events: none;
}

.hero-interactive__layer.is-active {
	opacity: 0.42;
}

.hero-interactive__layer--healthcare {
	background:
		radial-gradient(ellipse 90% 70% at 15% 85%, rgba(72, 58, 48, 0.4) 0%, transparent 58%),
		linear-gradient(155deg, rgba(14, 26, 31, 0.55) 0%, rgba(20, 18, 16, 0.25) 50%, rgba(14, 26, 31, 0.5) 100%);
}

.hero-interactive__layer--security {
	background:
		radial-gradient(ellipse 80% 60% at 80% 20%, rgba(30, 38, 42, 0.35) 0%, transparent 55%),
		linear-gradient(145deg, rgba(10, 18, 22, 0.55) 0%, rgba(20, 20, 20, 0.22) 55%, rgba(14, 26, 31, 0.48) 100%);
}

.hero-interactive__layer--government {
	background:
		radial-gradient(ellipse 75% 55% at 50% 100%, rgba(55, 55, 52, 0.32) 0%, transparent 58%),
		linear-gradient(160deg, rgba(14, 20, 22, 0.52) 0%, rgba(26, 26, 26, 0.24) 45%, rgba(14, 26, 31, 0.5) 100%);
}

.hero-interactive__scrim {
	position: absolute;
	inset: 0;
	z-index: 2;
	background:
		linear-gradient(180deg, rgba(14, 26, 31, 0.72) 0%, rgba(14, 26, 31, 0.22) 30%, rgba(14, 26, 31, 0.28) 55%, rgba(14, 26, 31, 0.95) 85%, rgba(14, 26, 31, 1) 100%);
	pointer-events: none;
}

/* Content column — centered; horizontal inset lives on .hero-interactive (matches header) */
.hero-interactive > .hero-interactive__inner,
.hero-interactive > .wp-block-group.hero-interactive__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-inline: auto !important;
	padding-inline: 0 !important;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: clamp(1.75rem, 4vh, 2.75rem);
	min-width: 0;
}

.hero-interactive > .hero-interactive__inner > *,
.hero-interactive > .wp-block-group.hero-interactive__inner > * {
	width: 100%;
	max-width: 100%;
	margin-inline: 0 !important;
	box-sizing: border-box;
}

/* WP wraps the console in a Custom HTML block — keep it inside the content column */
.hero-interactive__inner > .wp-block-html {
	width: 100% !important;
	max-width: 100% !important;
	margin-inline: 0 !important;
}

.hero-interactive .hero-interactive__eyebrow {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: rgba(250, 249, 247, 0.5) !important;
	margin: 0 0 var(--wp--preset--spacing--30) !important;
}

.hero-interactive .hero-interactive__title {
	font-family: var(--wp--preset--font-family--serif) !important;
	font-size: clamp(2rem, 4.2vw, 3.25rem) !important;
	font-weight: 300 !important;
	line-height: 1.08 !important;
	letter-spacing: -0.02em;
	max-width: 22ch;
	margin: 0 !important;
	color: var(--wp--preset--color--base) !important;
}

.hero-interactive__title em {
	font-style: italic;
	color: rgba(250, 249, 247, 0.82);
}

/* Console */
.hero-interactive__console {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40);
	width: 100%;
	min-width: 0;
	padding: var(--wp--preset--spacing--45);
	background: rgba(10, 14, 16, 0.62);
	border: 1px solid rgba(250, 249, 247, 0.16);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

/* Domain doors */
.hero-interactive__doors {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--wp--preset--spacing--30);
}

.hero-interactive__door {
	appearance: none;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: var(--wp--preset--color--base);
	padding: var(--wp--preset--spacing--40);
	background: rgba(250, 249, 247, 0.04);
	border: 2px solid rgba(250, 249, 247, 0.12);
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-height: 8.5rem;
	transition:
		background 0.25s ease,
		border-color 0.25s ease,
		transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
		box-shadow 0.25s ease;
}

.hero-interactive__door:hover {
	background: rgba(250, 249, 247, 0.08);
	border-color: rgba(250, 249, 247, 0.28);
	transform: translateY(-3px);
}

.hero-interactive__door.is-active,
.hero-interactive__door[aria-checked="true"] {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--base);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
	transform: translateY(-6px) scale(1.02);
}

.hero-interactive__door.is-active .hero-interactive__door-index,
.hero-interactive__door[aria-checked="true"] .hero-interactive__door-index {
	color: var(--wp--preset--color--contrast);
}

.hero-interactive__door.is-active .hero-interactive__door-meta,
.hero-interactive__door[aria-checked="true"] .hero-interactive__door-meta {
	color: var(--wp--preset--color--muted);
}

.hero-interactive__door:focus-visible {
	outline: 2px solid var(--wp--preset--color--base);
	outline-offset: 3px;
}

.hero-interactive__door-index {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 300;
	line-height: 1;
	color: rgba(250, 249, 247, 0.25);
}

.hero-interactive__door-label {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	font-weight: 400;
	line-height: 1.15;
}

.hero-interactive__door-meta {
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(250, 249, 247, 0.45);
	margin-top: auto;
}

/* Explore panel — tags + links per domain */
.hero-interactive__explore {
	position: relative;
	min-height: 7.5rem;
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid rgba(250, 249, 247, 0.12);
}

.hero-interactive__explore-panel {
	position: absolute;
	inset: var(--wp--preset--spacing--40) 0 0;
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition:
		opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
		transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-interactive__explore-panel.is-active {
	position: relative;
	inset: auto;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.hero-interactive__explore.is-animating .hero-interactive__explore-panel.is-active .hero-interactive__explore-lead {
	animation: hero-explore-lead-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-explore-lead-in {
	from {
		opacity: 0.35;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero-interactive__explore-lead {
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.05rem, 1.8vw, 1.2rem);
	font-weight: 300;
	line-height: 1.35;
	color: rgba(250, 249, 247, 0.88);
	margin: 0 0 var(--wp--preset--spacing--40);
	max-width: 42ch;
}

.hero-interactive__explore-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.6rem;
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--40);
	padding: 0;
}

a.hero-interactive__tag {
	text-decoration: none;
	color: inherit;
}

.hero-interactive__tag {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.4rem 0.65rem;
	color: rgba(250, 249, 247, 0.92);
	background: rgba(250, 249, 247, 0.08);
	border: 1px solid rgba(250, 249, 247, 0.2);
	border-radius: 2px;
	opacity: 0;
	transform: translateY(6px);
}

.hero-interactive__explore-panel.is-active .hero-interactive__tag {
	opacity: 1;
	transform: translateY(0);
	transition:
		opacity 0.35s ease,
		transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
		background 0.2s ease,
		border-color 0.2s ease;
}

.hero-interactive__explore.is-animating .hero-interactive__explore-panel.is-active .hero-interactive__tag {
	opacity: 0;
	transform: translateY(8px);
	animation: hero-tag-in 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-interactive__explore-panel.is-active .hero-interactive__tag:nth-child(1) { transition-delay: 0.04s; animation-delay: 0.06s; }
.hero-interactive__explore-panel.is-active .hero-interactive__tag:nth-child(2) { transition-delay: 0.08s; animation-delay: 0.1s; }
.hero-interactive__explore-panel.is-active .hero-interactive__tag:nth-child(3) { transition-delay: 0.12s; animation-delay: 0.14s; }
.hero-interactive__explore-panel.is-active .hero-interactive__tag:nth-child(4) { transition-delay: 0.16s; animation-delay: 0.18s; }
.hero-interactive__explore-panel.is-active .hero-interactive__tag:nth-child(5) { transition-delay: 0.2s; animation-delay: 0.22s; }

@keyframes hero-tag-in {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero-interactive__tag:hover {
	background: rgba(250, 249, 247, 0.14);
	border-color: rgba(250, 249, 247, 0.35);
}

.hero-interactive__explore-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 1.25rem;
	margin: 0;
	font-size: 0.88rem;
}

.hero-interactive__explore-cta {
	font-weight: 600;
	color: var(--wp--preset--color--base);
	text-decoration: none;
	border-bottom: 1px solid rgba(250, 249, 247, 0.45);
	padding-bottom: 2px;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.hero-interactive__explore-cta:hover {
	border-color: var(--wp--preset--color--base);
}

.hero-interactive__explore-cta:focus-visible {
	outline: 2px solid var(--wp--preset--color--base);
	outline-offset: 3px;
}

@media (max-width: 900px) {
	.hero-interactive .hero-interactive__title {
		max-width: none;
	}
}

/* Mobile — segmented domain control instead of stacked cards */
@media (max-width: 781px) {
	/* Below wide column: equal gutters from root padding only (no negative vw calc) */
	.hero-interactive {
		--hero-gutter-left: var(--wp--style--root--padding-left, 1.5rem);
		--hero-gutter-right: var(--wp--style--root--padding-right, 1.5rem);
		padding-left: var(--hero-gutter-left);
		padding-right: var(--hero-gutter-right);
	}
}

@media (max-width: 640px) {
	.hero-interactive__console {
		padding: var(--wp--preset--spacing--30);
		gap: var(--wp--preset--spacing--30);
	}

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

	.hero-interactive__doors {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 0.5rem;
	}

	.hero-interactive__door {
		min-height: auto;
		padding: 0.75rem 0.6rem;
		gap: 0.2rem;
		transform: none !important;
	}

	.hero-interactive__door:hover {
		transform: none !important;
	}

	.hero-interactive__door.is-active,
	.hero-interactive__door[aria-checked="true"] {
		transform: none !important;
	}

	.hero-interactive__door-index {
		font-size: 1.35rem;
	}

	.hero-interactive__door-label {
		font-size: 0.82rem;
		overflow-wrap: break-word;
		hyphens: auto;
	}

	.hero-interactive__door-meta {
		font-size: 0.6rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-interactive__video {
		animation: none !important;
	}
	.hero-interactive__layer,
	.hero-interactive__door,
	.hero-interactive__explore-panel,
	.hero-interactive__tag {
		transition: none;
	}
	.hero-interactive__explore-panel {
		transform: none;
	}
	.hero-interactive__tag,
	.hero-interactive__explore.is-animating .hero-interactive__explore-panel.is-active .hero-interactive__tag {
		opacity: 1;
		transform: none;
		animation: none !important;
	}
}
