:root {
  --ink: #f8f4e9;
  --muted: #b8b5cf;
  --void: #070212;
  --blue: #0637ff;
  --cyan: #26d8ff;
  --pink: #ff2ccf;
  --orange: #ff7a1a;
  --yellow: #ffe45f;
  --green: #58ff92;
  --line: rgba(255, 255, 255, 0.18);
  --panel: rgba(9, 8, 27, 0.68);
  --stage-w: min(100vw, 177.7778vh);
  --stage-h: min(100vh, 56.25vw);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

.sprite {
  display: none;
}

.ambient,
.grain,
.cursor-light {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 5;
}

.ambient {
  background:
    radial-gradient(circle at calc(var(--mx, 50) * 1px) calc(var(--my, 50) * 1px), rgba(38, 216, 255, 0.2), transparent 18rem),
    linear-gradient(125deg, rgba(255, 44, 207, 0.12), transparent 42%, rgba(255, 122, 26, 0.1));
  mix-blend-mode: screen;
}

.grain {
  opacity: 0.11;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 31px 31px;
}

.cursor-light {
  width: 22rem;
  height: 22rem;
  left: calc((var(--mx, 600) * 1px) - 11rem);
  top: calc((var(--my, 350) * 1px) - 11rem);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 95, 0.17), transparent 62%);
  filter: blur(14px);
}

.toast {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 30;
  transform: translateY(1rem);
  opacity: 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 4, 19, 0.88);
  box-shadow: 0 0 2rem rgba(255, 44, 207, 0.22);
  transition: 0.25s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.hud {
  position: fixed;
  inset: 1.1rem 1.3rem auto;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand,
.ca-pill,
.nav-dots {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 3, 16, 0.72);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  text-transform: uppercase;
  font-weight: 950;
  line-height: 0.88;
}

.brand img {
  width: 2.4rem;
  height: 2.4rem;
}

.nav-dots {
  justify-self: center;
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
}

.nav-dots a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 4.65rem;
  padding: 0.5rem 0.58rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-dots span {
  color: var(--orange);
}

.nav-dots a.active,
.nav-dots a:hover {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(255, 44, 207, 0.22), rgba(38, 216, 255, 0.15));
}

.ca-pill {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.95rem;
  color: var(--ink);
}

.ca-pill svg,
.btn svg,
.admin-link svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.deck {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.deck::-webkit-scrollbar {
  height: 0;
}

.slide {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  scroll-snap-align: start;
  overflow: hidden;
  isolation: isolate;
}

.slide::before {
  content: "";
  position: absolute;
  inset: -6%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: saturate(1.28) contrast(1.08);
  transform: scale(1.04);
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 2, 13, 0.86), rgba(4, 2, 13, 0.36) 45%, rgba(4, 2, 13, 0.74)),
    radial-gradient(circle at 74% 32%, rgba(255, 228, 95, 0.28), transparent 23rem),
    radial-gradient(circle at 18% 75%, rgba(255, 44, 207, 0.16), transparent 24rem);
}

.hero::before,
.game::before,
.airdrop::before {
  background-image: url("assets/backgrounds/hero-bg.jpg");
}

.lore::before,
.oracle::before,
.links::before {
  background-image: url("assets/backgrounds/lore-bg.jpg");
}

.chart::before,
.roadmap::before {
  background-image: url("assets/backgrounds/roadmap-bg.jpg");
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--stage-w);
  height: var(--stage-h);
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.copy-block,
.hero-copy {
  position: absolute;
  z-index: 3;
  max-width: 46rem;
}

.hero-copy {
  left: 7.2%;
  top: 24%;
}

.copy-block {
  left: 7.2%;
  top: 20%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--yellow);
  font-weight: 950;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 1000;
  line-height: 0.86;
  text-transform: uppercase;
}

h1 {
  max-width: 50rem;
  font-size: clamp(4.6rem, 8.7vw, 10.8rem);
}

h2 {
  max-width: 44rem;
  font-size: clamp(3.3rem, 5.8vw, 7rem);
}

.lead,
.copy-block p {
  max-width: 38rem;
  color: #f3e8da;
  font-size: clamp(1rem, 1.22vw, 1.35rem);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.25rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 950;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
button:hover,
.portal-grid a:hover,
.social-orbit a:hover {
  transform: translateY(-2px);
}

.hot {
  border-color: rgba(255, 228, 95, 0.62);
  background: linear-gradient(135deg, var(--pink), var(--orange) 57%, var(--yellow));
  color: #12030b;
  box-shadow: 0 0 2rem rgba(255, 122, 26, 0.35);
}

.ghost {
  background: rgba(5, 5, 23, 0.7);
}

.character {
  position: absolute;
  z-index: 2;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 2rem 2.5rem rgba(0, 0, 0, 0.45));
}

