/*
 * The page loader shown while the app's code downloads (index.html, inside #root; React
 * replaces it). A file, not inline, so the Content-Security-Policy needs no exception.
 * The hourglass matches src/ui/BrandMark.tsx and the .hourglass rules in styles.css.
 */
.splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #f6f7f4;
  color: #0f6e63;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  animation: splash-in 0.3s 0.15s ease-out both;
}
.splash p {
  margin: 0;
  font-size: 14px;
  color: #4c5754;
}
:root[data-theme='dark'] .splash {
  background: #0e1513;
  color: #64b6a9;
}
:root[data-theme='dark'] .splash p {
  color: #a9b6b3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .splash {
    background: #0e1513;
    color: #64b6a9;
  }
  :root:not([data-theme='light']) .splash p {
    color: #a9b6b3;
  }
}
.splash .hg-glass {
  transform-box: fill-box;
  transform-origin: center;
  animation: splash-flip 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.splash .hg-top {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: splash-drain 2.4s linear infinite;
}
.splash .hg-mound {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: splash-fill 2.4s linear infinite;
}
.splash .hg-stream {
  animation: splash-stream 2.4s linear infinite;
}
@keyframes splash-in {
  from {
    opacity: 0;
  }
}
@keyframes splash-flip {
  0%,
  78% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}
@keyframes splash-drain {
  0% {
    transform: scaleY(1);
  }
  70%,
  100% {
    transform: scaleY(0);
  }
}
@keyframes splash-fill {
  0% {
    transform: scaleY(0);
  }
  70%,
  100% {
    transform: scaleY(1);
  }
}
@keyframes splash-stream {
  0% {
    opacity: 0;
  }
  4%,
  64% {
    opacity: 1;
  }
  70%,
  100% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .splash .hg-glass,
  .splash .hg-top,
  .splash .hg-mound,
  .splash .hg-stream {
    animation: none;
  }
}
