:root {
  --bg: #030616;
  --bg-2: #07103a;
  --blue: #2f7bff;
  --cyan: #7fe6ff;
  --violet: #9a6bff;
  --gold: #ffd27a;
  --text: #eaf2ff;
  --muted: #a3b6dc;
  --card: rgba(18, 36, 110, 0.28);
  --line: rgba(127, 230, 255, 0.22);
  --glow: 0 0 24px rgba(87, 170, 255, 0.55), 0 0 60px rgba(87, 170, 255, 0.25);
  --radius: 22px;
  --head: "Unbounded", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: hidden; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0; }

/* ---------- background ---------- */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.nebula {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60vw 50vw at 85% 10%, rgba(47, 123, 255, 0.28), transparent 60%),
    radial-gradient(50vw 45vw at 5% 60%, rgba(154, 107, 255, 0.22), transparent 60%),
    radial-gradient(40vw 35vw at 60% 100%, rgba(127, 230, 255, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 15px 30px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: .02em;
  text-decoration: none; color: #031033;
  background: linear-gradient(120deg, var(--cyan), #5aa8ff 45%, var(--violet));
  box-shadow: var(--glow);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.1); box-shadow: 0 0 30px rgba(127,230,255,.8), 0 0 80px rgba(154,107,255,.4); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--line); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(127,230,255,.35); }
.btn--small { padding: 10px 20px; font-size: 13px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 14px; font-size: 13px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--cyan);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #3dff9e; box-shadow: 0 0 12px #3dff9e; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1180px, calc(100% - 28px)); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 12px 10px 14px; border-radius: 999px;
  background: rgba(5, 12, 45, 0.6); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 15px; }
.nav__brand img { border-radius: 50%; box-shadow: 0 0 16px rgba(127,230,255,.6); }
.nav__links { display: flex; gap: 26px; }
.nav__links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .2s; }
.nav__links a:hover { color: var(--cyan); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  width: min(1180px, calc(100% - 32px)); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
  padding: 120px 0 60px;
}
.glitch {
  position: relative; font-size: clamp(46px, 7.4vw, 104px); font-weight: 900; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff 20%, #9fd8ff 70%, #7a8dff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(87,170,255,.45));
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  mix-blend-mode: screen; opacity: .6;
}
.glitch::before { background-image: linear-gradient(var(--cyan), var(--cyan)); animation: ghostA 4.5s infinite ease-in-out; }
.glitch::after  { background-image: linear-gradient(var(--violet), var(--violet)); animation: ghostB 4.5s infinite ease-in-out; }
@keyframes ghostA { 0%,100% { transform: translate(0,0); opacity: 0; } 45% { opacity: 0; } 50% { transform: translate(-6px, 2px); opacity: .7; } 55% { transform: translate(3px,-1px); opacity: .4; } 60% { opacity: 0; } }
@keyframes ghostB { 0%,100% { transform: translate(0,0); opacity: 0; } 47% { opacity: 0; } 52% { transform: translate(6px,-2px); opacity: .7; } 57% { transform: translate(-3px,1px); opacity: .4; } 62% { opacity: 0; } }

