/* UX Page Transitions */

.ux-pt-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: var(--ux-pt-color, #111);
	visibility: hidden;
	pointer-events: none;
}

.ux-pt-overlay.is-active {
	visibility: visible;
	pointer-events: auto;
}

/* Curved: the SVG path is the panel. */
.ux-pt-overlay--curved {
	background: none;
}

.ux-pt-overlay__svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	overflow: hidden;
}

.ux-pt-overlay__path {
	fill: var(--ux-pt-color, #111);
}

/* Pixel wave: the grid of squares (built by the script) is the panel. */
.ux-pt-overlay--pixel {
	background: none;
}

.ux-pt-pixels {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.ux-pt-pixels span {
	position: absolute;
	background: var(--ux-pt-color, #111);
	opacity: 0;
}

/* Logo / text in the middle, revealed from a mask. */
.ux-pt-label {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	overflow: hidden;
	max-width: 80vw;
	padding: .1em 0;
	color: var(--ux-pt-contrast, #fff);
	font-size: clamp(1.5rem, 3.5vw, 3rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -.02em;
	text-align: center;
	white-space: nowrap;
}

.ux-pt-label__inner {
	transform: translate3d(0, 110%, 0);
}

.ux-pt-label img {
	display: block;
	width: auto;
	max-width: 60vw;
	max-height: 64px;
}

/* Loader: only shows up when the next page is slow (delay). */
.ux-pt-loader {
	position: fixed;
	left: 50%;
	top: 50%;
	z-index: 100001;
	width: 44px;
	height: 44px;
	margin: -22px 0 0 -22px;
	border-radius: 50%;
	background: var(--ux-pt-color, #111);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .2s, visibility 0s .2s;
}

.ux-pt-loader span {
	position: absolute;
	inset: 11px;
	border: 2px solid var(--ux-pt-contrast, #fff);
	border-right-color: transparent;
	border-radius: 50%;
	animation: ux-pt-spin .7s linear infinite;
}

html.ux-pt-loading .ux-pt-loader {
	opacity: 1;
	visibility: visible;
	transition: opacity .2s .6s, visibility 0s .6s;
}

@keyframes ux-pt-spin {
	to { transform: rotate(360deg); }
}

/* Running transition: block double clicks on the page. */
html.ux-pt-running #wrapper {
	pointer-events: none;
}

/* Next container waiting for its enter animation (content effects). */
[data-barba="container"].ux-pt-pending {
	opacity: 0;
}

[data-barba="container"]:focus {
	outline: none;
}

/* First load: covered until the script reveals the page (failsafe after 4s). */
html.ux-pt-once .ux-pt-overlay--curved,
html.ux-pt-once .ux-pt-overlay--pixel,
html.ux-pt-once .ux-pt-overlay--curtain,
html.ux-pt-once .ux-pt-overlay--wipe {
	visibility: visible;
	animation: ux-pt-failsafe-hide 0s linear 4s forwards;
}

html.ux-pt-once:not(.ux-pt-once--cover) [data-barba="container"] {
	opacity: 0;
	animation: ux-pt-failsafe-show 0s linear 4s forwards;
}

/* Pixel wave has no grid yet on first paint: cover with a plain panel. */
html.ux-pt-once .ux-pt-overlay--pixel {
	background: var(--ux-pt-color, #111);
}

@keyframes ux-pt-failsafe-hide {
	to { visibility: hidden; }
}

@keyframes ux-pt-failsafe-show {
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	html.ux-pt-once .ux-pt-overlay {
		visibility: hidden;
	}
	html.ux-pt-once [data-barba="container"] {
		opacity: 1;
	}
}
