:root {
  --void: #120a2b;
  --night: #1b1244;
  --dusk: #2a1a62;
  --fog: #6f5aa8;
  --lavender: #cbb6ff;
  --lilac: #eadbff;
  --moon: #fff7ff;
  --glow: #d8c4ff;
  --ink: #2a1d55;
  --glass: rgba(255, 247, 255, 0.07);
  --line: rgba(232, 217, 255, 0.22);
  --display: "Fredoka", "Nunito", sans-serif;
  --body: "Quicksand", "Nunito", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--lilac);
  font-family: var(--body);
  background: radial-gradient(1200px 700px at 50% -10%, #4a2f8f 0%, var(--night) 42%, var(--void) 100%);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#night-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.haze {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 42vh;
  filter: blur(28px);
  opacity: 0.45;
  animation: drift 28s ease-in-out infinite;
}

.haze-a {
  bottom: -8vh;
  background: radial-gradient(ellipse at center, rgba(196, 181, 253, 0.28), transparent 70%);
}

.haze-b {
  bottom: 8vh;
  opacity: 0.28;
  animation-duration: 36s;
  animation-direction: reverse;
  background: radial-gradient(ellipse at 30% 50%, rgba(167, 139, 250, 0.22), transparent 68%);
}

.haze-c {
  top: 12vh;
  height: 28vh;
  opacity: 0.18;
  animation-duration: 42s;
  background: radial-gradient(ellipse at 70% 40%, rgba(255, 247, 255, 0.16), transparent 70%);
}

.aurora {
  position: absolute;
  inset: 8% 10% auto;
  height: 36vh;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(167, 139, 250, 0.18), transparent 55%),
    radial-gradient(ellipse at 70% 30%, rgba(244, 217, 255, 0.12), transparent 50%);
  filter: blur(20px);
  animation: pulse 10s ease-in-out infinite;
}

.crescent {
  position: absolute;
  border-radius: 50%;
  box-shadow: 8px -6px 0 var(--lilac);
  opacity: 0.35;
  animation: floaty 14s ease-in-out infinite;
}

.crescent-a {
  width: 34px;
  height: 34px;
  top: 16vh;
  right: 12vw;
}

.crescent-b {
  width: 18px;
  height: 18px;
  top: 38vh;
  left: 8vw;
  animation-delay: -4s;
  box-shadow: 5px -4px 0 var(--lavender);
}

.crescent-c {
  width: 26px;
  height: 26px;
  bottom: 18vh;
  right: 22vw;
  animation-delay: -8s;
  opacity: 0.22;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 7vw;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.topbar.scrolled {
  background: rgba(18, 10, 43, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(10, 6, 24, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--moon);
  letter-spacing: 0.02em;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 247, 255, 0.35), 0 0 22px rgba(196, 181, 253, 0.55);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  font-weight: 600;
  color: var(--lavender);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--moon);
}

.nav-x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 247, 255, 0.05);
}

.nav-x img {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 247, 255, 0.05);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.menu-toggle i {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--moon);
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 48px;
  padding: 48px 7vw 80px;
}

.hero-orbit {
  position: relative;
  width: min(460px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  transition: transform 0.4s ease-out;
}

.orbit-ring {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px dashed rgba(232, 217, 255, 0.28);
  animation: spin 48s linear infinite;
}

.ring-two {
  inset: -4%;
  animation-direction: reverse;
  animation-duration: 64s;
  border-style: solid;
  border-color: rgba(196, 181, 253, 0.12);
}

.orbit-dust {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 18% 28%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 80% 22%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 86% 70%, #eadbff 0 2px, transparent 3px),
    radial-gradient(circle at 20% 78%, #fff 0 1px, transparent 2px);
  animation: spin 36s linear infinite;
}

.moon-plate {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  overflow: hidden;
  background: #c4b5fd;
  box-shadow:
    0 0 0 10px rgba(255, 247, 255, 0.08),
    0 0 60px rgba(196, 181, 253, 0.45),
    0 0 140px rgba(124, 58, 237, 0.35);
  animation: bob 6.5s ease-in-out infinite;
}

.moon-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy h1,
.panel-head h2 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--moon);
  letter-spacing: 0.01em;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.85),
    0 0 28px rgba(203, 182, 255, 0.75),
    0 0 54px rgba(139, 92, 246, 0.45);
}

