/* The door: the first paint of every app page, until #root has content.
 * A file, not an inline block, because the app's policy is style-src 'self'.
 * The colours are the room and brass from packages/ui/src/tokens.ts, written
 * out because this loads before the tokens do. apps/landing/test/brand.test.ts
 * holds them to the tokens. */
/* The markup says `hidden` and this rule is what shows it. Nothing else can
 * take the door away if this file never arrives, so without it there is none. */
.door[hidden] {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #080b09;
}

#root:not(:empty) ~ .door {
  display: none;
}

#root:not(:empty) ~ #boot {
  display: none;
}

/* /home is prerendered as a page of its own (scripts/prerender.mjs writes it
 * into #boot, beside #root), so it has no door. The app's first render takes
 * it away, as it takes the door. Its way out is the door's. */
#boot .door__slow {
  position: fixed;
  inset: auto 16px 96px;
  z-index: 1;
  padding: 8px 16px;
  border-radius: 8px;
  background: #161d19;
  text-align: center;
}

.door__word {
  display: block;
  height: 32px;
  width: auto;
}

/* A quiet line for a slow link. It holds its space, so nothing moves, and it
 * appears once: no pulse, no spinner. With motion reduced, the app's global
 * rule removes the animation, so the line is simply there from the start. */
.door__line {
  margin: 0;
  color: #969d97;
  font: 500 15px/1.35 system-ui, sans-serif;
  opacity: 0;
  animation: door-line 1ms 2500ms forwards;
}

.door__slow {
  margin: 0;
  color: #bec5bf;
  font: 400 15px/1.35 system-ui, sans-serif;
}

.door__slow[hidden] {
  display: none;
}

.door__slow a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #6bd69a;
}

.door__noscript {
  position: fixed;
  inset: auto 16px 32px;
  z-index: 1;
  margin: 0;
  color: #f3efe6;
  font: 400 16px/1.5 system-ui, sans-serif;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .door__line {
    opacity: 1;
  }
}

@keyframes door-line {
  to {
    opacity: 1;
  }
}
