/* Slow Gear: one stylesheet for every page.
   Layout idea: a calm workshop floor (light grey), cast-iron text, pine for actions, one amber tooth for marks. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ground: #eceeea;
  --surface: #ffffff;
  --ink: #15181c;
  --text: #2c3238;
  --muted: #545b63;
  --line: #d3d7d0;
  --pine: #1f5e54;
  --pine-dark: #15433c;
  --amber: #f0b23a;
  --night: #17202b;      /* Backyard Motors' own ink */
  --yellow: #ffc21a;     /* Backyard Motors' own safety yellow */
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 18px/1.55 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); text-underline-offset: 0.15em; }
a:hover { color: var(--pine-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.label {
  font: 600 13px/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.display { font-weight: 850; font-stretch: 118%; line-height: 1.02; letter-spacing: -0.005em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand span { font-weight: 850; font-stretch: 125%; letter-spacing: 0.04em; font-size: 19px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 999px; }
.nav a:hover { background: #dfe2dc; color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.nav a.btn-dark, .nav a.btn-dark:hover { color: #fff; background: var(--ink); padding: 10px 18px; min-height: 44px; }
.nav a.btn-dark:hover { background: #000; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-weight: 650; text-decoration: none; line-height: 1.2;
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-dark); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-line { border: 1.5px solid var(--ink); color: var(--ink); padding: 11px 21px; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-store { background: #000; color: #fff; border-radius: 12px; border: 1px solid #5a626b; }
.btn-store:hover { color: #fff; background: #111; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Hero */
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 56px; }
.hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(44px, 6vw, 84px); line-height: 0.98; font-weight: 850; font-stretch: 118%; }
.hero .lede { font-size: 21px; max-width: 34ch; color: var(--text); }
.hero-art { flex: 1 1 520px; min-width: 0; position: relative; }
.hero-art > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; }
.chip-card {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px; padding: 8px 14px 8px 8px;
  box-shadow: 0 6px 20px rgba(21, 24, 28, 0.18); line-height: 1.2;
}
.chip-card img { width: 40px; height: 40px; border-radius: 10px; }
.chip-card b { display: block; font-size: 15px; }
.chip-card span { font-size: 13px; color: var(--muted); }
.slow-gear { position: absolute; right: -28px; top: -36px; width: 120px; height: 120px; }
@media (prefers-reduced-motion: no-preference) {
  .slow-gear { animation: turn 60s linear infinite; }
}
@keyframes turn { to { transform: rotate(360deg); } }
@media (max-width: 640px) { .slow-gear { right: -8px; top: -28px; width: 80px; height: 80px; } }

/* Sections */
.section { padding: 48px 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(34px, 4vw, 44px); }

/* Game cards */
.cards { display: flex; flex-wrap: wrap; gap: 24px; }
.game-card { flex: 2 1 560px; min-width: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.game-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.game-card .body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 14px; }
.game-title { display: flex; align-items: center; gap: 12px; }
.game-title img { width: 56px; height: 56px; border-radius: 14px; }
.game-title h3 { margin-top: 6px; font-size: 30px; line-height: 1; font-weight: 850; font-stretch: 112%; }
.tag { display: inline-block; font: 600 12px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; background: var(--pine); color: #fff; }
.tag-amber { background: var(--amber); color: var(--ink); }
.game-card .pitch { font-size: 19px; color: var(--text); }
.game-card .meta { font-size: 15px; color: var(--muted); }
.bench { flex: 1 1 320px; min-width: 0; border: 2px dashed #9aa1a8; border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.bench h3 { font-size: 28px; line-height: 1.05; font-weight: 850; font-stretch: 112%; }
.bench p { color: var(--text); }

/* Promise band */
.band { background: var(--ink); color: var(--ground); margin-top: 40px; }
.band .wrap { padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 36px; }
.band .label { color: var(--amber); }
.band h2 { font-size: clamp(34px, 4vw, 44px); max-width: 20ch; }
.promises { display: flex; flex-wrap: wrap; gap: 20px; }
.promise { flex: 1 1 240px; min-width: 0; border-top: 2px solid var(--amber); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.promise h3 { font-size: 22px; font-weight: 800; font-stretch: 110%; }
.promise p { color: #c5ccd2; font-size: 17px; }

/* Studio */
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { min-width: 0; }
.split .media { flex: 1 1 360px; }
.split .media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }
.split .copy { flex: 1 1 520px; display: flex; flex-direction: column; gap: 16px; }
.split .copy h2 { font-size: clamp(32px, 3.6vw, 40px); }
.split .copy p { font-size: 19px; color: var(--text); max-width: 56ch; }

/* Letter */
.letter { background: var(--surface); border-radius: var(--radius); padding: 36px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.letter > div { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.letter h2 { font-size: 32px; line-height: 1.05; font-weight: 850; font-stretch: 115%; }
.letter p { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; }
.site-footer .wrap { padding-top: 36px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-cols div { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.small { font-size: 14px; color: var(--muted); }

/* Game page */
.game-hero { background: var(--night); color: #f4f5f1; }
.game-hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 56px; padding-bottom: 64px; }
.game-hero .text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.game-hero .label { color: var(--yellow); }
.game-hero .label a { color: var(--yellow); }
.game-hero .title { display: flex; align-items: center; gap: 18px; }
.game-hero .title img { width: 96px; height: 96px; border-radius: 22px; }
.game-hero h1 { font-size: clamp(42px, 5.4vw, 72px); line-height: 0.96; font-weight: 900; font-stretch: 110%; }
.game-hero .lede { font-size: 22px; max-width: 30ch; color: #e2e5de; }
.game-hero .price { font-size: 16px; color: #c7ccc4; }
.game-hero .art { flex: 1 1 540px; min-width: 0; }
.game-hero .art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; }
.btn-yellow { background: var(--yellow); color: var(--night); }
.btn-yellow:hover { background: #ffd34f; color: var(--night); }

.eras { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.eras li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 15px; font-weight: 650; }
.eras img { width: 96px; height: 96px; }
.eras span { font-weight: 400; color: var(--muted); }
@media (max-width: 900px) { .eras { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.features { display: flex; flex-direction: column; gap: 56px; }
.feature { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.feature.flip { flex-wrap: wrap-reverse; flex-direction: row-reverse; }
.feature img { flex: 1 1 520px; min-width: 0; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; }
.feature .copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.feature h3 { font-size: 32px; line-height: 1.05; font-weight: 850; font-stretch: 112%; }
.feature p { color: var(--text); }

.panels { display: flex; flex-wrap: wrap; gap: 24px; }
.panel { flex: 1 1 360px; min-width: 0; background: var(--surface); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.panel.wide { flex: 1.6 1 560px; }
.panel h2 { font-size: 28px; font-weight: 850; font-stretch: 115%; }
.facts { margin: 0; display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr); gap: 10px 20px; font-size: 16px; font-variant-numeric: tabular-nums; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }
.downloads { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.downloads a { font-weight: 650; }

/* Text pages (privacy, support, imprint) */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 32px; }
.doc h1 { font-size: clamp(36px, 4.6vw, 52px); font-weight: 850; font-stretch: 115%; line-height: 1.02; margin-bottom: 12px; }
.doc h2 { font-size: 24px; font-weight: 800; font-stretch: 108%; margin: 36px 0 10px; }
.doc h3 { font-size: 19px; font-weight: 700; margin: 22px 0 6px; }
.doc p, .doc ul, .doc address { margin: 0 0 14px; color: var(--text); }
.doc address { font-style: normal; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.fill { background: var(--amber); color: var(--ink); padding: 0 4px; border-radius: 3px; font-weight: 600; }

/* Apple's App Store badge: the artwork as Apple supplies it, at least 40 px tall, with clear space of a quarter of
   its height on every side (Apple's App Store Marketing Guidelines). */
.store-badge { display: inline-block; margin: 12px; line-height: 0; border-radius: 9px; }
.store-badge img { height: 48px; width: auto; }
.badge-row .store-badge { margin: 0; } /* the row's gap (16 px and more) keeps the clear space */
.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
