@font-face {
  font-family: "Rubik";
  src: url("assets/fonts/rubik.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f4ff;
  --text: #17133a;
  --muted: #5f5a85;
  --teal: #0d9488;
  --icon-size: clamp(6.5rem, 30vw, 9.5rem);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(60rem 36rem at 10% -10%, rgb(168 85 247 / 0.22), transparent 65%),
    radial-gradient(52rem 34rem at 92% 108%, rgb(45 212 191 / 0.24), transparent 65%),
    radial-gradient(44rem 30rem at 65% 40%, rgb(79 124 255 / 0.12), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.75rem 1.5rem;
}

.logo {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.wordmark {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Games */

main {
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
}

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2rem, 9vw, 4.5rem);
}

.game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
  border-radius: 0.5rem;
}

.app-icon {
  display: block;
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: 22.37%;
  box-shadow: 0 1.25rem 2.5rem -1rem rgb(35 20 90 / 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-name {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.005em;
}

a.game:hover .app-icon,
a.game:focus-visible .app-icon {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 1.75rem 3rem -1rem rgb(35 20 90 / 0.5),
    0 0 3rem -0.5rem rgb(147 51 234 / 0.4);
}

a.game:active .app-icon {
  transform: scale(0.97);
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  padding: 1.75rem 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.site-footer a:hover {
  color: var(--teal);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 6px;
}

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

  a.game:hover .app-icon,
  a.game:focus-visible .app-icon,
  a.game:active .app-icon {
    transform: none;
  }
}
