:root {
  --sky: #a9e7ff;
  --cloud: #e9fbff;
  --ink: #131126;
  --shadow: #322f57;
  --panel: #fff8d8;
  --panel-alt: #ffe37f;
  --accent: #ff6b6b;
  --accent-2: #29d3c2;
  --accent-3: #ffd447;
  --screen: #18213d;
  --screen-2: #294575;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Press Start 2P", monospace;
  background:
    linear-gradient(to bottom, transparent 75%, rgba(255, 255, 255, 0.22) 75%),
    linear-gradient(180deg, #9de4ff 0%, #baf0ff 55%, #d8f8ff 100%);
  background-size: 100% 10px, 100% 100%;
  color: var(--ink);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 160px;
  background:
    radial-gradient(circle at 4% 100%, var(--cloud) 0 70px, transparent 72px),
    radial-gradient(circle at 18% 100%, var(--cloud) 0 84px, transparent 86px),
    radial-gradient(circle at 34% 100%, var(--cloud) 0 76px, transparent 78px),
    radial-gradient(circle at 50% 100%, var(--cloud) 0 92px, transparent 94px),
    radial-gradient(circle at 67% 100%, var(--cloud) 0 78px, transparent 80px),
    radial-gradient(circle at 82% 100%, var(--cloud) 0 64px, transparent 66px),
    radial-gradient(circle at 95% 100%, var(--cloud) 0 88px, transparent 90px);
  pointer-events: none;
  opacity: 0.95;
}

.transition-curtain {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
  opacity: 0;
  transform: none;
  background: rgba(19, 17, 38, 0.12);
}

.page-shell {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.16s ease-out,
    transform 0.16s ease-out;
}

html.is-entering .page-shell {
  opacity: 0;
  transform: translateY(4px);
}

html.is-entering .transition-curtain {
  opacity: 1;
  animation: curtain-open 0.2s ease-out forwards;
}

body.is-leaving {
  overflow: hidden;
}

body.is-leaving .page-shell {
  opacity: 0;
  transform: translateY(-4px);
}

body.is-leaving .transition-curtain {
  opacity: 1;
  animation: curtain-close 0.14s ease-out forwards;
}

.page-shell {
  position: relative;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 96px;
}

.guides-shell {
  padding-top: 72px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  min-height: 78vh;
}

.guides-hero {
  display: grid;
  gap: 28px;
  min-height: auto;
  margin-bottom: 44px;
}

.guides-copy {
  max-width: 900px;
}

.guides-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--white);
  text-shadow:
    6px 0 0 var(--ink),
    -6px 0 0 var(--ink),
    0 6px 0 var(--ink),
    0 -6px 0 var(--ink),
    12px 12px 0 var(--shadow);
}

.sticker {
  display: inline-block;
  position: absolute;
  top: 12px;
  left: 0;
  padding: 12px 18px;
  background: #ff4768;
  color: var(--white);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  transform: rotate(-10deg);
  font-size: 0.7rem;
  text-decoration: none;
}

