.mhp {
	--mhp-bg: #fbf8f2;
	--mhp-title: #2b3337;
	--mhp-subtitle: #b07312;
	--mhp-logo: 120px;
	--mhp-ease: cubic-bezier(0.22, 1, 0.36, 1);
	position: fixed;
	inset: 0;
	z-index: 100100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var(--mhp-bg);
	text-align: center;
	transition: opacity 0.7s ease, visibility 0s linear 0.7s;
	/* Hides itself even if the page script never runs. */
	animation: mhp-failsafe 0.6s ease 10s forwards;
}

html.mhp-skip .mhp {
	display: none;
}

html.mhp-active:not(.mhp-skip),
html.mhp-active:not(.mhp-skip) body {
	overflow: hidden;
}

.mhp.is-done {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.mhp__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 560px;
	transition: transform 0.7s var(--mhp-ease);
}

.mhp.is-done .mhp__inner {
	transform: translateY(-16px) scale(0.98);
}

.mhp .mhp__logo {
	display: block;
	width: var(--mhp-logo);
	max-width: 60vw;
	height: auto;
	margin: 0 0 24px;
	border: 0;
	object-fit: contain;
	opacity: 0;
	animation: mhp-logo-in 0.9s var(--mhp-ease) 0.1s forwards, mhp-float 3.2s ease-in-out 1s infinite;
}

.mhp .mhp__title,
.mhp .mhp__subtitle {
	margin: 0;
	padding: 0;
	opacity: 0;
	animation: mhp-rise 0.8s var(--mhp-ease) forwards;
}

.mhp .mhp__title {
	color: var(--mhp-title);
	font-family: 'Amatic SC', cursive;
	font-size: clamp(40px, 8vw, 64px);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	animation-delay: 0.35s;
}

.mhp .mhp__subtitle {
	margin-top: 8px;
	color: var(--mhp-subtitle);
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: clamp(10px, 2.4vw, 12px);
	font-weight: 500;
	letter-spacing: 0.3em;
	line-height: 1.5;
	text-transform: uppercase;
	animation-delay: 0.55s;
}

.mhp__bar {
	position: relative;
	display: block;
	width: 96px;
	height: 1px;
	margin-top: 32px;
	overflow: hidden;
	background: color-mix(in srgb, var(--mhp-subtitle) 20%, transparent);
	opacity: 0;
	animation: mhp-rise 0.8s var(--mhp-ease) 0.75s forwards;
}

.mhp__bar::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--mhp-subtitle);
	transform: translateX(-100%);
	animation: mhp-sweep 1.6s var(--mhp-ease) 0.9s infinite;
}

@keyframes mhp-logo-in {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes mhp-float {
	50% {
		transform: translateY(-6px);
	}
}

@keyframes mhp-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes mhp-sweep {
	to {
		transform: translateX(100%);
	}
}

@keyframes mhp-failsafe {
	to {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mhp .mhp__logo,
	.mhp .mhp__title,
	.mhp .mhp__subtitle,
	.mhp__bar {
		opacity: 1;
		animation: none;
	}

	.mhp__bar::after {
		animation: none;
		transform: none;
	}

	.mhp,
	.mhp__inner {
		transition-duration: 0.01ms;
	}
}
