/*
 * The static boot screen — everything the page needs before the app bundle
 * arrives. On a fast connection this is visible for a blink; on a slow
 * mainland route it may be the view for many seconds, so it must come from
 * this tiny file and the HTML alone, never from the bundle it is waiting for.
 *
 * React replaces the whole #root subtree when it mounts, taking this screen
 * with it. Kept out of the bundle and unhashed on purpose; served with a
 * short cache life from the Caddyfile.
 */

html {
  background: #edf1f2;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

.sboot {
  display: grid;
  place-items: center;
  height: 100%;
  font-family:
    system-ui,
    -apple-system,
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
}

.sboot__stack {
  display: grid;
  justify-items: center;
  gap: 1rem;
  text-align: center;
}

.sboot__mark {
  margin: 0;
  font-size: 2.25rem;
  letter-spacing: 0.14em;
  color: #5c6670;
  animation: sboot-breathe 1.6s ease-in-out infinite;
}

/*
 * The hint fades in only after six seconds without the app taking over —
 * pure CSS, because if it needed JavaScript it would be waiting on the very
 * download it is apologising for.
 */
.sboot__hint {
  margin: 0;
  max-width: 16rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #8b949e;
  opacity: 0;
  animation: sboot-appear 0.6s ease 6s forwards;
}

@keyframes sboot-breathe {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes sboot-appear {
  to {
    opacity: 1;
  }
}

@media (prefers-color-scheme: dark) {
  html {
    background: #0f131a;
  }

  .sboot__mark {
    color: #98a2ad;
  }

  .sboot__hint {
    color: #6e7a87;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sboot__mark {
    animation: none;
    opacity: 0.7;
  }
}
