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

html, body {
  height: 100%;
  overflow: hidden;
  cursor: none;
}

body {
  position: relative;
  background: url("assets/background.png") center / cover no-repeat;
}

.stage {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.critter {
  width: min(80vw, 700px);
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.35));
}

.action-buttons {
  display: flex;
  gap: 48px;
  margin-bottom: 24px;
}

.action-btn {
  position: relative;
  display: block;
  width: 78px;
  height: 78px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  opacity: 0;
  transform-origin: center;
  box-shadow:
    0 8px 14px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

body.revealed .action-btn:nth-child(1) {
  animation: roll-in-left 1.1s cubic-bezier(0.22, 0.9, 0.32, 1) 0.3s forwards;
}

body.revealed .action-btn:nth-child(2) {
  animation: roll-in-right 1.1s cubic-bezier(0.22, 0.9, 0.32, 1) 0.9s forwards;
}

@keyframes roll-in-left {
  0% {
    opacity: 0;
    transform: translateX(-100vw) rotate(-720deg);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }
}

@keyframes roll-in-right {
  0% {
    opacity: 0;
    transform: translateX(100vw) rotate(720deg);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }
}

.action-btn-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  box-shadow:
    inset -4px -6px 10px rgba(0, 0, 0, 0.5),
    inset 4px 5px 8px rgba(255, 255, 255, 0.35);
}

.action-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.5), transparent 45%);
  mix-blend-mode: overlay;
}

.action-btn:hover {
  transform: scale(1.12);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(255, 190, 110, 0.6);
}

.action-btn:active {
  transform: scale(0.94);
}

.wordmark-wrap {
  width: min(65vw, 560px);
  height: calc(min(65vw, 560px) * 0.32);
  overflow: hidden;
  margin-top: -10vh;
  opacity: 0;
  transform: scale(0.3);
  transform-origin: center;
}

body.revealed .wordmark-wrap {
  animation:
    pop-in 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    wordmark-pulse 2.6s ease-in-out 1.4s infinite;
}

@keyframes pop-in {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  60% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes wordmark-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.wordmark {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-64.7%);
  mix-blend-mode: multiply;
}

.torch-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 1;
  background: radial-gradient(
    circle 180px at var(--x, 50%) var(--y, 50%),
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.55) 55%,
    rgba(0, 0, 0, 0.92) 100%
  );
  transition: background 0.05s linear, opacity 1.2s ease;
}

.torch-overlay.boost {
  background: radial-gradient(
    circle 260px at var(--x, 50%) var(--y, 50%),
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.4) 55%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

body.revealed .torch-overlay {
  opacity: 0;
}

body.revealed {
  cursor: auto;
}

.torch-btn {
  position: fixed;
  bottom: 60px;
  left: 50%;
  z-index: 1;
  width: 88px;
  height: 88px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: none;
  perspective: 400px;
  box-shadow:
    0 10px 16px rgba(0, 0, 0, 0.55),
    0 3px 4px rgba(0, 0, 0, 0.4),
    0 0 14px rgba(255, 130, 40, 0.4);
  cursor: pointer;
  animation: ember-pulse 2.2s ease-in-out infinite;
  transition: box-shadow 0.35s ease, opacity 0.6s ease, transform 0.2s ease;
}

.torch-btn-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  box-shadow:
    inset -6px -8px 14px rgba(0, 0, 0, 0.55),
    inset 5px 6px 10px rgba(255, 255, 255, 0.4);
}

.torch-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.55), transparent 45%);
  mix-blend-mode: overlay;
}

body.revealed .torch-btn {
  opacity: 0;
  pointer-events: none;
}

@keyframes ember-pulse {
  0%, 100% {
    transform: translate(-50%, 0) scale(1) rotateX(0deg);
    box-shadow:
      0 10px 16px rgba(0, 0, 0, 0.55),
      0 3px 4px rgba(0, 0, 0, 0.4),
      0 0 14px rgba(255, 130, 40, 0.4);
  }
  50% {
    transform: translate(-50%, 0) scale(1.08) rotateX(0deg);
    box-shadow:
      0 13px 20px rgba(0, 0, 0, 0.55),
      0 4px 6px rgba(0, 0, 0, 0.4),
      0 0 36px rgba(255, 160, 50, 0.85);
  }
}

.torch-btn:hover,
.torch-btn:focus-visible {
  animation-play-state: paused;
  transform: translate(-50%, 0) scale(1.14) rotateX(8deg);
  box-shadow:
    0 14px 22px rgba(0, 0, 0, 0.6),
    0 4px 6px rgba(0, 0, 0, 0.4),
    0 0 48px rgba(255, 180, 70, 0.95);
}

.torch-btn:active {
  transform: translate(-50%, 0) scale(0.96) rotateX(0deg);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 150, 40, 0.6);
}

.torch-btn.lit {
  animation: none;
  transform: translate(-50%, 0) scale(1) rotateX(0deg);
  box-shadow:
    0 10px 16px rgba(0, 0, 0, 0.55),
    0 3px 4px rgba(0, 0, 0, 0.4),
    0 0 34px rgba(255, 190, 90, 0.9);
  cursor: default;
}
