/*
 * The splash inside #root in index.html: what shows while the app's JavaScript
 * downloads, until React's first render replaces it. A stylesheet rather than
 * inline styles so a strict Content-Security-Policy (style-src 'self') allows it.
 * Colours are the theme tokens' values (src/index.css): dark by default, light
 * when theme-boot.js has put .light on <html>.
 */
.boot-splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  background: oklch(0.16 0.015 250);
  color: oklch(0.66 0.02 240);
  font: 14px/1.4 "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.boot-splash__logo {
  width: 100px;
  height: auto;
}

.boot-splash__spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgb(134 212 163 / 0.25);
  border-top-color: #86d4a3;
  animation: boot-splash-spin 0.8s linear infinite;
}

.boot-splash__label {
  margin: 0;
}

:root.light .boot-splash {
  background: oklch(0.99 0.005 230);
  color: oklch(0.46 0.02 240);
}

/* The wordmark is white; the same flip the Logo component uses on a light surface. */
:root.light .boot-splash__logo {
  filter: invert(1) hue-rotate(180deg);
}

:root.light .boot-splash__spinner {
  border-color: rgb(51 114 76 / 0.2);
  border-top-color: #33724c;
}

@keyframes boot-splash-spin {
  to { transform: rotate(360deg); }
}

/* Slower, not stopped: a still spinner reads as a frozen page. */
@media (prefers-reduced-motion: reduce) {
  .boot-splash__spinner { animation-duration: 2.4s; }
}
