:root {
  --black: #000;
  --white: #fff;
  --green: #00ff00;
  --nav-height: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: "Courier New", monospace;
}

body {
  padding-top: var(--nav-height);
}

a {
  color: inherit;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: var(--nav-height);
  border-bottom: 1px solid var(--white);
  background: var(--black);
}

.site-title,
.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--nav-height);
  padding: 0 22px;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background-color 120ms linear, color 120ms linear;
}

.site-title {
  margin-right: auto;
  border-right: 1px solid var(--white);
  font-weight: bold;
}

.nav-link {
  border-left: 1px solid var(--white);
}

.site-title:hover,
.site-title:focus-visible,
.nav-link:hover,
.nav-link:focus-visible,
.nav-link[aria-current="page"] {
  background: var(--white);
  color: var(--black);
  outline: none;
}

/* Home page */
.home-page {
  height: 100vh;
  overflow: hidden;
}

.home-page main {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - var(--nav-height));
}

#grid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(16, 1fr);
  width: min(90vw, calc(100vh - var(--nav-height) - 5vh));
  height: min(90vw, calc(100vh - var(--nav-height) - 5vh));
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 4vw, 42px);
  line-height: 1;
  opacity: 0;
  transform: scale(0.2);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cell.visible {
  opacity: 1;
  transform: scale(1);
}

#flash-image {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

/* Video pages */
.video-page main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 48px 5vw;
}

.video-shell {
  width: min(1120px, 100%);
}

.video-title {
  margin: 0 0 18px;
  font-size: clamp(24px, 4vw, 48px);
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--white);
  background: #050505;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 760px) {
  :root {
    --nav-height: 104px;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .site-title {
    width: 100%;
    min-height: 48px;
    margin-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--white);
  }

  .nav-link {
    flex: 1 1 50%;
    min-height: 56px;
    padding: 0 10px;
    font-size: 13px;
    text-align: center;
  }

  .nav-link:first-of-type {
    border-left: 0;
  }

  .video-page main {
    padding: 30px 18px;
  }
}
