/* Polbyte Games – catalogue site in the Polbyte visual language (polbyte.com): light, flat, pink→purple brand gradient.
   No build step, no external fonts. Dark mode follows the system, like polbyte.com. */
:root {
  --bg: #f8f7fb;
  --bg-alt: #f1eef7;
  --surface: #ffffff;
  --fg: #1a1424;
  --muted: #625a70;
  --line: #e4dfee;
  --accent: #a0179f;
  --accent-strong: #7d1aa8;
  --accent-soft: #f7e5f6;
  --grad: linear-gradient(120deg, #e83a8c 0%, #c4179f 45%, #8a22c4 100%);
  --hero: linear-gradient(160deg, #ec3d84 0%, #d1208f 35%, #ad21ad 70%, #8a24c2 100%);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0b16;
    --bg-alt: #151020;
    --surface: #1b1528;
    --fg: #eee9f5;
    --muted: #a399b3;
    --line: #2c2340;
    --accent: #e46ad4;
    --accent-strong: #f39be6;
    --accent-soft: #2e1636;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--fg); font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
section { padding: 88px 0; position: relative; scroll-margin-top: 60px; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.15rem; }
.lead { color: var(--muted); font-size: 1.125rem; max-width: 640px; margin: 18px 0 0; }
.muted { color: var(--muted); }
.kicker { margin: 0 0 12px; color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; display: flex; align-items: center; gap: 8px; }
.kicker .dot { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1.5px solid transparent; transition: transform .15s, background-position .3s, border-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); background-size: 140% 100%; color: #fff; }
.btn-primary:hover { background-position: 100% 0; }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); }
.btn.sm { padding: 8px 16px; font-size: .9rem; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; height: 64px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark { display: inline-block; height: 24px; aspect-ratio: 844 / 133; background: linear-gradient(120deg, #f0368a 0%, #e0258f 55%, #c81aa0 100%);
  -webkit-mask: url(polbyte-wordmark.png) center / contain no-repeat; mask: url(polbyte-wordmark.png) center / contain no-repeat; }
.wordmark.sm { height: 14px; vertical-align: -2px; margin-right: 6px; }
.logo-tag { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1.5px solid currentColor; border-radius: 6px; padding: 2px 7px; }
.nav nav { margin-left: auto; display: flex; gap: 22px; }
.nav nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav nav a:hover { color: var(--fg); }

/* hero – brand gradient band, white text (as on polbyte.com) */
.hero, .game-hero { padding: 76px 0 92px; overflow: hidden; color: #fff; background: var(--hero); }
.hero .kicker, .game-hero .kicker, .game-hero .crumbs, .game-hero .crumbs a { color: rgba(255, 255, 255, .85); }
.hero .lead, .game-hero .lead { color: rgba(255, 255, 255, .9); }
.hero h1 em { font-style: normal; color: #ffd3f1; }
.hero .btn-primary, .game-hero .btn-primary { background: #fff; color: #8a1fb3; }
.hero .btn-ghost, .game-hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero .btn-ghost:hover, .game-hero .btn-ghost:hover { border-color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; position: relative; }
.screen-frame { position: relative; display: block; border-radius: var(--radius); padding: 8px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); transition: transform .2s; }
.screen-frame:hover { transform: translateY(-3px); }
.screen-frame img { border-radius: 12px; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.play-badge { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; padding-left: 4px;
  background: #fff; color: #8a1fb3; transition: transform .2s; }
.screen-frame:hover .play-badge, .cover:hover .play-badge { transform: scale(1.08); }
.play-badge.sm { width: 52px; height: 52px; margin: -26px 0 0 -26px; font-size: 18px; opacity: 0; }
.cover:hover .play-badge.sm { opacity: 1; }
.champ { position: absolute; left: 20px; bottom: 20px; background: #fff; color: #1a1424; border-radius: 999px; padding: 5px 14px; font-weight: 700; font-size: .88rem; }
.pixels { position: absolute; inset: 0; pointer-events: none; }
.pixels i { position: absolute; width: 12px; height: 12px; background: #fff; border-radius: 2px; opacity: .14; }
.pixels i:nth-child(1) { left: 3%; top: 16%; } .pixels i:nth-child(2) { left: 6%; top: 10%; width: 7px; height: 7px; opacity: .1; }
.pixels i:nth-child(3) { left: 46%; bottom: 10%; } .pixels i:nth-child(4) { left: 49%; bottom: 15%; width: 6px; height: 6px; opacity: .08; }
.pixels i:nth-child(5) { right: 4%; top: 12%; width: 10px; height: 10px; } .pixels i:nth-child(6) { right: 7%; top: 7%; width: 6px; height: 6px; opacity: .1; }

/* games grid – scales to any number of titles */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font: inherit; font-weight: 600; font-size: .9rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.filters button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.game-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.game-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.game-card[hidden] { display: none; }
.cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.body h3 a { text-decoration: none; }
.body h3 a:hover { color: var(--accent); }
.body p { margin: 0; color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tags span.soft { background: var(--bg-alt); color: var(--muted); }
.game-hero .tags span { background: rgba(255, 255, 255, .2); color: #fff; }
.game-hero .tags span.soft { background: transparent; border: 1px solid rgba(255, 255, 255, .4); color: rgba(255, 255, 255, .9); }
.meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .9rem; margin-top: auto; padding-top: 6px; }
.actions { display: flex; gap: 8px; }
.game-card.soon { border-style: dashed; background: transparent; }
.game-card.soon:hover { transform: none; border-color: var(--line); }
.soon-art { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--bg-alt); border-bottom: 1px dashed var(--line); }
.soon-art span { font-size: 56px; font-weight: 800; color: var(--line); }

/* hall of fame */
.dark { background: var(--bg-alt); }
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 32px; }
.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.board-head a { color: var(--accent); text-decoration: none; font-weight: 700; font-size: .9rem; }
.leaders { list-style: none; margin: 0; padding: 0; counter-reset: r; display: grid; }
.leaders li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); }
.leaders li:first-child { border-top: 0; }
.leaders li::before { counter-increment: r; content: counter(r); color: var(--muted); font-weight: 700; text-align: center; }
.leaders li:nth-child(1)::before { content: "🥇"; } .leaders li:nth-child(2)::before { content: "🥈"; } .leaders li:nth-child(3)::before { content: "🥉"; }
.leaders li.empty { display: block; color: var(--muted); } .leaders li.empty::before { content: none; }
.leaders li.empty a { color: var(--accent); font-weight: 600; }
.leaders .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.leaders .who small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.leaders b { text-align: right; font-variant-numeric: tabular-nums; }
.leaders b small { color: var(--muted); font-weight: 400; font-size: .8rem; }

/* b2b – brand gradient card, like the "startups" band on polbyte.com */
.b2b { padding: 72px 0; }
.b2b-box { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: 40px; border-radius: 24px; background: var(--hero); color: #fff; max-width: 1120px; }
.b2b-box .lead { color: rgba(255, 255, 255, .9); }
.b2b-box .btn-primary { background: #fff; color: #8a1fb3; }

/* game page */
.game-hero .tags { margin-top: 24px; }
.crumbs { margin: 0 0 14px; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.rules { padding: 0; list-style: none; display: grid; gap: 10px; margin: 20px 0 32px; }
.rules li { padding-left: 26px; position: relative; color: var(--muted); }
.rules li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 2px; background: var(--grad); }
.keys { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.keys span { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; }
.board.big table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board.big th { text-align: left; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.board.big td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.board.big tr:last-child td { border-bottom: 0; }
.board.big tr:nth-child(-n+3) td { font-weight: 700; }
.board.big .num { text-align: right; }
.board.big td:nth-child(2) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero-grid, .two-col { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 600px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 16px; }
  .nav nav a:not(.ext) { display: none; }
  .games, .boards { grid-template-columns: minmax(0, 1fr); }
  .b2b-box { padding: 26px; }
  .board.big th:nth-child(3), .board.big td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .screen-frame, .game-card { transition: none; } }
