/*
  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, which reads as a broken link
  rather than as a product that is loading.

  In its own file rather than an inline <style>, so the Content-Security-
  Policy in index.html needs no 'unsafe-inline'. No font and no image is
  fetched, so it paints as soon as this small file arrives.

  Colours are TIDE's own (lib/ui/tide_colors.dart): `lightGround` #FFFFFF,
  `accent` #FF6B4A, ink #0A0A0D. TIDE ships a true light theme, so the boot
  screen is light too and hands over to the app without a flash.
*/
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #FFFFFF;
  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: #FFFFFF;
  transition: opacity 200ms ease-out;
}

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

#boot .mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 107, 74, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}

#boot .name {
  margin-top: 18px;
  color: #0A0A0D;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 4px;
}

#boot .line {
  margin-top: 8px;
  color: #6E6E78;
  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(10, 10, 13, 0.08);
  overflow: hidden;
}

#boot .rail span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: #FF6B4A;
  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;
  }
}
