/* CVTA 3D logo (see js/logo3d.js) */
.l3d {
  --l3d-w: 220px;
  position: relative;
  display: block;
  width: var(--l3d-w);
  max-width: 100%;
  aspect-ratio: 1000 / 420;
  margin: 0 auto;
  perspective: 900px;
  contain: layout paint;
}
.l3d::after {                                   /* soft contact shadow */
  content: "";
  position: absolute;
  left: 18%; right: 18%; bottom: 2%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 32, 96, 0.22), rgba(0, 32, 96, 0) 70%);
  filter: blur(2px);
  pointer-events: none;
}
.l3d-canvas {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
  display: block;
  opacity: 0;
  transition: opacity .35s ease;
}
.l3d-canvas.is-ready { opacity: 1; }

/* Flat fallback: the traced SVG on a CSS turntable. Shown instantly, then
   replaced by WebGL; stays if WebGL is unavailable. */
.l3d-flat {
  position: absolute; inset: 12% 6%;
  display: grid; place-items: center;
  transform-style: preserve-3d;
  transition: opacity .3s ease;
  filter: drop-shadow(0 6px 10px rgba(0, 32, 96, .25));
}
.l3d-flat svg { width: 100%; height: auto; display: block; }
.l3d-flat.is-spinning { animation: l3d-turn 1.85s linear infinite; }
.l3d-flat.is-hidden { opacity: 0; }
@keyframes l3d-turn {
  from { transform: rotateY(0deg) rotateX(4deg); }
  to   { transform: rotateY(360deg) rotateX(4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .l3d-flat.is-spinning { animation: none; }
}

/* Loader block */
.l3d-loader {
  display: grid; justify-items: center; gap: 12px;
  padding: 28px 16px;
  transition: opacity .3s ease, transform .3s ease;
}
.l3d-loader.is-leaving { opacity: 0; transform: scale(.96); }
.l3d-label {
  font: 500 14px/1.3 Inter, system-ui, sans-serif;
  letter-spacing: .01em;
  color: var(--c-muted, #5b6478);
}
.l3d-loader .l3d-label::after {                 /* animated ellipsis */
  content: "";
  display: inline-block; width: 1.2em; text-align: left;
  animation: l3d-dots 1.2s steps(4, end) infinite;
}
@keyframes l3d-dots {
  0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; }
}

/* Boot splash */
.l3d-suppressed { display: none !important; }
/* The one in-app loader floats in the middle of the screen, above the skeleton rows. */
.l3d-inline {
  position: fixed; z-index: 60;
  left: 50%; top: calc(50% + var(--banner-h, 0px) / 2);
  transform: translate(-50%, -50%);
  --l3d-w: min(220px, 56vw) !important;
  margin: 0; pointer-events: none;
}
@media (min-width: 900px) { .l3d-inline { left: calc(50% + 120px); } }

.l3d-splash {
  position: fixed; inset: 0; z-index: 65;             /* above the header and nav, below any toast */
  display: grid; place-items: center;
  background:
    radial-gradient(120% 80% at 50% 0%, #ffffff 0%, #f1f5fb 60%, #e6edf7 100%);
  padding-top: var(--banner-h, 0px);
  transition: opacity .45s ease, visibility .45s;
}
.l3d-splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.l3d-splash .l3d-loader { padding: 0; }
.l3d-splash .l3d::after { bottom: -2%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .l3d-splash {
    background: radial-gradient(120% 80% at 50% 0%, #ffffff 0%, #eef2f8 60%, #dfe7f2 100%);
  }
}
