:root {
  --space: #04060f;
  --ice: #8fd0f0;
  --pale: #cfeeff;
  --gold: #e8b46a;
}

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

html {
  background: var(--space);
}

html,
body {
  width: 100%;
}

body {
  color: #e8eaf0;
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow-x: hidden;
}

/* The camera rail. Scrolling this = moving through the world. */
.scroll-track {
  height: 1300vh;
}

.canvas-wrap {
  position: fixed;
  inset: 0;
}

.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- overlay copy ---------- */
.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: #eef3f8;
  text-shadow: 0 0 44px rgba(143, 208, 240, 0.35);
}

.hero p {
  font-size: clamp(0.78rem, 1.4vw, 1.05rem);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: rgba(207, 238, 255, 0.62);
}

/* ---------- CTA buttons + contract address ---------- */
.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  pointer-events: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.btn {
  color: #eaf6ff;
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  border: 1px solid rgba(143, 208, 240, 0.55);
  background: rgba(6, 12, 28, 0.85);
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  transition: background 0.3s, box-shadow 0.3s;
  white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
  background: rgba(143, 208, 240, 0.18);
  box-shadow: 0 0 18px rgba(143, 208, 240, 0.35);
  outline: none;
}

.btn.gold {
  color: #ffedc9;
  border-color: rgba(232, 180, 106, 0.75);
  background: rgba(58, 38, 12, 0.75);
}

.btn.gold:hover,
.btn.gold:focus-visible {
  background: rgba(232, 180, 106, 0.25);
  box-shadow: 0 0 20px rgba(232, 180, 106, 0.4);
}

.btn.soon {
  opacity: 0.55;
  cursor: default;
}

.ca-pill {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #cfeeff;
  background: rgba(6, 12, 28, 0.85);
  border: 1px dashed rgba(143, 208, 240, 0.45);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-pill:hover {
  background: rgba(143, 208, 240, 0.12);
}

.cue {
  position: absolute;
  bottom: 4vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  font-size: 0.62rem;
  color: rgba(207, 238, 255, 0.45);
}

.cue::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(207, 238, 255, 0.5), transparent);
  animation: cueDrift 2.4s ease-in-out infinite;
}

@keyframes cueDrift {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: translateY(10px);
    opacity: 0.3;
  }
}

/* progress rail: you always know there is more to scroll */
.rail {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  height: 38vh;
  width: 2px;
}

.rail-track {
  position: absolute;
  inset: 0;
  background: rgba(207, 238, 255, 0.14);
  border-radius: 2px;
}

.rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(to bottom, rgba(143, 208, 240, 0.85), rgba(143, 208, 240, 0.35));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(143, 208, 240, 0.5);
}

.rail-dot {
  position: absolute;
  left: 50%;
  top: 0%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #cfeeff;
  box-shadow: 0 0 12px rgba(143, 208, 240, 0.9);
}

@media (max-width: 700px) {
  .rail {
    right: 12px;
  }
}

.payoff {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15vh;
  text-align: center;
  font-size: clamp(1.3rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: #e9f4fb;
  text-shadow: 0 0 32px rgba(143, 208, 240, 0.4);
  opacity: 0;
}

.payoff.already {
  color: #f2e2c4;
  text-shadow: 0 0 32px rgba(232, 180, 106, 0.35);
}

.payoff.small {
  font-size: clamp(0.95rem, 1.9vw, 1.55rem);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  padding: 0 8vw;
}

/* ---------- brand chrome ---------- */
.brandbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  z-index: 11;
  pointer-events: none;
  opacity: 0;
}

.brand-left {
  display: flex;
  gap: 12px;
  align-items: center;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  font-size: 0.8rem;
  color: #dfe9f2;
}

.brand-left img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(143, 208, 240, 0.45);
}

.brand-right {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--gold);
}

/* ---------- finale end card ---------- */
.endcard {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  isolation: isolate;
}

/* dark scrim so the finale reads over the bright pack scene */
.endcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(4, 6, 15, 0.85) 0%,
    rgba(4, 6, 15, 0.6) 45%,
    rgba(4, 6, 15, 0) 78%
  );
}

.endcard-emblem {
  width: clamp(80px, 12vw, 120px);
  height: clamp(80px, 12vw, 120px);
  border-radius: 50%;
  box-shadow: 0 0 44px rgba(143, 208, 240, 0.4);
}

.endcard-title {
  font-size: clamp(1.4rem, 3.2vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: #e9f4fb;
  text-shadow: 0 0 32px rgba(143, 208, 240, 0.4);
}

.endcard .ticker {
  font-size: clamp(0.85rem, 1.6vw, 1.2rem);
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  color: var(--gold);
  text-shadow: 0 0 26px rgba(232, 180, 106, 0.5);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
  padding: 0 4vw;
}

.fineprint {
  margin-top: 1rem;
  max-width: 560px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(207, 238, 255, 0.6);
  padding: 0 6vw;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.nogl[hidden] {
  display: none;
}

.nogl {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 1rem;
  text-align: center;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

.nogl .small {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: rgba(207, 238, 255, 0.6);
}

.filewarn {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 40;
  max-width: min(560px, 92vw);
  background: rgba(10, 22, 48, 0.95);
  border: 1px solid rgba(232, 180, 106, 0.5);
  border-radius: 10px;
  padding: 0.8rem 2.4rem 0.8rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #f2e2c4;
}

.filewarn[hidden] {
  display: none;
}

.filewarn code {
  font-family: ui-monospace, Consolas, monospace;
}

.filewarn button {
  position: absolute;
  right: 8px;
  top: 6px;
  background: none;
  border: none;
  color: #f2e2c4;
  font-size: 1.1rem;
  cursor: pointer;
}

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

@media (prefers-reduced-motion: reduce) {
  .cue::after {
    animation: none;
  }
}
