@font-face {
  font-family: "Jersey 10";
  src: url("fonts/Jersey10-Regular.woff") format("woff");
  font-display: swap;
}

:root {
  --night: #070f24;
  --navy: #0b1a3a;
  --navy-2: #12244d;
  --navy-3: #1c3366;
  --line: #2b4a8a;
  --pants: #e8eefc;
  --pants-shade: #a9b9e6;
  --text: #dfe7fb;
  --muted: #93a4cf;
  --gold: #ffcc4d;
  --gold-deep: #c98a12;
  --pink: #ff7aa8;
  --mint: #6ef0c2;
  --px: 4px;
  --wrap: 1120px;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pixel: "Jersey 10", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { max-width: 100%; }
.pixelated { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold); }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--night); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: 400; letter-spacing: .02em; line-height: 1; }

/* Notched pixel frame: the four box-shadows cut the corners like a sprite border. */
.px-frame {
  background: var(--navy-2);
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--line),
    0 var(--px) 0 0 var(--line),
    calc(var(--px) * -1) 0 0 0 var(--line),
    var(--px) 0 0 0 var(--line),
    var(--px) calc(var(--px) * 3) 0 0 rgba(0, 0, 0, .45);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 15, 36, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(43, 74, 138, .5);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--pants); text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand span { font-family: var(--pixel); font-size: 28px; line-height: 1; }
