.preloader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: linear-gradient(
		180deg,
		var(--gradient-color-1),
		var(--gradient-color-2)
	);
	z-index: 1000;
	opacity: 1;
	transition: opacity 0.5s ease-out;
	display: flex;
	align-items: center;
	justify-content: center;
}

.preloader.hide {
	opacity: 0;
}

.preloader-grid {
	width: 20vmin;
	min-width: 160px;
	aspect-ratio: 1 / 1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, 1fr);
	gap: 16px;
}

.preloader-grid .preloader-square {
	border-radius: 4px;
	border: 8px var(--light-color) solid;
	box-shadow: 0 0 16px 2px var(--light-color),
		inset 0 0 16px 2px var(--light-color);
	-webkit-animation: preloaderSquarePulse 1.3s infinite ease-in-out;
	animation: preloaderSquarePulse 1.3s infinite ease-in-out;
	-webkit-animation-delay: var(--delay);
	animation-delay: var(--delay);
}

@-webkit-keyframes preloaderSquarePulse {
	0%,
	70%,
	100% {
		-webkit-transform: scale3D(1, 1, 1);
		transform: scale3D(1, 1, 1);
	}
	35% {
		-webkit-transform: scale3D(0, 0, 1);
		transform: scale3D(0, 0, 1);
	}
}

@keyframes preloaderSquarePulse {
	0%,
	70%,
	100% {
		-webkit-transform: scale3D(1, 1, 1);
		transform: scale3D(1, 1, 1);
	}
	35% {
		-webkit-transform: scale3D(0, 0, 1);
		transform: scale3D(0, 0, 1);
	}
}