/* Fein Interactive: the studio site and each game's pages. Black and white. */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #5f5f5f;
  --line: #e4e4e4;
  --soft: #f5f5f5;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #a3a3a3;
    --line: #262626;
    --soft: #111111;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #a3a3a3;
  --line: #262626;
  --soft: #111111;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }

a { color: var(--fg); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header and footer */

.site-header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand img { width: 32px; height: 32px; display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img { filter: invert(1); }
}
:root[data-theme="dark"] .brand img { filter: invert(1); }

.site-nav { display: flex; gap: 20px; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--fg); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap-wide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: var(--muted); }

/* Landing */

.hero { padding: 88px 0 72px; }
.hero h1 { font-size: clamp(44px, 9vw, 88px); margin: 0 0 20px; }
.hero p { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); max-width: 580px; margin: 0; }

.games-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.games-head h2 { font-size: 32px; margin: 0; }

.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.tabs button {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.tabs button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.panel { margin-top: 28px; }
html.js .panel[hidden] { display: none; }
/* Without scripts, both lists show, each under its own label. */
.panel-label { display: none; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
html:not(.js) .panel-label { display: block; }
html:not(.js) .tabs { display: none; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.game {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.game-top { display: flex; gap: 16px; align-items: center; }
.game-top img { width: 76px; height: 76px; border-radius: 18px; flex: none; border: 1px solid var(--line); }
.game h3 { font-size: 24px; margin: 0 0 4px; }
.game .platform { font-size: 14px; color: var(--muted); margin: 0; }
.game p.blurb { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.game-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--fg);
}
.pill:hover { border-color: var(--fg); }
.pill.solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.empty {
  border: 1px dashed var(--line);
  border-radius: 24px;
  padding: 40px 22px;
  text-align: center;
  color: var(--muted);
}
.empty strong { display: block; color: var(--fg); font-size: 20px; margin-bottom: 6px; }

/* A game's page */

.game-hero { padding: 72px 0 48px; text-align: center; }
.game-hero img { width: 128px; height: 128px; border-radius: 29px; border: 1px solid var(--line); }
.game-hero h1 { font-size: clamp(44px, 9vw, 72px); margin: 22px 0 12px; }
.game-hero p { font-size: 20px; color: var(--muted); max-width: 560px; margin: 0 auto; }
.game-hero .game-links { justify-content: center; margin-top: 26px; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.features li { border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.features h3 { margin: 0 0 6px; font-size: 19px; }
.features p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Legal and support pages */

.doc { padding: 40px 0 0; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0; }
.crumbs a { color: var(--muted); }
.doc h1 { font-size: clamp(34px, 7vw, 48px); margin: 8px 0 8px; }
.doc .updated { color: var(--muted); margin: 0 0 32px; font-size: 15px; }
.doc h2 { font-size: 24px; margin: 44px 0 10px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .summary { background: var(--soft); border: 1px solid var(--line); border-radius: 18px; padding: 4px 20px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; }

@media (max-width: 380px) {
  .brand { font-size: 17px; }
  .brand img { width: 28px; height: 28px; }
  .site-nav { gap: 14px; font-size: 14px; }
}
