/* Available before the application bundle: no JS, network fonts or theme flash. */
html, body { margin: 0; background: #000000; }
#boot-screen {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 4vh, 28px);
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: #000000;
  color: #fff;
  font: 14px ui-monospace, SFMono-Regular, Consolas, monospace;
}
#boot-screen .boot-logo {
  display: block;
  width: min(70vw, 620px, 150vh);
  height: auto;
  max-width: 100%;
  object-fit: contain;
}
/* "Loading" sits in the middle between the logo's letters (their baseline, not the tail of the p) and the rail of the briefcase. The
   logo's empty bottom edge grows with its width, and the rail is 17px below the top of its box, so the text is lifted by an amount that
   follows the logo width. */
#boot-screen .boot-loading { margin: 0; letter-spacing: .14em; transform: translateY(calc(8.8px - .0392 * min(70vw, 620px, 150vh))); }
#boot-screen .boot-track {
  position: relative;
  width: min(52vw, 340px);
  max-width: 100%;
  height: 40px;
}
#boot-screen .boot-flight::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 17px;
  right: 18px;
  height: 3px;
  border-radius: 2px;
  background: #ffffff;
}
#boot-screen .boot-flight {
  position: absolute;
  left: 0;
  top: 0;
  /* Real progress (src/bootProgress.ts), from the left edge to the right edge; never loops. */
  width: calc(36px + (100% - 36px) * var(--boot-progress, .08));
  height: 36px;
  transition: width .35s cubic-bezier(.2, .8, .2, 1);
}
#boot-screen .boot-case {
  position: absolute;
  right: 0;
  top: 0;
  display: block;
  width: 36px;
  height: 36px;
  animation: boot-spin .5s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #boot-screen .boot-flight { transition: none; }
  #boot-screen .boot-case { animation: none; }
}
/* A phone held upright shows the rotate-phone picture from the first frame, with no loading text. */
@media (orientation: portrait) and (pointer: coarse) {
  #boot-screen { background: #000000 url('images/rotate-phone.png') center / contain no-repeat; }
  #boot-screen > * { visibility: hidden; }
}
