/* ==========================================================================
   TASKBOXIE — site styles
   Fonts are self-hosted (no Google Fonts calls → no GDPR headaches).
   ========================================================================== */

@font-face { font-family: "Silkscreen"; src: url("../fonts/silkscreen-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("../fonts/silkscreen-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #0c0a0e;
  --bg-2: #120f15;
  --panel: #18141d;
  --panel-2: #1f1a25;
  --line: #2b2433;
  --line-2: #3a3144;
  --text: #efe8da;
  --muted: #a39a8b;
  --dim: #6f675c;
  --amber: #ffb02e;
  --amber-hot: #ffc857;
  --rust: #e07a2a;

  --f-pixel: "Silkscreen", ui-monospace, monospace;
  --f-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1180px;
  --r: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* faint CRT scanlines + vignette */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.16) 2px 3px);
  mix-blend-mode: multiply;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 99;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%);
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #000; padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12,10,14,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px/1 var(--f-pixel); letter-spacing: .06em; }
.brand img { image-rendering: pixelated; }
.brand-small { font-size: 14px; gap: 8px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font: 500 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em;
  text-decoration: none; color: var(--muted); padding: 10px 12px; border-radius: var(--r);
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav .nav-cta { color: var(--amber); border: 1px solid var(--line-2); margin-left: 6px; }
.nav .nav-cta:hover { border-color: var(--amber); }

/* ---------- shared bits ---------- */
.label { font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin: 0 0 14px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; }
.dot { width: 8px; height: 8px; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink 2.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 13px/1 var(--f-pixel); letter-spacing: .06em; text-transform: uppercase;
  padding: 15px 20px; border-radius: var(--r); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s, box-shadow .12s, background .12s;
}
.btn-primary { background: var(--amber); color: #1a0f02; box-shadow: 0 4px 0 #a2620c; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #a2620c; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #a2620c; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); background: var(--panel); }

/* ---------- hero ---------- */
.hero {
  position: relative; padding: 84px 0 72px;
  background:
    radial-gradient(800px 380px at 85% 10%, rgba(255,176,46,.10), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 100%;
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero::after { /* fade the grid out at the bottom */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(12,10,14,.55), rgba(12,10,14,.92) 85%, var(--bg));
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
h1 {
  font: 700 clamp(40px, 6.4vw, 78px)/1.02 var(--f-pixel);
  letter-spacing: -.01em; text-transform: uppercase; margin-bottom: 26px;
  text-shadow: 0 0 24px rgba(255,176,46,.15);
}
h1 .hl { color: var(--amber); text-shadow: 0 0 22px rgba(255,176,46,.45), 3px 3px 0 #5a2f05; }
.lede { font-size: 19px; color: var(--muted); max-width: 32em; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }

.stats { display: flex; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--r); width: fit-content; background: rgba(24,20,29,.6); }
.stats div { padding: 12px 20px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats dt { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.stats dd { margin: 0; font: 700 22px/1 var(--f-pixel); color: var(--text); }

/* featured card */
.feature {
  --accent: var(--amber);
  position: relative; display: block; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 30px 80px -30px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .2s, box-shadow .2s;
}
a.feature:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--accent), 0 40px 90px -30px color-mix(in srgb, var(--accent) 60%, transparent); }
.feature-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.feature-bar .leds { display: flex; gap: 6px; }
.feature-bar .leds i { width: 8px; height: 8px; background: var(--line-2); }
.feature-bar .leds i:first-child { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.feature .cover { aspect-ratio: 16 / 9; }
.feature-body { padding: 22px 22px 24px; }
.feature-body h3 { font: 700 30px/1.05 var(--f-pixel); text-transform: uppercase; margin-bottom: 10px; }
.feature-body p { color: var(--muted); margin-bottom: 18px; }
.feature-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- sections ---------- */
.section { padding: 96px 0; border-bottom: 1px solid var(--line); }
.section-tight { padding: 56px 0; }
.section h2 { font: 700 clamp(30px, 4vw, 44px)/1.05 var(--f-pixel); text-transform: uppercase; margin-bottom: 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2 { margin-bottom: 0; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: 500 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line-2);
  padding: 10px 14px; border-radius: 999px; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- game cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.card {
  --accent: var(--amber);
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--accent) 70%, transparent); }
.card.is-dev .cover canvas, .card.is-dev .cover img { filter: saturate(.75) brightness(.85); }
.card.is-dev:hover .cover canvas, .card.is-dev:hover .cover img { filter: none; }

.cover { position: relative; aspect-ratio: 16 / 9; background: #07060a; overflow: hidden; border-bottom: 1px solid var(--line); }
.cover canvas, .cover img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: transform .4s, filter .3s; }
.card:hover .cover canvas, .card:hover .cover img, a.feature:hover .cover canvas { transform: scale(1.04); }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font: 700 10px/1 var(--f-pixel); letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 9px; border-radius: 2px; background: rgba(7,6,10,.82); color: var(--text);
  border: 1px solid var(--line-2); backdrop-filter: blur(4px);
}
.badge.is-live { background: var(--accent); color: #0b0a0d; border-color: transparent; }
.badge-wt { left: auto; right: 12px; color: var(--muted); }

.card-body { display: flex; flex-direction: column; gap: 12px; padding: 20px; flex: 1; }
.card-body h3 { font: 700 21px/1.1 var(--f-pixel); text-transform: uppercase; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.card-body p { color: var(--muted); font-size: 15.5px; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { font: 500 11px/1 var(--f-mono); color: var(--muted); padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 2px; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.platform { font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.play {
  position: relative; z-index: 2;
  font: 700 12px/1 var(--f-pixel); letter-spacing: .06em; text-transform: uppercase;
  color: #0b0a0d; background: var(--accent); padding: 11px 14px; border-radius: 3px; text-decoration: none;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 45%, #000);
}
.play:hover { filter: brightness(1.1); }
.soon { font: 700 11px/1 var(--f-pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }

.empty { color: var(--muted); font-family: var(--f-mono); }

/* ---------- news ---------- */
.news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news li { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.news time { font: 500 13px/1.6 var(--f-mono); color: var(--amber); }
.news a { color: var(--text); text-decoration-color: var(--amber); text-underline-offset: 3px; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.about-grid > div > p { color: var(--muted); font-size: 18px; max-width: 34em; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pillars li { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.pillar-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; font-size: 20px; color: var(--amber); border: 1px solid var(--line-2); background: var(--bg-2); border-radius: 3px; }
.pillars h3 { font: 700 15px/1.2 var(--f-pixel); text-transform: uppercase; margin-bottom: 6px; }
.pillars p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- contact ---------- */
.contact { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.contact-inner { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.contact-inner p { color: var(--muted); }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- bitcoin donate ---------- */
:root { --btc: #f7931a; }
button.nav-cta { font: 500 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; background: none; cursor: pointer; padding: 10px 12px; border-radius: var(--r); }
.nav .nav-btc, button.nav-btc { color: var(--btc); border: 1px solid color-mix(in srgb, var(--btc) 45%, var(--line-2)); margin-left: 6px; }
.nav-btc:hover { background: color-mix(in srgb, var(--btc) 14%, transparent); border-color: var(--btc); }

.support {
  margin-top: 48px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: 24px 26px; border-radius: 6px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--btc) 12%, var(--panel)), var(--panel) 55%);
  border: 1px solid color-mix(in srgb, var(--btc) 35%, var(--line));
}
.support[hidden] { display: none; }
.support-coin {
  width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  font: 700 30px/1 var(--f-body); color: #2a1600; background: var(--btc);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 0 26px color-mix(in srgb, var(--btc) 45%, transparent);
}
.support h3 { font: 700 18px/1.2 var(--f-pixel); text-transform: uppercase; margin-bottom: 6px; }
.support p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 44em; }
.btn-btc { background: var(--btc); box-shadow: 0 4px 0 #9a5404; color: #1e1000; }
.btn-btc:hover { box-shadow: 0 6px 0 #9a5404; }
.btn-btc:active { box-shadow: 0 1px 0 #9a5404; }

.donate {
  width: min(440px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: auto;
  padding: 26px 24px 22px; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--panel); color: var(--text);
  box-shadow: 0 30px 90px -20px color-mix(in srgb, var(--btc) 40%, transparent);
}
.donate::backdrop { background: rgba(5,4,7,.78); backdrop-filter: blur(3px); }
.donate[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.donate h2 { font: 700 26px/1.1 var(--f-pixel); text-transform: uppercase; margin-bottom: 8px; }
.donate .label { color: var(--btc); }
.donate-sub { color: var(--muted); font-size: 15px; }
.donate-close-form { position: absolute; top: 10px; right: 10px; margin: 0; }
.donate-x { width: 36px; height: 36px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); border-radius: 4px; cursor: pointer; font-size: 15px; }
.donate-x:hover { color: var(--text); border-color: var(--muted); }
.donate-qr { width: 230px; max-width: 100%; margin: 6px auto 18px; padding: 0; background: #fff8ea; border-radius: 6px; border: 4px solid var(--btc); }
.donate-qr svg { display: block; width: 100%; height: auto; }
.donate-qr svg rect[fill="white"], .donate-qr svg rect[fill="#ffffff"] { fill: #fff8ea; }
.donate-addr { display: flex; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.donate-addr code {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line-2);
  font: 500 13px/1.45 var(--f-mono); word-break: break-all; user-select: all; -webkit-user-select: all; color: var(--text);
}
.donate-copy { padding: 0 16px; flex: none; }
.donate-copy.is-done { border-color: #6dff9e; color: #6dff9e; }
.donate-wallet { width: 100%; background: var(--btc); box-shadow: 0 4px 0 #9a5404; color: #1e1000; }
.donate-note { margin: 14px 0 0; font: 400 12px/1.5 var(--f-mono); color: var(--dim); }

.footer-btc { background: none; border: 0; padding: 0; font: inherit; color: var(--btc); cursor: pointer; }
.footer-btc:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .support { grid-template-columns: auto 1fr; }
  .support .btn-btc { grid-column: 1 / -1; width: 100%; }
}

/* ---------- footer ---------- */
.footer { padding: 28px 0 40px; color: var(--dim); font: 500 12px/1 var(--f-mono); letter-spacing: .06em; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer .brand { color: var(--muted); }

.noscript { position: fixed; bottom: 16px; left: 16px; right: 16px; padding: 14px; background: var(--panel); border: 1px solid var(--amber); z-index: 300; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .stats div { padding: 10px 14px; }
  .stats dd { font-size: 18px; }
  .news li { grid-template-columns: 1fr; gap: 4px; }
  .btn { width: 100%; }
  .feature-body h3 { font-size: 24px; }
}

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

/* donate + nav fixes for small screens */
.nav-cta { white-space: nowrap; }
.donate .donate-copy { width: auto; }
@media (max-width: 520px) {
  .nav #nav-itch { display: none; }   /* itch.io is still in Contact */
  .brand { font-size: 17px; }
  .donate { padding: 22px 18px 18px; }
  .donate-qr { width: 200px; }
}
.donate:focus, .donate:focus-visible { outline: none; }
