/* ==================================================================
   Page loader — kwizzbit/page-loader  (shared chrome)
   Source: /HTML/page-loader.html  ·  STYLEGUIDE §8 (Page-load animation)

   Full-page cream overlay with three pulsing coral bits, shown on load and
   faded out by assets/js/page-loader.js. The html.kwb-loading guard hides page
   content until the loader dismisses (paired with the early class-add in wp_head
   and the dismiss script — so it is ALWAYS removed; never a permanent blank page).
   ================================================================== */

#kwb-loader{
	position: fixed;
	inset: 0;
	background: var(--wp--preset--color--cream);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	pointer-events: none;
	transition: opacity 0.35s var(--wp--custom--motion--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}
#kwb-loader.is-hidden{ opacity: 0; }

.kwb-loader__bit{
	width: 8px;
	height: 8px;
	background: var(--wp--preset--color--coral);
	border-radius: 0;
	animation: kwb-loader-pulse 1.2s ease-in-out infinite;
}
.kwb-loader__bit:nth-child(2){ animation-delay: 0.2s; }
.kwb-loader__bit:nth-child(3){ animation-delay: 0.4s; }

@keyframes kwb-loader-pulse{
	0%, 100% { transform: scale(0.6); }
	50%      { transform: scale(1); }
}

/* Hide page content until the loader dismisses, preventing FOUC. The early wp_head
   script adds .kwb-loading to <html>; page-loader.js removes it on window.load (with an
   8s safety net), so this never strands the page blank. */
html.kwb-loading body > *:not(#kwb-loader){
	visibility: hidden;
}

@media (prefers-reduced-motion: reduce){
	.kwb-loader__bit{ animation: none; }
}
