/* Loading screen on the home page. js/intro.js plays it, then removes it. */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: var(--page);
  color: var(--text);
  text-align: center;
  cursor: default;
  /* If the script never runs, do not cover the site forever. */
  animation: intro-out 400ms 9s ease forwards;
}
.intro.is-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}
@keyframes intro-out {
  to { opacity: 0; visibility: hidden; }
}
.intro p { margin: 0; visibility: hidden; }
.intro p.is-shown { visibility: visible; }
.intro-headline {
  font: 600 clamp(40px, 6vw, 64px)/1.1 "Figtree:SemiBold", sans-serif;
  letter-spacing: -.02em;
}
.intro-text {
  font: 400 clamp(16px, 2vw, 20px)/1.5 "Inter:Regular", sans-serif;
  color: var(--muted);
  opacity: 0;
  transition: opacity 600ms ease;
}
.intro-text.is-shown { opacity: 1; }
.intro-bar {
  width: min(160px, 50vw);
  height: 4px;
  margin-top: 18px;
  border-radius: 2px;
  background: var(--control-hover);
  overflow: hidden;
}
.intro-bar div {
  height: 100%;
  border-radius: inherit;
  background: #2489ee;
  transform: translateX(-100%);
}
.intro-skip {
  position: absolute;
  bottom: max(40px, env(safe-area-inset-bottom));
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--page);
  font: 400 15px/1 "Inter:Regular", sans-serif;
  cursor: pointer;
  transition: scale 260ms cubic-bezier(.34, 1.56, .64, 1);
}
@media (hover: hover) {
  .intro-skip:hover { scale: 1.07; }
}
.intro-skip:active { scale: .98; }
@media (prefers-reduced-motion: reduce) {
  .intro-skip,
  .intro-skip:hover,
  .intro-skip:active { scale: none; transition: none; }
}
.intro-skip:focus-visible { outline: 2px solid #2489ee; outline-offset: 3px; }

/* Each letter rises in, delayed by js/intro.js. */
.intro-letter {
  display: inline-block;
  animation: intro-letter 420ms cubic-bezier(.22, 1, .36, 1) backwards;
}
@keyframes intro-letter {
  from { opacity: 0; transform: translateY(.35em); filter: blur(6px); }
}

/* No scrolling behind the loading screen. */
html:not([data-welcomed]):has(.intro:not(.is-done)) { overflow: hidden; }

/* Only on a visitor's first visit. */
html[data-welcomed] .intro { display: none; }
