/* Pew Pew Games shared styles. Game pages override the custom properties in :root. */

@font-face {
  font-family: "Gaegu";
  src: url("/assets/fonts/gaegu-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* Display face for Xeno Frontier; only downloaded on pages that use it. */
@font-face {
  font-family: "Anton";
  src: url("/assets/fonts/anton.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #fbf8f1;
  --paper-2: #f2ede2;
  --card: #fffdf9;
  --ink: #2b2926;
  --muted: #5f5a52;
  --line: #ddd5c6;
  --accent: #c9302a;
  --accent-ink: #ffffff;
  --link: #b5281f;
  --live: #1d7a3a;
  --soon: #95560a;
  --dev: #5747b0;
  --logo-filter: none;
  --font-hand: "Gaegu", "Comic Sans MS", "Chalkboard SE", cursive;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-hand);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1a18;
    --paper-2: #24221f;
    --card: #22201d;
    --ink: #f1ece3;
    --muted: #b9b1a4;
    --line: #3d3a34;
    --accent: #ff6b5f;
    --accent-ink: #1b1a18;
    --link: #ff9a90;
    --live: #74dc92;
    --soon: #ffc56e;
    --dev: #b9afff;
    --logo-filter: invert(1);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); }
h2 { font-size: clamp(2rem, 5vw, 2.8rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: 16px; top: -100px; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 12px; }

/* Header and footer */
.site-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 18px 0; }
.site-logo img { height: 54px; width: auto; filter: var(--logo-filter); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.site-nav a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 8px 0; }
.site-nav a:hover { text-decoration: underline; }
.site-footer { margin-top: 64px; padding: 28px 0 40px; border-top: 2px dashed var(--line); color: var(--muted); font-size: 0.92rem; }
.site-footer p { margin: 0.3em 0; }
.site-footer a { color: inherit; }

/* Buttons and badges */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--card); color: var(--ink);
  font-weight: 800; text-decoration: none; text-align: center;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.badge {
  display: inline-block; padding: 3px 12px; border: 2px solid currentColor; border-radius: 999px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.badge-live { color: var(--live); }
.badge-soon { color: var(--soon); }
.badge-dev { color: var(--dev); }

/* Sections */
.section { padding: 48px 0 8px; }
.section-intro { color: var(--muted); max-width: 60ch; margin-bottom: 24px; }

/* Homepage */
.home-hero { padding: 40px 0 16px; max-width: 52rem; }
.home-hero .lead { font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.game-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 760px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
.game-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 4px 0 var(--ink);
}
.game-card-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; text-decoration: none; }
.game-card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.game-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; }
.game-card-body h3 { margin: 0; font-size: 2rem; }
.game-card-body h3 a { color: var(--ink); text-decoration: none; }
.game-card-body h3 a:hover { text-decoration: underline; }
.game-card-body p { margin: 0; color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: auto; padding-top: 6px; }
.text-link { font-weight: 800; }
.badge { align-self: flex-start; }

/* Game pages */
.game-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 32px 0 16px; }
.game-hero.no-art { grid-template-columns: 1fr; max-width: 52rem; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-copy h1 { margin: 0; }
.eyebrow { margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.subtitle { margin: -6px 0 0; font-family: var(--font-display); font-size: clamp(1.4rem, 4vw, 2rem); color: var(--muted); }
.lead { margin: 0; font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.hero-art { justify-self: center; width: min(100%, 440px); }
.hero-art img, .hero-art svg { width: 100%; border-radius: 24px; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.steps li { counter-increment: step; position: relative; background: var(--paper-2); border-radius: var(--radius); padding: 20px 20px 20px 64px; }
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 18px;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800;
}
.steps h3, .features h3 { font-size: 1.35rem; margin-bottom: 0.25em; }
.steps p, .features p { margin: 0; color: var(--muted); }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.features li { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* Long-form text (privacy policy) */
.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(2.4rem, 7vw, 3.6rem); }
.prose h2 { font-family: var(--font-body); font-size: 1.35rem; font-weight: 800; margin-top: 2.2em; scroll-margin-top: 16px; }
.prose h3 { font-family: var(--font-body); font-size: 1.1rem; font-weight: 800; margin-top: 1.6em; scroll-margin-top: 16px; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: 0.4em; }
.prose .updated { color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 2px solid var(--line); border-radius: 12px; }
.table-wrap table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.95rem; }
.table-wrap th, .table-wrap td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--paper-2); }
.table-wrap tr:last-child td { border-bottom: 0; }

@media (max-width: 820px) {
  .game-hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; width: min(100%, 320px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
