/* Pixel Wonder (pixelwonder.io): night sky, lit windows into each game's world.
   Type: Mona Sans, bundled (OFL, fonts/OFL-MonaSans.txt): display wide black italic, text 500-800. */
@font-face { font-family: "Mona"; src: url("/fonts/mona-display-latin.woff2") format("woff2"); font-style: italic; font-weight: 900; font-stretch: 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mona"; src: url("/fonts/mona-display-latin-ext.woff2") format("woff2"); font-style: italic; font-weight: 900; font-stretch: 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Mona"; src: url("/fonts/mona-text-latin.woff2") format("woff2"); font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mona"; src: url("/fonts/mona-text-latin-ext.woff2") format("woff2"); font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #0c0a1d;
  --night: #15113a;
  --dusk: #2a1d63;
  --star: #fff6e6;
  --dim: #c9c0e8;
  --mute: #9a90c4;
  --gold: #ffc94a;
  --pink: #ff5fa2;
  --teal: #4fe3d0;
  --amber: #ff9a3c;
  --line: #ffffff1f;
  --display: "Mona", "Arial Black", system-ui, sans-serif;
  --text: "Mona", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; background: var(--ink); }
body {
  margin: 0; min-height: 100vh; color: var(--star); font: 500 17px/1.6 var(--text); background: var(--ink);
  background:
    radial-gradient(1200px 700px at 78% -10%, #3b2a8a88, transparent 60%),
    radial-gradient(900px 600px at -10% 30%, #ff5fa21f, transparent 60%),
    radial-gradient(800px 600px at 110% 80%, #4fe3d01a, transparent 60%),
    linear-gradient(180deg, var(--night), var(--ink) 55%);
  overflow-x: hidden;
}
/* A field of pixel stars: square dots on a coarse grid, two layers drifting apart. */
body::before, body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    linear-gradient(var(--star), var(--star)), linear-gradient(var(--star), var(--star)), linear-gradient(var(--gold), var(--gold)),
    linear-gradient(var(--star), var(--star)), linear-gradient(var(--teal), var(--teal)), linear-gradient(var(--star), var(--star));
  background-size: 2px 2px;
  background-repeat: no-repeat;
  background-position: 12% 18%, 31% 7%, 64% 22%, 83% 12%, 47% 41%, 92% 47%;
  opacity: .55;
}
body::after { background-position: 6% 63%, 22% 88%, 71% 69%, 88% 91%, 39% 76%, 58% 95%; opacity: .35; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .7; } }

a { color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: #ffe08a; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── header ── */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: #0c0a1dcc; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--star); text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
/* the pixel logo (site/tools/pixel-logo.mjs): a 16-pixel arched window, then the pixel wordmark, both at whole-pixel scales */
.brand { min-height: 44px; }
.brand svg.mk { width: 32px; height: 32px; }
.brand svg.wm { width: auto; height: 24px; margin-top: 2px; }
.brand:hover svg.mk { animation: mk-hop .5s steps(2) both; }
@keyframes mk-hop { 50% { transform: translateY(-4px); } }
@media (max-width: 600px) { .brand { gap: 8px; } .brand svg.wm { height: 16px; } }
.brand b { font: italic 900 21px/1 var(--display); font-stretch: 125%; letter-spacing: -.01em; }
.brand b span { color: var(--gold); }
.nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.nav a { color: var(--dim); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav a:hover, .nav a[aria-current] { color: var(--star); }

/* ── type ── */
.display { font: italic 900 clamp(44px, 8.4vw, 104px)/.92 var(--display); font-stretch: 125%; letter-spacing: -.02em; margin: 0; }
.display .glow { color: var(--gold); text-shadow: 0 0 34px #ffc94a66; }
.kicker { font: italic 900 13px/1 var(--display); font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin: 0 0 14px; }
h2.title { font: italic 900 clamp(30px, 5vw, 54px)/1 var(--display); font-stretch: 125%; letter-spacing: -.01em; margin: 0 0 12px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--dim); max-width: 34em; margin: 18px 0 0; }

/* ── buttons and chips ── */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 14px; font: 800 16px/1 var(--text); text-decoration: none; color: var(--ink); background: var(--gold);
  box-shadow: 0 4px 0 #b77a10, 0 10px 24px #ffc94a33; transition: transform .15s, box-shadow .15s; }
.btn:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 6px 0 #b77a10, 0 14px 30px #ffc94a44; }
.btn.ghost { background: #ffffff10; color: var(--star); box-shadow: inset 0 0 0 1.5px #ffffff33; }
.btn.ghost:hover { color: var(--star); background: #ffffff1a; }
.btn[aria-disabled="true"] { cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font: 800 12px/1 var(--text); letter-spacing: .04em; text-transform: uppercase; }
.chip.soon { background: #ffc94a22; color: var(--gold); box-shadow: inset 0 0 0 1px #ffc94a55; }
.chip.lab { background: #4fe3d01a; color: var(--teal); box-shadow: inset 0 0 0 1px #4fe3d04d; }
.chip::before { content: ""; width: 6px; height: 6px; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* ── hero ── */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); overflow-x: clip; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* A lit window onto a game's world: arched, glowing, with its people stepping out of the frame. */
.window { position: relative; aspect-ratio: 4 / 4.4; animation: rise .9s .15s cubic-bezier(.2,.7,.2,1) both; }
.window .pane { position: absolute; inset: 0 8% 6% 8%; border-radius: 999px 999px 28px 28px; overflow: hidden;
  box-shadow: 0 0 0 6px #2a1d63, 0 0 0 8px #ffc94a66, 0 30px 80px #ffb24a40, 0 0 120px #ff9a3c33; }
.window .pane img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); }
.window .pane::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0000 45%, #1a0c0688 100%); }
.window .mark { position: absolute; left: 50%; top: 12%; width: 64%; transform: translateX(-50%); filter: drop-shadow(0 8px 14px #000a); z-index: 2; }
.window .who { position: absolute; bottom: 0; height: 66%; width: auto; filter: drop-shadow(0 14px 18px #000b); z-index: 3; }
.window .who.left { left: -6%; animation: peek .9s .5s cubic-bezier(.2,.7,.2,1) both; }
.window .who.right { right: -8%; animation: peek-r .9s .65s cubic-bezier(.2,.7,.2,1) both; }
@keyframes peek { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes peek-r { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ── games ── */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section.alt { background: linear-gradient(180deg, #ffffff06, #ffffff00); border-top: 1px solid var(--line); }
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); margin-top: 36px; }
.game { position: relative; display: flex; flex-direction: column; border-radius: 26px; background: #ffffff08; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; text-decoration: none; color: var(--star);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s; }
a.game:hover { color: var(--star); transform: translateY(-6px) rotate(-.4deg); box-shadow: inset 0 0 0 1px #ffffff40, 0 24px 60px var(--glow, #ffc94a33); }
.game .art { position: relative; aspect-ratio: 4 / 4.2; overflow: hidden; background: radial-gradient(circle at 50% 60%, var(--glow, #ffc94a44), transparent 70%); }
.game .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.game .art img.cast-in { position: absolute; left: 50%; bottom: 0; width: auto; height: 82%; transform: translateX(-50%); object-fit: contain; filter: drop-shadow(0 12px 18px #000b); }
a.game:hover .art img.cast-in { transform: translateX(-50%) translateY(-6px); }
.game .art img.contain { object-fit: contain; padding: 8%; }
a.game:hover .art img { transform: scale(1.04); }
.game .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.game h3 { font: italic 900 24px/1.05 var(--display); font-stretch: 125%; margin: 0; }
.game p { margin: 0; color: var(--dim); font-size: 15.5px; line-height: 1.5; }
.game .meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.game.feature { grid-column: span 2; grid-row: span 2; }
.game.feature .art { aspect-ratio: auto; flex: 1; min-height: 260px; }
.genre { font-size: 13px; font-weight: 700; color: var(--mute); }

/* ── promises ── */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.promise { padding: 24px; border-radius: 22px; background: #ffffff07; box-shadow: inset 0 0 0 1px var(--line); }
.promise svg { width: 34px; height: 34px; margin-bottom: 12px; }
.promise h3 { margin: 0 0 6px; font: 800 19px/1.25 var(--text); }
.promise p { margin: 0; color: var(--dim); font-size: 15.5px; }

/* ── game page ── */
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 8px var(--gutter) 24px; margin: 28px calc(-1 * var(--gutter)) 0; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots img { flex: none; width: clamp(180px, 22vw, 240px); height: auto; border-radius: 20px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px #0009; scroll-snap-align: start; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; margin: 28px 0 0; padding: 0; list-style: none; }
.features li { position: relative; padding-left: 26px; color: var(--dim); }
.features li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.features b { color: var(--star); }
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.cast figure { margin: 0; text-align: center; }
.cast img { height: 260px; width: auto; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 14px 18px #000a); }
.cast figcaption { margin-top: 8px; font-weight: 800; }
.cast figcaption span { display: block; font-weight: 500; font-size: 14px; color: var(--mute); }

/* ── documents (privacy, terms, support) ── */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 80px; }
.doc h1 { font: italic 900 clamp(34px, 6vw, 56px)/1 var(--display); font-stretch: 125%; margin: 0 0 10px; }
.doc .updated { color: var(--mute); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font: 800 22px/1.3 var(--text); margin: 40px 0 10px; color: var(--star); }
.doc h3 { font: 800 17px/1.35 var(--text); margin: 24px 0 6px; }
.doc p, .doc li { color: #e4def6; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--gold); font-weight: 800; white-space: nowrap; }
.doc .note { padding: 16px 18px; border-radius: 16px; background: #ffc94a14; box-shadow: inset 0 0 0 1px #ffc94a40; color: var(--star); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 99px; background: #ffffff0d; color: var(--dim); text-decoration: none; font-size: 14px; font-weight: 700; }
.toc a:hover { color: var(--star); background: #ffffff1a; }

/* ── footer ── */
.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--mute); font-size: 14.5px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--dim); text-decoration: none; font-weight: 700; }
.foot a:hover { color: var(--star); }

/* ── small screens ── */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .window { max-width: 520px; margin: 0 auto; width: 100%; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .game.feature { grid-column: span 2; grid-row: auto; }
  .game.feature .art { aspect-ratio: 16 / 9; flex: none; }
  .promises { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav a.opt { display: none; }
  .games { grid-template-columns: 1fr; }
  .game.feature { grid-column: auto; }
  .game.feature .art { aspect-ratio: 4 / 3; }
  .features { grid-template-columns: 1fr; }
  .cast img { height: 170px; }
  .cast figcaption span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
