/* What the Ai. One stylesheet for the homepage, guides, model comparison and
   About. Each game owns a colour (--c) that sits behind its artwork as a
   solid block; everything else is ink on a cool, pale page. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #eef0f7;
  --ink: #14162b;
  --soft: #555a78;
  --line: #cfd3e3;
  --raised: #ffffff;
  --link: #2a3fd6;
  --c: #3d5cff;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wide: 1240px;
}
:root.dark-mode {
  color-scheme: dark;
  --page: #0c0e1c;
  --ink: #eceeff;
  --soft: #a4a9c9;
  --line: #2a2e4a;
  --raised: #171a30;
  --link: #a9b7ff;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.55 var(--body);
}
a {
  color: var(--link);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 750;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
p,
li {
  max-width: 68ch;
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--page);
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.site-header,
main,
.site-footer {
  width: min(var(--wide), 100% - 40px);
  margin-inline: auto;
}
.site-header {
  display: flex;
  align-items: center;
  gap: 8px 26px;
  flex-wrap: wrap;
  padding: 18px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font: 800 1.45rem/1 var(--display);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brand img {
  width: 30px;
  height: 30px;
}
#dynamic-title {
  min-width: 7.2em;
}
#dynamic-title::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 3px;
  vertical-align: -0.08em;
  background: var(--c);
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-weight: 600;
}
.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}
.site-header nav a:hover,
.site-header nav a[aria-current] {
  border-bottom-color: var(--c);
}
.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover {
  border-color: var(--ink);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sun-icon,
.dark-mode .moon-icon {
  display: none;
}
.dark-mode .sun-icon {
  display: block;
}
main {
  padding-bottom: 40px;
}
main:focus {
  outline: none;
}
main > section,
main > .columns {
  margin-top: clamp(48px, 8vw, 96px);
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  margin-top: clamp(20px, 4vw, 48px) !important;
}
.hero.plain {
  grid-template-columns: minmax(0, 1fr);
}
.hero.plain h1 {
  max-width: 16ch;
}
.lead {
  margin: 22px 0 0;
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.45;
  max-width: 34em;
}
.facts {
  margin: 14px 0 0;
  color: var(--soft);
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 26px 0 0;
  font-weight: 650;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--page);
  text-decoration: none;
  font-weight: 700;
}
.button:hover {
  background: var(--c);
  color: #fff;
}
.button svg,
.chip svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex: none;
}
.kind {
  margin: 0 0 8px;
  color: var(--soft);
  font-weight: 600;
  font-size: 0.95rem;
}
/* one game, as each model built it: the site's idea in a single row */
.strip {
  margin: 0;
}
.strip figcaption {
  margin-bottom: 14px;
  font-weight: 600;
  color: var(--soft);
}
.strip ol {
  list-style: none;
  margin: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  background: var(--c);
  border-radius: 28px;
}
.strip li {
  max-width: none;
}
.strip ol a {
  display: block;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: scale 0.35s ease;
}
.strip ol a:hover img {
  scale: 1.05;
}
.strip span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(12, 14, 28, 0.86);
}
.cover {
  margin: 0;
  padding: 14px;
  background: var(--c);
  border-radius: 28px;
}
.cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
}