.ticker {
  margin: 6px 0 0; font-family: var(--head); font-weight: 700;
  font-size: clamp(26px, 3.4vw, 42px); color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 210, 122, .65);
}
.hero__lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); margin: 18px 0 32px; }
.hero__lead strong { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__art { position: relative; aspect-ratio: 1; width: min(520px, 100%); justify-self: center; transition: transform .25s ease-out; }
.hero__cat {
  position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: cover; border-radius: 50%;
  border: 2px solid rgba(127,230,255,.55);
  box-shadow: 0 0 40px rgba(87,170,255,.6), 0 0 120px rgba(87,170,255,.3), inset 0 0 30px rgba(0,0,0,.4);
  animation: float 6s ease-in-out infinite;
}
.halo {
  position: absolute; inset: 4%; border-radius: 50%;
  background: radial-gradient(circle, rgba(127,230,255,.35), rgba(47,123,255,.12) 45%, transparent 70%);
  animation: breathe 5s ease-in-out infinite;
}
.orbits { position: absolute; inset: -6%; width: 112%; height: 112%; z-index: 2; pointer-events: none; animation: spin 40s linear infinite; }
.orbit { fill: none; stroke: rgba(190, 235, 255, .75); stroke-width: 2.2; }
.electron { fill: #fff; }
@keyframes float { 50% { transform: translateY(-12px); } }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .75; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(47,123,255,.18), rgba(154,107,255,.18));
  padding: 16px 0; transform: rotate(-1.5deg); margin: 20px -10px 40px;
}
.marquee__track { display: flex; gap: 28px; width: max-content; animation: marquee 32s linear infinite; font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: 18px; white-space: nowrap; }
.marquee__track i { font-style: normal; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 100px 0; }
.section__head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section__head h2, .boxgame h2, .final h2 { font-size: clamp(30px, 4.4vw, 54px); font-weight: 900; }
.section__sub { color: var(--muted); margin: 16px 0 0; font-size: 19px; }
.center { text-align: center; margin-top: 46px; }

