/* Loading screen shown while main.dart.js and the engine download.
 *
 * Deliberately CSS-only: a GIF or a Lottie animation would have to be
 * fetched during exactly the window this exists to cover, and Lottie would
 * also pull a player library off a CDN first — spending the loading time on
 * loading the thing that says "loading". These rules paint the instant the
 * stylesheet parses, before flutter.js has even been requested.
 *
 * Brand colours come from custom properties so a flavor overrides two values
 * in its own index.html instead of forking this file. Defaults below are
 * neutral; every flavor sets its own.
 */

:root {
  --splash-bg: #090C0E;
  --brand: #E3800F;
  --splash-text: rgba(255, 255, 255, 0.62);
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--splash-bg);
  background-size: 100% 100%;
}

#splash {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: var(--splash-bg);
  /* Above the <flutter-view> the engine attaches to the body. */
  z-index: 2147483647;
  opacity: 1;
  transition: opacity 260ms ease;
}

#splash.splash-hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-mark {
  position: relative;
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sized so the square mark's diagonal stays clear of the ring, and rounded
   so its corners do not fight the circle around it. */
.splash-mark img {
  width: 72px;
  height: 72px;
  display: block;
  border-radius: 18px;
}

/* The ring is drawn by the browser, so it is visible even before the logo
   PNG has finished downloading. */
.splash-ring {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--brand);
  animation: splash-spin 900ms linear infinite;
}

.splash-label {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
      Helvetica, Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--splash-text);
}

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

@keyframes splash-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Spinning is the kind of motion that triggers vestibular discomfort. Keep
   an indication that something is happening, without the rotation. */
@media (prefers-reduced-motion: reduce) {
  .splash-ring {
    border-color: var(--brand);
    animation: splash-pulse 1.6s ease-in-out infinite;
  }
  #splash {
    transition: none;
  }
}

/* ── Legacy positioning helpers ─────────────────────────────────
 * Emitted by flutter_native_splash and referenced by its generated markup.
 * Kept so a regenerated splash still lands correctly.
 */

.center {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.contain {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stretch {
  display: block;
  width: 100%;
  height: 100%;
}

.cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  -ms-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

.bottomLeft {
  position: absolute;
  bottom: 0;
  left: 0;
}

.bottomRight {
  position: absolute;
  bottom: 0;
  right: 0;
}
