:root {
  --scroll-top: 0;
  --mouse-x: 0;
  --mouse-y: 0;
  --index: calc(1vw + 1vh);
  --text: #ece8dc;
  --accent: #f1d996;
  --input-bg: rgba(10, 13, 21, 0.82);
  --transition: transform 0.55s cubic-bezier(0.075, 0.5, 0, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background: #020306;
  overflow-x: hidden;
  line-height: 1.55;
}

.content {
  will-change: transform;
}

.hero {
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: calc(var(--index) * -4.5);
  z-index: 7;
  width: 100%;
  height: calc(var(--index) * 10);
  background: center / cover no-repeat url("https://i.ibb.co/DM2Knwf/ground.png");
}

.layers {
  display: flex;
  position: relative;
  height: 100vh;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.layer {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform;
  transition: var(--transition);
}

.layer-base {
  z-index: 0;
  background-image: url("https://i.ibb.co/gjgkdXX/layer-base.png");
  transform: translate3d(
    calc(var(--mouse-x) * -8px),
    calc((var(--scroll-top) / 1.8) + (var(--mouse-y) * -6px)),
    0
  );
}

.layer-middle {
  z-index: 2;
  background-image: url("https://i.ibb.co/bs5VtZj/layer-middle.png");
  transform: translate3d(
    calc(var(--mouse-x) * 12px),
    calc((var(--scroll-top) / 2.6) + (var(--mouse-y) * -10px)),
    0
  );
}

.layer-front {
  z-index: 4;
  background-image: url("https://i.ibb.co/1fKwBmW/layer-front.png");
  transform: translate3d(
    calc(var(--mouse-x) * 18px),
    calc((var(--scroll-top) / 5.8) + (var(--mouse-y) * -15px)),
    0
  );
}

.layer-title {
  position: relative;
  z-index: 12;
  transform: translateY(calc((var(--scroll-top) / 2.35) - 100px));
  transition: var(--transition);
}

.hero-logo {
  width: min(400px, 82vw);
  height: auto;
  filter:
    drop-shadow(0 0 6px rgba(247, 222, 157, 0.22))
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.34));
  animation: logo-pulse 5.5s ease-in-out infinite;
}

.eyebrow {
  margin: calc(var(--index) * 0.45) 0 0;
  text-transform: uppercase;
  letter-spacing: calc(var(--index) / 4);
  font-size: calc(var(--index) * 0.58);
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(38, 24, 4, 0.8);
}

.article {
  position: relative;
  top: -1px;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  background: center / cover no-repeat url("https://i.ibb.co/ryQdX3b/dungeon.jpg");
  padding: 1.2rem;
}

.article-content {
  position: relative;
  z-index: 12;
  width: min(760px, 95vw);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 230, 174, 0.25);
  background: rgba(7, 10, 16, 0.86);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-align: center;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform: translate3d(
    calc(var(--mouse-x) * 10px),
    calc((var(--scroll-top) / -45) + (var(--mouse-y) * 8px)),
    0
  );
  transition: transform 0.55s cubic-bezier(0.075, 0.5, 0, 1);
}

h1 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--accent);
  text-shadow: 0 0 16px rgba(53, 34, 8, 0.55);
}

.description {
  margin: 0.85rem auto 1.35rem;
  max-width: 50ch;
  color: rgba(242, 241, 238, 0.88);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.notify-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.notify-form input {
  width: min(360px, 100%);
  padding: 0.8rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(239, 222, 184, 0.3);
  background: var(--input-bg);
  color: #f7f3eb;
  font: inherit;
}

.notify-form input:focus {
  outline: 2px solid rgba(230, 190, 103, 0.45);
  outline-offset: 1px;
}

.notify-form button {
  padding: 0.8rem 1.05rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(248, 218, 149, 0.65);
  background: linear-gradient(180deg, #f0cc7e, #c19647);
  color: #1f1706;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.notify-form button:hover {
  filter: brightness(1.08);
}

.games-scroll-cue {
  margin-top: 50px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  color: #e3ddca;
}

.games-scroll-label {
  font-size: 1.14rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #e8d6a5;
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.55),
    0 0 12px rgba(238, 197, 93, 0.35);
}

.games-scroll-arrow {
  font-size: 1.35rem;
  line-height: 1;
  color: #f4dfac;
  text-shadow: 0 0 12px rgba(238, 197, 93, 0.35);
  animation: arrow-bounce-slow 2.8s ease-in-out infinite;
}

.section-fade-divider {
  position: relative;
  z-index: 10;
  height: 160px;
  margin-top: -135px;
  margin-bottom: -30px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(7, 10, 16, 0) 0%,
    rgba(7, 10, 16, 0.72) 48%,
    rgba(5, 6, 10, 1) 100%
  );
}

