/* ============================================================
   WONDER — playwonder.fun
   Palette sampled from the banner art. Materials, not roles.
   ============================================================ */
:root {
  /* sky & light */
  --sky-deep:   #1e3b81;
  --sky-purple: #5e4590;
  --cloud-pink: #955784;
  --sunset:     #ed815d;
  --sun:        #fdf4c2;
  /* land */
  --snow:       #faf3dc;
  --mtn:        #42778b;
  --mtn-dark:   #094f8b;
  --forest:     #00212a;
  --leaf:       #2a705c;
  --grass:      #698205;
  /* water */
  --water:      #7bb0c7;
  --water-deep: #0f4876;
  /* materials */
  --path:       #edb060;
  --wood:       #543828;
  --wood-dark:  #2e1e14;
  --gold:       #c86c02;
  --gold-lite:  #edb060;
  --ice:        #80c9e5;
  --ice-lite:   #a5e6ea;
  --parchment:  #f4e7c8;
  --ink:        #10131f;
  --night:      #0c1626;
  --night-2:    #0a1120;

  --font-display: "Press Start 2P", monospace;
  --font-body: "Pixelify Sans", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--night);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.55;
  overflow-x: hidden;
  /* sparse pixel starfield on the page ground */
  background-image:
    radial-gradient(rgba(165,230,234,.20) 1px, transparent 1px),
    radial-gradient(rgba(165,230,234,.09) 1px, transparent 1px);
  background-size: 240px 240px, 170px 170px;
  background-position: 0 0, 90px 120px;
}
img { display: block; max-width: 100%; }
a { color: var(--ice); }

::selection { background: var(--gold); color: var(--ink); }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
  background: var(--night-2);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 3px 0 rgba(0,0,0,.45);
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 13px;
  color: var(--ice-lite); text-decoration: none;
  text-shadow: 2px 2px 0 var(--ink);
}
.nav-sword { width: 20px; height: 20px; image-rendering: pixelated; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a {
  font-family: var(--font-display); font-size: 9px;
  color: var(--parchment); text-decoration: none; line-height: 1.8;
}
.nav-links a:hover { color: var(--gold-lite); }
.snd-btn {
  font-family: var(--font-display); font-size: 8px;
  background: var(--wood-dark); color: var(--gold-lite);
  border: 2px solid var(--ink); padding: 5px 7px; cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
}
.snd-btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--ink); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px; line-height: 1;
  text-decoration: none; text-align: center;
  padding: 15px 22px 13px;
  border: 3px solid var(--ink);
  cursor: pointer;
  transition: transform 90ms steps(2, end), box-shadow 90ms steps(2, end);
}
.btn-gold {
  background: var(--gold); color: var(--sun);
  text-shadow: 0 2px 0 var(--wood-dark);
  box-shadow: 0 5px 0 var(--wood-dark);
}
.btn-ice {
  background: var(--water-deep); color: var(--ice-lite);
  text-shadow: 0 2px 0 var(--ink);
  box-shadow: 0 5px 0 var(--ink);
}
.btn:hover  { transform: translateY(2px); }
.btn-gold:hover { box-shadow: 0 3px 0 var(--wood-dark); }
.btn-ice:hover  { box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(5px); }
.btn-gold:active { box-shadow: 0 0 0 var(--wood-dark); }
.btn-ice:active  { box-shadow: 0 0 0 var(--ink); }
.btn-sm { font-size: 10px; padding: 11px 14px 10px; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: clamp(760px, 104vh, 1050px);
  overflow: hidden;
  border-bottom: 4px solid var(--ink);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  cursor: crosshair;
}
.hero-in {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding: 118px 16px 0;
  text-align: center;
  pointer-events: none;
}
.hero-in a, .hero-in button { pointer-events: auto; }

