/* HPHT — preloader.css: fullscreen page-load overlay.
   Sits above all content until window.load fires, then JS fades it out. */

.hpht-preloader {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	background: #faf6ec;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

/* Hidden state — applied by main.js on window.load (or by body.hpht-loaded). */
body.hpht-loaded .hpht-preloader {
	opacity: 0;
	visibility: hidden;
}

.hpht-preloader__inner {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 200px;
	min-height: 200px;
}

/* Logo (or site name) sits in the centre of the ring. */
.hpht-preloader__logo {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	z-index: 2;
	animation: hpht-preloader-breath 1.8s ease-in-out infinite;
}
.hpht-preloader__logo img,
.hpht-preloader__logo .custom-logo {
	max-width: 110px;
	height: auto;
	display: block;
}
.hpht-preloader__sitename {
	font-family: var(--ff-display, 'Poppins', sans-serif);
	font-weight: 700;
	font-size: 1.4rem;
	color: var(--c-primary, #1273b5);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: center;
	padding: 0 var(--space-3, 0.75rem);
}

/* Animated ring — track + spinning arc. */
.hpht-preloader__ring {
	position: relative;
	z-index: 1;
	display: block;
}
.hpht-preloader__ring-track {
	stroke: rgba(28, 79, 139, 0.12);    /* faint primary */
}
.hpht-preloader__ring-spin {
	stroke: var(--c-primary, #1273b5);
	stroke-dasharray: 90 250;            /* arc length + gap */
	stroke-dashoffset: 0;
	transform-origin: 60px 60px;
	animation: hpht-preloader-spin 1.4s linear infinite;
}

@keyframes hpht-preloader-spin {
	0%   { transform: rotate(0deg);   stroke-dasharray: 30 250; }
	50%  {                            stroke-dasharray: 180 250; }
	100% { transform: rotate(360deg); stroke-dasharray: 30 250; }
}

@keyframes hpht-preloader-breath {
	0%, 100% { transform: scale(0.96); opacity: 0.85; }
	50%      { transform: scale(1);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.hpht-preloader__ring-spin,
	.hpht-preloader__logo {
		animation: none;
	}
}
