@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Hanken+Grotesk:wght@400;500;600&display=swap");

:root {
  --bg: #14161c;
  --ink: #eceae4;
  --muted: #9a9ca6;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ff6b4a;
  --on-accent: #14161c;
  --panel: #1d2029;
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body[data-game="battle-dice"] {
  --bg: #0e1a2c;
  --ink: #f1ede3;
  --muted: #9fb0c8;
  --line: rgba(241, 237, 227, 0.16);
  --accent: #ff4d4d;
  --on-accent: #0e1a2c;
  --panel: #16273f;
}

body[data-game="pakjesfeest"] {
  --bg: #6e0f1f;
  --ink: #fff3da;
  --muted: #e9b9a6;
  --line: rgba(255, 243, 218, 0.2);
  --accent: #f4c24f;
  --on-accent: #4a0914;
  --panel: #861629;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; display: block; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }

/* header */
.site-head { display: flex; justify-content: space-between; align-items: center; padding: 1.4rem 0; gap: 1rem; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -0.01em; }
.site-head nav { display: flex; gap: 1.5rem; }
.site-head nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--ink); }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1rem; max-width: 62ch; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* home hero */
.hero { padding: 3rem 0 2.5rem; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); font-weight: 800; max-width: 14ch; }
.hero p { margin-top: 1.5rem; font-size: 1.2rem; color: var(--muted); }

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; margin: 1rem 0 4rem; }
.game-tile {
  position: relative; overflow: hidden; text-decoration: none;
  border-radius: 28px; padding: 2rem; min-height: 420px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform 0.25s ease;
}
.game-tile:hover { transform: translateY(-6px) rotate(-0.4deg); }
.game-tile h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.5rem; }
.game-tile p { margin: 0; max-width: 32ch; opacity: 0.85; }
.game-tile .art { position: absolute; top: 1.5rem; right: 1.5rem; width: 46%; max-width: 200px; }
.tile-dice { background: #0e1a2c; color: #f1ede3; box-shadow: inset 0 0 0 1px rgba(241, 237, 227, 0.14); }
.tile-gift { background: #6e0f1f; color: #fff3da; }
.tile-tag { display: inline-block; margin-bottom: 1rem; font-weight: 600; font-size: 0.9rem; opacity: 0.85; }

/* news */
.section { padding: 3rem 0; border-top: 1px solid var(--line); }
.feed { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--line); display: grid; gap: 1.75rem; }
.feed li { position: relative; }
.feed li::before {
  content: ""; position: absolute; left: calc(-1.5rem - 7px); top: 0.55rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.feed li.milestone::before { background: var(--accent); width: 14px; height: 14px; left: calc(-1.5rem - 8px); }
.feed time { color: var(--muted); font-size: 0.9rem; }
.feed .meta { display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap; }
.feed h3 { margin: 0.2rem 0 0.3rem; }
.feed p { margin: 0; color: var(--muted); }
.feed .from { font-size: 0.9rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.empty { color: var(--muted); }

/* work in progress */
.wip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.wip-card { background: var(--panel); border-radius: 20px; padding: 1.4rem; }
.wip-card p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.98rem; }
.chip { display: inline-block; font-size: 0.85rem; font-weight: 600; padding: 0.2rem 0.7rem; border-radius: 999px; margin-bottom: 0.8rem; }
.chip.building { background: var(--accent); color: var(--on-accent); }
.chip.testing { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.chip.planned { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }

/* game page */
.game-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; padding: 3rem 0 4rem; }
.game-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 800; }
.game-hero .lead { font-size: 1.25rem; margin-top: 1.25rem; color: var(--muted); }
.game-hero .art svg { width: 100%; height: auto; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.shot {
  aspect-ratio: 9 / 16; border-radius: 22px; border: 2px dashed var(--line);
  display: grid; place-items: center; text-align: center; color: var(--muted); padding: 1rem; font-size: 0.95rem;
}

.site-foot { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.95rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* one orchestrated moment: dice tumble on the home page */
@keyframes tumble { from { transform: rotate(-24deg) translateY(-14px); } to { transform: rotate(0) translateY(0); } }
.tile-dice .art { animation: tumble 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both; }

@media (max-width: 760px) {
  .games { grid-template-columns: 1fr; }
  .game-tile { min-height: 340px; }
  .game-hero { grid-template-columns: 1fr; gap: 2rem; }
  .game-hero .art { order: -1; max-width: 240px; }
  .shots { grid-template-columns: repeat(3, 70%); overflow-x: auto; padding-bottom: 0.5rem; scroll-snap-type: x mandatory; }
  .shot { scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile-dice .art { animation: none; }
  .btn, .game-tile { transition: none; }
}

/* long-form game text */
.prose h3 { margin: 2rem 0 0.75rem; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--ink); }
.ticks { list-style: none; margin: 0 0 1.25rem; padding: 0; columns: 2; column-gap: 2.5rem; max-width: 900px; }
.ticks li { break-inside: avoid; padding: 0.35rem 0 0.35rem 1.5rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.95rem; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ticks.plain li { padding-left: 0; }
.ticks.plain li::before { display: none; }
.note { background: var(--panel); border-radius: 16px; padding: 1rem 1.25rem; max-width: 62ch; margin-top: 1.5rem; }
.prose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 760px) { .ticks { columns: 1; } .prose-grid { grid-template-columns: 1fr; gap: 0; } }

/* language switch */
html[lang="en"] [data-l="nl"], html[lang="nl"] [data-l="en"] { display: none !important; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { background: transparent; color: var(--muted); border: 0; padding: 0.3rem 0.8rem; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.site-head nav { align-items: center; flex-wrap: wrap; }
.bold { font-weight: 700; }
.ticks.one { columns: 1; }

body[data-game="asteroid-miner"] {
  --bg: #14102a; --ink: #efe9ff; --muted: #a79fc4; --line: rgba(239, 233, 255, 0.16);
  --accent: #ffb347; --on-accent: #14102a; --panel: #1f1a3d;
}
.tile-rock { background: #14102a; color: #efe9ff; box-shadow: inset 0 0 0 1px rgba(239, 233, 255, 0.14); }
.badge { display: inline-block; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 0.55rem 1.1rem; font-weight: 600; }

/* screenshots with images */
.shot-fig { margin: 0; }
.shot-img { aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: var(--panel); display: grid; place-items: center; }
.shot-img img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.shot-img img.sprite { width: 70%; height: auto; }
.shot-fig figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.95rem; }

/* landscape screenshot gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.gal-fig { margin: 0; }
.gal-fig a { display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.gal-fig img { width: 100%; height: auto; display: block; transition: transform 0.25s ease; }
.gal-fig a:hover img { transform: scale(1.03); }
.gal-fig figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.95rem; }
@media (prefers-reduced-motion: reduce) { .gal-fig img { transition: none; } }
