/* jantagames — site (same "kitchen" base as the itch.io custom page) */
:root {
  --bg: #0F1117; --panel: #1B1F2A; --text: #E6E6EB; --muted: #9A9AA6;
  --accent: #FF6A3D; --cyan: #3DD9D6; --ink: #0F1117;
  --pop: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif; font-size: 18px; line-height: 1.6; }
a { color: var(--accent); }
a:hover { color: var(--cyan); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ---------- Tabs (name plates) ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(15,17,23,.92);
  backdrop-filter: blur(6px); border-bottom: 2px solid var(--panel); }
.topbar .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 1px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand b { color: var(--accent); }
.tabs { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tabs a { display: inline-block; padding: 3px 12px; background: var(--panel); color: var(--text);
  border: 3px solid var(--ink); border-radius: 6px; box-shadow: 0 3px 0 #000;
  font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .25s var(--pop); }
.tabs a:hover, .tabs a[aria-current="page"] { background: var(--cyan); color: var(--ink); transform: rotate(-2deg) scale(1.05); }

/* ---------- Hero: banner + hat + stack + tray ---------- */
.hero { position: relative; max-width: 960px; margin: 0 auto; }
.hero > img.banner { display: block; width: 100%; height: auto; }
.hero .spot { position: absolute; top: 0; line-height: 0; }
.hero .spot img { display: block; width: 100%; }
/* % margins use the WIDTH, so they follow the 960x340 banner at any size */
.hero .hat { left: 9.06%; width: 16.67%; margin-top: .83%; z-index: 3; cursor: help; }
.hero .hat img { transform-origin: 100% 100%; transition: transform .45s var(--pop); }
.hero .hat:hover img, .hero .hat:focus-within img { transform: translate(24%, -40%) rotate(24deg); }
.hero .stack { left: 9.58%; width: 15.63%; margin-top: 6.25%; z-index: 2; pointer-events: none; }
.hero .stack img { opacity: 0; transform: translateY(25%) scale(.7); transition: opacity .2s, transform .4s var(--pop); }
.hero .hat:hover + .stack img, .hero .hat:focus-within + .stack img { opacity: 1; transform: none; }
.hero .tray { left: 31.67%; width: 32.08%; margin-top: 11.25%; z-index: 3; display: flex; justify-content: space-between; }
.hero .tray a { width: 14.3%; transition: transform .25s var(--pop); }
.hero .tray a:hover, .hero .tray a:focus-visible { transform: translateY(-18%) rotate(-6deg); }

/* ---------- Sections ---------- */
section { padding: 36px 0 12px; }
h1, h2 { line-height: 1.2; }
h2 { font-size: 30px; margin: 0 0 8px; }
h2 span { color: var(--accent); }
.lead { font-size: 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.stats li { background: var(--panel); border: 3px solid var(--ink); border-radius: 6px; padding: 4px 14px; font-size: 16px; }
.stats b { color: var(--cyan); }

/* ---------- Games: tray with a lid ---------- */
.menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 64px 34px; padding: 40px 10px 40px; }
.dish { position: relative; display: block; text-align: center; color: var(--text); text-decoration: none; padding-top: 28px; }
.dish .thumb { position: relative; }
.dish .thumb img { position: relative; z-index: 1; display: block; width: 100%; aspect-ratio: 315 / 250;
  object-fit: cover; border-radius: 6px; filter: brightness(.12); transition: filter .35s; }
.dish .thumb::before { content: ""; position: absolute; left: -7%; right: -7%; bottom: -9%; height: 16%;
  background: url("plate.svg") center / 100% 100% no-repeat; z-index: 0; }
.dish .thumb::after { content: ""; position: absolute; left: -3%; right: -3%; top: -11%; bottom: -2%;
  background: url("cloche.svg") center bottom / 100% 100% no-repeat; z-index: 2;
  transform-origin: 90% 90%; transition: transform .5s var(--pop); }
.dish:hover .thumb::after, .dish:focus-visible .thumb::after { transform: translate(14%, -58%) rotate(22deg) scale(.82); }
.dish:hover .thumb img, .dish:focus-visible .thumb img { filter: none; }
.plaque { position: relative; z-index: 3; display: inline-block; max-width: 90%; margin-top: 22px; padding: 5px 14px;
  background: var(--cyan); color: var(--ink); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 0 4px 0 var(--ink);
  font-weight: 700; font-size: 17px; transition: transform .25s var(--pop); }
.dish:hover .plaque { transform: rotate(-2deg) scale(1.04); }
.dish p { max-height: 0; opacity: 0; overflow: hidden; margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.4;
  transition: max-height .35s, opacity .25s, margin .35s; }
.dish:hover p, .dish:focus-visible p { max-height: 7em; opacity: 1; margin-top: 10px; }
.dish small { display: block; color: var(--accent); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- Text pages (privacy) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 30px 16px 60px; }
.doc h1 { font-size: 34px; margin-bottom: 4px; }
.doc h2 { font-size: 24px; margin-top: 2.2em; padding-top: 1em; border-top: 2px solid var(--panel); }
.doc nav a { margin-right: 14px; }
.cards { display: grid; gap: 14px; padding: 0; list-style: none; }
.cards a { display: block; padding: 14px 18px; background: var(--panel); border: 3px solid var(--ink); border-radius: 8px;
  box-shadow: 0 4px 0 #000; color: var(--text); text-decoration: none; transition: transform .25s var(--pop); }
.cards a:hover { transform: translateY(-3px); color: var(--cyan); }

footer { margin-top: 40px; padding: 24px 16px 40px; border-top: 2px solid var(--panel); text-align: center; color: var(--muted); font-size: 15px; }
footer a { margin: 0 6px; }

/* Touch: no hover, so lids start open */
@media (hover: none) {
  .dish .thumb::after { transform: translate(14%, -58%) rotate(22deg) scale(.82); }
  .dish .thumb img { filter: none; }
  .dish p { max-height: 7em; opacity: 1; margin-top: 10px; }
  .hero .stack img { opacity: 1; transform: none; }
  .hero .hat img { transform: translate(24%, -40%) rotate(24deg); }
}
/* Narrow: tray icons get too small to tap, so they drop below the banner */
@media (max-width: 600px) {
  .hero .tray { position: static; display: flex; justify-content: center; gap: 12px; width: auto; margin: 12px 0 0; }
  .hero .tray a { width: 40px; }
  .brand span { display: none; }
  .tabs a { padding: 3px 9px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