.eyebrow,
.card-label {
  color: var(--shadow);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.pixel-title {
  margin: 16px 0 28px;
  line-height: 0.95;
  text-transform: uppercase;
  font-size: clamp(2.8rem, 8vw, 6.8rem);
}

.hero-logo {
  display: block;
  width: min(100%, 480px);
  margin: 22px 0 20px;
  filter: drop-shadow(10px 10px 0 var(--shadow));
}

.hero-signup {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  max-width: 540px;
}

.hero-signup input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 18px 20px;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.hero-signup input::placeholder {
  color: #57507e;
  opacity: 1;
}

.hero-signup input:focus-visible,
.sticker:focus-visible {
  outline: 4px solid var(--accent-2);
  outline-offset: 4px;
}

.signup-button {
  flex: 0 0 auto;
}

.hero-text,
.info-card p,
.feature-large li,
.feature-small p,
.join-banner p,
.faq-card p {
  font-size: 0.85rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-actions-secondary {
  margin-top: 18px;
  gap: 12px;
}

.hero-actions-secondary .pixel-button {
  padding: 12px 16px;
  font-size: 0.64rem;
  box-shadow: 6px 6px 0 var(--shadow);
}

.hero-actions-secondary .pixel-button:hover,
.hero-actions-secondary .pixel-button:focus-visible {
  box-shadow: 3px 3px 0 var(--shadow);
}

.pixel-button {
  display: inline-block;
  padding: 18px 22px;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.pixel-button.primary {
  background: var(--panel-alt);
}

.pixel-button.secondary {
  background: var(--white);
}

.pixel-button:hover,
.pixel-button:focus-visible,
.sticker:hover {
  transform: translate(4px, 4px);
  box-shadow: 4px 4px 0 var(--shadow);
}

.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;
}

.cabinet {
  justify-self: center;
  width: min(420px, 100%);
  padding: 18px;
  background: linear-gradient(180deg, #ffefb8 0%, #f7b546 100%);
  border: 6px solid var(--ink);
  box-shadow: 14px 14px 0 var(--shadow);
}

.screen-bezel {
  padding: 16px;
  background: #1e1c31;
  border: 4px solid var(--ink);
}

.screen {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(180deg, var(--screen) 0%, var(--screen-2) 100%);
  border: 4px solid #09070f;
  touch-action: manipulation;
}

.marquee {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  color: var(--panel-alt);
  font-size: 0.6rem;
}

.game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.screen-tip {
  position: absolute;
  top: 28px;
  right: 10px;
  z-index: 2;
  padding: 8px 9px 7px;
  background: rgba(19, 17, 38, 0.76);
  border: 2px solid rgba(255, 255, 255, 0.18);
  color: var(--panel);
  font-size: 0.42rem;
  line-height: 1.5;
  text-transform: uppercase;
}

.screen-tip p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.screen-tip p + p {
  margin-top: 4px;
}

.tip-chip {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
}

.tip-chip.token {
  background: #ffd447;
}

.tip-chip.shield {
  background: #29d3c2;
}

.screen-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: var(--panel);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.screen-hud strong {
  color: var(--panel-alt);
}

.screen-overlay {
  position: absolute;
  inset: auto 12px 54px;
  z-index: 2;
  padding: 10px 12px;
  background: rgba(19, 17, 38, 0.84);
  border: 3px solid rgba(255, 227, 127, 0.88);
  color: var(--panel);
}

.screen-overlay[hidden] {
  display: none;
}

.overlay-title,
.overlay-text {
  margin: 0;
}

.overlay-title {
  color: var(--panel-alt);
  font-size: 0.64rem;
}

.overlay-text {
  margin-top: 8px;
  font-size: 0.52rem;
  line-height: 1.6;
}

.screen-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

.pixel-sun {
  position: absolute;
  right: 48px;
  top: 60px;
  width: 72px;
  height: 72px;
  background: #ffd447;
  box-shadow:
    0 0 0 10px rgba(255, 212, 71, 0.18),
    0 0 0 22px rgba(255, 212, 71, 0.08);
}

.pixel-mountain {
  position: absolute;
  bottom: 0;
  clip-path: polygon(0 100%, 0 58%, 18% 38%, 34% 48%, 48% 28%, 64% 46%, 82% 22%, 100% 50%, 100% 100%);
}

.mountain-back {
  left: -4%;
  width: 108%;
  height: 42%;
  background: #5367b6;
}

.mountain-front {
  left: -6%;
  width: 112%;
  height: 28%;
  background: #8b9cdd;
}

.pixel-ship {
  position: absolute;
  left: 68px;
  bottom: 86px;
  width: 84px;
  height: 46px;
  background: #ff6b6b;
  clip-path: polygon(0 100%, 18% 52%, 38% 36%, 58% 20%, 100% 0, 84% 100%);
  animation: hover 2.6s steps(2, end) infinite;
}

.pixel-ship span {
  position: absolute;
  display: block;
  background: var(--white);
}

.pixel-ship span:nth-child(1) {
  inset: 8px 10px 10px auto;
  width: 12px;
}

.pixel-ship span:nth-child(2) {
  left: 10px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  background: #ffd447;
}

.pixel-ship span:nth-child(3) {
  left: 28px;
  bottom: -16px;
  width: 12px;
  height: 24px;
  background: #29d3c2;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-top: 18px;
  padding: 18px 10px 6px;
}

.joystick {
  position: relative;
  width: 108px;
  height: 90px;
  border: 4px solid var(--ink);
  background: #2a2740;
  padding: 0;
  cursor: pointer;
}

.stick {
  position: absolute;
  left: 45px;
  bottom: 18px;
  width: 18px;
  height: 46px;
  background: #0f0d1c;
}

.ball {
  position: absolute;
  left: 34px;
  top: 4px;
  width: 40px;
  height: 40px;
  background: var(--accent);
}

.buttons {
  display: flex;
  gap: 12px;
}

.button {
  display: block;
  width: 34px;
  height: 34px;
  border: 4px solid var(--ink);
  padding: 0;
  cursor: pointer;
}

.button.red {
  background: var(--accent);
}

.button.yellow {
  background: var(--accent-3);
}

.button.blue {
  background: var(--accent-2);
}

.joystick:hover,
.joystick:focus-visible,
.button:hover,
.button:focus-visible,
.screen:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

.side-panel {
  position: absolute;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 30;
}

.side-panel.right {
  right: -96px;
}

.side-panel a {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 18px 10px;
  background: var(--white);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.75rem;
}

main {
  display: grid;
  gap: 28px;
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
  padding: 18px 20px;
  text-align: center;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.site-footer a,
.site-footer span {
  display: inline-block;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--shadow);
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--shadow);
}

.info-strip,
.feature-grid,
.rewards-strip,
.gallery,
.faq {
  display: grid;
  gap: 24px;
}

.info-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.feature-large,
.feature-small,
.reward-card,
.gallery-card,
.join-banner,
.faq-card {
  padding: 28px;
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--shadow);
}

.info-card,
.feature-small,
.reward-card,
.faq-card {
  background: rgba(255, 255, 255, 0.82);
}

.feature-grid {
  grid-template-columns: 1fr;
}

.feature-large {
  background: var(--panel);
}

.feature-wide {
  padding: 36px;
  background: linear-gradient(180deg, rgba(255, 248, 216, 0.97) 0%, rgba(255, 252, 241, 0.97) 100%);
}

.feature-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  margin-bottom: 28px;
}

