/* ─── Intro Overlay ──────────────────────────────────────────────────────── */

/*
 * Hidden by default. The inline cookie-check script in <head> adds
 * .acunltd-intro to <html> on first visit, making the overlay visible
 * before anything else paints — so there's no flash of page content.
 */
.intro-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background-color: var(--acunltd-primary-color, var(--wp--preset--color--chocolate));
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

html.acunltd-intro .intro-overlay {
	display: flex;
}

/* Video — covers full overlay, sits behind logo */
.intro-overlay__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 1;
	transition: opacity 1s ease;
}

/* Skip video on mobile to save bandwidth */
@media (max-width: 767px) {
	.intro-overlay__video {
		display: none;
	}
}

@media (min-width: 768px) {
	.intro-overlay__logo {
		width: 50vw;
	}
}

/* Logo — centered above video layer, hidden until video fades */
.intro-overlay__logo {
	position: relative;
	z-index: 1;
	width: 80vw;
	color: var(--acunltd-accent-color, var(--wp--preset--color--sky));
	transform-origin: center center;
	opacity: 0;
	transition: opacity 1s ease;
}

.intro-overlay__logo svg {
	width: 100%;
	height: auto;
	display: block;
}

/* Overlay fade-out (class added by JS at the end) */
.intro-overlay.is-fading {
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}
