/*
 * The splash drawn before the JavaScript loads (origin: TrustyNet ADR-0056). Same look as the React
 * <Splash/> of @nexora/ui, which replaces it without a jump.
 */
html,
body {
  margin: 0;
  height: 100%;
  background: #f3f4f8;
}
html[data-mode="dark"],
html[data-mode="dark"] body {
  background: #0e1016;
}
.nx-splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font: 400 0.875rem/1.4 Inter, ui-sans-serif, system-ui, sans-serif;
  color: color-mix(in oklch, #0e1016 58%, #f3f4f8);
}
html[data-mode="dark"] .nx-splash {
  color: color-mix(in oklch, #f3f4f8 55%, #0e1016);
}
.nx-splash-mark {
  display: flex;
}
/* The symbol stands still (TrustyNet ADR-0069). */
.nx-splash-mark svg {
  width: 4rem;
  height: 4rem;
}
.nx-splash-mark rect {
  fill: #5b4cf5;
}
html[data-mode="dark"] .nx-splash-mark rect,
html[data-mode="dark"] .nx-splash-bar span {
  background: #8b80ff;
  fill: #8b80ff;
}
.nx-splash-bar {
  width: 12rem;
  height: 0.25rem;
  overflow: hidden;
  border-radius: 9999px;
  background: #ebedf3;
}
html[data-mode="dark"] .nx-splash-bar {
  background: #1e212b;
}
.nx-splash-bar span {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background: #5b4cf5;
  transform-origin: left;
  animation: nx-splash-progress 5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.nx-splash p {
  margin: 0;
}
@keyframes nx-splash-progress {
  from {
    transform: scaleX(0.04);
  }
  to {
    transform: scaleX(0.92);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nx-splash-bar span {
    animation: none;
  }
}
/* On the lighter dark-mode accent, the glyph turns ink (same rule as `on-accent`). */
html[data-mode="dark"] .nx-splash-mark path {
  stroke: #0e1016;
}
html[data-mode="dark"] .nx-splash-mark circle {
  fill: #0e1016;
}
