/* Gate mounted inside #intro (.g5-gate-host): scoped overlay, scroll lock, reveal intro copy. */

#intro {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: 100vh;
	min-height: 100dvh;
	min-height: 520px;
}

/* Hero fills #intro; sits under copy + gate (not inside .g5-intro-content, so never opacity:0). */
#intro > .intro_wrapper.g5-intro-hero-stack {
	position: absolute;
	inset: 0;
	width: 100%;
	z-index: 0;
}

#intro > .intro_wrapper.g5-intro-hero-stack .intro_item,
#intro > .intro_wrapper.g5-intro-hero-stack #backimg {
	min-height: 100%;
	height: 100%;
}

/* Copy + arrow overlay the hero; hidden until gate completes */
#intro .g5-intro-content {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.65s ease, visibility 0s linear 0.65s;
}

#intro.g5-intro-revealed .g5-intro-content {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.65s ease, visibility 0s linear 0s;
}

/* Gate layer covers only #intro (not full viewport) */
#intro .g5-gate-host {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	z-index: 30;
	pointer-events: none;
}

#intro .g5-gate-host .tc-overlay {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-height: none !important;
	pointer-events: auto;
	/* Darkening lives on .tc-stage--gate::before (gate.bundle) so it can fade in first */
	background: transparent;
}

#intro .g5-gate-host #tcHeroBackdrop {
	display: none !important;
}

#intro .g5-gate-host .tc-brand-stack {
	width: 100%;
	max-width: 100%;
}

/*
 * Lock document scroll while gate is active.
 * home-head-fragment sets body:not(.g5l-lock){ overflow:visible !important } — beat it when
 * .site-phase--gate is present (same specificity as body:not but later sheet + extra class).
 */
html.g5-gate-pending {
	overflow: hidden !important;
	overscroll-behavior: none;
}

html.g5-gate-pending body {
	overflow: hidden !important;
	overscroll-behavior: none;
}

body.site-phase--gate:not(.g5l-lock) {
	overflow: hidden !important;
	overscroll-behavior: none;
}

@media (prefers-reduced-motion: reduce) {
	#intro .g5-intro-content {
		transition: opacity 0.2s ease, visibility 0s linear 0.2s;
	}

	#intro.g5-intro-revealed .g5-intro-content {
		transition: opacity 0.2s ease, visibility 0s linear 0s;
	}

	#intro .g5-gate-host .tc-overlay {
		transition: opacity 0.25s ease, visibility 0.25s ease !important;
	}
}