.prismtd-section {
  position: relative;
  z-index: 10;
  min-height: 82vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1.5rem 1rem;
  background: #05060a;
  border-top: 1px solid rgba(66, 110, 176, 0.35);
}

.prismtd-bg,
.prism-nebula,
.prism-stars,
.prism-shooting-stars {
  position: absolute;
  inset: 0;
}

.prismtd-bg {
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.prism-nebula,
.prism-stars,
.prism-shooting-stars {
  inset: -12%;
}

.prism-nebula {
  background:
    radial-gradient(circle at 18% 24%, rgba(130, 66, 255, 0.26), transparent 42%),
    radial-gradient(circle at 76% 20%, rgba(0, 229, 255, 0.2), transparent 40%),
    radial-gradient(circle at 64% 74%, rgba(255, 47, 146, 0.2), transparent 46%),
    radial-gradient(circle at 32% 78%, rgba(42, 169, 255, 0.18), transparent 44%);
  filter: blur(14px) saturate(1.1);
  animation: prism-nebula-breathe 14s ease-in-out infinite alternate;
}

.prism-stars {
  background-image:
    radial-gradient(1.6px 1.6px at 24px 42px, rgba(210, 240, 255, 0.8), transparent),
    radial-gradient(1.2px 1.2px at 114px 88px, rgba(184, 219, 255, 0.68), transparent),
    radial-gradient(1.4px 1.4px at 180px 30px, rgba(220, 198, 255, 0.72), transparent),
    radial-gradient(1.1px 1.1px at 280px 126px, rgba(166, 255, 243, 0.66), transparent),
    radial-gradient(1.3px 1.3px at 350px 62px, rgba(255, 187, 235, 0.62), transparent);
  background-size: 420px 220px;
  opacity: 0.5;
  animation: prism-stars-drift 46s linear infinite;
}

.prism-stars.far {
  background-size: 620px 320px;
  opacity: 0.28;
  filter: blur(0.4px);
  animation-duration: 80s;
  animation-direction: reverse;
}

.prism-shooting-stars {
  overflow: hidden;
}

.prism-shooting-star {
  position: absolute;
  width: 140px;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0), rgba(255, 166, 245, 0.9), rgba(255, 255, 255, 0));
  box-shadow: 0 0 8px rgba(255, 170, 245, 0.66);
  transform: rotate(-24deg) translate(0);
  opacity: 0;
  animation: prism-shooting-star 15s linear infinite;
}

.prism-shooting-star.s1 {
  top: 12%;
  left: -12%;
  animation-duration: 13s;
  animation-delay: 1.6s;
}

.prism-shooting-star.s2 {
  top: 22%;
  left: 14%;
  animation-duration: 16s;
  animation-delay: 6.2s;
}

.prism-shooting-star.s3 {
  top: 56%;
  left: 40%;
  animation-duration: 15s;
  animation-delay: 10.8s;
}

.prism-shooting-star.s4 {
  top: 38%;
  left: 68%;
  animation-duration: 18s;
  animation-delay: 3.9s;
}

.prismtd-link {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.prismtd-link:hover {
  transform: translateY(-4px) scale(1.01);
}

.prismtd-logo {
  width: min(560px, 88vw);
  height: auto;
  filter:
    drop-shadow(0 0 14px rgba(0, 229, 255, 0.42))
    drop-shadow(0 0 28px rgba(0, 229, 255, 0.18));
  animation: prism-logo-float 5s ease-in-out infinite;
}

.prismtd-cta {
  color: #d9f1ff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 0.82rem;
  text-shadow: 0 0 12px rgba(42, 169, 255, 0.36);
}

.fireflies {
  position: fixed;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  overflow: hidden;
}

.fireflies span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 236, 162, 0.95) 0%,
    rgba(255, 215, 117, 0.3) 55%,
    transparent 75%
  );
  box-shadow:
    0 0 10px rgba(255, 213, 107, 0.7),
    0 0 20px rgba(255, 213, 107, 0.28);
  opacity: 0.25;
  animation:
    firefly-drift 11s linear infinite,
    firefly-blink 3.4s ease-in-out infinite;
}

.fireflies span:nth-child(1) {
  left: 8%;
  top: 74%;
  animation-duration: 13s, 3.6s;
  animation-delay: -2s, -1.1s;
}

.fireflies span:nth-child(2) {
  left: 17%;
  top: 52%;
  width: 5px;
  height: 5px;
  animation-duration: 10s, 2.8s;
  animation-delay: -5s, -0.7s;
}

.fireflies span:nth-child(3) {
  left: 27%;
  top: 79%;
  animation-duration: 14s, 3.1s;
  animation-delay: -4s, -1.9s;
}

