/*
 * hub.css – styles for the games.shahak.studio hub page (not used by the games).
 * Mobile first, RTL, self-hosted Rubik font.
 */
@font-face {
  font-family: 'Rubik'; font-weight: 500; font-display: swap;
  src: url('fonts/rubik-hebrew-500-normal.woff2') format('woff2');
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Rubik'; font-weight: 500; font-display: swap;
  src: url('fonts/rubik-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rubik'; font-weight: 900; font-display: swap;
  src: url('fonts/rubik-hebrew-900-normal.woff2') format('woff2');
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Rubik'; font-weight: 900; font-display: swap;
  src: url('fonts/rubik-latin-900-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

:root {
  --bg: #1a0d0b;
  --surface: #2a1512;
  --ink: #fbefe4;
  --muted: #c9ab9b;
  --accent: #ffc93c;
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
}

.hub {
  max-width: 880px;
  margin: 0 auto;
  padding: calc(40px + env(safe-area-inset-top)) 16px 48px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-align: right;
}

h1 {
  margin: 4px 0 8px;
  font-weight: 900;
  font-size: clamp(2.4rem, 9vw, 4rem);
  line-height: 1;
}

.lead {
  margin: 0 0 32px;
  max-width: 34em;
  color: var(--muted);
  line-height: 1.5;
}

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.game {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  background: radial-gradient(circle at 70% 0%, #a3121a 0%, #5c0709 55%, var(--surface) 100%);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.game:hover { transform: translateY(-2px); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45); }
.game:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.game img {
  width: 100%;
  max-width: 420px;
  height: auto;
  justify-self: center;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.4));
}

.game-text { display: grid; gap: 6px; }
.game-title { font-weight: 900; font-size: 1.6rem; }
.game-desc { color: var(--muted); line-height: 1.45; }

.game-cta {
  justify-self: start;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #8a0c10;
  font-weight: 900;
}

@media (min-width: 720px) {
  .game {
    grid-template-columns: 300px 1fr auto;
    align-items: center;
    padding: 20px 24px;
  }
  .game-cta { justify-self: end; }
}

/* ---------- footer links (hub) ---------- */
.legal-links {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--muted);
}
.legal-links a { color: var(--muted); }

/* ---------- text pages: privacy, accessibility ---------- */
.doc { max-width: 680px; line-height: 1.6; }
.doc h1 { font-size: clamp(2rem, 7vw, 2.8rem); margin-top: 12px; }
.doc h2 { font-weight: 900; font-size: 1.25rem; margin: 28px 0 8px; color: var(--accent); }
.doc ul { padding-inline-start: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--accent); }
.doc .updated { color: var(--muted); font-size: 0.9rem; margin-top: 0; }
.doc .back { margin: 0; }
.doc .back a::before { content: '→ '; }

@media (prefers-reduced-motion: reduce) {
  .game { transition: none; }
  .game:hover { transform: none; }
}
