:root {
  color-scheme: dark;
  --ink: #071018;
  --night: #071829;
  --deep: #0b2f64;
  --blue: #0d67cf;
  --cyan: #24e8ff;
  --lime: #b9ff1f;
  --yellow: #ffd92f;
  --gold: #f5a90b;
  --orange: #ff7a1a;
  --cream: #fff6cf;
  --white: #ffffff;
  --muted: #a7cef3;
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 28px 90px rgba(0, 10, 30, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 217, 47, 0.28), transparent 24rem),
    radial-gradient(circle at 80% 8%, rgba(36, 232, 255, 0.18), transparent 28rem),
    linear-gradient(180deg, #0a3978 0, #071829 42%, #071018 100%);
  overflow-x: hidden;
}

a,
button {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.site-shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 24px));
  overflow: hidden;
  border: 2px solid rgba(36, 232, 255, 0.45);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 217, 47, 0.16), transparent 35%),
    radial-gradient(circle at 70% 55%, rgba(255, 217, 47, 0.32), transparent 22rem),
    linear-gradient(160deg, #0e55a8 0, #0a3269 42%, #061c34 100%);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.hero::before {
  width: 620px;
  height: 620px;
  right: -210px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 255, 31, 0.24), transparent 58%);
}

.hero::after {
  left: -40px;
  bottom: -80px;
  width: 110%;
  height: 190px;
  background:
    linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.12) 18px 28px, transparent 28px) 0 0 / 46px 46px,
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.brand span:last-child {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.brand em {
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.brand-face {
  position: relative;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  border-radius: 18px 18px 22px 22px;
  background: linear-gradient(180deg, #fff27a, var(--yellow));
  box-shadow: 0 5px 0 var(--ink);
  transform: rotate(-5deg);
}

.brand-face::before,
.brand-face::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
}

.brand-face::before {
  left: 11px;
}

.brand-face::after {
  right: 11px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav-links a,
.btn,
.contract-card button,
.portal-links a,
.mobile-controls button {
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 5px 0 var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.nav-links a {
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 900;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 1000;
}

.btn-primary {
  background: linear-gradient(180deg, #fff27a, var(--yellow));
}

.nav-links a:active,
.btn:active,
.contract-card button:active,
.portal-links a:active,
.mobile-controls button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  gap: 24px;
  align-items: center;
  padding: 54px 44px 74px;
}

.tag {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 14px;
  font-weight: 1000;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  color: #fff;
  font-size: clamp(58px, 11vw, 148px);
  line-height: 0.83;
  text-transform: uppercase;
  text-shadow: 0 7px 0 rgba(0, 0, 0, 0.28);
}

.hero-text {
  max-width: 600px;
  margin: 26px 0 0;
  color: #e5f6ff;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.25;
  font-weight: 800;
}

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

.contract-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  max-width: 660px;
  margin-top: 22px;
  padding: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  background: rgba(2, 14, 28, 0.54);
}

.contract-card span {
  grid-column: 1 / -1;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.contract-card code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff7b5;
  font-size: 12px;
}

.contract-card button {
  padding: 9px 13px;
  border-radius: 10px;
  font-weight: 1000;
}

.hero-art {
  position: relative;
  min-height: 560px;
}

.moon {
  position: absolute;
  right: 4%;
  top: 7%;
  width: 145px;
  height: 145px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff7b5;
  box-shadow: 0 10px 0 var(--ink);
  opacity: 0.95;
}

.rocket {
  position: absolute;
  right: 25%;
  top: 18%;
  width: 68px;
  height: 140px;
  border: 3px solid var(--ink);
  border-radius: 40px 40px 18px 18px;
  background: linear-gradient(180deg, #fff, #dff8ff);
  transform: rotate(18deg);
  box-shadow: 0 8px 0 var(--ink);
}

.rocket::before,
.rocket::after {
  content: "";
  position: absolute;
  bottom: 24px;
  width: 25px;
  height: 38px;
  border: 3px solid var(--ink);
  background: var(--cyan);
}

.rocket::before {
  left: -22px;
  border-radius: 18px 0 8px 18px;
}

.rocket::after {
  right: -22px;
  border-radius: 0 18px 18px 8px;
}

.rocket span {
  position: absolute;
  left: 50%;
  bottom: -82px;
  width: 38px;
  height: 86px;
  border-radius: 50% 50% 60% 60%;
  background: linear-gradient(180deg, var(--yellow), var(--orange), transparent);
  transform: translateX(-50%);
}

.minon-giant {
  position: absolute;
  left: 50%;
  bottom: 58px;
  width: min(390px, 75vw);
  height: min(420px, 80vw);
  border: 5px solid var(--ink);
  border-radius: 48% 48% 36% 36%;
  background:
    radial-gradient(circle at 35% 20%, #fff8a8 0 36px, transparent 37px),
    linear-gradient(180deg, #ffec5e 0, var(--yellow) 62%, #244fa9 63%, #163575 100%);
  box-shadow: 0 16px 0 var(--ink), 0 40px 80px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%) rotate(-2deg);
  animation: floaty 3.2s ease-in-out infinite;
}

.minon-giant::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 32%;
  width: 230px;
  height: 72px;
  border: 8px solid var(--ink);
  border-radius: 999px;
  background: #cfe7ff;
  transform: translateX(-50%);
}

.minon-giant::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 58px;
  height: 58px;
  border: 5px solid var(--ink);
  border-radius: 50%;
  background:
    radial-gradient(circle at 54% 56%, var(--ink) 0 8px, transparent 9px),
    #fff;
  box-shadow: -68px 0 0 #fff, -68px 0 0 5px var(--ink), 68px 0 0 #fff, 68px 0 0 5px var(--ink);
  transform: translateX(-50%);
}

.minon-giant i {
  position: absolute;
  left: 50%;
  top: 53%;
  width: 88px;
  height: 40px;
  border-bottom: 7px solid var(--ink);
  border-radius: 50%;
  transform: translateX(-50%);
}

.banana {
  position: absolute;
  width: 82px;
  height: 46px;
  border-bottom: 15px solid var(--yellow);
  border-radius: 0 0 80px 80px;
  filter: drop-shadow(0 5px 0 var(--ink));
  animation: spinBanana 4s linear infinite;
}

.banana::before,
.banana::after {
  content: "";
  position: absolute;
  bottom: -8px;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 2px;
}

.banana::before {
  left: 8px;
}

.banana::after {
  right: 8px;
}

.b1 {
  left: 3%;
  top: 15%;
}

.b2 {
  right: 7%;
  bottom: 19%;
  animation-delay: -1.3s;
}

.b3 {
  left: 20%;
  bottom: 7%;
  animation-delay: -2.1s;
}

.ticker {
  width: 100vw;
  margin: 28px 0 28px 50%;
  transform: translateX(-50%);
  overflow: hidden;
  border-block: 2px solid rgba(36, 232, 255, 0.22);
  background: #082b55;
}

.ticker div {
  display: flex;
  width: max-content;
  animation: ticker 26s linear infinite;
}

.ticker span {
  display: inline-flex;
  align-items: center;
  min-height: 72px;
  padding: 0 28px;
  color: var(--cyan);
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.stats-band,
.story-grid,
.game-section {
  position: relative;
  z-index: 1;
}

.stats-band {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(160px, 0.7fr));
  gap: 14px;
}

.stats-band article,
.mission,
.buy-box,
.game-card {
  border: 2px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.stats-band article {
  min-height: 132px;
  padding: 18px;
}

.stats-band span,
.score-pill span {
  display: block;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.stats-band strong,
.score-pill strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1;
}

.stats-band small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.progress {
  height: 18px;
  margin-top: 18px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
}

.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--lime), var(--cyan));
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
}

.mission,
.buy-box {
  padding: 26px;
}

.mission h2,
.buy-box h2,
.game-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
  text-transform: uppercase;
}