.fireflies span:nth-child(4) {
  left: 41%;
  top: 60%;
  width: 6px;
  height: 6px;
  animation-duration: 12s, 3.9s;
  animation-delay: -1s, -2.2s;
}

.fireflies span:nth-child(5) {
  left: 53%;
  top: 70%;
  animation-duration: 15s, 3.3s;
  animation-delay: -3.2s, -0.9s;
}

.fireflies span:nth-child(6) {
  left: 64%;
  top: 56%;
  width: 5px;
  height: 5px;
  animation-duration: 11s, 2.6s;
  animation-delay: -6.2s, -1.4s;
}

.fireflies span:nth-child(7) {
  left: 72%;
  top: 81%;
  animation-duration: 16s, 3.8s;
  animation-delay: -8s, -2.1s;
}

.fireflies span:nth-child(8) {
  left: 81%;
  top: 62%;
  width: 6px;
  height: 6px;
  animation-duration: 13s, 2.9s;
  animation-delay: -3.8s, -1.6s;
}

.fireflies span:nth-child(9) {
  left: 90%;
  top: 76%;
  animation-duration: 10s, 3.2s;
  animation-delay: -7.4s, -2.6s;
}

.fireflies span:nth-child(10) {
  left: 35%;
  top: 42%;
  width: 4px;
  height: 4px;
  animation-duration: 9s, 2.4s;
  animation-delay: -2.8s, -0.4s;
}

.vignette {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(251, 231, 184, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(2, 3, 6, 0.2), rgba(2, 3, 6, 0.55));
  pointer-events: none;
  z-index: 5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes logo-pulse {
  0%,
  100% {
    transform: scale(1);
    filter:
      drop-shadow(0 0 6px rgba(247, 222, 157, 0.22))
      drop-shadow(0 8px 18px rgba(0, 0, 0, 0.34));
  }
  50% {
    transform: scale(1.03);
    filter:
      drop-shadow(0 0 10px rgba(247, 222, 157, 0.35))
      drop-shadow(0 10px 22px rgba(0, 0, 0, 0.4));
  }
}

@keyframes firefly-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  35% {
    transform: translate3d(16px, -28px, 0);
  }
  70% {
    transform: translate3d(-10px, -58px, 0);
  }
  100% {
    transform: translate3d(12px, -90px, 0);
  }
}

@keyframes firefly-blink {
  0%,
  100% {
    opacity: 0.16;
  }
  50% {
    opacity: 0.88;
  }
}

@keyframes arrow-bounce-slow {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.76;
  }
  50% {
    transform: translateY(9px);
    opacity: 1;
  }
}

@keyframes prism-nebula-breathe {
  0% {
    transform: scale(1) translateZ(0);
    opacity: 0.72;
  }
  100% {
    transform: scale(1.08) translate3d(1.5%, -1.2%, 0);
    opacity: 0.9;
  }
}

@keyframes prism-stars-drift {
  0% {
    transform: translateZ(0);
  }
  100% {
    transform: translate3d(-220px, 110px, 0);
  }
}

@keyframes prism-shooting-star {
  0%,
  86%,
  100% {
    opacity: 0;
    transform: rotate(-24deg) translate(0);
  }
  88% {
    opacity: 0.9;
  }
  96% {
    opacity: 0.6;
    transform: rotate(-24deg) translate(140vw);
  }
}

@keyframes prism-logo-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter:
      drop-shadow(0 0 12px rgba(0, 229, 255, 0.34))
      drop-shadow(0 0 24px rgba(0, 229, 255, 0.14));
  }
  50% {
    transform: translateY(-5px) scale(1.018);
    filter:
      drop-shadow(0 0 18px rgba(0, 229, 255, 0.58))
      drop-shadow(0 0 32px rgba(0, 229, 255, 0.32));
  }
}

@media (max-width: 680px) {
  .hero-logo {
    width: min(360px, 90vw);
  }

  .article {
    padding: 1rem;
  }

  .article-content {
    padding: 1.25rem;
  }

  .notify-form {
    gap: 0.55rem;
  }

  .notify-form input,
  .notify-form button {
    width: 100%;
  }

  .prismtd-section {
    min-height: 68vh;
  }

  .prismtd-logo {
    width: min(460px, 92vw);
  }

  .section-fade-divider {
    height: 120px;
    margin-top: -100px;
    margin-bottom: -20px;
  }

  .fireflies span {
    width: 5px;
    height: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .layer,
  .layer-title,
  .article-content,
  .hero-logo,
  .fireflies span,
  .prism-nebula,
  .prism-stars,
  .prism-shooting-star,
  .prismtd-logo,
  .games-scroll-arrow {
    transition: none;
    animation: none;
    transform: none;
  }
}
