/* styles.css */
html,
body {
  overflow: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  display: grid;
  cursor: none;
  background: #111;
  place-items: center;
  min-height: 100svh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
    Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
}

video {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 4px;
  max-width: min(80vw, 1200px);
  max-height: 85vh;
}

.wrap {
  text-align: center;
}

.vidwrap {
  position: relative;
}

p {
  color: #444;
  margin-top: 8px;
  font-size: 12px;
}

.wrap a {
  color: #666;
}

/* "click to enable sound" hint on scene pages */
.unlock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #999;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 14px;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 9998;
}

.unlock.gone {
  opacity: 0;
}

/* landing page — just two hoverable cards */
body.landing {
  cursor: auto;
  overflow: auto;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
  min-height: 100svh;
  padding: 20px;
}

.card {
  display: block;
  background: #181818;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
  border-color: #7dbd92;
  transform: translateY(-2px);
}

.card video {
  display: block;
  width: min(420px, 90vw);
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 0;
  max-width: none;
  max-height: none;
}

/* the custom cursor: plain dot, or the emoji of the region being hovered */
#cursor {
  position: fixed;
  text-align: center;
  pointer-events: none;
  z-index: 9999;
  color: #666;
  will-change: transform;
  width: 20px;
  height: 20px;
  font-size: 16px;
  line-height: 20px;
  transform: translate(-50%, -50%);
}

#cursor.emoji {
  mix-blend-mode: normal;
  color: inherit;
  width: 40px;
  height: 40px;
  font-size: 32px;
  line-height: 40px;
}

/* animated film-grain overlay */
.noise {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
  animation: shift 0.4s steps(1) infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27256%27 height=%27256%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.65%27 numOctaves=%273%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix type=%27saturate%27 values=%270%27/%3E%3C/filter%3E%3Crect width=%27256%27 height=%27256%27 filter=%27url(%23n)%27/%3E%3C/svg%3E")
    0 0 / 256px 256px;
  border-radius: 4px;
  inset: 0;
}

@keyframes shift {
  0%,
  100% {
    background-position: 0 0;
  }

  12% {
    background-position: -3px -3px;
  }

  25% {
    background-position: 3px 2px;
  }

  37% {
    background-position: -5px 2px;
  }

  50% {
    background-position: 4px -3px;
  }

  62% {
    background-position: -2px 5px;
  }

  75% {
    background-position: 3px -4px;
  }

  87% {
    background-position: -3px -2px;
  }
}