/* story */
.story { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; position: relative; }
.story::before {
  content: ""; position: absolute; left: 34px; top: 20px; bottom: 20px; width: 2px;
  background: linear-gradient(var(--cyan), var(--violet), transparent);
  box-shadow: 0 0 12px var(--cyan);
}
.chapter { display: grid; grid-template-columns: 70px 1fr; gap: 26px; margin-bottom: 40px; }
.chapter__num {
  width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  font-family: var(--head); font-weight: 900; font-size: 20px; color: var(--gold);
  background: radial-gradient(circle, #0f2470, #050c30); border: 1.5px solid var(--cyan);
  box-shadow: 0 0 22px rgba(127,230,255,.5);
}
.chapter__body {
  padding: 28px 30px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.chapter__body h3 { font-size: 22px; margin-bottom: 12px; color: #cfeaff; }
.chapter__body p { margin: 0 0 12px; color: var(--muted); }
.chapter__body p:last-child { margin-bottom: 0; }
.chapter__body strong, .chapter__body em { color: var(--text); }
.epilogue {
  margin: 60px auto 0; max-width: 760px; text-align: center;
  font-family: var(--head); font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; line-height: 1.4;
}
.epilogue span { color: var(--gold); text-shadow: 0 0 18px rgba(255,210,122,.5); }

/* box game */
.boxgame {
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
  padding: 56px; border-radius: 32px;
  background: linear-gradient(140deg, rgba(47,123,255,.22), rgba(154,107,255,.16));
  border: 1px solid var(--line); box-shadow: inset 0 0 60px rgba(127,230,255,.08);
}
.boxgame__text p { color: var(--muted); margin: 18px 0 28px; }
.boxgame__text em { color: var(--text); }
.boxgame__count { font-size: 14px; margin: 20px 0 0 !important; }
.boxgame__count span { color: var(--gold); font-weight: 700; }
.boxgame__stage { display: flex; flex-direction: column; align-items: center; gap: 28px; }

.qbox { position: relative; width: 190px; height: 170px; perspective: 600px; }
.qbox__body {
  position: absolute; bottom: 0; width: 100%; height: 140px; border-radius: 14px;
  background: linear-gradient(160deg, #1a3a9a, #0a1752);
  border: 2px solid var(--cyan); box-shadow: 0 0 30px rgba(127,230,255,.45), inset 0 0 30px rgba(127,230,255,.2);
  display: grid; place-items: center; overflow: hidden;
}
.qbox__q { font-family: var(--head); font-weight: 900; font-size: 64px; color: var(--cyan); text-shadow: 0 0 20px var(--cyan); }
.qbox__lid {
  position: absolute; top: 12px; left: -8px; width: calc(100% + 16px); height: 26px; border-radius: 10px; z-index: 2;
  background: linear-gradient(160deg, #2a54c9, #132a85); border: 2px solid var(--cyan);
  box-shadow: 0 0 20px rgba(127,230,255,.5); transform-origin: left bottom;
  transition: transform .6s cubic-bezier(.3,1.6,.5,1);
}
.qbox.shake { animation: shake .5s ease-in-out 2; }
.qbox.open .qbox__lid { transform: translate(-4px, -10px) rotate(-22deg); }
.qbox.open .qbox__body { background: radial-gradient(circle at 50% 40%, #fff5d6, var(--gold) 20%, #2f7bff 70%, #0a1752); }
.qbox.open .qbox__q { color: #031033; text-shadow: none; }
@keyframes shake { 25% { transform: translateX(-6px) rotate(-3deg); } 75% { transform: translateX(6px) rotate(3deg); } }

.result {
  width: 100%; max-width: 400px; text-align: center; padding: 20px 22px; border-radius: 18px;
  background: rgba(3, 8, 30, .6); border: 1px solid var(--line); min-height: 140px;
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
}
.result__label { font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.result__value { font-family: var(--head); font-weight: 900; font-size: 26px; color: var(--cyan); text-shadow: 0 0 14px rgba(127,230,255,.6); }
.result__value.flicker { animation: flicker .08s steps(2) infinite; }
.result__desc { color: var(--muted); font-size: 15px; }
@keyframes flicker { 50% { opacity: .3; } }

/* tokenomics */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  padding: 30px 24px; border-radius: var(--radius); text-align: center;
  background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--cyan); box-shadow: 0 0 30px rgba(127,230,255,.25); }
.card__label { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); font-weight: 700; }
.card__value { font-family: var(--head); font-weight: 900; font-size: clamp(22px, 2.2vw, 30px); overflow-wrap: anywhere; }
.card__note { color: var(--muted); font-size: 15px; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { padding: 30px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step__num {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; margin-bottom: 18px;
  font-family: var(--head); font-weight: 900; color: #031033;
  background: linear-gradient(135deg, var(--gold), #ffb347); box-shadow: 0 0 20px rgba(255,210,122,.55);
}
.step h3 { font-size: 18px; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }
.step strong { color: var(--text); }

/* states */
.states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.state {
  position: relative; padding: 30px 24px; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
}
.state::after {
  content: ""; position: absolute; width: 160px; height: 160px; right: -60px; top: -60px; border-radius: 50%;
  border: 1.5px solid rgba(127,230,255,.25); box-shadow: 0 0 0 20px rgba(127,230,255,.04), 0 0 0 40px rgba(127,230,255,.03);
}
.state__sym { font-size: 34px; color: var(--gold); text-shadow: 0 0 16px rgba(255,210,122,.6); display: block; margin-bottom: 12px; }
.state h3 { font-size: 19px; margin-bottom: 12px; }
.state ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15.5px; }
.state li { margin-bottom: 6px; }
.state li::marker { color: var(--cyan); }

/* final */
.final { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.final__img { border-radius: 50%; box-shadow: 0 0 40px rgba(127,230,255,.7), 0 0 100px rgba(87,170,255,.35); animation: float 6s ease-in-out infinite; }

/* footer */
.footer {
  width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 50px;
  border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 14px;
}
.footer__brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; color: var(--text); }
.footer__brand img { border-radius: 50%; }
.footer__legal { max-width: 720px; margin: 18px auto 10px; }
.footer__copy { margin: 0; opacity: .7; }

/* reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 110px; gap: 20px; }
  .hero__text { order: 2; }
  .hero__art { order: 1; width: min(420px, 88%); }
  .hero__cta { justify-content: center; }
  .eyebrow { justify-content: center; }
  .grid4, .steps, .states { grid-template-columns: repeat(2, 1fr); }
  .boxgame { grid-template-columns: 1fr; padding: 40px 28px; text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 70px 0; }
  .grid4, .steps, .states { grid-template-columns: 1fr; }
  .story::before { left: 24px; }
  .chapter { grid-template-columns: 50px 1fr; gap: 14px; }
  .chapter__num { width: 50px; height: 50px; font-size: 16px; }
  .chapter__body { padding: 22px 20px; }
  .nav__brand span { display: none; }
  .marquee__track { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