.wordmark {
  font-family: var(--font-display);
  font-size: clamp(44px, 9vw, 92px);
  color: var(--ice-lite);
  letter-spacing: 4px;
  text-shadow:
    -4px 0 0 var(--ink), 4px 0 0 var(--ink),
    0 -4px 0 var(--ink), 0 4px 0 var(--ink),
    -4px -4px 0 var(--ink), 4px -4px 0 var(--ink),
    -4px 4px 0 var(--ink), 4px 4px 0 var(--ink),
    0 9px 0 var(--ink);
}
.wordmark-under {
  width: min(560px, 72vw); height: 8px; margin-top: 18px;
  background: var(--gold);
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.4);
}
.tagline {
  /* Pixelify, not the arcade face — Press Start 2P's "8" reads as "&" */
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(19px, 3vw, 26px);
  line-height: 1.6;
  color: var(--sun);
  text-shadow: 2px 2px 0 var(--ink);
  margin-top: 26px;
  min-height: 3.3em;
  max-width: 700px;
}
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-cta { display: flex; gap: 18px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }
.chip {
  margin-top: 24px;
  font-family: var(--font-display); font-size: 9px; line-height: 1.8;
  color: var(--gold-lite); text-decoration: none;
  background: rgba(16,19,31,.82);
  border: 2px solid var(--gold);
  padding: 8px 13px;
  box-shadow: 0 3px 0 var(--ink);
}
.chip:hover { color: var(--sun); }
.hero-hint {
  margin-top: 16px;
  font-size: 16px; color: var(--ice);
  text-shadow: 1px 1px 0 var(--ink);
  opacity: .85;
}
.scroll-hint {
  position: absolute; left: 50%; bottom: 12px; z-index: 2;
  transform: translateX(-50%);
  font-family: var(--font-display); font-size: 16px;
  color: var(--sun); text-decoration: none;
  text-shadow: 2px 2px 0 var(--ink);
  animation: bob 1.2s steps(2, end) infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* ============ SECTIONS ============ */
.section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 90px 20px 30px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(15px, 3vw, 24px);
  line-height: 1.7;
  color: var(--ice-lite);
  text-align: center;
  text-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 46px;
}
.section-title span {
  display: inline-block;
  border-bottom: 6px solid var(--gold);
  padding: 0 10px 14px;
}

/* reveal-on-scroll: stepped, no easing */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal-left  { transform: translate(-46px, 0); }
.reveal-right { transform: translate(46px, 0); }
.reveal.on {
  opacity: 1; transform: translate(0, 0);
  transition: opacity 280ms steps(5, end), transform 280ms steps(5, end);
}
.cards .reveal:nth-child(2).on { transition-delay: 110ms; }
.cards .reveal:nth-child(3).on { transition-delay: 220ms; }

.panel {
  border: 3px solid var(--ink);
  box-shadow: 0 6px 0 rgba(0,0,0,.5);
  padding: 24px 26px;
}
.parchment {
  background: var(--parchment);
  color: var(--wood-dark);
  border-color: var(--wood);
  outline: 2px solid var(--ink);
}
.parchment p { margin-bottom: 14px; }
.parchment p:last-child { margin-bottom: 0; }
.parchment b { color: var(--gold); }
.quote {
  font-family: var(--font-display); font-size: 9px; line-height: 1.9;
  color: var(--leaf);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
}

.world-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch;
}

/* ============ CLASSES ============ */
.class-picker {
  position: relative;
  width: min(560px, 92vw);
  margin: 0 auto 26px;
  border: 3px solid var(--wood);
  outline: 2px solid var(--ink);
  box-shadow: 0 6px 0 rgba(0,0,0,.5);
  background: var(--night-2);
}
.class-picker img { width: 100%; image-rendering: pixelated; display: block; }
.class-hot {
  position: absolute; top: 20%; height: 48%; width: 21%;
  background: none; border: 3px solid transparent; cursor: pointer;
  transition: border-color 90ms steps(2, end);
}
.class-hot:hover { border-color: var(--gold); }
.class-hot[data-c="0"] { left: 4%; }
.class-hot[data-c="1"] { left: 28%; }
.class-hot[data-c="2"] { left: 52%; }
.class-hot[data-c="3"] { left: 76%; }

