/* Garax: shared styles for every page. No external fonts, no scripts. */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #16161a;
  --muted: #5d5d66;
  --border: #e4e4df;
  --accent: #e8492c;
  --accent-text: #ffffff;
  --brick-1: #e8492c;
  --brick-2: #f29a1f;
  --brick-3: #2f9e6e;
  --brick-4: #3a6fd8;
  --radius: 14px;
  --max: 44rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121215;
    --surface: #1b1b20;
    --text: #ececef;
    --muted: #a3a3ad;
    --border: #2c2c33;
    --accent: #ff6a4d;
    --accent-text: #121215;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.logo-mark {
  display: inline-grid;
  grid-template-columns: repeat(2, 0.55rem);
  gap: 2px;
}

.logo-mark span {
  height: 0.38rem;
  border-radius: 2px;
}

.logo-mark span:nth-child(1) { background: var(--brick-1); }
.logo-mark span:nth-child(2) { background: var(--brick-2); }
.logo-mark span:nth-child(3) { background: var(--brick-3); }
.logo-mark span:nth-child(4) { background: var(--brick-4); }

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-header nav a:hover {
  color: var(--text);
}

main {
  padding: 2.5rem 0 3rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

.site-footer a {
  color: var(--muted);
}

/* Typography */

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

/* Bricks: decorative row, pure CSS */

.bricks {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  max-width: 16rem;
  margin: 0 0 1.5rem;
}

.bricks span {
  height: 0.7rem;
  border-radius: 3px;
}

.bricks span:nth-child(4n + 1) { background: var(--brick-1); }
.bricks span:nth-child(4n + 2) { background: var(--brick-2); }
.bricks span:nth-child(4n + 3) { background: var(--brick-3); }
.bricks span:nth-child(4n + 4) { background: var(--brick-4); }

/* Game list (home) */

.games {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.game-card {
  display: block;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.game-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.game-card p {
  margin: 0;
  color: var(--muted);
}

.tag {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Store buttons */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
}

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 9.5rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  line-height: 1.25;
}

.store small {
  font-size: 0.72rem;
  opacity: 0.8;
}

.store strong {
  font-size: 1.05rem;
}

.store[aria-disabled="true"] {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--border);
  cursor: default;
}

/* Features */

.features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.features li {
  margin: 0;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.features strong {
  display: block;
}

/* FAQ */

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.faq details:first-of-type {
  border-top: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: 0.6rem 0 0;
}

.contact-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-box p:last-child {
  margin-bottom: 0;
}

/* Legal documents */

.doc h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.lang-switch a {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.lang-switch a:hover {
  border-color: var(--accent);
}

.doc-lang + .doc-lang {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 2px solid var(--border);
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
}

/* 404 */

.not-found {
  text-align: center;
  padding: 3rem 0;
}

.not-found .bricks,
.not-found .lead {
  margin: 0 auto 1.5rem;
}

@media (min-width: 40rem) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-card {
    transition: none;
  }
}

.doc-lang .doc-title {
  margin-top: 0;
  font-size: 1.5rem;
}
