:root {
  --bg: #001065;
  --bg-alt: #000d52;
  --ink: #00031a;
  --outline: #001065;
  --panel: #000f5c;
  --line: #2d2fd8;
  --blue-700: #031ca5;
  --blue-500: #002fff;
  --violet-500: #4e3bff;
  --violet-400: #6749fe;
  --lavender: #8f78ff;
  --lav-200: #c4b8ff;
  --text: #ecebff;
  --muted: #a9acdf;

  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --pixel-s: 'Tiny5', 'Press Start 2P', ui-monospace, monospace;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

:focus-visible { outline: 3px dashed var(--lavender); outline-offset: 4px; }

/* ---------- pixel panel ---------- */
.px {
  background: var(--panel);
  box-shadow:
    0 0 0 4px var(--line),
    inset 4px 4px 0 rgba(143, 120, 255, .28),
    inset -4px -4px 0 rgba(0, 0, 10, .4);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 40, .55);
  background: var(--violet-500);
  border: 0;
  padding: 17px 24px;
  cursor: pointer;
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, .3),
    inset 0 -6px 0 rgba(0, 0, 30, .4),
    0 0 0 4px var(--ink),
    0 6px 0 4px var(--ink);
  transition: transform .08s, background .12s, box-shadow .08s;
}
.btn:hover { background: var(--violet-400); transform: translateY(-2px); }
.btn:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, .3),
    inset 0 -6px 0 rgba(0, 0, 30, .4),
    0 0 0 4px var(--ink),
    0 2px 0 4px var(--ink);
}
.btn--ghost { background: var(--blue-700); }
.btn--ghost:hover { background: var(--blue-500); }
.btn--sm { font-family: var(--pixel-s); font-size: 20px; letter-spacing: .02em; padding: 8px 16px; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(0, 6, 34, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 4px solid var(--outline);
}
.nav__in { display: flex; align-items: center; gap: 20px; height: 68px; }
.nav__logo img { height: 38px; width: auto; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  font-family: var(--pixel-s);
  font-size: 22px;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  transition: color .12s, background .12s;
}
.nav__links a:hover { color: #fff; background: rgba(143, 120, 255, .2); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: max(680px, 100svh);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #00021a 0%, #00093f 30%, #0a1590 66%, #3a30f0 86%, #6a4dff 100%);
}
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.hero__in {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
  padding: 112px 0 170px;
}
.hero__logo {
  width: min(700px, 88vw);
  filter: drop-shadow(0 0 44px rgba(78, 59, 255, .6));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero__tag {
  max-width: 560px;
  font-size: 20px;
  color: #d9d6ff;
  text-shadow: 0 2px 12px rgba(0, 3, 26, .8);
}
.hero__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 4px; }

/* ---------- IP box ---------- */
.ip {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: #fff;
  background: #00104f;
  box-shadow:
    0 0 0 4px var(--ink),
    0 8px 0 4px var(--ink),
    inset 4px 4px 0 rgba(143, 120, 255, .22),
    inset -4px -4px 0 rgba(0, 0, 10, .45);
  transition: transform .08s;
}
.ip:hover { transform: translateY(-2px); }
.ip:active { transform: translateY(4px); }
.ip__label, .ip__action { display: grid; place-items: center; font-family: var(--pixel); }
.ip__label {
  padding: 0 18px;
  font-size: 16px;
  background: var(--violet-500);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .3), inset 0 -6px 0 rgba(0, 0, 30, .4);
}
.ip__value {
  font-family: var(--pixel);
  font-size: 18px;
  padding: 20px 24px;
  overflow-wrap: anywhere;
}
.ip__action {
  min-width: 176px;
  padding: 0 18px;
  font-size: 12px;
  background: var(--blue-500);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .3), inset 0 -6px 0 rgba(0, 0, 30, .4);
}
.ip.is-copied .ip__action { background: #1f9d63; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  font-family: var(--pixel-s);
  font-size: 21px;
  background: rgba(0, 3, 26, .55);
  box-shadow: 0 0 0 3px rgba(78, 59, 255, .55);
}
.chip b { color: var(--lav-200); font-weight: 700; }
.dot { width: 12px; height: 12px; background: #7d82c9; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .3); }
.dot--on { background: #4dff9c; animation: blink 1.6s steps(2) infinite; }
.dot--off { background: #ff5c7a; }
.dot--preparing { background: var(--lavender); }
@keyframes blink { 50% { opacity: .45; } }

/* ---------- sections ---------- */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); border-block: 4px solid #00106a; }

.head { max-width: 640px; margin-bottom: 56px; }
.eyebrow {
  font-family: var(--pixel-s);
  font-size: 22px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 10px;
}
h2 {
  font-family: var(--pixel);
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.4;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 3, 26, .7);
}
h2::after {
  content: '';
  display: block;
  width: 72px;
  height: 8px;
  margin-top: 16px;
  background: linear-gradient(90deg, var(--violet-500) 0 48px, var(--lavender) 48px);
}
.lead { margin-top: 18px; color: var(--muted); font-size: 19px; }

h3 { font-family: var(--pixel); font-size: 14px; line-height: 1.55; color: #fff; }

/* ---------- features ---------- */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.card { padding: 30px 26px 32px; transition: transform .15s; }
.card:hover { transform: translateY(-4px); }
.card__icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  background: linear-gradient(180deg, var(--blue-500), var(--violet-500) 60%, var(--lavender));
  box-shadow: 0 0 0 4px var(--ink), inset 4px 4px 0 rgba(255, 255, 255, .22), inset -4px -4px 0 rgba(0, 0, 30, .35);
}
.pxicon { display: block; line-height: 0; }
.pxicon svg { display: block; }
.card p { margin-top: 10px; color: var(--muted); }

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step { position: relative; padding: 78px 24px 28px; counter-increment: step; }
.step::before {
  content: counter(step);
  position: absolute;
  top: 18px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: var(--pixel);
  font-size: 18px;
  color: #fff;
  background: var(--violet-500);
  box-shadow: 0 0 0 4px var(--ink), inset 0 4px 0 rgba(255, 255, 255, .3), inset 0 -4px 0 rgba(0, 0, 30, .4);
}
.step p { margin-top: 10px; color: var(--muted); }
.step b { color: var(--lav-200); }
.join__ip { display: flex; justify-content: center; margin-top: 64px; }

/* ---------- rules ---------- */
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 0; padding: 0; list-style: none; }
.rule { display: flex; gap: 20px; align-items: flex-start; padding: 24px 26px; }
.rule > b {
  flex: none;
  font-family: var(--pixel);
  font-size: 24px;
  line-height: 1;
  color: var(--lavender);
  text-shadow: 0 3px 0 rgba(0, 3, 26, .7);
}
.rule h3 { font-size: 13px; }
.rule p { margin-top: 6px; color: var(--muted); }