.nav { display: flex; gap: 6px; }
.nav a {
  font-family: var(--pixel); font-size: 24px; color: var(--muted); text-decoration: none;
  padding: 6px 12px; line-height: 1;
}
.nav a[aria-current="page"] { color: var(--pants); background: var(--navy-2); }
.codes-home-link { display: inline-block; padding-block: 10px; font-family: var(--pixel); font-size: 26px; text-decoration: none; }
/* 44 px square: Apple's minimum touch target */
.menu-btn { display: none; width: 44px; height: 44px; margin-right: -8px; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-btn i { display: block; width: 24px; height: 4px; background: var(--pants); margin: 0 0 4px; transition: transform .12s steps(2), opacity .12s steps(2); }
.menu-btn[aria-expanded="true"] i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Buttons */
.btn {
  --bg: var(--gold); --fg: var(--night); --edge: var(--gold-deep);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pixel); font-size: 28px; line-height: 1;
  color: var(--fg); background: var(--bg); text-decoration: none;
  padding: 14px 22px 12px; border: 0; cursor: pointer;
  box-shadow:
    0 -4px 0 0 var(--bg), 0 4px 0 0 var(--bg), -4px 0 0 0 var(--bg), 4px 0 0 0 var(--bg),
    inset 0 -6px 0 0 var(--edge), 4px 12px 0 0 rgba(0, 0, 0, .45);
  transition: transform .08s steps(2);
}
.btn:active { transform: translateY(3px); }
/* Game-blue secondary button, the same blue as the in-game buy buttons */
.btn.ghost { --bg: #0095e9; --fg: #fff; --edge: #0067a8; }

/* Hero */
.hero { padding: 0; position: relative; min-height: min(calc(100svh - 64px), 820px); display: grid; place-items: center; overflow: hidden; isolation: isolate; }
#meadow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; background: var(--night); }
.hero-inner { text-align: center; padding: 16px 0 164px; }
/* Heroes stand on the meadow at a whole-pixel scale (the sprites use 8 px art pixels) */
.party { position: absolute; left: max(16px, 6vw); bottom: 34px; display: flex; align-items: flex-end; gap: 6px; z-index: -1; }
.party img { width: 102px; height: auto; animation: bob 1.6s steps(2) infinite; }
.party img.wide { width: 156px; }
.party img:nth-child(2) { animation-delay: .4s; }
.party img:nth-child(3) { animation-delay: .8s; }
.party img.strike { animation: strike .3s steps(3) 1; }
@keyframes strike { 40% { transform: translateX(18px) rotate(4deg); } }
.pop-hit { position: absolute; z-index: 2; pointer-events: none; font-family: var(--pixel); font-size: 26px; line-height: 1; white-space: nowrap; color: #fff;
  text-shadow: 0 2px 0 #1d1420, 2px 0 0 #1d1420, -2px 0 0 #1d1420, 0 -2px 0 #1d1420; }
.pop-hit.crit { color: #ffcc4d; font-size: 32px; }
.pop-hit.gold { color: #ffcc4d; }
.pop-hit.gold::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 4px; background: #ffcc4d; box-shadow: inset -3px -3px 0 #c98a12, 0 0 0 2px #1d1420; vertical-align: 2px; }
.pop-hit.heal { color: #7dff6b; font-size: 22px; }
.pop-number { position: fixed; z-index: 51; pointer-events: none; font-family: var(--pixel); font-size: 44px; line-height: 1; color: #7dff6b; text-shadow: 0 3px 0 #1d3b1a, 3px 0 0 #1d3b1a, -3px 0 0 #1d3b1a, 0 -3px 0 #1d3b1a; }
.logo-stage { position: relative; width: min(200px, 52vw); margin: 0 auto 18px; cursor: pointer; }
.logo-stage img { width: 100%; height: auto; display: block; animation: strut 1.2s steps(2) infinite; transform-origin: 50% 100%; }
.logo-stage::after {
  content: ""; position: absolute; left: 14%; right: 14%; bottom: -14px; height: 12px;
  background: rgba(0, 0, 0, .45); border-radius: 0; animation: shadow 1.2s steps(2) infinite;
  clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
}
.logo-stage.jump img { animation: jump .6s steps(6) 1; }
@keyframes strut { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
@keyframes shadow { 50% { transform: scaleX(.9); opacity: .7; } }
@keyframes jump { 40% { transform: translateY(-70px) rotate(8deg); } 70% { transform: translateY(-20px) rotate(-4deg); } }

.kicker { font-family: var(--pixel); font-size: 26px; color: var(--mint); margin: 0 0 6px; line-height: 1; }
.logo-stage + .kicker { margin-top: 30px; }
section[id] { scroll-margin-top: 64px; }
.hero h1 { font-size: clamp(60px, 12vw, 112px); color: var(--pants); margin: 0; text-shadow: 0 6px 0 var(--line), 0 12px 0 rgba(0,0,0,.5); }
.hero h1 em { text-shadow: 0 6px 0 var(--gold-deep), 0 12px 0 rgba(0,0,0,.5); }
.hero h1 em { font-style: normal; color: var(--gold); }
.tagline { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 560px; margin: 22px auto 30px; }
.cta { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* Marquee strip */
.ticker { background: var(--gold); color: var(--night); overflow: hidden; border-block: 4px solid var(--gold-deep); }
.ticker div { display: flex; width: max-content; animation: tick 28s linear infinite; }
.ticker span { font-family: var(--pixel); font-size: 32px; line-height: 1; padding: 12px 22px 10px; white-space: nowrap; }
.ticker span::after { content: "\2726"; margin-left: 44px; color: var(--gold-deep); }
@keyframes tick { to { transform: translateX(-50%); } }

/* Sections */
section { padding: 110px 0; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .kicker { color: var(--pink); }
.section-head h2 { font-size: clamp(48px, 7vw, 76px); color: var(--pants); margin: 0; }
.section-head p { color: var(--muted); max-width: 600px; margin: 14px auto 0; }

/* Game card */
.game {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; overflow: hidden;
  background: linear-gradient(160deg, #1a1440, var(--navy-2) 60%);
}
.game-art {
  position: relative; min-height: 420px; padding: 56px 24px 40px;
  background:
    linear-gradient(180deg, #62b4f0 0 18%, #8bcbf6 18% 30%, #bce2fa 30% 44%, #3d8a33 44% 47%, #4a9a39 47%);
  display: flex; align-items: center; justify-content: center;
}
.phone {
  width: min(280px, 70%); padding: 28px 10px 16px; background: #11131a;
  box-shadow: 0 0 0 4px #2d3242, 8px 14px 0 0 rgba(0,0,0,.4);
  border-radius: 34px; position: relative;
}
/* Speaker slot sits in the bezel above the screen so it never covers the game */
.phone::before { content: ""; position: absolute; top: 11px; left: 50%; width: 56px; height: 6px; translate: -50% 0; background: #2d3242; border-radius: 6px; }
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 720 / 1280; border-radius: 6px; background: #232a38; }
.badge-soon {
  position: absolute; top: 20px; left: 20px; font-family: var(--pixel); font-size: 24px; line-height: 1;
  background: var(--pink); color: var(--night); padding: 8px 12px 6px;
}
.game-body { padding: 44px 44px 48px; }
.game-body h3 { font-size: 64px; margin: 0 0 6px; color: var(--pants); }
.genre { font-family: var(--pixel); font-size: 24px; color: var(--mint); margin: 0 0 18px; line-height: 1.1; }
.game-body ul { list-style: none; padding: 0; margin: 22px 0 30px; display: grid; gap: 10px; }
.game-body li { padding-left: 28px; position: relative; }
.game-body li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; background: var(--gold); box-shadow: 2px 2px 0 var(--gold-deep); }
.soon-note {
  display: inline-flex; gap: 10px; align-items: center; margin: 0; padding: 10px 14px;
  border: 2px dashed var(--line); color: var(--pants); font-size: 15px;
}

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about h2 { font-size: clamp(48px, 7vw, 72px); margin: 0 0 18px; color: var(--pants); }
.about p { color: var(--text); }
.facts { margin: 0; padding: 30px 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; }
.facts dt { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-family: var(--pixel); font-size: clamp(28px, 2.6vw, 36px); white-space: nowrap; line-height: 1; color: var(--gold); }
.facts .game-name { white-space: normal; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 88px; }
.value { padding: 28px 26px; }
/* Pixel-drawn SVG icons on a bevelled tile, 4 px per art pixel like the rest of the page */
.value .icon {
  color: var(--night); background: var(--mint); width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 16px;
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, .35), inset -4px -4px 0 rgba(0, 0, 0, .2);
}
.value .icon svg { display: block; }
.value:nth-child(2) .icon { background: var(--gold); }
.value:nth-child(3) .icon { background: var(--pink); }
.value h3 { font-size: 34px; margin: 0 0 8px; color: var(--pants); }
.value p { margin: 0; color: var(--muted); font-size: 16px; }

/* Contact */
.contact { text-align: center; padding: 64px 32px; max-width: 820px; margin: 0 auto; }
.contact h2 { font-size: clamp(48px, 7vw, 72px); margin: 0 0 12px; color: var(--pants); }
.contact p { color: var(--muted); margin: 0 auto 30px; max-width: 520px; }
.mails { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 2px solid rgba(43, 74, 138, .5); padding: 40px 0; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer span a { color: var(--pants); }
.lang-switch { display: inline-block; margin-bottom: 18px; font-size: 15px; }
.site-footer a:hover { color: var(--pants); }

/* Hover lifts only on real pointers; on phones a tap would leave the button stuck in its hover state */
@media (hover: hover) {
  a:hover { color: #fff; }
  .nav a:hover { color: var(--pants); background: var(--navy-2); }
  .btn:hover { color: var(--fg); transform: translateY(-3px); }
  .btn:hover:active { transform: translateY(3px); }
  .site-footer a:hover { color: var(--pants); }
}

/* Legal / support pages */
.doc { padding: 72px 0 96px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(52px, 9vw, 80px); color: var(--pants); margin: 0 0 8px; }
.doc .meta { color: var(--muted); margin: 0 0 40px; }
.doc h2 { font-size: 38px; color: var(--gold); margin: 48px 0 10px; }
.doc h3 { font-size: 28px; color: var(--pants); margin: 28px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc .card { padding: 22px 24px; margin: 22px 0; }
.doc .card p { margin: 0; }
details { background: var(--navy-2); border-left: 4px solid var(--line); margin: 12px 0; padding: 4px 20px; }
details[open] { border-color: var(--gold); }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: var(--pants); }

/* Reveal on scroll (only when JS has run) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .3s steps(4); }
.js .reveal.in { opacity: 1; transform: none; }

.confetti { position: fixed; width: 8px; height: 8px; pointer-events: none; z-index: 50; }

@media (max-width: 860px) {
  .game, .about { grid-template-columns: 1fr; }
  .game-art { min-height: 0; }
  .game-body { padding: 32px 24px 36px; }
  .values { grid-template-columns: 1fr; margin-top: 64px; }
  section { padding: 80px 0; }
}
@media (max-width: 880px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--night); padding: 4px 16px 12px; border-bottom: 2px solid var(--line); box-shadow: 0 16px 24px rgba(0, 0, 0, .5); }
  .nav.open { display: flex; }
  .nav a { font-size: 28px; padding: 14px 8px 12px; border-bottom: 2px solid rgba(43, 74, 138, .35); }
  .nav a:last-child { border-bottom: 0; }
  .nav a:active { color: var(--pants); background: var(--navy-2); }
  .brand span { font-size: 24px; }
}
@media (max-width: 640px) {
  .btn { font-size: 26px; }
  .game-body h3 { font-size: 52px; }
  .mails .btn { width: 100%; justify-content: center; font-size: 22px; }
  .facts { padding: 24px 20px; gap: 22px 16px; }
  .facts dd { font-size: 28px; }
  .party { left: 8px; bottom: 24px; gap: 2px; }
  /* 3 px per art pixel: small enough that the slimes read as a fight, still whole pixels */
  .party img { width: 51px; }
  .party img.wide { width: 78px; }
  /* Whole hero, meadow included, fits one phone screen */
  .hero-inner { padding: 8px 0 120px; }
  .logo-stage { width: 150px; margin-bottom: 10px; }
  .logo-stage + .kicker { margin-top: 22px; font-size: 22px; }
  .tagline { font-size: 17px; margin: 16px auto 22px; }
  .cta { gap: 14px; }
  .cta .btn { font-size: 22px; padding: 12px 16px 10px; }
  .pop-hit { font-size: 20px; }
  .pop-hit.crit { font-size: 24px; }
  .ticker span { font-size: 24px; padding: 9px 16px 7px; }
  .ticker span::after { margin-left: 28px; }
  section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2, .about h2, .contact h2 { font-size: 46px; }
  .game-art { padding: 64px 16px 28px; }
  .badge-soon { top: 16px; left: 50%; translate: -50% 0; font-size: 20px; }
  .phone { width: min(240px, 76%); }
  .game-body { padding: 26px 20px 30px; }
  .about { gap: 28px; }
  /* Value cards become compact rows: icon beside the text */
  .values { gap: 16px; margin-top: 40px; }
  .value { display: grid; grid-template-columns: 52px 1fr; gap: 4px 16px; padding: 18px; }
  .value .icon { grid-row: span 2; width: 52px; height: 52px; margin: 0; }
  .value h3 { font-size: 28px; margin: 0; }
  .contact { padding: 40px 20px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; gap: 16px; }
  .site-footer nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; width: 100%; }
  /* Footer links get a full finger-sized row instead of a 15 px text line */
  .site-footer nav a { display: block; padding: 12px 0; }
  .site-footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
}
/* Safari on a 6.1" iPhone leaves ~660 px under its bars: shrink the logo so the buttons stay clear of the meadow */
@media (max-width: 640px) and (max-height: 760px) {
  .logo-stage { width: 112px; margin-bottom: 8px; }
  .logo-stage + .kicker { margin-top: 18px; }
  .hero h1 { font-size: 56px; }
  .tagline { margin: 12px auto 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
