html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, Arial, sans-serif;
  background: #1f1e1e;
  color: #1f1e1e;
  overflow: hidden;
}

/* ---- 3D world canvas sits behind everything, hidden until summoned ---- */
#world-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: none;
  transition: opacity 2.6s ease,
    filter 2.6s ease,
    transform 2.6s ease;
  will-change: opacity, filter, transform;
}

/* the win "un-burn": the 3D world blurs outward as the homepage returns */
#world-canvas.burning {
  opacity: 0;
  filter: blur(46px) brightness(2.2) contrast(0.7);
  transform: scale(1.18);
}

/* ---- The original dark 2D site, now wrapped so it can "burn off" ---- */
#overlay-2d {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #1f1e1e;
  transition: opacity 2.6s ease,
    filter 2.6s ease,
    transform 2.6s ease;
  will-change: opacity, filter, transform;
}

#overlay-2d.burning {
  opacity: 0;
  filter: blur(46px) brightness(2.4) contrast(0.7);
  transform: scale(1.18);
  pointer-events: none;
}

/* ---- red wash that pulses in sync with the ambient drone ---- */
#red-tint {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%,
      rgba(255, 60, 40, 0.55) 0%,
      rgba(150, 0, 0, 0.95) 100%);
  mix-blend-mode: screen;
  opacity: 0;
  will-change: opacity;
}

/* ---- ephemeral "thank you" flashed after the win returns home ---- */
#thank-you {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #f5e6c8;
  font-weight: 300;
  font-size: clamp(1.6rem, 5vw, 3rem);
  letter-spacing: .3em;
  text-transform: lowercase;
  opacity: 0;
}

#thank-you.show {
  animation: thanks 4.2s ease forwards;
}

@keyframes thanks {
  0% { opacity: 0; filter: blur(22px); transform: scale(1.12); letter-spacing: .7em; }
  28% { opacity: .95; filter: blur(0); transform: scale(1); letter-spacing: .3em; }
  68% { opacity: .95; filter: blur(0); }
  100% { opacity: 0; filter: blur(26px); transform: scale(1.05); letter-spacing: .7em; }
}

#particles-wrapper {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.content {
  position: relative;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.0);
  /* transparent overlay */
}

h1 {
  margin: 0 0 1rem;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: #f5ca30;
  letter-spacing: .05em;
}

h2 {
  position: absolute;
  top: 5vh;
  left: 5vw;
  font-family: "Sanomat Alt", serif;
  font-size: calc(8vw + 8vh + 6vmin);
  font-weight: 800;
  /* Change the position of transformed element */
  transform-origin: bottom;
  /*  Rotates around x-axis */
  transform: translatey(-8px) skew(120deg);
  filter: blur(10px) brightness(1.5);
  line-height: 0.85em;
  /* linear-gradient defined by up,down,left ,right ,diagonal */
  background-image: linear-gradient(0deg, #000000 0, transparent 95%);
  -webkit-background-clip: text;
  color: transparent;
  opacity: 0.8;
  animation: 32s anim-lineUp;
}

@keyframes anim-lineUp {
  0% {
    filter: blur(50px);
  }

  100% {
    filter: blur(10px);
  }
}

p {
  max-width: 720px;
  line-height: 1.5;
  margin: 0;
  font-size: 1rem;
  color: #ddd;
}

a {
  color: #1890d7;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
