/* The splash `index.html` draws before the bundle exists. Plain CSS in its own
   file on purpose: the app's Tailwind stylesheet arrives with the bundle (in
   dev Vite even injects it from JavaScript), so nothing here may lean on it,
   and the production CSP (`style-src-elem 'self'`) refuses an inline <style>.

   The colours are copies of each family's `--color-screen`, `--color-accent`
   and `--color-accent-tint-*` (styles/theme.css, styles/themes/*.css). Keep
   them in step; `theme-boot.js` has already set the two attributes. */

html {
  --boot-screen: #161826;
  --boot-accent: #9184d9;
  --boot-tint-6: rgb(145 132 217 / 0.14);
  --boot-tint-8: rgb(145 132 217 / 0.18);
  background-color: var(--boot-screen);
}
html[data-mode="light"] {
  --boot-screen: #f7f8fc;
  --boot-accent: #4f3fd0;
  --boot-tint-6: rgb(79 63 208 / 0.15);
  --boot-tint-8: rgb(79 63 208 / 0.19);
}
html[data-theme="nextshot"] {
  --boot-screen: #0b0b10;
  --boot-accent: #b5de04;
  --boot-tint-6: rgb(238 240 242 / 0.08);
  --boot-tint-8: rgb(238 240 242 / 0.12);
}
html[data-theme="nextshot"][data-mode="light"] {
  --boot-screen: #f8f8f8;
  --boot-accent: #b5de04;
  --boot-tint-6: rgb(22 22 22 / 0.07);
  --boot-tint-8: rgb(22 22 22 / 0.1);
}

body {
  margin: 0;
}

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  transition: opacity 250ms ease-out;
  align-items: center;
  justify-content: center;
  background-color: var(--boot-screen);
}
/* Set by app/boot-splash.ts once the first screen is underneath. */
.boot-splash[data-leaving] {
  opacity: 0;
  pointer-events: none;
}
/* A fast, soft fade in. Backwards fill, so nothing shows before its first
   frame. */
.boot-splash-mark {
  animation: boot-splash-fade 200ms ease-out 40ms backwards;
  position: relative;
  display: flex;
  width: 6rem;
  height: 6rem;
  align-items: center;
  justify-content: center;
}
.boot-splash-bloom {
  position: absolute;
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  background-color: var(--boot-tint-6);
  filter: blur(40px);
}
.boot-splash-ring {
  position: absolute;
  box-sizing: border-box;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  border: 2px solid var(--boot-tint-8);
  border-top-color: var(--boot-accent);
  animation: boot-splash-spin 1s linear infinite;
}
.boot-splash-logo {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}
html[data-mode="light"] .boot-splash-logo-dark,
html:not([data-mode="light"]) .boot-splash-logo-light {
  display: none;
}

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

@media (prefers-reduced-motion: reduce) {
  .boot-splash {
    transition: none;
  }
  .boot-splash-ring {
    animation-duration: 3s;
  }
}

@keyframes boot-splash-fade {
  from {
    opacity: 0;
  }
}