/* ---------- the games ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(24px, 3vw, 40px);
}
.game-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.game-link {
  display: block;
  width: 100%;
  margin-bottom: 16px;
}
.thumbnail {
  display: block;
  position: relative;
  margin: 0 10px 10px 0;
  border-radius: 22px;
  background: var(--c);
}
.thumbnail img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  translate: 10px 10px;
  transition: translate 0.2s ease;
}
.game-item:hover .thumbnail img,
.game-item:focus-within .thumbnail img {
  translate: 0 0;
}
.game-title {
  font-size: clamp(1.6rem, 2.4vw, 1.95rem);
}
.game-description {
  margin: 10px 0 0;
}
.built {
  margin: 16px 0 8px;
  color: var(--soft);
  font-size: 0.95rem;
  font-weight: 600;
}
.versions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.97rem;
}
.chip.first {
  background: var(--ink);
  color: var(--page);
}
.chip:hover {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
}
.guide-link {
  margin-top: 16px;
  font-size: 0.97rem;
}

/* ---------- compare by model ---------- */
.families > p {
  margin: 12px 0 0;
}
.families ul {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 2px solid var(--ink);
}
.families li {
  max-width: none;
  border-bottom: 1px solid var(--line);
}
.families a {
  display: block;
  padding: 20px 20px 22px 0;
  color: var(--ink);
  text-decoration: none;
}
.families strong {
  display: block;
  font: 800 clamp(2rem, 4vw, 3rem) / 1 var(--display);
  letter-spacing: -0.04em;
}
.families span {
  display: block;
  margin-top: 6px;
  color: var(--soft);
}
.families a:hover strong {
  color: var(--link);
}
.answers > div {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 20em) minmax(0, 1fr);
  gap: 0 40px;
}
.answers h3,
.answers p {
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.answers h3 {
  font-size: 1.15rem;
  line-height: 1.25;
}

/* ---------- guides, model comparison, about ---------- */
.breadcrumb {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  color: var(--soft);
  font-size: 0.92rem;
}
main > section > h2 + p,
.columns h2 + p,
.columns h2 + ol {
  margin-top: 14px;
}
.overview p {
  font-size: 1.12rem;
}
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 40px clamp(30px, 6vw, 80px);
}
.columns ol {
  padding-left: 1.2em;
}
.columns li + li {
  margin-top: 12px;
}
.version-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.version-list li {
  max-width: none;
  display: grid;
  grid-template-columns: clamp(96px, 16vw, 168px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 30px);
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.shot {
  display: block;
  margin: 0 6px 6px 0;
  border-radius: 14px;
  background: var(--c);
}
.shot img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  translate: 6px 6px;
  transition: translate 0.2s ease;
}
.version-list li:hover .shot img {
  translate: 0 0;
}
.version-list h3 a {
  color: var(--ink);
}
.version-list p {
  margin: 6px 0 0;
}
.version-list .kind {
  margin: 4px 0 0;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 22px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
caption {
  text-align: left;
  color: var(--soft);
  padding-bottom: 8px;
}
th,
td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  border-bottom: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 1.1rem;
}
.matrix {
  min-width: 720px;
}
.matrix tbody th {
  border-left: 8px solid var(--c);
  padding-left: 14px;
  font-family: var(--display);
  font-size: 1.1rem;
}
.matrix tbody th a {
  color: var(--ink);
}
.matrix tbody th span {
  display: block;
  font: 500 0.88rem var(--body);
  color: var(--soft);
}
.matrix td a {
  display: block;
  padding: 2px 0;
}
.none {
  color: var(--soft);
}
.note,
.byline {
  color: var(--soft);
  font-size: 0.95rem;
}
.note {
  margin-top: 18px;
}
code {
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--raised);
}
.plain-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  columns: 2 220px;
}
.plain-list li {
  padding: 5px 0;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  padding: 30px 0 40px;
  border-top: 2px solid var(--ink);
  font-size: 0.95rem;
}
.site-footer h2 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.site-footer ul {
  list-style: none;
  margin: 12px 0 26px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}
.foot-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 30px;
  color: var(--soft);
}
.foot-line p {
  margin: 0;
  max-width: none;
}
.foot-line p + p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .answers > div {
    grid-template-columns: minmax(0, 1fr);
  }
  .answers h3 {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .answers p {
    padding-top: 6px;
  }
}
@media (max-width: 520px) {
  .site-header nav {
    order: 3;
    width: 100%;
    gap: 0 18px;
    font-size: 0.97rem;
  }
  .strip ol {
    padding: 10px;
    gap: 10px;
    border-radius: 22px;
  }
  .thumbnail {
    margin: 0 7px 7px 0;
  }
  .thumbnail img {
    translate: 7px 7px;
  }
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}
.spin {
  animation: spin 0.7s ease;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  .site-header nav,
  .theme-toggle,
  .site-footer nav {
    display: none;
  }
}
