/* The front page's intro video (docs/INTRO-VIDEO.md): full screen over the page while it plays, then the page. */
.intro {
  display: none;
}

html.intro-on .intro {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #071629;
  transition: opacity 0.7s ease;
}

html.intro-on .intro video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* The page waits underneath, out of sight, then fades in as the video fades out. */
html.intro-on body > main {
  visibility: hidden;
  opacity: 0;
}

html.intro-on.intro-done body > main {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.7s ease;
}

html.intro-done .intro {
  opacity: 0;
  pointer-events: none;
}

.intro-skip {
  position: absolute;
  right: 24px;
  bottom: 24px;
  padding: 8px 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: rgba(7, 22, 41, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.intro-skip:hover,
.intro-skip:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

@media (max-width: 575.98px) {
  /* A phone is tall: the whole picture, letterboxed, rather than its middle cut out. */
  html.intro-on .intro video {
    object-fit: contain;
  }
}
