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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: relative;

  --background-width: min(80vh, 90vw);
  --background-height: calc(var(--background-width) * 1.25);
  --hotspot-size: 80px;

  width: 100vw;
  height: 100vh;
  overflow: hidden;
  touch-action: manipulation;

  font-family: Ramabhadra;
  size: 7.8;
  color: #181818;

  background-color: #2f2f2f;
  background-image:
    url("background.png"),
    url("assets/site_bg_2.png");

  background-size:
    var(--background-width) auto,
    cover;
  background-position:
    center,
    center;
  background-repeat:
    no-repeat,
    no-repeat;
}

.overlay {
  position: absolute;
  inset: 0;

  pointer-events: none;
}

.title-container {
  position: absolute;

  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .81));
  left: 50%;

  transform: translateX(-50%);

  display: flex;
  gap: 15px;

  z-index: 10;
}

.clue-counter {
  position: absolute;
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .72));
  left: 50%;

  transform: translateX(-50%);

  z-index: 10;

  text-align: center;
  font-size: 1.3rem;
}

.counter-label,
.counter-numbers {
  display: block;
}

.counter-numbers {
  margin-top: 4px;

  font-size: 1.45rem;
}

.opening-prompt {
  position: absolute;
  top: calc(51vh - (var(--background-height) / 2) + (var(--background-height) * .66));
  left: 50%;

  transform: translateX(-50%);

  z-index: 10;

  width: var(--background-width);

  text-align: center;
  font-size: 1.7rem;
}

.title-box {
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.2rem;
  letter-spacing: 2px;

  transition: .3s;
}

.title-box.revealed {
  animation: word-shake .6s ease-in-out infinite;
}

@keyframes word-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }

  20% {
    transform: translateX(-2px) rotate(-1deg);
  }

  40% {
    transform: translateX(2px) rotate(1deg);
  }

  60% {
    transform: translateX(-1px) rotate(-.5deg);
  }

  80% {
    transform: translateX(1px) rotate(.5deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  .title-box.revealed {
    animation: none;
  }

}

.unlock-panel {
  position: absolute;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  width: 350px;

  background: rgba(0,0,0,.6);

  padding: 30px;

  border: 1px solid rgba(255,255,255,.1);

  backdrop-filter: blur(8px);

  z-index: 10;
}

.unlock-panel h2 {
  margin-bottom: 15px;

  color: white;
}

.unlock-panel p {
  margin-bottom: 25px;

  color: rgba(255,255,255,.8);

  line-height: 1.6;
}

.unlock-panel input {
  width: 100%;

  padding: 15px;

  margin-bottom: 15px;

  background: black;

  border: 1px solid rgba(255,255,255,.2);

  color: white;
}

.unlock-panel button {
  width: 100%;

  padding: 15px;

  border: none;

  background: white;
  color: black;

  font-weight: bold;

  cursor: pointer;

  transition: .3s;
}

.unlock-panel button:hover {
  opacity: .8;
}

.hidden {
  display: none;
}

.scribble-overlay {
  position: fixed;

  top: 50%;
  left: 50%;

  width: var(--background-width);
  height: var(--background-height);

  display: block;
  max-width: none;

  object-fit: contain;

  pointer-events: none;

  transform: translate(-50%, -50%);

  opacity: 0;

  z-index: 8;

  animation: scribble-pop .35s ease-out forwards;
}

@keyframes scribble-pop {
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {

  .scribble-overlay {
    animation: none;
    opacity: 1;
    transform: translate(-50%, -50%);
  }

}

/* HOTSPOTS */

.hotspot {
  position: absolute;

  width: var(--hotspot-size);
  height: var(--hotspot-size);

  border-radius: 50%;

  cursor: pointer;

  transition: .3s;

  z-index: 20;
}

.hotspot:hover {
  background: rgba(255, 255, 255, 0);

  box-shadow:
    0 0 25px rgba(255,255,255,.4);
}

/* POSITION HOTSPOTS */

.hotspot1 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .176) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .34) - (var(--hotspot-size) / 2));
}

.hotspot2 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .288) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .62) - (var(--hotspot-size) / 2));
}

.hotspot3 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .448) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .86) - (var(--hotspot-size) / 2));
}

.hotspot4 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .672) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .24) - (var(--hotspot-size) / 2));
}

.hotspot5 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .752) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .6) - (var(--hotspot-size) / 2));
}

.hotspot6 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .24) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .76) - (var(--hotspot-size) / 2));
}

.hotspot7 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .496) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .78) - (var(--hotspot-size) / 2));
}

.hotspot8 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .352) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .16) - (var(--hotspot-size) / 2));
}

.hotspot9 {
  top: calc(50vh - (var(--background-height) / 2) + (var(--background-height) * .816) - (var(--hotspot-size) / 2));
  left: calc(50vw - (var(--background-width) / 2) + (var(--background-width) * .88) - (var(--hotspot-size) / 2));
}

/* MOBILE */

@media (max-width: 900px) {

  body {
    --background-width: min(100vw, 80svh);
    --hotspot-size: 58px;
  }

  .clue-counter {
    font-size: 1rem;
  }

  .counter-numbers {
    margin-top: 3px;

    font-size: 1.15rem;
  }

  .opening-prompt {
    font-size: 1.15rem;

  }

  .title-container {
    flex-wrap: wrap;
    width: calc(100% - 32px);
    justify-content: center;
    gap: 10px;
  }

  .title-box {
    font-size: .9rem;
    letter-spacing: 1px;
  }

  .unlock-panel {
    width: calc(100% - 32px);
    max-width: 350px;
    padding: 24px;
  }

}
