/* Shared by index.html and 404.html. The ring's geometry here matches film.js layout(). */
:root {
  --ink: #08070a;
  --pewter: #8a8278;
  --vh: 100vh;
  --ring: max(min(72vmin, calc(var(--vh) - 128px)), 60vmin);
  color-scheme: dark;
}

/* Match film.js, which lays out with innerHeight (the dynamic viewport on mobile). */
@supports (height: 100dvh) {
  :root {
    --vh: 100dvh;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  overflow: hidden;
}

body {
  -webkit-tap-highlight-color: transparent;
}

#film {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
  /* Dragging on the film stirs it, so the browser shouldn't scroll or zoom. */
  touch-action: none;
}

/* Poster and the 404 ring sit where film.js draws the ring. */
.poster,
.empty-ring {
  position: fixed;
  left: 50%;
  top: min(calc(var(--vh) * 0.47), calc(var(--vh) - 64px - var(--ring) / 2));
  width: var(--ring);
  height: var(--ring);
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.poster {
  object-fit: cover;
}

.wordmark {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(22px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  font-family: 'Italiana', 'Didot', 'Bodoni 72', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--pewter);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.wordmark a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.wordmark a:hover {
  opacity: 1;
}

.wordmark a:focus-visible {
  outline: 1px solid var(--pewter);
  outline-offset: 6px;
  border-radius: 2px;
}

.debug {
  position: fixed;
  top: 10px;
  left: 12px;
  font: 11px/1.2 ui-monospace, monospace;
  color: var(--pewter);
}
