/* The front page (and the 404 page, which borrows its masthead). */

.home {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(2rem, 6vw, 3.5rem);
  min-height: 100dvh;
  max-width: 58rem;
  margin-inline: auto;
  padding:
    max(clamp(2rem, 8vw, 4.5rem), env(safe-area-inset-top))
    max(clamp(1.25rem, 5vw, 2.5rem), env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(clamp(1.25rem, 5vw, 2.5rem), env(safe-area-inset-left));
}

.masthead {
  text-align: center;
}

.wordmark {
  display: flex;
  justify-content: center;
  margin: 0;
  font-size: clamp(4rem, 19vw, 9.5rem);
  font-weight: 700;
  line-height: 1;
}

.wordmark span {
  text-shadow: 0 0.05em 0 var(--depth);
}

.wordmark span:nth-child(odd) { rotate: -5deg; }
.wordmark span:nth-child(even) { rotate: 4deg; }
.wordmark span:nth-child(3n) { translate: 0 0.04em; }

.tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 3.4vw, 1.6rem);
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.games > li {
  display: grid;
}

.card {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 1rem 1rem 1.25rem;
  border: 3px solid var(--ink);
  border-radius: 1.75rem;
  background: var(--card);
  box-shadow: 0 0.4rem 0 var(--ink);
  color: inherit;
  text-decoration: none;
  transition: translate 0.15s, box-shadow 0.15s;
}

a.card:hover {
  translate: 0 -0.2rem;
  box-shadow: 0 0.6rem 0 var(--ink);
}

a.card:active {
  translate: 0 0.3rem;
  box-shadow: 0 0.1rem 0 var(--ink);
}

a.card:focus-visible {
  outline: 4px solid var(--hue-6);
  outline-offset: 4px;
}

.card-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  margin-bottom: 0.6rem;
  padding: 0.3em 0.1em;
  border-radius: 1rem;
  background: var(--paper);
  font-size: clamp(2.75rem, 11vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
}

.card-art > * {
  text-shadow: 0 0.05em 0 var(--depth);
}

.card-art > :nth-child(odd) { rotate: -6deg; }
.card-art > :nth-child(even) { rotate: 5deg; }

.card-art svg {
  width: 0.8em;
  height: 0.8em;
  overflow: visible;
  filter: drop-shadow(0 0.05em 0 var(--depth));
}

.card-title {
  padding-inline: 0.4rem;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
}

.card-text {
  padding-inline: 0.4rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.card-soon {
  place-content: center;
  min-height: 9rem;
  border-style: dashed;
  border-color: var(--muted);
  background: none;
  box-shadow: none;
  color: var(--muted);
  text-align: center;
}

.card-soon .card-title {
  font-size: 1.25rem;
  font-weight: 500;
}

.colophon {
  color: var(--muted);
  text-align: center;
}

.colophon a {
  color: inherit;
}

.lost {
  align-self: center;
  text-align: center;
}

.lost p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 3.4vw, 1.6rem);
}

.button {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 0.3rem 0 var(--ink);
  color: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.button:active {
  translate: 0 0.2rem;
  box-shadow: 0 0.1rem 0 var(--ink);
}

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