@font-face {
  font-family: "VAG Rounded";
  src: url("assets/VAG Rounded Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #5fd7ff;
  --card-border: rgba(226, 226, 239, 0.4);
  --card-shadow: rgba(22, 62, 116, 0.12);
  --card-bg: #ffffff;
  --ink: #4b4b60;
  --accent: #ffb300;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "VAG Rounded", "Comic Sans MS", "Trebuchet MS", "Arial Rounded MT Bold", sans-serif;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--sky);
  position: relative;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #1d1d1d;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
  z-index: 3;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.background {
  position: fixed;
  inset: 0;
  background-image: url("assets/bg.png");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 18px 46px;
  gap: 18px;
}

.site-header {
  text-align: center;
}

.site-title {
  display: inline-block;
}

.logo {
  width: min(620px, 88vw);
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-main {
  width: min(1040px, 100%);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
}

.game-card {
  background: var(--card-bg);
  border: 6px solid var(--card-border);
  border-radius: 26px;
  padding: 18px 16px 20px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 22px var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(16, 50, 90, 0.16);
}

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

.card-title {
  font-size: 20px;
  font-weight: 800;
  color: #55556f;
  text-align: center;
}

.card-preview {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(160px, 28vw, 210px);
}

.card-illustration {
  height: auto;
  display: block;
}

.game-card--matching .card-illustration {
  width: clamp(160px, 55vw, 210px);
}

.game-card--word .card-illustration {
  width: clamp(180px, 60vw, 240px);
}

.game-card--animal .card-illustration {
  width: clamp(150px, 50vw, 200px);
}

@media (min-width: 768px) {
  .page {
    padding: 30px 40px 54px;
    gap: 28px;
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .game-card {
    min-height: 220px;
  }

  .card-title {
    font-size: 22px;
  }
}

@media (min-width: 1100px) {
  .page {
    gap: 36px;
  }

  .game-card {
    min-height: 240px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
