/* ============ Mavu Studio — Home industrial logistics showcase ============ */

.showpiece {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--bg-alt);
  overflow: hidden;
}
.showpiece .container { position: relative; z-index: 2; }
.sp-head { text-align: center; margin-bottom: clamp(1.5rem, 4vw, 2.4rem); }
.sp-head h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.sp-head p { color: var(--muted); max-width: 620px; margin: 0.6rem auto 0; }

/* bounded 3D stage — a card, NOT a full-screen sticky trap */
.sp-stage {
  position: relative;
  width: min(1200px, 94%);
  margin: 0 auto;
  height: clamp(340px, 62vh, 620px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #c2d4de 0%, #9fb6c4 100%);
  box-shadow: 0 26px 70px rgba(0,0,0,0.45);
}
/* the canvas purely displays — it must never eat touch/scroll on mobile */
.sp-stage canvas { display: block; width: 100%; height: 100%; pointer-events: none; }

/* soft cinematic edges for legibility of overlaid text */
.sp-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(to bottom, rgba(10,14,20,0.28) 0%, transparent 26%, transparent 62%, rgba(10,14,20,0.55) 100%);
}

/* auto-pan badge */
.sp-badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 3;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; color: #fff;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  background: rgba(18,20,24,0.5); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
}
.sp-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-soft);
  box-shadow: 0 0 8px var(--gold); animation: sp-pulse 1.8s ease-in-out infinite; }
@keyframes sp-pulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sp-badge .dot { animation: none; } }

/* explore overlay bottom-left */
.sp-overlay {
  position: absolute; left: 1.2rem; bottom: 1.2rem; z-index: 3;
  max-width: 62%;
}
.sp-overlay p {
  color: #eef1f4; font-size: 0.9rem; margin-bottom: 0.9rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.sp-overlay .tag { color: var(--gold-soft); font-weight: 600; }

/* feature chips under the stage */
.sp-feats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem;
  margin: 1.4rem auto 0; max-width: 760px;
}
.sp-feat {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: var(--gold-soft);
  padding: 0.4rem 0.95rem; border-radius: 999px;
  border: 1px solid rgba(201,162,39,0.4); background: rgba(201,162,39,0.08);
}

/* loading */
.sp-loading {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center;
  background: linear-gradient(180deg, #c2d4de, #9fb6c4); transition: opacity 0.6s ease;
}
.sp-loading.hidden { opacity: 0; pointer-events: none; }
.sp-loading .spin {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.14); border-top-color: #16130a;
  animation: sp-spin 0.9s linear infinite;
}
@keyframes sp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sp-loading .spin { animation: none; } }

@media (max-width: 620px) {
  .sp-overlay { max-width: 84%; left: 1rem; bottom: 1rem; }
}
