/* ============================================================
   DIESYT STORE — SELLER TRANSITION LOADER  (v4 — smooth anim)
   Entry: glitch-flash boot  |  Exit: flash-collapse to black
   ============================================================ */

/* ── Base overlay ─────────────────────────────────────────── */
#sl-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #06060a;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Share Tech Mono', monospace;
}

/* ════════════════════════════════════════════════════════════
   ENTRY  — whole overlay boots up with a glitch-flicker
   ════════════════════════════════════════════════════════════ */
#sl-overlay.sl-visible {
  animation: slBootIn 0.55s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes slBootIn {
  0%   { opacity: 0;    clip-path: inset(50% 0 50% 0); }
  30%  { opacity: 1;    clip-path: inset(30% 0 30% 0); }
  55%  { opacity: 0.85; clip-path: inset(8% 0 8% 0);   }
  70%  { opacity: 1;    clip-path: inset(2% 0 2% 0);   }
  100% { opacity: 1;    clip-path: inset(0% 0 0% 0);   }
}

/* ── Stars canvas ─────────────────────────────────────────── */
.sl-stars-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Status bar ───────────────────────────────────────────── */
.sl-status-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 1.1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  border-bottom: 1px solid rgba(147,51,234,0.12);
  animation: slFadeIn 0.35s 0.3s both;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.sl-status-left, .sl-status-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sl-status-label {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}
.sl-status-val {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(192,132,252,0.9);
  text-transform: uppercase;
}

/* ── HUD Corners ──────────────────────────────────────────── */
.sl-hud-tl, .sl-hud-tr, .sl-hud-bl, .sl-hud-br {
  position: absolute;
  width: 52px; height: 52px;
  z-index: 5;
  animation: slHudIn 0.45s 0.35s cubic-bezier(0.22,1,0.36,1) both;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sl-hud-tl { top: 54px; left: 28px;   border-top: 2px solid #9333EA; border-left:  2px solid #9333EA; }
.sl-hud-tr { top: 54px; right: 28px;  border-top: 2px solid #9333EA; border-right: 2px solid #9333EA; }
.sl-hud-bl { bottom: 28px; left: 28px;  border-bottom: 2px solid #9333EA; border-left:  2px solid #9333EA; }
.sl-hud-br { bottom: 28px; right: 28px; border-bottom: 2px solid #9333EA; border-right: 2px solid #9333EA; }
@keyframes slHudIn {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Scanline ─────────────────────────────────────────────── */
.sl-scanline {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(147,51,234,0.55), transparent);
  box-shadow: 0 0 18px rgba(147,51,234,0.45);
  animation: slScan 2.2s linear infinite;
  opacity: 0.6;
  z-index: 3;
  transition: opacity 0.2s ease;
}
@keyframes slScan {
  0%   { top: -2px; }
  100% { top: 100%; }
}

/* ── Centre stack ─────────────────────────────────────────── */
.sl-center {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  animation: slRiseIn 0.6s 0.2s cubic-bezier(0.22,1,0.36,1) both;
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}
@keyframes slRiseIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0);   }
}
@keyframes slFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Radar wrap ───────────────────────────────────────────── */
.sl-radar-wrap {
  position: relative;
  width: clamp(230px, 30vw, 310px);
  height: clamp(230px, 30vw, 310px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sl-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(147,51,234,0.22);
}
.sl-ring-outer {
  inset: 0;
  border-color: rgba(147,51,234,0.35);
}
.sl-ring-mid {
  inset: 14%;
  border-color: rgba(192,132,252,0.18);
  animation: slSpin 18s linear infinite;
}
.sl-ring-inner {
  inset: 34%;
  border-color: rgba(147,51,234,0.3);
  animation: slSpin 10s linear infinite reverse;
}
@keyframes slSpin { to { transform: rotate(360deg); } }

/* Arc SVG */
.sl-arc-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  z-index: 2;
}
.sl-arc-track {
  fill: none;
  stroke: rgba(147,51,234,0.12);
  stroke-width: 2;
}
.sl-arc-fill {
  fill: none;
  stroke: #9333EA;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.05s linear;
  filter: drop-shadow(0 0 6px rgba(147,51,234,0.8));
}

/* Sweep */
.sl-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 80%,
    rgba(147,51,234,0.08) 90%,
    rgba(147,51,234,0.35) 100%
  );
  animation: slSpin 3s linear infinite;
  z-index: 1;
}

/* ── Orbital labels ───────────────────────────────────────── */
.sl-orbit-label {
  position: absolute;
  font-size: clamp(0.36rem, 0.85vw, 0.48rem);
  letter-spacing: 0.22em;
  color: rgba(192,132,252,0.48);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}
.sl-ol-1 { top: 4%;  right: 10%; }
.sl-ol-2 { top: 4%;  left:  10%; }
.sl-ol-3 { top: 22%; left:  -12%; transform: rotate(-30deg); }
.sl-ol-4 { top: 50%; left:  -18%; transform: rotate(-90deg); }
.sl-ol-5 { bottom: 18%; left: -4%;  transform: rotate(-140deg); }
.sl-ol-6 { bottom: 4%;  left:  10%; }
.sl-ol-7 { bottom: 10%; right: 6%; }
.sl-ol-8 { top: 24%; right: -10%; transform: rotate(30deg); }

