@font-face {
  font-family: 'Big Shoulders Display';
  src: url(fonts/big-shoulders.woff2) format('woff2');
  font-weight: 500 900;
  font-display: swap;
}

:root {
  --paper: #f3f4f1;
  --ink: #000;
  --graphite: #5f625e;
  --veil: 243 244 241;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { overflow: hidden; }

/* Scenes fill the viewport behind the menu; only the active one shows. */
.stage { position: fixed; inset: 0; }
.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease-out, visibility 0s linear 160ms;
}
.scene.on {
  opacity: 1;
  visibility: visible;
  transition: opacity 160ms ease-out;
}
.scene > video, .scene > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Shown until the real animation file is in media/. */
.scene.empty { background: #e3e5e1; }
.scene.empty > video, .scene.empty > img { display: none; }
.scene.empty::after {
  content: attr(data-label) " goes here";
  position: absolute;
  right: clamp(20px, 6vw, 96px);
  top: clamp(18px, 4.5vh, 44px);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--graphite);
}

/* Keeps the links readable over whichever scene is playing. */
.veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease-out;
  background: linear-gradient(90deg,
    rgb(var(--veil) / .94) 0,
    rgb(var(--veil) / .8) 24%,
    rgb(var(--veil) / 0) 46%);
}
body.playing .veil { opacity: 1; }

.menu {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(18px, 4.5vh, 44px) clamp(20px, 6vw, 96px);
  pointer-events: none;
}
.menu a, .menu p { pointer-events: auto; }

.mark, .dest {
  margin: 0;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: .01em;
}
.dest { color: var(--graphite); min-height: 1.4em; }

nav { align-self: center; }
.links {
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
}
.links a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(4rem, 16vh, 12rem);
  line-height: .86;
  letter-spacing: -.005em;
  padding: .02em .08em .04em 0;
  transition: color 120ms ease-out, opacity 120ms ease-out;
}
.links a:focus { outline: none; }
.links a:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

/* While one link plays, the others drop back to an outline. */
body.playing .links a:not(.active) {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  opacity: .5;
}

@media (max-aspect-ratio: 4/5) {
  nav { align-self: end; margin-bottom: 2vh; }
  .links a { font-size: clamp(3.5rem, 12.5vh, 9rem); }
  .veil {
    background: linear-gradient(0deg,
      rgb(var(--veil) / .95) 0,
      rgb(var(--veil) / .82) 40%,
      rgb(var(--veil) / 0) 60%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene, .veil, .links a { transition: none; }
}
