@font-face {
  font-family: Instrument Serif;
  src: url("clockguessr/fonts/instrument-serif.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: Archivo;
  src: url("layover/fonts/Archivo-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f3e9;
  --card: #fffdf6;
  --ink: #192b24;
  --muted: #4d6056;
  --line: #c9cbbd;
  --green: #365d42;
  --lime: #d8ed9e;
  font-family: Archivo, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }

.collection {
  width: min(100% - 2.5rem, 65rem);
  margin-inline: auto;
}

.masthead {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
  padding-block: clamp(2.5rem, 7vw, 5.25rem) 1.7rem;
}

h1, h2, p { margin: 0; }
h1, h2 { font-family: Instrument Serif, Georgia, serif; font-weight: 400; }
h1 { font-size: clamp(4.2rem, 13vw, 9.5rem); line-height: .88; letter-spacing: -.045em; }
h1 span { color: var(--green); }
.masthead p { margin-top: 1.2rem; color: var(--muted); line-height: 1.5; }

.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--card);
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.game:hover { border-color: var(--green); box-shadow: 0 5px 18px #192b241a; }
.game img { display: block; width: 100%; height: auto; aspect-ratio: 2.18; object-fit: cover; }
.layover { background: #071f34; }
.relatives { background: #f8f7f1; }
.clock { object-position: 50% 58%; background: #678180; }
.atlas { object-position: 50% 47%; background: #c9b99c; }

.game-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-top: 1px solid var(--line);
  padding: 1rem clamp(.95rem, 2.2vw, 1.5rem) 1.2rem;
}

h2 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1; }
.game-info p { margin-top: .4rem; color: var(--muted); font-size: .93rem; line-height: 1.4; }
.arrow {
  display: grid;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.35rem;
  transition: background-color .18s ease;
}
.game:is(:hover, :focus-visible) .arrow { background: var(--lime); }

footer {
  margin: 1.5rem 0 0;
  padding: 1rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.6;
}
footer a { text-underline-offset: .16em; }

@media (max-width: 42rem) {
  .games { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .game, .arrow { transition: none; }
}