/* ── Connector lines ──────────────────────────────────────── */
.sl-hex-connector {
  position: absolute;
  background: rgba(147,51,234,0.45);
  z-index: 3;
}
.sl-hc-top   { width: 1px; height: 16%; top: 0;    left: 50%; transform: translateX(-50%); }
.sl-hc-bot   { width: 1px; height: 16%; bottom: 0; left: 50%; transform: translateX(-50%); }
.sl-hc-left  { height: 1px; width: 16%; left: 0;   top: 50%;  transform: translateY(-50%); }
.sl-hc-right { height: 1px; width: 16%; right: 0;  top: 50%;  transform: translateY(-50%); }

/* ── Hex percentage ───────────────────────────────────────── */
.sl-hex-wrap {
  position: relative;
  width: 116px; height: 134px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  animation: slHexPulse 2s ease-in-out infinite;
}
@keyframes slHexPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(147,51,234,0.6)); }
  50%       { filter: drop-shadow(0 0 22px rgba(147,51,234,1)); }
}
.sl-hex-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.sl-hex-poly {
  fill: none;
  stroke: #9333EA;
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.sl-hex-pct {
  position: relative;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  color: #ffffff;
  z-index: 1;
  text-shadow: 0 0 14px rgba(147,51,234,0.8);
}

/* ── Logo block ───────────────────────────────────────────── */
.sl-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.sl-logo-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  color: rgba(147,51,234,0.65);
  text-transform: uppercase;
}
.sl-logo-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(120deg, #9333EA 0%, #C084FC 45%, #9333EA 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slLogoShine 2s linear infinite;
  min-height: 1.2em;
}
@keyframes slLogoShine { to { background-position: 200% center; } }
.sl-logo-text::after {
  content: '_';
  -webkit-text-fill-color: #9333EA;
  animation: slBlink 0.7s step-end infinite;
  margin-left: 2px;
}
@keyframes slBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.sl-logo-sub {
  font-size: 0.55rem;
  letter-spacing: 0.26em;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
}

/* ── Dashed separator ─────────────────────────────────────── */
.sl-dash-sep {
  width: clamp(190px, 27vw, 330px);
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(147,51,234,0.55) 0px, rgba(147,51,234,0.55) 10px,
    transparent 10px, transparent 18px
  );
  opacity: 0.7;
}

/* ── Progress bar ─────────────────────────────────────────── */
.sl-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: clamp(200px, 28vw, 360px);
}
.sl-progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: visible;
  position: relative;
}
.sl-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #C084FC);
  border-radius: 2px;
  transition: width 0.05s linear;
  position: relative;
}
.sl-progress-fill::after {
  content: '';
  position: absolute;
  right: -3px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #C084FC;
  box-shadow: 0 0 10px #C084FC, 0 0 20px rgba(192,132,252,0.55);
}
.sl-progress-label {
  font-size: 0.55rem;
  letter-spacing: 0.28em;
  color: rgba(147,51,234,0.7);
  text-transform: uppercase;
}

/* ── Trust row ────────────────────────────────────────────── */
.sl-trust-row {
  display: flex;
  gap: 2rem;
  font-size: 0.48rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.18);
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════
   EXIT  — power-down: content implodes, then full flash-to-black
   ════════════════════════════════════════════════════════════ */

/* 1. Centre content collapses inward */
#sl-overlay.sl-exit .sl-center {
  opacity: 0;
  transform: scale(0.88) translateY(12px);
  filter: blur(6px) brightness(2);
  transition: opacity 0.32s ease-in,
              transform 0.32s ease-in,
              filter 0.32s ease-in;
}

/* 2. HUD corners retract */
#sl-overlay.sl-exit .sl-hud-tl { opacity: 0; transform: scale(0.5) translate(-6px, -6px); }
#sl-overlay.sl-exit .sl-hud-tr { opacity: 0; transform: scale(0.5) translate(6px, -6px); }
#sl-overlay.sl-exit .sl-hud-bl { opacity: 0; transform: scale(0.5) translate(-6px, 6px); }
#sl-overlay.sl-exit .sl-hud-br { opacity: 0; transform: scale(0.5) translate(6px, 6px); }

/* 3. Status bar + scanline fade */
#sl-overlay.sl-exit .sl-status-bar { opacity: 0; transform: translateY(-8px); }
#sl-overlay.sl-exit .sl-scanline   { opacity: 0; }

/* 4. Full overlay does a purple-flash then collapses to black */
#sl-overlay.sl-exit {
  animation: slPowerDown 0.85s 0.15s ease-in both;
  pointer-events: none;
}
@keyframes slPowerDown {
  0%   { opacity: 1;    background: #06060a; }
  25%  { opacity: 1;    background: rgba(120,40,220,0.25); }
  55%  { opacity: 1;    background: #06060a; }
  75%  { opacity: 1;    background: #000; }
  100% { opacity: 1;    background: #000; }
}

/* Remove old wipe panels — replaced by clip-path animation */
.sl-wipe-top, .sl-wipe-bot { display: none; }

/* ── Page in/out fade — scoped to non-index pages ────────── */
body.sl-page-ready {
  transition: opacity 0.28s ease;
}

/* ════════════════════════════════════════════════════════════
   PAGE-IN  — new page fades in from black after navigation
   ════════════════════════════════════════════════════════════ */
body.sl-page-enter {
  animation: slPageIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes slPageIn {
  from { opacity: 0; filter: brightness(0); }
  to   { opacity: 1; filter: brightness(1); }
}