.hero-blue {
  right: 7%;
  bottom: 0;
  width: 43%;
  animation: bob 4.8s ease-in-out infinite;
}

.lore-blue {
  right: 8%;
  bottom: -6%;
  width: 37%;
}

.game-blue {
  right: 3%;
  bottom: -10%;
  width: 30%;
  opacity: 0.5;
  transform: rotate(5deg);
}

.roadmap-blue {
  right: 4%;
  bottom: 3%;
  width: 47%;
}

.oracle-blue {
  right: 10%;
  bottom: -8%;
  width: 35%;
}

.floaty {
  animation: bob 7.2s ease-in-out infinite;
}

.floaty-slow {
  animation: bob 9s ease-in-out infinite;
}

.social-orbit {
  position: absolute;
  right: 6%;
  top: 17%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(2, 4rem);
  gap: 0.7rem;
}

.social-orbit a,
.portal-grid a {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 22, 0.72);
  backdrop-filter: blur(14px);
  transition: 0.2s ease;
}

.social-orbit a {
  width: 4rem;
  height: 4rem;
  color: var(--ink);
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spark-button {
  cursor: pointer;
  position: absolute;
  left: 7.2%;
  bottom: 9%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 228, 95, 0.45);
  border-radius: 8px;
  background: rgba(4, 3, 18, 0.68);
  color: var(--yellow);
  font-weight: 900;
  text-transform: uppercase;
}

.spark-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.spark-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.spark-dot {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--color);
  animation: sparkFly 1.35s ease-out forwards;
}

.artifact-grid {
  position: absolute;
  left: 7.2%;
  bottom: 12%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(10rem, 14rem));
  gap: 0.7rem;
}

.artifact,
.phase {
  cursor: pointer;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  backdrop-filter: blur(12px);
}

.artifact b,
.phase b {
  display: block;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.artifact span,
.phase small {
  color: var(--muted);
  line-height: 1.4;
}

.artifact.active,
.phase.active {
  border-color: rgba(255, 228, 95, 0.66);
  box-shadow: 0 0 1.6rem rgba(255, 44, 207, 0.24);
}

.lore-output,
.phase-output,
.oracle-answer {
  position: absolute;
  z-index: 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 4, 19, 0.74);
  color: #fff3d5;
  line-height: 1.55;
  backdrop-filter: blur(16px);
}

.lore-output {
  right: 8%;
  top: 18%;
  width: 24rem;
  padding: 1.15rem;
}

.game .copy-block {
  top: 16%;
  max-width: 27rem;
}

.game .copy-block h2 {
  max-width: 27rem;
  font-size: clamp(2.9rem, 4.05vw, 5rem);
  line-height: 0.9;
}

.game .copy-block p {
  max-width: 24rem;
}

.game-shell {
  position: absolute;
  right: 4.5%;
  top: 14%;
  z-index: 4;
  width: 51%;
  height: 72%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 6, 23, 0.76);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 3rem rgba(38, 216, 255, 0.16);
}

.game-top,
.game-bottom {
  height: 3.4rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
}

.game-top {
  justify-content: space-between;
}

.game-top b {
  color: var(--yellow);
}

.game-shell canvas {
  display: block;
  width: 100%;
  height: calc(100% - 6.8rem);
  cursor: crosshair;
}

.game-bottom {
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.game-bottom .btn {
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
}

#gameStatus {
  margin-left: auto;
  color: var(--yellow);
}

.chart-shell {
  position: absolute;
  right: 3%;
  top: 14%;
  z-index: 4;
  width: 57%;
  height: 70%;
  overflow: hidden;
  border: 1px solid rgba(38, 216, 255, 0.32);
  border-radius: 8px;
  background: rgba(3, 4, 12, 0.82);
  box-shadow: 0 0 3rem rgba(38, 216, 255, 0.14);
}

.chart .copy-block {
  top: 19%;
  max-width: 28rem;
}

.chart .copy-block h2 {
  max-width: 28rem;
  font-size: clamp(3rem, 4.3vw, 5.3rem);
}

.chart .copy-block p {
  max-width: 25rem;
}

