/* ==========================================================================
   SCOLA — Loader (orange dot pulse)
   Brand-anchored loading animation. Reusable everywhere async.
   ========================================================================== */

.scola-loader {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: 80px 24px;
	font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #8A95A1;
	min-height: 320px;
}

/* The signature "scola·" wordmark */
.scola-loader__mark {
	display: inline-flex;
	align-items: baseline;
	font-family: 'Hanken Grotesk', sans-serif;
	font-weight: 800;
	font-size: clamp(28px, 4vw, 40px);
	letter-spacing: -0.045em;
	color: #1E1E1E;
	line-height: 1;
}

.scola-loader__mark-text { display: inline-block; }

/* The orange dot — the soul of this animation */
.scola-loader__dot {
	display: inline-block;
	width: 0.32em;
	height: 0.32em;
	border-radius: 50%;
	background: #FD8E25;
	margin-left: 0.04em;
	transform-origin: center;
	animation: scola-dot-pulse 1.2s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate;
	will-change: transform, opacity;
}

@keyframes scola-dot-pulse {
	0% {
		transform: scale(1);
		opacity: 1;
	}
	100% {
		transform: scale(1.5);
		opacity: 0.55;
	}
}

/* Optional caption — only 'Loading' or context-specific text */
.scola-loader__caption {
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #8A95A1;
	font-weight: 600;
	opacity: 0;
	animation: scola-fade-in 0.4s ease 0.3s forwards;
}

@keyframes scola-fade-in {
	to { opacity: 1; }
}

/* === Variants === */

/* Inline small (botones submit, etc.) — solo el dot pulsing */
.scola-loader--inline {
	padding: 0;
	min-height: auto;
	display: inline-flex;
	gap: 8px;
}

.scola-loader--inline .scola-loader__mark { display: none; }
.scola-loader--inline .scola-loader__dot {
	width: 8px;
	height: 8px;
	margin: 0;
}
.scola-loader--inline .scola-loader__caption {
	font-size: 11px;
	letter-spacing: 0.1em;
}

/* Splash overlay (page transitions, full-page loading) */
.scola-loader--splash {
	position: fixed;
	inset: 0;
	background: #FAFAF7;
	z-index: 99999;
	min-height: 100vh;
	animation: scola-splash-fade 0.4s ease forwards;
}

@keyframes scola-splash-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.scola-loader--splash.is-leaving {
	animation: scola-splash-fade-out 0.4s ease forwards;
}

@keyframes scola-splash-fade-out {
	from { opacity: 1; }
	to { opacity: 0; visibility: hidden; }
}

/* Dark theme variant (para sections oscuras) */
.scola-loader--dark {
	color: #D3DDDE;
}

.scola-loader--dark .scola-loader__mark {
	color: #FFFFFF;
}

.scola-loader--dark .scola-loader__caption {
	color: #8A95A1;
}

/* Respect reduced motion preference (a11y) */
@media (prefers-reduced-motion: reduce) {
	.scola-loader__dot {
		animation: scola-dot-pulse-reduced 2s ease infinite alternate;
	}
	@keyframes scola-dot-pulse-reduced {
		0% { opacity: 1; }
		100% { opacity: 0.6; }
	}
}
