/* GameHub — torch-lit hall. Palette mirrors the tavern art bible:
   warm torch key on dark stone, cool night fill, gold = interactive. */
:root {
  --ink: #e8dcc3;          /* parchment text */
  --ink-dim: #b3a688;
  --gold: #d9a441;
  --gold-bright: #f0c368;
  --stone-9: #14100d;      /* page background */
  --stone-8: #1d1712;
  --stone-7: #272019;      /* cards */
  --stone-6: #362c21;      /* borders/raised */
  --ember: #a33c22;
  --serif: "Source Serif 4", Georgia, serif;
  --display: "Cinzel", "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--stone-9); color: var(--ink);
  font-family: var(--serif); line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); }

/* ---- hero ---- */
.hero { position: relative; min-height: 72vh; display: grid; place-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: url("assets/shots/hub.jpg") center 30% / cover no-repeat;
  filter: saturate(1.05);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(20,16,13,0) 0%, rgba(20,16,13,.55) 62%, var(--stone-9) 100%),
    linear-gradient(to bottom, rgba(20,16,13,.35), rgba(20,16,13,.15) 40%, var(--stone-9) 96%);
}
.hero-inner { position: relative; text-align: center; padding: 6rem 1.25rem 7rem; max-width: 46rem; }
.hero-kicker {
  font-family: var(--display); letter-spacing: .35em; text-transform: lowercase;
  color: var(--gold-bright); margin: 0 0 .25rem; text-shadow: 0 1px 8px rgba(0,0,0,.8);
}
.hero h1 {
  font-family: var(--display); font-weight: 900; margin: 0;
  font-size: clamp(3.2rem, 9vw, 5.5rem); color: #f5ead0;
  text-shadow: 0 2px 6px rgba(0,0,0,.85), 0 0 42px rgba(217,164,65,.35);
}
.hero-sub {
  color: var(--ink); font-size: 1.12rem; margin: 1rem auto 2rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.9); max-width: 34rem;
}

/* ---- buttons ---- */
.btn {
  display: inline-block; font-family: var(--display); font-weight: 700;
  letter-spacing: .06em; text-decoration: none; cursor: pointer;
  padding: .78rem 1.6rem; border-radius: 6px; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #241a0d; border-color: #8a6320;
  box-shadow: 0 2px 14px rgba(217,164,65,.35), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:hover { box-shadow: 0 4px 20px rgba(217,164,65,.5), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-ghost {
  background: rgba(39,32,25,.7); color: var(--ink);
  border-color: var(--stone-6);
}
.btn-ghost:hover { background: var(--stone-6); }
.btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---- library ---- */
main { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem 4rem; }
.section-title {
  font-family: var(--display); font-weight: 700; color: var(--gold-bright);
  font-size: 2rem; text-align: center; margin: 1.5rem 0 2.25rem; letter-spacing: .08em;
}
.section-title::after {
  content: ""; display: block; width: 84px; height: 2px; margin: .8rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  background: var(--stone-7); border: 1px solid var(--stone-6); border-radius: 10px;
  overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: inherit;
  font: inherit; display: flex; flex-direction: column; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-3px); border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 24px rgba(217,164,65,.12);
  outline: none;
}
.card-cover { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .3rem; }
.card h3 { font-family: var(--display); margin: 0; color: #f2e6c9; font-size: 1.25rem; }
.card .tagline { color: var(--ink-dim); margin: 0; font-size: .95rem; }
.card .badges { margin-top: .55rem; display: flex; gap: .45rem; flex-wrap: wrap; }
.badge {
  font-size: .72rem; letter-spacing: .05em; text-transform: uppercase;
  padding: .18rem .55rem; border-radius: 999px; border: 1px solid var(--stone-6);
  color: var(--ink-dim); background: var(--stone-8);
}
.badge.play { color: #241a0d; background: var(--gold); border-color: #8a6320; font-weight: 600; }
.badge.dl { color: var(--ink); border-color: var(--gold); }

/* ---- shared detail-page pieces (gallery, actions, meta) ---- */
.m-thumbs { display: flex; gap: .5rem; padding: .6rem; background: var(--stone-9); overflow-x: auto; }
.m-thumbs img {
  width: 108px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px;
  cursor: pointer; opacity: .55; border: 1px solid transparent;
}
.m-thumbs img.on, .m-thumbs img:hover { opacity: 1; border-color: var(--gold); }
.m-tagline { color: var(--gold-bright); font-style: italic; margin: .25rem 0 1rem; }
.m-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.m-actions .note { flex-basis: 100%; color: var(--ink-dim); font-size: .85rem; margin: .1rem 0 0; }
.m-desc p { margin: .6rem 0; }
.m-desc ul { margin: .6rem 0; padding-left: 1.2rem; }
.m-desc li { margin: .3rem 0; }
.m-meta {
  margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--stone-6);
  color: var(--ink-dim); font-size: .88rem;
}
.m-meta dt { font-weight: 600; color: var(--ink); float: left; clear: left; width: 9.5rem; }
.m-meta dd { margin: 0 0 .35rem 10rem; }

/* ---- individual game page ---- */
.g-top { max-width: 62rem; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
.back { font-family: var(--display); text-decoration: none; letter-spacing: .04em; }
.back:hover { color: var(--gold-bright); }
.g-main { max-width: 62rem; margin: 0 auto; padding: .8rem 1.25rem 3rem; }
.g-main h1 {
  font-family: var(--display); font-weight: 900; color: #f2e6c9;
  font-size: clamp(2rem, 5vw, 3rem); margin: .4rem 0 0;
}
.g-embed {
  margin: 1.2rem 0 1.4rem; border: 1px solid var(--stone-6); border-radius: 10px;
  overflow: hidden; background: #000;
  box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 0 30px rgba(217,164,65,.08);
}
.g-embed iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.g-embed-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .55rem .9rem; background: var(--stone-8); color: var(--ink-dim); font-size: .88rem;
}
.g-gallery { border: 1px solid var(--stone-6); border-radius: 10px; overflow: hidden; margin: 1.4rem 0; }
.g-gallery img#g-shot { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

footer { border-top: 1px solid var(--stone-6); padding: 2rem 1.25rem 3rem; text-align: center; color: var(--ink-dim); }
footer .fine { font-size: .82rem; max-width: 40rem; margin: .8rem auto 0; }

@media (max-width: 560px) {
  .m-meta dt { float: none; width: auto; }
  .m-meta dd { margin-left: 0; }
}