.mission p,
.game-copy p {
  max-width: 720px;
  color: #d8eeff;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 700;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.steps div {
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
}

.steps b,
.steps span {
  display: block;
}

.steps b {
  color: var(--yellow);
  font-size: 24px;
}

.steps span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 900;
}

.portal-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.portal-links a {
  min-height: 96px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--cream), #ffe88a);
}

.portal-links b,
.portal-links span {
  display: block;
}

.portal-links b {
  font-size: 26px;
  line-height: 1;
}

.portal-links span {
  margin-top: 8px;
  color: #5d4b14;
  font-weight: 900;
}

.game-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(0, 1.42fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.game-copy {
  position: sticky;
  top: 18px;
  min-height: 320px;
  padding: 28px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 217, 47, 0.28), transparent 12rem),
    rgba(255, 255, 255, 0.08);
  border: 2px solid var(--line);
}

.game-card {
  padding: 16px;
}

.game-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.score-pill {
  min-width: 0;
  padding: 13px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: rgba(4, 19, 36, 0.72);
}

.score-pill strong {
  font-size: 28px;
}

.canvas-frame {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #89dcff;
  aspect-ratio: 15 / 8.7;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  background: rgba(4, 18, 34, 0.28);
  backdrop-filter: blur(2px);
}

.game-overlay strong {
  color: var(--yellow);
  font-size: clamp(42px, 9vw, 88px);
  line-height: 0.9;
  text-shadow: 0 6px 0 var(--ink);
}

