:root {
  color-scheme: dark;
  --ink: #f8f4ea;
  --muted: rgba(248, 244, 234, 0.18);
  --line: rgba(248, 244, 234, 0.12);
  --gold: #f2bd4b;
  --cyan: #55d6c2;
  --pink: #d24c7a;
  --green: #7ef27c;
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body {
  cursor: default;
}

p,
h1,
span,
.echo,
.ticker,
.stack {
  cursor: default;
}

html {
  min-height: 100%;
  background: #08090b;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 16% 18%, rgba(85, 214, 194, 0.24), transparent 30rem),
    radial-gradient(circle at 78% 28%, rgba(242, 189, 75, 0.22), transparent 28rem),
    radial-gradient(circle at 62% 84%, rgba(210, 76, 122, 0.18), transparent 30rem),
    linear-gradient(135deg, #08090b 0%, #121216 48%, #090a0d 100%);
  background-size:
    48px 48px,
    48px 48px,
    auto,
    auto,
    auto,
    auto;
  overflow: hidden;
  animation: grid-shift 18s linear infinite;
}

::selection {
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.34)),
    radial-gradient(circle at center, transparent 0 46%, rgba(0, 0, 0, 0.42) 100%);
}

.stage {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 4rem);
  isolation: isolate;
}

.stage::before,
.stage::after {
  content: "";
  position: fixed;
  width: clamp(18rem, 34vw, 34rem);
  aspect-ratio: 1;
  border: 1px solid rgba(248, 244, 234, 0.08);
  pointer-events: none;
  z-index: -2;
  animation: spin-panel 18s linear infinite;
}

.stage::before {
  top: -9rem;
  left: -7rem;
  background: linear-gradient(135deg, rgba(85, 214, 194, 0.16), transparent 62%);
}

.stage::after {
  right: -9rem;
  bottom: -10rem;
  background: linear-gradient(315deg, rgba(210, 76, 122, 0.15), transparent 62%);
  animation-direction: reverse;
  animation-duration: 22s;
}

.hero {
  width: min(1180px, 100%);
  position: relative;
  display: grid;
  place-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(2rem, 8vw, 7rem) clamp(1rem, 5vw, 4rem);
  text-align: center;
}