/* ---------- community ---------- */
.cta {
  position: relative;
  padding: 64px 32px;
  text-align: center;
  background:
    repeating-conic-gradient(rgba(255, 255, 255, .045) 0 25%, transparent 0 50%) 0 0 / 40px 40px,
    linear-gradient(135deg, var(--blue-700), var(--violet-500) 70%, var(--lavender));
  box-shadow: 0 0 0 4px var(--ink), inset 4px 4px 0 rgba(255, 255, 255, .25), inset -4px -4px 0 rgba(0, 0, 30, .4);
}
.cta h2::after { margin-inline: auto; }
.cta p { margin: 18px auto 0; max-width: 520px; color: #e4e0ff; font-size: 19px; }
.cta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 34px; }
.cta .btn { background: var(--outline); }
.cta .btn:hover { background: #0a1c8a; }

/* ---------- footer ---------- */
.foot { border-top: 4px solid var(--outline); padding: 32px 0; background: #00062b; }
.foot__in { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; }
.foot img { width: 96px; }
.foot p { color: var(--muted); font-size: 15px; }
.foot__up { margin-left: auto; font-family: var(--pixel-s); font-size: 22px; text-decoration: none; color: var(--lavender); }
.foot__up:hover { color: #fff; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .grid4, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; }
  .section { padding: 72px 0; }
  .rules { grid-template-columns: 1fr; }
  .hero__in { padding: 100px 0 150px; gap: 22px; }
  .hero__tag { font-size: 18px; }
}
@media (max-width: 560px) {
  .grid4, .steps { grid-template-columns: 1fr; }
  .ip__label { display: none; }
  .ip { flex-direction: column; width: 100%; max-width: 360px; }
  .ip__value { font-size: 13px; padding: 20px 12px; text-align: center; }
  .ip__action { min-width: 0; font-size: 11px; padding: 14px 12px; }
  .btn { font-size: 12px; padding: 15px 18px; }
  .cta { padding: 48px 20px; }
  .foot__up { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__logo, .dot--on { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