.game-overlay span {
  color: #fff;
  font-size: 20px;
  font-weight: 1000;
}

.game-overlay.is-hidden {
  display: none;
}

.mobile-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 12px;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.mobile-controls > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.mobile-controls button {
  min-height: 48px;
  border-radius: 14px;
  background: var(--cream);
  font-size: 24px;
  font-weight: 1000;
  touch-action: none;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateX(-50%) translateY(-18px) rotate(2deg);
  }
}

@keyframes spinBanana {
  from {
    transform: rotate(0deg) translateY(0);
  }
  50% {
    transform: rotate(14deg) translateY(-18px);
  }
  to {
    transform: rotate(360deg) translateY(0);
  }
}

@media (max-width: 980px) {
  .hero {
    min-height: 0;
  }

  .hero-grid,
  .story-grid,
  .game-section,
  .stats-band {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 490px;
  }

  .game-copy {
    position: static;
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 16px, 1220px);
    padding-top: 8px;
  }

  .hero {
    border-radius: 20px;
  }

  .nav {
    align-items: flex-start;
    padding: 14px;
  }

  .brand-face {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    font-size: 19px;
  }

  .nav-links {
    max-width: 185px;
    gap: 7px;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 12px;
  }

  .hero-grid {
    gap: 8px;
    padding: 34px 14px 34px;
  }

  .hero-copy h1 {
    font-size: clamp(54px, 18vw, 82px);
  }

  .hero-text {
    font-size: 19px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions .btn-primary {
    grid-column: 1 / -1;
  }

  .contract-card {
    grid-template-columns: 1fr;
  }

  .contract-card button {
    justify-self: start;
  }

  .hero-art {
    min-height: 360px;
  }

  .moon {
    width: 92px;
    height: 92px;
  }

  .rocket {
    right: 12%;
    top: 12%;
    width: 46px;
    height: 98px;
  }

  .minon-giant {
    width: 245px;
    height: 270px;
    bottom: 24px;
  }

  .minon-giant::before {
    width: 150px;
    height: 50px;
  }

  .minon-giant::after {
    width: 39px;
    height: 39px;
    box-shadow: -45px 0 0 #fff, -45px 0 0 4px var(--ink), 45px 0 0 #fff, 45px 0 0 4px var(--ink);
  }

  .ticker {
    margin-block: 18px;
  }

  .ticker span {
    min-height: 56px;
    padding: 0 18px;
  }

  .stats-band article,
  .mission,
  .buy-box,
  .game-copy,
  .game-card {
    border-radius: 18px;
  }

  .steps,
  .portal-links,
  .game-top {
    grid-template-columns: 1fr;
  }

  .mission,
  .buy-box,
  .game-copy {
    padding: 18px;
  }

  .mission p,
  .game-copy p {
    font-size: 17px;
  }

  .game-top .btn {
    min-height: 46px;
  }
}