.hero::before,
.hero::after {
  content: "Fak af";
  position: absolute;
  z-index: -1;
  font-size: clamp(8rem, 28vw, 24rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  text-stroke: 1px var(--line);
  opacity: 0.72;
}

.hero::before {
  transform: translate(-12%, -30%) rotate(-8deg);
}

.hero::after {
  transform: translate(13%, 34%) rotate(7deg);
}

p {
  margin: 0;
  color: rgba(248, 244, 234, 0.72);
  font-size: clamp(0.86rem, 1.5vw, 1.1rem);
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

button {
  font: inherit;
}

h1 {
  margin: 0;
  font-size: clamp(5rem, 18vw, 16rem);
  font-weight: 900;
  line-height: 0.76;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28),
    0 22px 80px rgba(0, 0, 0, 0.62);
  animation: headline 5.6s ease-in-out infinite;
}

.click-prompt {
  min-height: 3.25rem;
  padding: 0 1.35rem;
  border: 1px solid rgba(248, 244, 234, 0.24);
  border-radius: 999px;
  color: #101115;
  background: linear-gradient(135deg, var(--gold), #ffe08a);
  box-shadow:
    0 18px 54px rgba(242, 189, 75, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: prompt-pulse 1.3s ease-in-out infinite;
}

.click-prompt:active {
  transform: scale(0.97);
}

body.music-started .click-prompt {
  opacity: 0;
  transform: translateY(0.75rem) scale(0.96);
  pointer-events: none;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.echo {
  position: absolute;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(248, 244, 234, 0.16);
  text-stroke: 1px rgba(248, 244, 234, 0.16);
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.echo--one {
  top: 12%;
  left: 2%;
  animation: float-one 7s ease-in-out infinite;
}

.echo--two {
  right: 4%;
  bottom: 18%;
  animation: float-two 8s ease-in-out infinite;
}

.echo--three {
  left: 10%;
  bottom: 6%;
  color: rgba(126, 242, 124, 0.12);
  -webkit-text-stroke: 0;
  text-stroke: 0;
  animation: float-three 6.5s ease-in-out infinite;
}

.stack {
  width: min(780px, 92vw);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.32);
}

.stack span {
  min-height: clamp(3rem, 7vw, 5rem);
  display: grid;
  place-items: center;
  color: rgba(248, 244, 234, 0.68);
  background: rgba(8, 9, 11, 0.68);
  backdrop-filter: blur(18px);
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 850;
  text-transform: uppercase;
}

.stack span:nth-child(2) {
  color: #101115;
  background: var(--gold);
}

.stack span:nth-child(3) {
  color: #071412;
  background: var(--cyan);
}

.stack span {
  animation: tile-pop 5s ease-in-out infinite;
}

.stack span:nth-child(2) {
  animation-delay: 0.4s;
}

.stack span:nth-child(3) {
  animation-delay: 0.8s;
}

.stack span:nth-child(4) {
  animation-delay: 1.2s;
}

.ticker {
  position: fixed;
  left: -10vw;
  right: -10vw;
  z-index: -1;
  display: flex;
  gap: clamp(1.5rem, 5vw, 4rem);
  width: 120vw;
  color: var(--muted);
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.ticker span {
  flex: 0 0 auto;
}

.ticker--top {
  top: 7vh;
  transform: rotate(-4deg);
  animation: drift-left 24s linear infinite;
}

.ticker--bottom {
  bottom: 8vh;
  transform: rotate(4deg);
  animation: drift-right 26s linear infinite;
}

body.music-started h1 {
  animation-duration: 2.8s;
}

body.music-started .stack {
  border-color: rgba(242, 189, 75, 0.32);
}

.click-burst {
  position: fixed;
  left: 0;
  top: 0;
  width: 1rem;
  aspect-ratio: 1;
  border: 1px solid rgba(248, 244, 234, 0.9);
  border-radius: 50%;
  pointer-events: none;
  translate: -50% -50%;
  z-index: 20;
  animation: click-burst 680ms ease-out forwards;
}

.click-burst::before,
.click-burst::after {
  content: "";
  position: absolute;
  inset: -0.5rem;
  border: 1px solid rgba(242, 189, 75, 0.74);
  border-radius: inherit;
}

.click-burst::after {
  inset: -1rem;
  border-color: rgba(85, 214, 194, 0.62);
}

.spark {
  position: fixed;
  left: 0;
  top: 0;
  width: 0.34rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  pointer-events: none;
  translate: -50% -50%;
  z-index: 21;
  animation: spark 540ms ease-out forwards;
}

.spark:nth-child(3n) {
  background: var(--cyan);
}

.spark:nth-child(3n + 1) {
  background: var(--pink);
}

body.is-clicking h1 {
  animation: click-headline 420ms ease-out, headline 2.8s ease-in-out infinite 420ms;
}

@keyframes grid-shift {
  from {
    background-position:
      0 0,
      0 0,
      center,
      center,
      center,
      center;
  }

  to {
    background-position:
      48px 0,
      0 48px,
      center,
      center,
      center,
      center;
  }
}

@keyframes headline {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.018);
  }
}

@keyframes prompt-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-0.35rem) scale(1.03);
  }
}

@keyframes click-headline {
  0% {
    transform: scale(1) rotate(0deg);
  }

  44% {
    transform: scale(1.045) rotate(-1deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes tile-pop {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-0.35rem);
  }
}

@keyframes spin-panel {
  from {
    transform: rotate(0deg) scale(1);
  }

  to {
    transform: rotate(360deg) scale(1.05);
  }
}

@keyframes float-one {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-10deg);
  }

  50% {
    transform: translate3d(1rem, -1.2rem, 0) rotate(-5deg);
  }
}

@keyframes float-two {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(9deg);
  }

  50% {
    transform: translate3d(-1.3rem, 1rem, 0) rotate(3deg);
  }
}

@keyframes float-three {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(4deg) scale(1);
  }

  50% {
    transform: translate3d(1rem, 1rem, 0) rotate(8deg) scale(1.08);
  }
}

@keyframes click-burst {
  from {
    opacity: 0.95;
    transform: scale(0.35);
  }

  to {
    opacity: 0;
    transform: scale(4);
  }
}

@keyframes spark {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    opacity: 0;
    transform: translate3d(var(--spark-x), var(--spark-y), 0) scale(0.25);
  }
}

@keyframes drift-left {
  from {
    translate: 0 0;
  }

  to {
    translate: -22rem 0;
  }
}

@keyframes drift-right {
  from {
    translate: -22rem 0;
  }

  to {
    translate: 0 0;
  }
}

@media (max-width: 740px) {
  body {
    overflow-y: auto;
  }

  .stage {
    min-height: 100svh;
    padding: 1rem;
  }

  .hero {
    padding-block: 4rem;
  }

  h1 {
    font-size: clamp(4.6rem, 28vw, 8rem);
  }

  .stack {
    grid-template-columns: 1fr 1fr;
  }
}