.feature-heading h2 {
  margin: 12px 0 0;
  line-height: 1.45;
}

.feature-note {
  max-width: 280px;
  margin: 0;
  color: var(--shadow);
  font-size: 0.7rem;
  line-height: 1.8;
  text-align: right;
}

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

.qualify-item {
  padding: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 4px solid var(--ink);
}

.qualify-item p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.9;
}

.qualify-number {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--shadow);
  font-size: 0.72rem;
}

.rewards-strip {
  grid-template-columns: 0.9fr 1fr 1fr 1fr;
  gap: 28px;
  margin-top: 22px;
  margin-bottom: 26px;
  align-items: stretch;
}

.rewards-intro {
  padding: 12px 8px 12px 0;
}

.rewards-intro h2 {
  margin: 14px 0 16px;
  line-height: 1.45;
}

.rewards-intro p:last-child {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.9;
}

.reward-card {
  background: linear-gradient(180deg, #fff4bf 0%, #ffd86c 100%);
  padding-top: 24px;
}

.reward-card h3,
.faq-card h3 {
  line-height: 1.5;
}

.join-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, #fff2b3 0%, #ffc56a 100%);
}

.faq {
  grid-template-columns: 1fr;
  margin-bottom: 48px;
  gap: 16px;
}

.faq-intro {
  margin-bottom: 8px;
}

.faq-intro h2 {
  margin: 12px 0 0;
  line-height: 1.4;
}

