/* Grazulex Games — "arcade night": dark cabinet, orange studio mark, one accent per game. */
:root {
  --bg: #0b0d14;
  --panel: #131725;
  --panel-2: #1a1f30;
  --line: #2a3047;
  --text: #ece8df;
  --muted: #a9afc0;
  --brand: #f5a623;
  --ink: #1c1a17;
  --accent: var(--brand);
  --radius: 14px;
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font: 1.0625rem/1.6 var(--body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245, 166, 35, .13), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: #ffc35a; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); margin-top: 2.2em; }
h3 { font-size: 1.45rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--brand); color: var(--ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 1rem; }

/* Header & footer */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 72rem; width: 100%; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 2rem);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-family: var(--display); font-size: 1.2rem; font-weight: 700; letter-spacing: .04em; }
.brand b { color: var(--brand); }
.brand:hover { color: var(--text); }
.logo { flex: none; }
.top nav { display: flex; gap: 1.2rem; font-family: var(--display); font-weight: 500; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }

main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 4rem; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; padding: 1.6rem clamp(1rem, 4vw, 2rem); text-align: center; }
.foot p { margin: .3rem 0; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* Hero */
.hero { padding: clamp(2.5rem, 8vw, 5.5rem) 0 1rem; max-width: 46rem; }
.hero.narrow { padding-bottom: 4rem; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .25em; font-size: .85rem; color: var(--brand); margin: 0 0 .8rem; }
.hero h1 { text-shadow: 0 0 28px rgba(245, 166, 35, .25); }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0; }

/* Home grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.card a {
  display: flex; flex-direction: column; height: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card a:hover, .card a:focus-visible { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 30px -12px var(--accent); }
.card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--panel-2); }
.card-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.15rem 1.2rem; flex: 1; }
.card-genre { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
.card-title { font-family: var(--display); font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.card-tagline { color: var(--muted); }
.card-stores { margin-top: auto; padding-top: .6rem; font-size: .88rem; color: var(--muted); border-top: 1px dashed var(--line); }
.all-itch { margin-top: 2rem; font-family: var(--display); font-weight: 500; font-size: 1.1rem; }

/* All games: compact cards in groups, with a platform filter (shown by its script only) */
.all-games { margin-top: 3.5rem; }
.all-games [hidden] { display: none !important; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; }
.filter {
  font: 600 .95rem/1.2 var(--display); color: var(--muted); cursor: pointer;
  min-height: 2.5rem; padding: .45rem 1rem; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
}
.filter:hover { color: var(--text); border-color: var(--muted); }
.filter[aria-pressed="true"] { color: var(--ink); background: var(--brand); border-color: var(--brand); }
.filter:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.group { margin: 0 0 2.2rem; }
.group-title { font-family: var(--display); font-size: 1.25rem; margin: 0 0 .3rem; }
.group-intro { color: var(--muted); margin: 0 0 1rem; }
.group-title + .mini-grid { margin-top: 1rem; }
.mini-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.mini a {
  display: flex; flex-direction: column; height: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}
.mini a:hover, .mini a:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.mini img { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; background: var(--panel-2); }
.mini-body { display: flex; flex-direction: column; gap: .25rem; padding: .7rem .85rem .85rem; flex: 1; }
.mini .card-genre { font-size: .72rem; }
.mini-title { font-family: var(--display); font-size: 1.15rem; font-weight: 700; line-height: 1.15; }
.mini-tagline { color: var(--muted); font-size: .92rem; }
.mini-stores { margin-top: auto; padding-top: .45rem; font-size: .8rem; color: var(--muted); }
.filter-empty { color: var(--muted); }

/* Social accounts (home hero and footer) */
.follow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-top: 1.2rem; }
.follow-label { font-family: var(--display); font-weight: 500; color: var(--muted); }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.social a {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: .35rem .8rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: .92rem;
}
.social a:hover, .social a:focus-visible { border-color: var(--brand); color: var(--brand); }
.social svg { flex: none; }
.foot-social { justify-content: center; margin-top: .8rem; }

/* Game page */
.crumb { margin: 1.5rem 0 1rem; font-family: var(--display); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--text); }
.game-head { display: grid; gap: 1.6rem 2.2rem; align-items: start; }
@media (min-width: 60rem) { .game-head { grid-template-columns: 1.35fr 1fr; } }
.game-cover { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 20px 50px -25px var(--accent); }
.game-intro h1 { margin-bottom: .2em; }
.tagline { font-size: 1.2rem; color: var(--accent); font-family: var(--display); font-weight: 500; margin: 0 0 1rem; }
.facts { margin: 0 0 1.2rem; display: grid; gap: .3rem; }
.facts div { display: flex; flex-wrap: wrap; gap: .2rem .6rem; }
.facts dt { color: var(--muted); min-width: 6.5rem; }
.facts dd { margin: 0; }
.about { max-width: 44rem; margin-top: 2rem; }
.about p { margin: 0 0 1em; }
.extra, .trailer { margin: .6rem 0; }
.extra a, .trailer a { font-weight: 600; }

/* Store buttons */
.stores { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 3.2rem; min-width: 10rem;
  padding: .45rem 1rem .5rem 1rem; border-radius: 10px; text-decoration: none;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-left: 4px solid var(--store, var(--brand));
  transition: background .15s ease, border-color .15s ease;
}
.store:hover, .store:focus-visible { background: #232a40; color: var(--text); border-color: var(--store, var(--brand)); }
.store-get { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; line-height: 1.2; }
.store-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.store-steam { --store: #66c0f4; }
.store-itch { --store: #fa5c5c; }
.store-google-play { --store: #34a853; }
.store-app-store { --store: #4aa3ff; }
.store-web { --store: var(--accent); }

/* Screenshots */
.shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.shots-portrait { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); max-width: 46rem; }
.shots img { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }

/* Collection */
.jump { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.jump a { display: inline-block; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .95rem; }
.jump a:hover { border-color: var(--accent); }
.sub {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem 2rem; padding: clamp(1rem, 4vw, 1.6rem); margin: 0 0 1.6rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 1rem;
}
@media (min-width: 52rem) {
  .sub { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .sub .shots { grid-column: 1 / -1; }
}
.sub-cover { width: 100%; border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; }
.sub-body h3 { margin-bottom: .2em; }
.sub-body p { margin: 0 0 .9rem; }
.sub .shots-portrait { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); max-width: 26rem; }

/* Privacy */
.prose { max-width: 46rem; padding-top: 2rem; }

/* Buttons & cookie banner */
.btn {
  display: inline-block; font: 700 1rem var(--display); cursor: pointer;
  background: var(--brand); color: var(--ink); border: 2px solid var(--brand); border-radius: 10px; padding: .55rem 1.2rem; text-decoration: none;
}
.btn:hover { background: #ffc35a; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.cookies {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 20; max-width: 40rem; margin: 0 auto;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55); font-size: .95rem;
}
.cookies[hidden] { display: none; }
.cookies p { margin: 0 0 .8rem; }
.cookies-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 30rem) {
  .top { flex-wrap: wrap; }
  .brand span { font-size: 1.05rem; }
  .store { min-width: 0; flex: 1 1 9rem; }
}
