/* ==========================================================================
   BCPL - page loader
   Full-screen branded overlay shown until the page has finished loading.
   Hidden by js/bcpl-responsive.js on window load (with a safety timeout),
   and by the <noscript> rule in layouts/loader.php when JS is unavailable.
   ========================================================================== */

.bcpl-loader {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-webkit-box-align: center;
	-ms-flex-align: center;
	align-items: center;
	-webkit-box-pack: center;
	-ms-flex-pack: center;
	justify-content: center;
	background: #0f2453;
	background: radial-gradient(circle at 50% 42%, #1a366f 0%, #0f2453 62%);
	opacity: 1;
	visibility: visible;
	-webkit-transition: opacity .45s ease, visibility 0s linear .45s;
	transition: opacity .45s ease, visibility 0s linear .45s;
}

.bcpl-loader.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* While the loader is up the page behind it must not scroll. */
body.bcpl-loading {
	overflow: hidden;
}

.bcpl-loader__inner {
	text-align: center;
	padding: 24px;
	max-width: 92vw;
}

/* --- mark: logo inside a rotating gold ring ------------------------------- */

.bcpl-loader__mark {
	position: relative;
	width: 116px;
	height: 116px;
	margin: 0 auto 26px;
}

.bcpl-loader__ring {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 3px solid rgba(255, 255, 255, .14);
	border-top-color: #ffce14;
	border-right-color: #ffce14;
	border-radius: 50%;
	-webkit-animation: bcpl-spin 1.1s linear infinite;
	animation: bcpl-spin 1.1s linear infinite;
}

.bcpl-loader__logo {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 58px;
	height: auto;
	-webkit-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
	-webkit-animation: bcpl-pulse 1.8s ease-in-out infinite;
	animation: bcpl-pulse 1.8s ease-in-out infinite;
}

/* --- wordmark ------------------------------------------------------------- */

.bcpl-loader__name {
	color: #ffce14;
	font-family: 'Oswald', 'Lato', sans-serif;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 3px;
	line-height: 1.5;
	text-transform: uppercase;
}

.bcpl-loader__name span {
	display: block;
	margin-top: 4px;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 4px;
	opacity: .85;
}

/* --- progress bar --------------------------------------------------------- */

.bcpl-loader__bar {
	position: relative;
	width: 190px;
	max-width: 60vw;
	height: 3px;
	margin: 22px auto 0;
	background: rgba(255, 255, 255, .16);
	border-radius: 3px;
	overflow: hidden;
}

.bcpl-loader__bar span {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 42%;
	background: #ffce14;
	border-radius: 3px;
	-webkit-animation: bcpl-sweep 1.35s ease-in-out infinite;
	animation: bcpl-sweep 1.35s ease-in-out infinite;
}

@-webkit-keyframes bcpl-spin {
	to {
		-webkit-transform: rotate(360deg);
	}
}

@keyframes bcpl-spin {
	to {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

@-webkit-keyframes bcpl-pulse {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: .55;
	}
}

@keyframes bcpl-pulse {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: .55;
	}
}

@-webkit-keyframes bcpl-sweep {
	0% {
		left: -45%;
	}

	100% {
		left: 100%;
	}
}

@keyframes bcpl-sweep {
	0% {
		left: -45%;
	}

	100% {
		left: 100%;
	}
}

/* --- small screens -------------------------------------------------------- */

@media (max-width: 480px) {
	.bcpl-loader__mark {
		width: 92px;
		height: 92px;
		margin-bottom: 20px;
	}

	.bcpl-loader__logo {
		width: 46px;
	}

	.bcpl-loader__name {
		font-size: 13px;
		letter-spacing: 2px;
	}

	.bcpl-loader__name span {
		font-size: 10px;
		letter-spacing: 3px;
	}
}

/* --- reduced motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.bcpl-loader__ring {
		-webkit-animation: none;
		animation: none;
		border-color: rgba(255, 255, 255, .14);
		border-top-color: #ffce14;
	}

	.bcpl-loader__logo,
	.bcpl-loader__bar span {
		-webkit-animation: none;
		animation: none;
	}

	.bcpl-loader__bar span {
		left: 0;
		width: 100%;
	}
}