.faq-item {
  background: rgba(255, 255, 255, 0.86);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--shadow);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 28px;
  position: relative;
  font-size: 0.82rem;
  line-height: 1.6;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  font-size: 1rem;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  margin: 0;
  padding: 0 28px 24px;
  font-size: 0.78rem;
  line-height: 1.9;
}

.gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 56px;
}

.gallery-intro {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

.gallery-intro h2 {
  margin: 12px 0 16px;
  line-height: 1.35;
}

.gallery-intro p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.9;
}

.gallery-card {
  background: rgba(255, 255, 255, 0.9);
}

.gallery-card h3 {
  margin: 20px 0 12px;
  line-height: 1.5;
}

.gallery-card p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.85;
}

.gallery-art {
  height: 168px;
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.neon-racer {
  background:
    linear-gradient(180deg, #20173b 0%, #50388c 55%, #ff7b72 100%);
}

.slime-jump {
  background:
    linear-gradient(180deg, #1f3a2d 0%, #3ca55c 52%, #d3ff80 100%);
}

.astro-panic {
  background:
    linear-gradient(180deg, #070b1f 0%, #1e3177 50%, #55d6ff 100%);
}

.ghost-kart {
  background:
    linear-gradient(180deg, #251737 0%, #6a3ca2 52%, #ffd447 100%);
}

.guides-main {
  display: grid;
  gap: 34px;
}

.guide-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.guide-card,
.guides-note {
  padding: 28px;
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--shadow);
}

.guide-card {
  background: rgba(255, 255, 255, 0.9);
}

.guide-card h2,
.guides-note h2 {
  margin: 14px 0 18px;
  line-height: 1.45;
}

.guide-card p,
.guides-note p {
  margin: 0 0 22px;
  font-size: 0.76rem;
  line-height: 1.85;
}

.guide-card .pixel-button,
.guides-note .pixel-button {
  padding: 14px 18px;
  font-size: 0.65rem;
}

.guides-note {
  background: linear-gradient(135deg, #fff2b3 0%, #ffc56a 100%);
  grid-column: 1 / -1;
}

@keyframes curtain-close {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes curtain-open {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes hover {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@media (max-width: 1180px) {
  .side-panel {
    display: none;
  }

  .page-shell {
    width: min(calc(100% - 32px), 1040px);
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 64px;
  }

  .cabinet {
    width: min(480px, 100%);
  }

  .info-strip,
  .feature-grid,
  .rewards-strip,
  .gallery,
  .faq {
    grid-template-columns: 1fr;
  }

  .join-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .guide-gallery {
    grid-template-columns: 1fr;
  }

  .feature-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .feature-note {
    max-width: none;
    text-align: left;
  }

  .qualify-grid {
    grid-template-columns: 1fr;
  }

  .rewards-intro {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 20px), 100%);
    padding-bottom: 72px;
  }

  .sticker {
    left: 6px;
    top: 8px;
    font-size: 0.58rem;
  }

  .hero-logo {
    width: min(100%, 420px);
    margin-top: 12px;
    filter: drop-shadow(8px 8px 0 var(--shadow));
  }

  .guides-copy h1 {
    text-shadow:
      4px 0 0 var(--ink),
      -4px 0 0 var(--ink),
      0 4px 0 var(--ink),
      0 -4px 0 var(--ink),
      8px 8px 0 var(--shadow);
  }

  .hero-signup {
    gap: 12px;
  }

  .hero-signup input,
  .signup-button {
    width: 100%;
  }

  .hero-text,
  .info-card p,
  .qualify-item p,
  .feature-large li,
  .feature-small p,
  .rewards-intro p,
  .gallery-intro p,
  .gallery-card p,
  .guide-card p,
  .guides-note p,
  .join-banner p,
  .faq-item p {
    font-size: 0.72rem;
  }

  .faq-item summary {
    padding: 20px 22px;
    font-size: 0.72rem;
  }

  .faq-item p {
    padding: 0 22px 20px;
  }

  .pixel-button {
    width: 100%;
    text-align: center;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions-secondary .pixel-button {
    width: auto;
  }
}
