/*
 * One stylesheet for every page. System fonts for text; Press Start 2P (SIL Open Font License 1.1, beside it
 * in /fonts/ with OFL.txt) only for the Pixel Peel name, as the game draws it.
 */
@font-face {
  font-family: 'Press Start 2P';
  src: url('/fonts/PressStart2P-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fafaf7;
  --ink: #1c1c22;
  --muted: #5b5b66;
  --line: #e2e2dc;
  --card: #ffffff;
  --link: #2f6fe0;
  /* The game's own colours: its page and its blue. */
  --game: #1c1c22;
  --game-ink: #f0f0f4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141418;
    --ink: #ececf0;
    --muted: #a3a3ae;
    --line: #2c2c34;
    --card: #1c1c22;
    --link: #7aa7ff;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

header.site a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

p,
ul {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* The hub: one card per project. */
.projects {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.projects li + li {
  margin-top: 0;
}

.project {
  display: block;
  padding: 1.25rem 1.25rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
}

.project:hover,
.project:focus-visible {
  border-color: var(--link);
}

.project h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.project p {
  margin: 0;
  color: var(--muted);
}

.project .go {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--link);
  font-weight: 600;
}

/* The game's name, letter by letter in its colours, on the game's own dark page. */
.pixel-name {
  font-family: 'Press Start 2P', system-ui, sans-serif;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero {
  margin: 0 -1rem 2rem;
  padding: 2rem 1rem 1.5rem;
  background: var(--game);
  color: var(--game-ink);
  text-align: center;
}

@media (min-width: 46rem) {
  .hero {
    margin: 0 0 2rem;
    border-radius: 12px;
  }
}

.hero h1 {
  font-size: clamp(1.5rem, 7vw, 2.5rem);
  line-height: 1.3;
  margin: 0 0 1rem;
}

.hero p {
  margin: 0 auto;
  max-width: 32rem;
  color: #c9c9d2;
}

/* Google's badge as Google gives it: the PNG's transparent margin is the badge's clear space, so nothing is added
   around it and the artwork is only scaled; 75 px high draws the badge itself 50 px high (28 px is the least). */
.play {
  display: inline-block;
  margin-top: 0.75rem;
}

.play img {
  display: block;
  width: auto;
  height: 75px;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
  padding: 0;
  list-style: none;
}

.shots li + li {
  margin-top: 0;
}

.shots figure {
  margin: 0;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: var(--game);
}

.shots figcaption {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
  text-align: center;
}

nav.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1rem;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

footer.site {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
