/*
 * react-native-web's root element reset (https://necolas.github.io/react-native-web/docs/setup/),
 * which Expo's own page template inlines. Domi's page loads it as a file instead, so its
 * Content-Security-Policy can refuse every inline style and script (ADR-0049).
 */
html,
body {
  height: 100%;
}
body {
  margin: 0;
  /* Scrolling belongs to each screen's own ScrollView. */
  overflow: hidden;
  /* The warm paper the sign-in is drawn on (theme/palette.ts canvas), shown until the app draws. */
  background-color: #fcf5ed;
}
#root {
  display: flex;
  height: 100%;
  flex: 1;
}

/*
 * The loading screen (public/index.html): the logo, and a quiet bar under it,
 * on the same paper. It sits under #root, so whatever the app draws covers it,
 * and the app removes it after its first frame. It waits a moment before it
 * shows, so a fast load never flashes it.
 */
#root {
  position: relative;
  z-index: 1;
}
.boot {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: boot-in 240ms ease-out 200ms both;
}
.boot-logo {
  display: block;
  width: 94px;
  height: 28px;
}
.boot-bar {
  position: relative;
  width: 96px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  /* theme/palette.ts consumer primaryTint and primary (ADR-0059). */
  background: #e7e5f2;
}
.boot-bar::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: #3f3a7a;
  animation: boot-bar 1100ms cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.boot-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@keyframes boot-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes boot-bar {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .boot-bar::after {
    width: 100%;
    animation: none;
    opacity: 0.5;
  }
}