.class-tabs {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 26px;
}
.class-tab {
  font-family: var(--font-display); font-size: 11px; line-height: 1;
  padding: 13px 16px 11px;
  background: var(--night-2); color: var(--parchment);
  border: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 90ms steps(2, end), box-shadow 90ms steps(2, end);
}
.class-tab:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.class-tab.on {
  background: var(--class-col); color: var(--sun);
  text-shadow: 0 2px 0 var(--ink);
  border-color: var(--ink);
}
.class-stage {
  max-width: 980px; margin: 0 auto;
  background: var(--wood-dark);
  border: 3px solid var(--gold);
  outline: 3px solid var(--ink);
  box-shadow: 0 8px 0 rgba(0,0,0,.55);
  padding: 10px;
  cursor: zoom-in;
}
.class-stage img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  image-rendering: pixelated; display: block;
}
.class-stage.swap img { animation: classswap 220ms steps(4); }
@keyframes classswap {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
.class-tag {
  font-family: var(--font-display); font-size: 10px; line-height: 1.8;
  color: var(--gold-lite); text-align: center;
  padding: 12px 6px 4px;
}

/* ============ JOURNEY CTA ============ */
.journey-grid {
  display: grid; grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 40px; align-items: center; justify-content: center;
}
.journey-art {
  border: 3px solid var(--gold);
  outline: 3px solid var(--ink);
  box-shadow: 0 8px 0 rgba(0,0,0,.55);
  background: var(--night-2);
}
.journey-art img { width: 100%; image-rendering: pixelated; display: block; }
.journey-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 3.4vw, 30px); line-height: 1.6;
  color: var(--sun);
  text-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 18px;
}
.journey-copy p { font-size: 20px; max-width: 480px; margin-bottom: 10px; }
.journey-copy .hero-cta { justify-content: flex-start; }

/* ============ CARDS ============ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  display: block; text-decoration: none; text-align: left;
  font-family: inherit; cursor: pointer; padding: 0;
  background: var(--night-2);
  border: 3px solid var(--ink);
  outline: 2px solid var(--wood);
  box-shadow: 0 6px 0 var(--ink);
  transition: transform 90ms steps(2, end), box-shadow 90ms steps(2, end), outline-color 90ms steps(2, end);
}
.card:hover  { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink); outline-color: var(--gold); }
.card:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ink); }
.card img {
  width: 100%; image-rendering: pixelated;
  border-bottom: 3px solid var(--ink);
  aspect-ratio: 1 / 1; object-fit: cover;
}
.card-body { padding: 18px 18px 20px; }
.card h3 {
  font-family: var(--font-display); font-size: 15px;
  color: var(--gold-lite);
  text-shadow: 2px 2px 0 var(--ink);
  margin-bottom: 10px;
}
.card p { color: var(--parchment); font-size: 18px; }

/* ============ SCREENSHOTS: THE CONSOLE ============ */
.section-wide { max-width: 1280px; }
.console {
  display: flex; align-items: center; gap: 18px;
}
.con-body {
  flex: 1;
  background: var(--wood-dark);
  border: 3px solid var(--gold);
  outline: 3px solid var(--ink);
  box-shadow: 0 8px 0 rgba(0,0,0,.55);
  padding: 12px;
}
.con-screen {
  background: var(--ink);
  border: 3px solid var(--ink);
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
}
.con-screen img {
  width: 100%; height: 100%; object-fit: contain;
  image-rendering: pixelated; display: block;
}
.con-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 6px 4px;
}
.con-led {
  width: 10px; height: 10px; flex: none;
  background: var(--grass);
  border: 2px solid var(--ink);
  animation: blink 2s steps(1) infinite;
}
.con-cap {
  flex: 1;
  font-family: var(--font-display); font-size: 10px; line-height: 1.8;
  color: var(--parchment);
  min-height: 1.8em;
}
.con-count {
  font-family: var(--font-display); font-size: 10px;
  color: var(--gold-lite);
}
.con-arrow {
  flex: none;
  font-family: var(--font-display); font-size: 22px;
  width: 60px; height: 84px;
  background: var(--gold); color: var(--sun);
  text-shadow: 0 2px 0 var(--wood-dark);
  border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--wood-dark);
  cursor: pointer;
  transition: transform 90ms steps(2, end), box-shadow 90ms steps(2, end);
}
.con-arrow:hover  { transform: translateY(2px); box-shadow: 0 3px 0 var(--wood-dark); }
.con-arrow:active { transform: translateY(5px); box-shadow: 0 0 0 var(--wood-dark); }
.con-thumbs {
  display: flex; gap: 16px; justify-content: center;
  margin-top: 22px;
}
.con-thumb {
  padding: 4px; cursor: pointer;
  background: var(--night-2);
  border: 3px solid var(--wood);
  outline: 2px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 90ms steps(2, end), border-color 90ms steps(2, end);
}
.con-thumb img { width: 148px; image-rendering: pixelated; display: block; }
.con-thumb:hover { transform: translateY(2px); }
.con-thumb.on { border-color: var(--gold); }
.shots-hint {
  text-align: center; margin-top: 20px;
  color: var(--ice); opacity: .8; font-size: 16px;
}

