/* =========================================================
   Splash enter button
   Uses the theme's standard WordPress button classes.
   ========================================================= */

.jm-splash__enter-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 0 0 clamp(2.5rem, 7vh, 5rem);
	pointer-events: none;
}

.jm-splash__enter-wrap .wp-block-button {
	display: flex;
	justify-content: center;
}

.jm-splash__enter {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.jm-splash__enter.is-visible {
	pointer-events: auto;
}

/* =========================================================
   Session Splash — Milestone 4
   ========================================================= */

.jm-splash {
	position: fixed;
	inset: 0;
	z-index: 99999;

	width: 100%;
	height: 100vh;
	height: 100svh;
	overflow: hidden;

	background: #fff;
	color: #000;
}

/* Black field driven by real loading progress. */
.jm-splash__wipe {
	position: absolute;
	inset: 0;
	z-index: 1;

	background: #000;
	transform: scaleX(0);
	transform-origin: left center;
	will-change: transform;
}

/* =========================================================
   Splash image + text stages
   ========================================================= */

.jm-splash__image-stage {
	position: absolute;
	inset: 0;
    
	z-index: 1;
	background: #000;
	pointer-events: none;
}

.jm-splash__image-stage::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;

	background: rgba(0, 0, 0, 0.3);

	pointer-events: none;
}

.jm-splash__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	will-change: opacity, filter, transform;
}

/* Milestone 6: stack current + incoming images for a simple crossfade. */
.jm-splash__image {
	position: absolute;
	inset: 0;
}

.jm-splash__text-stage {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	pointer-events: none;
}

.jm-splash__text-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(1.5rem, 3vh, 2.5rem);
	width: 100%;
	box-sizing: border-box;
}

.jm-splash__text-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.jm-splash__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 90vw;
	max-width: none;
	margin: 0 auto;
	padding: 0 5vw;
	box-sizing: border-box;
	color: #fff;
	text-align: center;
	opacity: 0;
	will-change: opacity, filter;
}

.jm-splash__text-line {
	display: block;
	width: 100%;
	white-space: nowrap;
	text-align: center;
	will-change: opacity, filter, letter-spacing;
}

/* =========================================================
   Loader
   ========================================================= */

.jm-splash__loader {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	width: min(50vw, 660px);
	transform: translate(-50%, -50%);
}

.jm-splash__loader--dark {
	color: #000;
}

.jm-splash__loader-mask {
	position: absolute;
	inset: 0;
	z-index: 3;

	overflow: hidden;
	clip-path: inset(0 100% 0 0);
	will-change: clip-path;
	pointer-events: none;
}

.jm-splash__loader--light {
	color: #fff;
}

.jm-splash__loading-text,
.jm-splash__text {
	font-size: clamp(1.2rem, 6vw, 4.5rem);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: -0.04em;
	text-transform: uppercase;
}



.jm-splash__loading-text {
	margin-top: 1rem;	    
	will-change: opacity, filter, letter-spacing;
}

/* Splash button — use global outline button styling,
   but invert it for the dark photographic background. */
.jm-splash .jm-splash__enter.wp-element-button {
	background-color: transparent;
	border-color: #fff;
	border-width: 2px;
	border-style: solid;
	color: #fff;
}

.jm-splash .jm-splash__enter.wp-element-button:hover,
.jm-splash .jm-splash__enter.wp-element-button:focus-visible {
	background-color: #fff;
	border-color: #fff;
	color: #000;
}



.jm-splash__percentage {
	margin-top: 0.75rem;
	font-size: var(--wp--preset--font-size--small);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.jm-splash__progress {
	position: relative;
	width: min(50vw, 660px);
	height: 1px;
	margin-top: 1rem;
	overflow: hidden;
}

.jm-splash__progress::before {
	content: '';
	position: absolute;
	inset: 0;
	background: currentColor;
	opacity: 0.2;
}

.jm-splash__progress-line {
	position: absolute;
	inset: 0;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	will-change: transform;
}



.jm-splash__loading-text,
.jm-splash__text {
	font-size: clamp(1.2rem, 6vw, 4.5rem);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: -0.04em;
	text-transform: uppercase;
}

.jm-splash__text {
	width: 90vw;
	max-width: none;
	margin: 0 auto;

	color: #fff;
	text-align: center;

	opacity: 0;
	will-change: opacity, filter;
}

@media (prefers-reduced-motion: reduce) {
	.jm-splash__wipe,
	.jm-splash__loader-mask,
	.jm-splash__progress-line,
	.jm-splash__image,
	.jm-splash__text,
	.jm-splash__loading-text {
		will-change: auto;
	}
}


@media (max-width: 768px) {

	.jm-splash__loader {
		width: 86vw;
	}

	.jm-splash__text-stage {
		padding-inline: 5vw;
	}

	.jm-splash__text {
		width: 90vw;
	}

	.jm-splash__loading-text,
	.jm-splash__text {
		font-size: clamp(2.5rem, 12vw, 5rem);
	}

}



/* smaller sizes for mobile */

@media (max-width: 768px) {

	.jm-splash__loader {
		width: 90vw;
	}

	.jm-splash__text-stage {
		padding-inline: 2.5vw;
	}

	.jm-splash__text {
		width: 95vw;
		padding-inline: 0;
	}

	.jm-splash__text-line {
		width: auto;
		max-width: 100%;
		white-space: nowrap;
	}

	.jm-splash__loading-text {
		font-size: clamp(2.5rem, 12vw, 5rem);
	}

	.jm-splash__text {
		font-size: clamp(1.8rem, 7vw, 3.8rem);
	}
}


