/* Boot screen shown while the Flutter engine loads. In a file rather than an
   inline <style> so the Content-Security-Policy needs no 'unsafe-inline'. */

/*
  main.dart.js is several megabytes and the engine needs a moment after it
  to paint. Without something here the first thing a visitor sees is an
  empty white page for ten to twenty seconds — and white, on a terminal
  whose ground is near-black, reads as a broken link rather than as a
  console that is loading.

  This file is small and same-origin: no font and no image is fetched, so
  it paints on the first frame and costs nothing against the bundle it is
  covering for.

  Colours are Token Forge's own (lib/ui/theme.dart): `ground` #0A0D11 and
  `accent` #E8B04B, the gold that marks an irreversible action.
*/
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0A0D11;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% 0%,
      rgba(232, 176, 75, 0.12) 0%,
      rgba(232, 176, 75, 0.03) 42%,
      transparent 72%),
    #0A0D11;
  transition: opacity 200ms ease-out;
}

#boot.done {
  opacity: 0;
  pointer-events: none;
}

#boot .mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(232, 176, 75, 0.30);
  background: rgba(232, 176, 75, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

#boot .name {
  margin-top: 18px;
  color: #ECEFF4;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

#boot .line {
  margin-top: 8px;
  color: #6E7787;
  font-size: 13px;
  line-height: 1.5;
  max-width: 340px;
  text-align: center;
}

/* A 2px indeterminate rail. Deliberately not a percentage: the engine
   does not report progress, and a bar that claimed to know would be
   inventing the number. */
#boot .rail {
  margin-top: 26px;
  width: 180px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

#boot .rail span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: #E8B04B;
  animation: slide 1.4s ease-in-out infinite;
}

@keyframes slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Respect the OS setting: still obviously loading, just not moving. */
@media (prefers-reduced-motion: reduce) {
  #boot .rail span {
    animation: none;
    width: 100%;
    opacity: 0.6;
  }
}