/* ============ TOKEN ============ */
.token-grid {
  display: grid; grid-template-columns: 250px 1fr; gap: 34px; align-items: center;
}
.token-coin-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.token-coin {
  width: 150px; height: 150px;
  background: var(--gold);
  border: 5px solid var(--ink);
  box-shadow:
    inset 8px 8px 0 var(--gold-lite),
    inset -8px -8px 0 #8f4d02,
    0 8px 0 var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 64px;
  color: var(--sun); text-shadow: 4px 4px 0 #8f4d02;
  animation: coinflip 2.6s steps(8, end) infinite;
}
@keyframes coinflip {
  0%, 55%   { transform: scaleX(1); }
  65%       { transform: scaleX(.35); }
  75%       { transform: scaleX(-1); }
  85%       { transform: scaleX(.35); }
  95%, 100% { transform: scaleX(1); }
}
.token-coin-shadow {
  width: 110px; height: 12px;
  background: rgba(0,0,0,.55);
}
.token-name {
  font-family: var(--font-display); font-size: 22px;
  color: var(--gold); text-shadow: 2px 2px 0 rgba(0,0,0,.2);
  margin-bottom: 14px;
}
.token-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 14px;
}
.tstat {
  background: var(--wood-dark);
  border: 2px solid var(--wood);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.tstat-k { font-family: var(--font-display); font-size: 8px; color: var(--ice); }
.tstat-v { font-family: var(--font-display); font-size: 11px; color: var(--sun); line-height: 1.5; }
.blink { animation: blink 1.1s steps(1) infinite; }
.token-note { font-size: 16px; opacity: .92; }
.token-note a { color: var(--gold); }

/* ============ FOOTER ============ */
.footer {
  margin-top: 90px;
  background: var(--night-2);
  border-top: 4px solid var(--ink);
}
.footer-in {
  max-width: 1060px; margin: 0 auto;
  padding: 34px 20px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.footer-pfp {
  width: 84px; height: 84px;
  image-rendering: pixelated;
  border: 3px solid var(--gold);
  outline: 2px solid var(--ink);
  border-radius: 50%;
}
.footer-mid { flex: 1; min-width: 220px; }
.footer-brand {
  font-family: var(--font-display); font-size: 15px; color: var(--ice-lite);
  text-shadow: 2px 2px 0 var(--ink);
}
.footer-tag { color: var(--gold-lite); margin-top: 6px; }
.footer-copy { font-size: 15px; opacity: .7; margin-top: 6px; }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6,10,20,.88);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox-frame {
  position: relative;
  background: var(--wood-dark);
  border: 3px solid var(--gold);
  outline: 3px solid var(--ink);
  box-shadow: 0 8px 0 rgba(0,0,0,.6);
  padding: 10px;
  max-width: min(920px, 94vw);
}
.lightbox-frame img { max-height: 72vh; image-rendering: pixelated; margin: 0 auto; }
.lightbox-cap {
  font-family: var(--font-display); font-size: 9px; line-height: 1.8;
  color: var(--parchment); text-align: center; padding: 12px 6px 4px;
}
.lightbox-x {
  position: absolute; top: -16px; right: -16px;
  width: 34px; height: 34px;
  font-family: var(--font-display); font-size: 12px;
  background: #c0392b; color: var(--sun);
  border: 3px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.lightbox-x:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }

/* ============ TOAST ============ */
.toast {
  position: fixed; z-index: 95;
  left: 50%; top: 74px; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 10px; line-height: 1.7;
  background: var(--wood-dark); color: var(--sun);
  border: 3px solid var(--gold);
  outline: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.5);
  padding: 12px 18px;
  text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .world-grid, .token-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .token-coin-wrap { order: -1; }
  .nav-links a:not([aria-label]) { display: none; }
  .journey-grid { grid-template-columns: 1fr; }
  .journey-art { max-width: 320px; margin: 0 auto; }
  .journey-copy { text-align: center; }
  .journey-copy .hero-cta { justify-content: center; }
  .console { flex-direction: column; }
  .con-arrow { width: 100%; height: 52px; }
  .con-body { width: 100%; }
  .con-thumb img { width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint, .dialog-next, .token-coin, .cursor, .blink { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
