/* AFC Games site. System fonts only: no third-party requests on a privacy site. */

:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --line: #e6dfd3;
  --ink: #1f1d2b;
  --ink-2: #57536a;
  --accent: #e2533b;
  --accent-ink: #ffffff;
  --link: #b8381f;
  --focus: #2f6fdf;
  --shadow: 0 1px 2px rgb(31 29 43 / 6%), 0 6px 20px rgb(31 29 43 / 6%);
  --radius: 18px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14131c;
    --surface: #1d1c28;
    --surface-2: #262433;
    --line: #34313f;
    --ink: #f1eff7;
    --ink-2: #aaa6bd;
    --accent: #ff6b52;
    --accent-ink: #1a0f0c;
    --link: #ff8f7a;
    --focus: #7aa7ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding-bottom: 64px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; letter-spacing: 0.02em; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 999px; font-size: 15px; font-weight: 550; }
nav a:hover { color: var(--ink); background: var(--surface-2); }
nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
nav a.lang { border: 1px solid var(--line); font-size: 13px; font-weight: 700; }

/* Home */
.hero { padding: 56px 0 24px; max-width: 680px; }
.hero h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 16px; }
.hero p { color: var(--ink-2); font-size: 19px; margin: 0 0 8px; }
.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin: 32px 0 16px; }

.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; height: 100%; transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card img { width: 72px; height: 72px; border-radius: 22%; flex: none; }
.card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-text strong { font-size: 17px; line-height: 1.3; }
.card-text span { color: var(--ink-2); font-size: 15px; line-height: 1.4; }

/* Game page */
.crumbs { margin: 24px 0 0; font-size: 15px; }
.crumbs a::before { content: "← "; }
.game { max-width: 720px; }
.game-head { display: flex; align-items: center; gap: 24px; margin: 24px 0 20px; }
.game-head img { width: 128px; height: 128px; border-radius: 22%; box-shadow: var(--shadow); flex: none; }
.game-head h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; }
.game-tagline { color: var(--ink-2); font-size: 19px; margin: 0; }
.game-about { font-size: 18px; margin: 0 0 24px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-width: 170px; min-height: 52px; padding: 6px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 19px; line-height: 1.1; }
.store small { font-size: 11px; font-weight: 500; opacity: .85; }
.soon { display: inline-block; padding: 10px 16px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 15px; margin: 0 0 32px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { font-size: 17px; margin: 0 0 8px; }
.panel p { margin: 0 0 8px; color: var(--ink-2); font-size: 16px; }
.panel p:last-child { margin-bottom: 0; }

/* Documents */
.doc { max-width: 720px; padding-top: 40px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 8px; }
.doc .meta { color: var(--ink-2); font-size: 15px; margin: 0 0 24px; }
.doc .lede { font-size: 19px; color: var(--ink-2); }
.doc h2 { font-size: 22px; margin: 40px 0 12px; letter-spacing: -0.01em; scroll-margin-top: 16px; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; scroll-margin-top: 16px; }
.doc li { margin-bottom: 6px; }
.doc :target { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
tbody th { font-weight: 650; white-space: nowrap; }
@media (max-width: 560px) { tbody th { white-space: normal; } }

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 20px; margin: 24px 0; }
.callout ul { margin: 8px 0 0; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 4px; }
details p { margin: 10px 0 14px; color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.footer-row { padding-top: 24px; padding-bottom: 32px; }
.footer-row p { margin: 0 0 6px; }
.site-footer a { color: var(--ink-2); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 36px; }
  .game-head { gap: 16px; }
  .game-head img { width: 88px; height: 88px; }
  nav a { padding: 6px 8px; }
}

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