.hero-copy h1 {
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  line-height: 0.92;
  margin: 8px 0 10px;
}

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lavender);
}

.ticker {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 247, 255, 0.06);
  font-family: var(--display);
  font-weight: 600;
  color: var(--moon);
}

.lead {
  max-width: 34rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #ddd0f5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn img,
.text-link img,
.join-card img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.btn-glow {
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ff, #d8c4ff);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 10px 30px rgba(196, 181, 253, 0.35);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(255, 247, 255, 0.45);
}

.btn-ghost {
  color: var(--moon);
  border: 1px solid var(--line);
  background: rgba(255, 247, 255, 0.04);
}

.btn-ghost:hover {
  background: rgba(255, 247, 255, 0.1);
}

.ink {
  filter: brightness(0) invert(1) sepia(0.25) saturate(2.2) hue-rotate(230deg) drop-shadow(0 0 6px rgba(203, 182, 255, 0.7));
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 36rem;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(10, 6, 28, 0.35);
  border: 1px solid var(--line);
}

.ca-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lavender);
}

.ca-row code {
  flex: 1;
  min-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--moon);
  font-size: 0.92rem;
}

.ca-row button {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: #cbb6ff;
  color: var(--ink);
  font-weight: 700;
}

.ca-row button.copied {
  background: #fff7ff;
}

.panel {
  padding: 88px 7vw;
}

.panel-head {
  max-width: 40rem;
  margin-bottom: 36px;
}

.panel-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-top: 8px;
  line-height: 1.05;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.glass {
  padding: 26px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 247, 255, 0.08), rgba(255, 247, 255, 0.03));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.glass h3,
.trail h3,
.join-card strong {
  font-family: var(--display);
  color: var(--moon);
  font-weight: 600;
  margin-bottom: 8px;
}

.glass p,
.trail p,
.join-card span {
  line-height: 1.65;
  color: #d5c6f3;
}

.glass-icon,
.step-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: rgba(255, 247, 255, 0.08);
  border: 1px solid var(--line);
}

.glass-icon img,
.step-mark img {
  width: 28px;
  height: 28px;
}

.mark {
  color: #efe4ff;
}

.trail {
  list-style: none;
  display: grid;
  gap: 0;
  position: relative;
}

.trail::before {
  content: "";
  position: absolute;
  left: 78px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(var(--lavender), transparent);
  opacity: 0.35;
}

.trail li {
  display: grid;
  grid-template-columns: 56px 64px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
}

.step {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--moon);
  text-shadow: 0 0 18px rgba(203, 182, 255, 0.7);
}

.chart-shell {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 8px rgba(255, 247, 255, 0.04), 0 30px 80px rgba(12, 6, 30, 0.45);
  background: rgba(10, 6, 28, 0.5);
}

.chart-shell iframe {
  display: block;
  width: 100%;
  height: 680px;
  border: 0;
  background: #0b0718;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-weight: 700;
  color: var(--moon);
}

.banner-frame {
  aspect-ratio: 3 / 1;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 8px rgba(255, 247, 255, 0.04),
    0 20px 70px rgba(91, 60, 168, 0.35);
  position: relative;
}

.banner-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 247, 255, 0.18) 48%, transparent 72%);
  transform: translateX(-120%);
  animation: sheen 7s ease-in-out infinite;
}

.banner-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.join-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.join-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 247, 255, 0.05);
  transition: transform 0.2s ease, background 0.2s ease;
}

.join-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 247, 255, 0.1);
}

.join-card img[src*="x.svg"] {
  filter: brightness(0) invert(1);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 7vw 48px;
  color: var(--lavender);
}

.footer img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
}

.reveal.visible {
  animation: rise 0.8s ease forwards;
}

.delay-1.visible { animation-delay: 0.12s; }
.delay-2.visible { animation-delay: 0.24s; }
.delay-3.visible { animation-delay: 0.36s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4%); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes sheen {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .join-links {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .trail::before {
    left: 22px;
  }

  .trail li {
    grid-template-columns: 48px 1fr;
  }

  .trail .step {
    display: none;
  }

  .chart-shell iframe {
    height: 520px;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 16px 7vw 24px;
    background: rgba(18, 10, 43, 0.94);
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .topbar.open .nav {
    display: flex;
  }

  .banner-frame {
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
