/* ==========================================================
   BAHAMON.DEV — TRANSITIONS
   Global page transition states
   ========================================================== */


/* ==========================================================
   01. PAGE TRANSITION
   ========================================================== */

.page-transition {
	position: fixed;
	inset: 0;

	z-index: 999999;

	width: 100%;
	height: 100%;

	background-color: var(--color-blue);
	color: var(--color-beige);

	pointer-events: none;
	visibility: hidden;

	clip-path: inset(0% 0% 100% 0%);

	will-change: clip-path;
}

/* ==========================================================
   PRELOADER
   ========================================================== */

html.is-loading .page-transition {
	visibility: visible;
	clip-path: inset(0% 0% 0% 0%);
}


.preloader {
	position: absolute;
	inset: 0;

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

	padding: var(--space-3);

	pointer-events: none;
}


.preloader-info {
	display: flex;
	flex-direction: column;
	align-items: flex-end;

	gap: var(--space-1);

	width: 12vw;
}


.preloader-progress {
	display: block;
}


.preloader-bar {
	position: relative;

	width: 100%;
	height: 1px;

	overflow: hidden;

	background-color: rgba(
		255,
		255,
		255,
		0.25
	);
}


.preloader-bar-progress {
	position: absolute;
	inset: 0;

	display: block;

	background-color: currentColor;

	transform: scaleX(0);
	transform-origin: left center;

	will-change: transform;
}


html:not(.is-loading) .preloader {
	display: none;
}