/* ══════════════════════════════
   PAGE LOADER — Shipping container crane animation
   ══════════════════════════════ */

.sd-loader {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: #0B2A52;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}

.sd-loader-done {
	opacity: 0;
	visibility: hidden;
}

.sd-loader-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	position: relative;
}

/* ── Crane cable ── */
.sd-crane-cable {
	width: 2px;
	height: 60px;
	background: linear-gradient(to bottom, transparent, #8b95a5);
	animation: cableSwing 2s ease-in-out infinite;
	transform-origin: top center;
}

@keyframes cableSwing {
	0%, 100% { transform: rotate(-3deg); }
	50% { transform: rotate(3deg); }
}

/* ── Hook ── */
.sd-crane-hook {
	margin-top: -2px;
	animation: cableSwing 2s ease-in-out infinite;
	transform-origin: top center;
}

/* ── Container body ── */
.sd-loader-container {
	margin-top: 4px;
	animation: containerLift 2s ease-in-out infinite, cableSwing 2s ease-in-out infinite;
	transform-origin: top center;
}

.sd-loader-container-body {
	width: 120px;
	height: 52px;
	background: #C8102E;
	border-radius: 3px;
	position: relative;
	overflow: hidden;
	box-shadow:
		0 4px 20px rgba(200, 16, 46, 0.3),
		inset 0 -2px 0 rgba(0, 0, 0, 0.15),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Corrugated ridges */
.sd-container-ridge {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: rgba(255, 255, 255, 0.12);
}

.sd-container-ridge:nth-child(1) { left: 20%; }
.sd-container-ridge:nth-child(2) { left: 35%; }
.sd-container-ridge:nth-child(3) { left: 50%; }
.sd-container-ridge:nth-child(4) { left: 65%; }
.sd-container-ridge:nth-child(5) { left: 80%; }

/* Door line on right side */
.sd-container-door-line {
	position: absolute;
	right: 10px;
	top: 6px;
	bottom: 6px;
	width: 1px;
	background: rgba(255, 255, 255, 0.25);
}

.sd-container-door-line::before {
	content: '';
	position: absolute;
	right: 3px;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
}

@keyframes containerLift {
	0% { transform: translateY(8px); }
	50% { transform: translateY(-4px); }
	100% { transform: translateY(8px); }
}

/* ── Brand text ── */
.sd-loader-text {
	margin-top: 32px;
	display: flex;
	align-items: center;
	gap: 0;
	font-family: 'Inter', sans-serif;
	font-weight: 800;
	font-size: 1.1rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.sd-loader-text span {
	display: inline-block;
	color: rgba(255, 255, 255, 0.9);
	animation: letterReveal 0.4s ease forwards;
	opacity: 0;
	transform: translateY(10px);
}

.sd-loader-text .sd-loader-accent {
	color: #C8102E;
}

.sd-loader-space {
	width: 8px;
}

/* Staggered letter reveal */
.sd-loader-text span:nth-child(1)  { animation-delay: 0.1s; }
.sd-loader-text span:nth-child(2)  { animation-delay: 0.15s; }
.sd-loader-text span:nth-child(3)  { animation-delay: 0.2s; }
.sd-loader-text span:nth-child(4)  { animation-delay: 0.25s; }
.sd-loader-text span:nth-child(5)  { animation-delay: 0.3s; }
.sd-loader-text span:nth-child(6)  { animation-delay: 0.35s; }
.sd-loader-text span:nth-child(7)  { animation-delay: 0.4s; }
.sd-loader-text span:nth-child(8)  { animation-delay: 0.45s; }
.sd-loader-text span:nth-child(9)  { animation-delay: 0.5s; }
.sd-loader-text span:nth-child(10) { animation-delay: 0.55s; }
.sd-loader-text span:nth-child(11) { animation-delay: 0.6s; }
.sd-loader-text span:nth-child(12) { animation-delay: 0.65s; }
.sd-loader-text span:nth-child(13) { animation-delay: 0.7s; }
.sd-loader-text span:nth-child(14) { animation-delay: 0.75s; }
.sd-loader-text span:nth-child(15) { animation-delay: 0.8s; }
.sd-loader-text span:nth-child(16) { animation-delay: 0.85s; }

@keyframes letterReveal {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Progress bar ── */
.sd-loader-progress {
	margin-top: 24px;
	width: 160px;
	height: 3px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 3px;
	overflow: hidden;
}

.sd-loader-progress-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #C8102E, #e85d5d);
	border-radius: 3px;
	animation: progressFill 1.8s ease-in-out infinite;
}

@keyframes progressFill {
	0% { width: 0%; margin-left: 0; }
	50% { width: 70%; margin-left: 0; }
	100% { width: 0%; margin-left: 100%; }
}
