/* empty-state.css — Brand splash shown over the viewer canvas when no board
   is loaded. Same module is used by /viewer/ (3D) and /viewer2d/ (2D). */

#empty-state {
  position: absolute;
  inset: 0;
  z-index: 5;                 /* above the canvas, below the loading spinner */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;       /* never blocks canvas interactions when shown */
  background:
    radial-gradient(circle at 50% 45%, rgba(74,222,128,0.16), transparent 55%),
    radial-gradient(circle at 50% 45%, rgba(16,185,129,0.10), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  perspective: 1200px;        /* enables the parallax tilt on .es-logo */
  user-select: none;
}
#empty-state.es-visible { opacity: 1; }
#empty-state[hidden]    { display: none; }

.es-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transform-style: preserve-3d;
  will-change: transform;
}

.es-logo-wrap {
  position: relative;
  width: clamp(480px, 82vh, 1100px);
  aspect-ratio: 4 / 3;
  transform-style: preserve-3d;
  animation: es-float 5.5s ease-in-out infinite;
}

.es-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 6px 28px rgba(74,222,128,0.45))
    drop-shadow(0 2px 6px rgba(0,0,0,0.55));
  transition: transform 0.25s ease-out;
}

/* Soft circular halo behind the logo. */
.es-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -8%;
  background: radial-gradient(circle, rgba(74,222,128,0.30) 0%, rgba(74,222,128,0) 65%);
  filter: blur(14px);
  z-index: -1;
  animation: es-pulse 4s ease-in-out infinite;
}

.es-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: clamp(20px, 2.4vh, 28px);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #e6f4ec;
  text-shadow: 0 2px 12px rgba(74,222,128,0.4);
  margin: 0;
}
.es-title .es-accent { color: #ef4444; text-shadow: 0 2px 12px rgba(239,68,68,0.45); }

.es-hint {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: clamp(11px, 1.5vh, 13px);
  color: #94b3a3;
  margin: 0;
  letter-spacing: 0.3px;
}

@keyframes es-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes es-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

/* Honor reduced-motion preferences — keep the logo, drop the loops. */
@media (prefers-reduced-motion: reduce) {
  .es-logo-wrap         { animation: none; }
  .es-logo-wrap::before { animation: none; }
  .es-logo              { transition: none; }
}
