/* rkj dev Play: the site's candlelit palette, turned up a little for games. */
:root {
  --night: #16101a;
  --dusk: #1f1824;
  --dusk-2: #271e2e;
  --wick: #372c3d;
  --underline: #5b4b61;
  --ash: #a69daa;
  --bone: #efe7dc;
  --flame: #f4b860;
  --ember: #c8703f;
  --violet: #6e4a9e;
  --lilac: #b494e8;
  --mint: #6fd6a8;
  --rose: #ef6f7c;
  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --text: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
  --ease-out: cubic-bezier(.2, .7, .1, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --radius: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--bone);
  font: 400 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 6px; }
.wrap { position: relative; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: var(--gutter); top: -48px; z-index: 60;
  background: var(--flame); color: var(--night); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.backdrop {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
  background: linear-gradient(170deg, #1a1320 0%, #16101a 38%, #130e17 72%, #110c14 100%);
}
.backdrop::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 30% at 12% 0%, rgba(244, 184, 96, .10), transparent 70%),
    radial-gradient(38% 32% at 86% 14%, rgba(110, 74, 158, .18), transparent 70%),
    radial-gradient(40% 34% at 70% 92%, rgba(84, 58, 132, .14), transparent 70%);
  animation: drift 40s ease-in-out infinite alternate;
}
.backdrop::after {
  content: ""; position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate3d(-4%, 3%, 0) scale(1.06); } }

/* Header (matches the blog) */
.top { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease; }
.top.scrolled, .top.solid {
  background: rgba(22, 16, 26, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(55, 44, 61, .7);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font: 500 16px/1 var(--display); letter-spacing: .01em; text-decoration: none; }
.mark::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--flame); box-shadow: 0 0 14px 3px rgba(244, 184, 96, .45); }
.top nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.top nav a { color: var(--ash); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; transition: color .25s ease; }
.top nav a:hover, .top nav a[aria-current] { color: var(--bone); }
.top nav a[aria-current] { box-shadow: inset 0 -1px 0 var(--flame); }
@media (max-width: 520px) { .top nav a.opt { display: none; } }

/* Buttons */
.btn {
  --bg: var(--flame); --fg: #1b1210;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: 16px; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 30px -10px rgba(244, 184, 96, .55);
  transition: transform .2s var(--spring), box-shadow .2s ease, background-color .2s ease, opacity .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 16px 36px -12px rgba(244, 184, 96, .7); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { --bg: rgba(255, 255, 255, .04); --fg: var(--bone); box-shadow: 0 0 0 1px var(--wick) inset; }
.btn.ghost:hover { --bg: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1px var(--underline) inset; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .04); color: var(--ash); box-shadow: 0 0 0 1px var(--wick) inset;
  transition: color .2s, background-color .2s, transform .2s var(--spring);
}
.icon-btn:hover { color: var(--bone); background: rgba(255, 255, 255, .08); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; }

/* Dialogs */
dialog.sheet {
  width: min(520px, calc(100vw - 24px)); max-height: min(86vh, 760px); padding: 0; border: 0; border-radius: 24px;
  background: linear-gradient(180deg, #241b2a, #1b1420); color: var(--bone);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 120px -20px rgba(0, 0, 0, .8);
}
dialog.sheet[open] { animation: pop .35s var(--spring); }
dialog.sheet::backdrop { background: rgba(10, 6, 12, .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.sheet-in { padding: 28px clamp(20px, 5vw, 32px) 30px; overflow: auto; max-height: inherit; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sheet-head h2 { margin: 0; font: 500 20px/1.2 var(--display); }
dialog.sheet p { color: #d9d0dc; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 84px; z-index: 80; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 12px; background: var(--bone); color: var(--night); font-weight: 600; font-size: 15px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .6); transition: opacity .2s, transform .3s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Hub: a plain index of games, each with a real preview */
.index { max-width: 1060px; margin: 0 auto; padding: clamp(40px, 9vh, 96px) var(--gutter) 40px; }
.index h1 { margin: 0; font: 500 clamp(40px, 6vw, 64px)/1 var(--display); letter-spacing: -.02em; }
.index .intro { max-width: 46ch; margin: 18px 0 0; font-size: 19px; line-height: 1.55; color: var(--ash); }
.list { list-style: none; margin: clamp(40px, 7vh, 72px) 0 0; padding: 0; }
.list li + li { margin-top: clamp(36px, 6vh, 56px); }
.entry { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; text-decoration: none; color: inherit; }
.entry .shot { display: block; aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--dusk); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.entry .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.entry:hover .shot img { transform: scale(1.02); }
.entry h2 { margin: 0; font: 500 clamp(26px, 3vw, 34px)/1.1 var(--display); letter-spacing: -.01em; }
.entry:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--flame); }
.entry p { margin: 12px 0 0; font-size: 17px; line-height: 1.55; color: #d4cad8; }
.entry .status { margin-top: 14px; font-size: 15px; color: var(--ash); }
.entry .status b { color: var(--bone); font-weight: 600; }
.later { margin: clamp(48px, 8vh, 80px) 0 0; font-size: 15px; color: var(--ash); }
@media (max-width: 760px) { .entry { grid-template-columns: 1fr; } }

.foot { padding: 40px 0 56px; border-top: 1px solid rgba(55, 44, 61, .6); color: var(--ash); font-size: 14px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.foot a { color: var(--bone); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