.chart-top {
  height: 3.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 950;
  color: var(--yellow);
}

.chart-top button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
}

.chart-shell iframe {
  width: 100%;
  height: calc(100% - 3.3rem);
  border: 0;
}

.phase-track {
  position: absolute;
  left: 7.2%;
  bottom: 11%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(8rem, 14rem));
  gap: 0.7rem;
}

.roadmap .copy-block {
  top: 13%;
  max-width: 32rem;
}

.roadmap .copy-block h2 {
  max-width: 32rem;
  font-size: clamp(3.3rem, 5vw, 6.2rem);
}

.phase span {
  color: var(--orange);
  font-weight: 1000;
}

.phase-output {
  left: auto;
  right: 8%;
  top: 24%;
  width: min(34rem, 34%);
  padding: 1.1rem;
}

.lore .copy-block {
  top: 13%;
  max-width: 34rem;
}

.lore .copy-block h2 {
  max-width: 34rem;
  font-size: clamp(3rem, 4.8vw, 5.9rem);
}

.lore .copy-block p {
  max-width: 31rem;
}

.lore .artifact-grid {
  bottom: 7%;
  grid-template-columns: repeat(3, minmax(9rem, 13.2rem));
}

.airdrop-form {
  position: absolute;
  left: 7.2%;
  bottom: 12%;
  z-index: 4;
  display: grid;
  gap: 0.85rem;
  width: min(38rem, 48%);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 22, 0.76);
  backdrop-filter: blur(16px);
}

.airdrop-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
}

.airdrop-form input,
.oracle-box input,
.admin-panel input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  outline: 0;
}

.airdrop-form input:focus,
.oracle-box input:focus,
.admin-panel input:focus {
  border-color: var(--cyan);
}

.form-status {
  margin: 0;
  color: var(--yellow);
  line-height: 1.45;
}

.airdrop-stats {
  position: absolute;
  right: 11%;
  top: 25%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 20rem;
  height: 20rem;
  border: 1px solid rgba(255, 228, 95, 0.38);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 44, 207, 0.22), rgba(5, 5, 21, 0.72));
  box-shadow: inset 0 0 3rem rgba(255, 228, 95, 0.15), 0 0 2rem rgba(255, 44, 207, 0.22);
}

.airdrop-stats b {
  font-size: 5rem;
  line-height: 1;
}

.airdrop-stats span {
  margin-top: -4rem;
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
}

.admin-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: -5rem;
  color: var(--yellow);
  font-weight: 900;
}

.oracle-box {
  position: absolute;
  left: 7.2%;
  bottom: 25%;
  z-index: 4;
  display: flex;
  gap: 0.75rem;
  width: min(45rem, 54%);
}

.oracle-box label {
  position: relative;
  flex: 1;
}

.oracle-box label svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 1.2rem;
  height: 1.2rem;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.oracle-box input {
  padding-left: 2.65rem;
}

.oracle-answer {
  left: 7.2%;
  bottom: 12%;
  width: min(50rem, 55%);
  min-height: 7rem;
  padding: 1.15rem;
}

.portal-grid {
  position: absolute;
  left: 7.2%;
  bottom: 18%;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(9rem, 13rem));
  gap: 0.8rem;
}

.portal-grid a {
  min-height: 8rem;
  gap: 0.75rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.portal-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  position: absolute;
  left: 7.2%;
  bottom: 7%;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

@keyframes bob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.35deg); }
  50% { transform: translate3d(0, -0.45rem, 0) rotate(0.45deg); }
}

@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(0.5); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.2); }
}

@media (max-width: 1000px) {
  .hud {
    grid-template-columns: auto auto;
  }

  .nav-dots {
    display: none;
  }

  .ca-pill {
    justify-self: end;
  }

  h1 {
    font-size: clamp(4rem, 15vw, 7rem);
  }

  h2 {
    font-size: clamp(3rem, 12vw, 5.2rem);
  }

  .hero-copy,
  .copy-block {
    left: 5%;
    top: 15%;
    max-width: 62%;
  }

  .hero-blue,
  .roadmap-blue,
  .game-blue {
    right: -9%;
    width: 52%;
  }

  .lore-blue,
  .oracle-blue {
    right: -7%;
    width: 45%;
  }

  .artifact-grid,
  .phase-track,
  .portal-grid {
    grid-template-columns: repeat(2, minmax(8rem, 1fr));
    width: 54%;
  }

  .chart-shell {
    right: 4%;
    width: 56%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
