/* Pixopoly: marketing site. No dependencies.
   The look is the game's own: thick flat pieces. Slate panels, cream paper,
   bright one-colour buttons with a lip that squashes when pressed.
   Art is shown at whole multiples of its pixels and never smoothed. */

@font-face {
  font-family: "PixOp";
  src: url("/assets/fonts/PixelOperator-Bold.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #12131f;
  --night: #171a2e;
  --slate: #262b47;
  --slate-d: #171a2e;
  --slate-l: #343b62;
  --neutral: #4d5688;
  --orange: #e8752a;
  --blue: #3a78d8;
  --purple: #8558d6;
  --gold: #ffd866;
  --parch: #f6edd8;
  --parch-d: #dccba6;
  --green: #34a35a;
  --red: #dc4a44;
  --teal: #1fa39b;
  --pink: #e86aa6;
  --u: 4px;            /* one chunky pixel */
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--parch);
  font: 16px/1.5 "PixOp", ui-monospace, monospace;
  -webkit-font-smoothing: none;
  font-smooth: never;
  overflow-x: hidden;
}
img, .spr { image-rendering: pixelated; image-rendering: crisp-edges; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 32px; line-height: 1.25; letter-spacing: 1px; color: #fff8e0; text-shadow: 3px 3px 0 var(--ink); }
h3 { font-size: 32px; line-height: 1.2; color: var(--gold); text-shadow: 2px 2px 0 var(--ink); }
p { font-size: 16px; max-width: 46ch; }
.small { font-size: 16px; opacity: .8; }
.center { text-align: center; margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--gold); color: var(--ink); padding: 8px 12px; }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 4px; }

@media (min-width: 900px) {
  h2 { font-size: 48px; }
  p { font-size: 32px; line-height: 1.3; }
  .small, .faq p, .way p, .foot, .caption { font-size: 16px; }
}

/* ── Buttons: a face, a lip underneath, and a squash when pressed ── */
.btn {
  --c: #3a78d8; --d: #24509a;
  display: inline-block;
  padding: 14px 26px 16px;
  font: inherit; font-size: 32px; line-height: 1; letter-spacing: 1px; text-decoration: none; text-transform: uppercase;
  color: #fff8e0; text-shadow: 2px 2px 0 var(--ink);
  background: var(--c);
  border: 0;
  box-shadow: 0 0 0 4px var(--ink), 0 12px 0 0 var(--d), 0 12px 0 4px var(--ink);
  transform: translateY(0);
  transition: transform .08s steps(2), box-shadow .08s steps(2), filter .1s;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-4px); box-shadow: 0 0 0 4px var(--ink), 0 16px 0 0 var(--d), 0 16px 0 4px var(--ink); }
.btn:active { transform: translateY(8px); box-shadow: 0 0 0 4px var(--ink), 0 4px 0 0 var(--d), 0 4px 0 4px var(--ink); }
.btn.green { --c: #34a35a; --d: #1f6b3a; }
.btn.gold { --c: #d9961a; --d: #8f5f0c; }
.btn.sm { font-size: 16px; padding: 10px 16px 12px; box-shadow: 0 0 0 4px var(--ink), 0 8px 0 0 var(--d), 0 8px 0 4px var(--ink); }
.btn.big { padding: 18px 34px 20px; }
.btn.is-soon { --c: #4d5688; --d: #343b62; cursor: default; }
.btn.is-soon { transition: none; }
.btn.is-soon:hover, .btn.is-soon:active { transform: none; filter: none; box-shadow: 0 0 0 4px var(--ink), 0 12px 0 0 var(--d), 0 12px 0 4px var(--ink); }
.btn.pop::after {              /* the gold frame that bursts out on a press, like in the game */
  content: ""; position: absolute; inset: 0; border: 4px solid var(--gold); pointer-events: none;
  animation: burst .25s ease-out forwards;
}
@keyframes burst { to { inset: -16px; opacity: 0; } }
.btn { position: relative; }

/* ── Top bar ── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px 20px 16px;
  background: var(--slate);
  box-shadow: 0 6px 0 var(--slate-d), 0 10px 0 var(--ink);
}
.brand { font-size: 32px; letter-spacing: 2px; color: var(--gold); text-decoration: none; text-shadow: 3px 3px 0 var(--ink); }
.top nav { display: none; gap: 22px; margin-left: auto; }
.top nav a { color: var(--parch); text-decoration: none; text-transform: uppercase; letter-spacing: 1px; padding: 4px 0; border-bottom: 4px solid transparent; }
.top nav a:hover { color: var(--gold); border-color: var(--gold); }
.top .btn { margin-left: auto; margin-bottom: 8px; }
@media (min-width: 900px) { .top nav { display: flex; } .top .btn { margin-left: 0; } }

/* ── Hero ── */
.hero { position: relative; min-height: min(100vh, 940px); padding: 70px 20px 150px; display: grid; justify-items: center; align-content: center; gap: 22px; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: -40px 0 0 0; background: url("/assets/img/bg_city.png") center / cover no-repeat; image-rendering: pixelated; filter: brightness(.9) saturate(1.15); transform: translateY(calc(var(--scroll, 0) * 0.25px)); }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 220px; background: linear-gradient(transparent, var(--night)); pointer-events: none; }
.hero > *:not(.hero-bg) { position: relative; z-index: 1; }
.logo { display: flex; align-items: flex-end; justify-content: center; gap: 4px; flex-wrap: nowrap; width: min(100%, 900px); filter: drop-shadow(8px 10px 0 rgba(0, 0, 0, .35)); }
.logo img { flex: 0 1 auto; min-width: 0; width: auto; height: auto; max-height: 146px; animation: drop .45s cubic-bezier(.2, .9, .3, 1.3) both, bob 2.4s ease-in-out infinite; }
.logo > :nth-child(1) { animation-delay: .05s, 1.0s; } .logo > :nth-child(2) { animation-delay: .12s, 1.15s; }
.logo > :nth-child(3) { animation-delay: .19s, 1.3s; } .logo > :nth-child(5) { animation-delay: .33s, 1.6s; }
.logo > :nth-child(6) { animation-delay: .40s, 1.75s; } .logo > :nth-child(7) { animation-delay: .47s, 1.9s; }
.logo > :nth-child(8) { animation-delay: .54s, 2.05s; }
.logo-die { flex: 0 1 auto; min-width: 0; animation: drop .45s cubic-bezier(.2, .9, .3, 1.3) .26s both; }
.logo-die img { animation: none; }
.logo-die.hop img { animation: hop .5s steps(8); }
@keyframes drop { from { transform: translateY(-160px); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes hop { 40% { transform: translateY(-44px) rotate(-8deg); } 70% { transform: translateY(0); } 85% { transform: translateY(-8px); } }
.tag { font-size: 32px; line-height: 1.2; max-width: none; color: #fff8e0; text-shadow: 3px 3px 0 var(--ink); animation: rise .5s .8s both; }
.sub { font-size: 16px; max-width: 54ch; animation: rise .5s .95s both; }
.cta { display: flex; flex-wrap: wrap; gap: 26px 22px; justify-content: center; padding-bottom: 14px; animation: rise .5s 1.1s both; }
.soon { font-size: 16px; opacity: .85; max-width: none; animation: rise .5s 1.25s both; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
@media (min-width: 900px) { .tag { font-size: 48px; } .sub { font-size: 32px; line-height: 1.25; max-width: 40ch; } }

/* The pawns walking along the bottom of the hero. */
.parade { position: absolute !important; left: 0; right: 0; bottom: 34px; height: 96px; }
.parade .spr { position: absolute; bottom: 0; left: -90px; animation: walk var(--t, 26s) linear infinite, step .5s steps(1) infinite; animation-delay: var(--d, 0s), var(--d, 0s); }
@keyframes walk { to { transform: translateX(calc(100vw + 180px)); } }
@keyframes step { 50% { margin-bottom: 8px; } }

/* ── Sprites from the game's sheets (js/main.js fills in the sizes) ── */
.spr { display: inline-block; background-repeat: no-repeat; flex: none; }
.spr.pawn { --k: 4; width: calc(20px * var(--k)); height: calc(24px * var(--k)); background-image: url("/assets/img/pawns.png"); background-size: calc(500px * var(--k)) calc(96px * var(--k)); background-position: calc(var(--n) * -20px * var(--k)) calc(var(--f, 0) * -24px * var(--k)); }
.spr.pawn.big { --k: 8; }
.spr.skin { --k: 2; width: calc(60px * var(--k)); height: calc(60px * var(--k)); background-image: url("/assets/img/skins.png"); background-size: calc(1620px * var(--k)) calc(60px * var(--k)); background-position: calc(var(--n) * -60px * var(--k)) 0; }
.spr.ability { --k: 4; width: calc(20px * var(--k)); height: calc(20px * var(--k)); background-image: url("/assets/img/abilities.png"); background-size: calc(100px * var(--k)) calc(20px * var(--k)); background-position: calc(var(--n) * -20px * var(--k)) 0; }

/* ── The three beats ── */
.beat, .tables, .together, .gallery, .final { width: min(100% - 40px, var(--wrap)); margin: 0 auto; padding: 80px 0; }
.beat { display: grid; gap: 40px; align-items: center; }
.beat > * { min-width: 0; }
@media (min-width: 900px) { .beat { grid-template-columns: 1fr 1fr; gap: 56px; padding: 110px 0; } .beat.flip > .copy { order: 2; } }
.copy { display: grid; gap: 18px; justify-items: start; }
.copy.center { justify-items: center; }
.kicker { font-size: 16px !important; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); background: var(--orange); padding: 4px 12px 6px; box-shadow: 0 0 0 4px var(--ink); max-width: none; }
.kicker.pink { background: var(--pink); } .kicker.gold { background: var(--gold); } .kicker.teal { background: #56c2b8; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; padding: 0; margin: 6px 0 0; }
.cities { display: block; width: 100%; height: auto; margin: 22px 0 0; image-rendering: pixelated; box-shadow: 0 0 0 4px var(--ink); }
.chips li { font-size: 16px; padding: 6px 12px 8px; background: var(--slate-l); box-shadow: 0 0 0 4px var(--ink); }

/* Screenshots sit in the game's own frame. */
.shot { display: block; padding: 0; border: 0; background: var(--ink); cursor: zoom-in; width: 100%; box-shadow: 0 0 0 8px var(--slate-l), 0 0 0 12px var(--ink), 12px 22px 0 12px rgba(0, 0, 0, .4); transition: transform .12s steps(3); }
.shot img { width: 100%; }
.shot:hover { transform: translate(-4px, -6px) rotate(-.4deg); }
.shot.wide { max-width: 1040px; margin: 34px auto 0; }

/* Ability cards fanned out, with the chaos stamp over them. */
.cards { position: relative; display: flex; justify-content: center; padding: 30px 0 60px; min-height: 300px; overflow: hidden; }
@media (max-width: 700px) { .card { width: 96px !important; margin: 0 -6px !important; padding: 12px 6px 16px !important; } .card .spr.ability { --k: 3; } .stamp { font-size: 16px !important; } }
.card { width: 150px; margin: 0 -12px; padding: 18px 10px 22px; display: grid; justify-items: center; gap: 14px; text-align: center; color: var(--ink); background: var(--parch); box-shadow: 0 0 0 4px var(--ink), inset 0 -8px 0 var(--parch-d), 8px 12px 0 rgba(0, 0, 0, .35); transform: rotate(calc((var(--i) - 2) * 7deg)) translateY(calc((var(--i) - 2) * (var(--i) - 2) * 9px)); transition: transform .15s steps(3); }
.card b { font-size: 16px; font-weight: normal; line-height: 1.1; }
.card:hover { transform: rotate(0) translateY(-26px) scale(1.06); z-index: 3; }
.stamp { position: absolute; left: 50%; bottom: 6px; translate: -50% 0; rotate: -5deg; white-space: nowrap; font-size: 32px; letter-spacing: 2px; padding: 6px 18px 8px; color: #fff; background: var(--pink); box-shadow: 0 0 0 4px var(--ink), 6px 8px 0 rgba(0, 0, 0, .4); }
.stamp.slam { animation: slam .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes slam { from { scale: 2.2; opacity: 0; } }
#chaos { color: var(--pink); font-weight: normal; }

/* Pawn picker and the felt it's shown on. */
.picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.picker button { padding: 6px; border: 0; background: var(--slate-l); box-shadow: 0 0 0 4px var(--ink); cursor: pointer; transition: transform .08s steps(2); }
.picker button .spr.pawn { --k: 2; display: block; }
.picker button:hover { transform: translateY(-4px); }
.picker button[aria-pressed="true"] { background: var(--gold); box-shadow: 0 0 0 4px var(--ink); }
.showcase { display: grid; justify-items: center; gap: 14px; }
.felt { position: relative; width: min(100%, 460px); aspect-ratio: 4 / 3; display: grid; place-items: center; grid-template-columns: auto auto; gap: 8px; align-content: center; justify-content: center;
  background: #2a8f8a radial-gradient(#1a5c59 3px, transparent 4px) 0 0 / 28px 28px; box-shadow: 0 0 0 4px var(--ink), 0 0 0 8px var(--gold), 0 0 0 12px var(--ink), 12px 22px 0 12px rgba(0, 0, 0, .4); }
.felt .big { grid-row: span 2; }
.felt .big.swap { animation: squash .3s steps(6); }
@keyframes squash { 0% { transform: scale(1.25, .7); } 60% { transform: scale(.92, 1.1); } }
.felt .skin { animation: bob 1.8s ease-in-out infinite; } .felt .skin + .skin { animation-delay: .4s; }
.caption { font-size: 32px !important; color: var(--gold); text-shadow: 2px 2px 0 var(--ink); max-width: none; }

/* Tables. */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 14px; margin-top: 30px; }
.tabs button { font: inherit; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; color: var(--parch); padding: 10px 16px 12px; border: 0; background: var(--neutral); box-shadow: 0 0 0 4px var(--ink), 0 8px 0 0 var(--slate-l), 0 8px 0 4px var(--ink); cursor: pointer; transition: transform .08s steps(2); }
.tabs button:hover { transform: translateY(-4px); }
.tabs button[aria-selected="true"] { background: var(--teal); box-shadow: 0 0 0 4px var(--ink), 0 8px 0 0 #12706a, 0 8px 0 4px var(--ink); color: #fff; }
#tableshot.swap img { animation: fadein .25s steps(5); }
@keyframes fadein { from { opacity: 0; transform: scale(1.02); } }

/* Play together. */
.ways { display: grid; gap: 34px; margin: 44px 0 30px; }
@media (min-width: 900px) { .ways { grid-template-columns: repeat(3, 1fr); } }
.way { padding: 26px 22px 30px; text-align: center; background: var(--slate); box-shadow: 0 0 0 8px var(--slate-l), 0 0 0 12px var(--ink), 8px 18px 0 12px rgba(0, 0, 0, .35); }
.way p { margin: 8px auto 0; max-width: 28ch; }
.way .spr { animation: bob 1.4s ease-in-out infinite; } .way .spr + .spr { animation-delay: .35s; }

/* Gallery. */
.gallery { display: grid; gap: 40px; padding-top: 30px; }
@media (min-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* The last word. */
.final { display: grid; justify-items: center; gap: 22px; text-align: center; padding-bottom: 120px; }
.final .hand { width: 182px; animation: wave 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes wave { 50% { transform: rotate(7deg); } }
.faq { display: grid; gap: 14px; width: min(100%, 760px); margin-top: 30px; text-align: left; }
.faq details { background: var(--parch); color: var(--ink); box-shadow: 0 0 0 4px var(--ink), 6px 10px 0 4px rgba(0, 0, 0, .35); }
.faq summary { cursor: pointer; padding: 12px 16px 14px; font-size: 16px; list-style: none; }
.faq summary::before { content: "+ "; color: var(--red); }
.faq details[open] summary::before { content: "- "; }
.faq p { padding: 0 16px 16px; max-width: none; }

.foot { display: grid; gap: 14px; justify-items: center; padding: 34px 20px 44px; background: var(--slate); box-shadow: inset 0 4px 0 var(--ink), inset 0 10px 0 var(--slate-l); text-align: center; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.foot small { font-size: 16px; opacity: .75; }

/* Lightbox. */
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(10, 8, 16, .92); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(100%, 1920px); max-height: 92vh; box-shadow: 0 0 0 8px var(--slate-l), 0 0 0 12px var(--ink); animation: fadein .2s steps(4); }
.lightbox .close { position: absolute; top: 18px; right: 22px; font: inherit; font-size: 32px; color: #fff; background: var(--red); border: 0; padding: 4px 14px 8px; box-shadow: 0 0 0 4px var(--ink); cursor: pointer; }

/* Things rise into place as you reach them. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .35s steps(6), transform .35s cubic-bezier(.2, .9, .3, 1.2); }
.reveal.in { opacity: 1; transform: none; }
.shot.reveal.in:hover { transform: translate(-4px, -6px) rotate(-.4deg); }

/* Plain pages (press kit, privacy, 404). */
.page { width: min(100% - 40px, 860px); margin: 0 auto; padding: 60px 0 100px; display: grid; gap: 22px; }
.page h1 { font-size: 48px; line-height: 1.1; color: var(--gold); text-shadow: 3px 3px 0 var(--ink); }
.page h2 { font-size: 32px; margin-top: 18px; }
.page p, .page li { font-size: 16px; max-width: 70ch; }
.page .panel { padding: 22px; background: var(--slate); box-shadow: 0 0 0 8px var(--slate-l), 0 0 0 12px var(--ink); display: grid; gap: 12px; }
.page table { border-collapse: collapse; width: 100%; }
.page td { padding: 6px 10px; border-bottom: 4px solid var(--slate-l); vertical-align: top; }
.page td:first-child { color: var(--gold); white-space: nowrap; }
.grid-shots { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── Holding page (until the Steam page is up) ── */
.holding .hero { min-height: 100vh; min-height: 100svh; padding: 56px 16px 150px; gap: 18px; }
.holding .logo { width: min(100%, 900px); }
.holding .tag { font-size: 24px; text-wrap: balance; }
.holding .tag span { display: inline-block; }
.holding .sub { font-size: 16px; }
.soon-badge { display: inline-block; max-width: none; margin-top: 8px; padding: 10px 18px 14px; font-size: 16px; letter-spacing: 2px; text-transform: uppercase;
  color: #fff8e0; background: var(--slate); box-shadow: inset 0 -6px 0 var(--slate-d), 0 0 0 4px var(--ink), 6px 8px 0 4px rgba(0, 0, 0, .35); text-shadow: 2px 2px 0 var(--ink); animation: rise .5s 1.1s both; }
.cue { font-size: 24px; color: var(--gold); text-decoration: none; text-shadow: 2px 2px 0 var(--ink); animation: rise .5s 1.4s both, nudge 1.4s steps(2) 2s infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }

.peek { display: grid; gap: 28px; justify-items: center; padding: 48px 16px 56px; max-width: var(--wrap); margin: 0 auto; }
.reel { position: relative; width: min(78vw, 320px); padding: 10px; background: var(--slate); box-shadow: 0 0 0 4px var(--ink), inset 0 -8px 0 var(--slate-d), 8px 10px 0 4px rgba(0, 0, 0, .35); }
.reel video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; background: var(--ink); }
.sound { position: absolute; right: 18px; bottom: 20px; font: inherit; font-size: 16px; color: var(--ink); background: var(--gold); border: 0; padding: 4px 10px 8px; cursor: pointer;
  box-shadow: 0 0 0 4px var(--ink), inset 0 -4px 0 #c9a23c; }
.sound[aria-pressed="true"] { background: var(--parch); box-shadow: 0 0 0 4px var(--ink), inset 0 -4px 0 var(--parch-d); }
.peek-copy { display: grid; gap: 18px; justify-items: center; text-align: center; }
.peek-copy h2 { font-size: 32px; }
.bits { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 14px; width: min(100%, 460px); }
.bits li { display: flex; align-items: center; gap: 16px; padding: 12px 16px; text-align: left; background: var(--slate); box-shadow: 0 0 0 4px var(--ink), inset 0 -6px 0 var(--slate-d); font-size: 16px; }
.bits img, .bits .spr { flex: none; width: auto; height: 44px; }
.bits .spr { width: 40px; height: 48px; }

.skyline { overflow: hidden; padding: 8px 0; background: var(--ink); }
.strip { display: flex; width: max-content; animation: slide 40s linear infinite; }
.strip img { height: 104px; width: auto; max-width: none; }
@keyframes slide { to { transform: translateX(-50%); } }

.stay { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 56px 16px 64px; }
.stay h2 { font-size: 32px; }
.holding .foot { padding: 18px 16px 22px; }

@media (min-width: 900px) {
  .holding .tag { font-size: 48px; }
  .holding .sub { font-size: 32px; }
  .soon-badge { font-size: 32px; }
  .peek { grid-template-columns: auto 1fr; gap: 64px; align-items: center; padding: 96px 32px; }
  .reel { width: 340px; }
  .peek-copy { justify-items: start; text-align: left; }
  .peek-copy h2, .stay h2 { font-size: 48px; }
  .bits li { font-size: 24px; }
  .stay p { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) { .strip, .cue { animation: none; } }
