/* Strona główna gier — kolory i kroje jak w oknach gry Kruszonkowo. */
:root {
  --cocoa: #2a1a14;
  --cocoa-soft: #3a2418;
  --cream: #fff6f1;
  --ink: #3a2418;
  --muted: #7d5f50;
  --accent: #d93d72;
  --accent-hover: #e85288;
  --accent-shadow: #a82555;
  --line: #ffd0de;
  --pink-light: #ff9ec0;
  --radius: 28px;
}

* { box-sizing: border-box; }

html { background: var(--cocoa); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--cream);
  background:
    radial-gradient(1200px 520px at 50% -120px, rgba(217, 61, 114, 0.28), transparent 70%),
    var(--cocoa);
  font: 700 17px/1.6 Nunito, "Trebuchet MS", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--pink-light);
  outline-offset: 4px;
  border-radius: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- nagłówek ---------- */
.hero {
  padding: 48px 16px 28px;
  text-align: center;
}

.brand { display: inline-block; }

.brand img {
  display: block;
  width: 180px;
  height: auto;
  margin: 0 auto;
  transition: transform 0.25s ease;
}

.brand:hover img { transform: rotate(-3deg) scale(1.03); }

.hero h1 {
  margin: 18px 0 6px;
  font: 800 clamp(32px, 6vw, 52px)/1.1 "Baloo 2", "Trebuchet MS", sans-serif;
  color: #fff4f6;
}

.lead {
  max-width: 560px;
  margin: 0 auto;
  color: #e8cfc6;
}

/* ---------- lista gier ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 16px 48px;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 6px var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 6px var(--line);
}

.game-cover {
  display: block;
  margin: 6px 6px 0;
  overflow: hidden;
  border-radius: calc(var(--radius) - 6px) calc(var(--radius) - 6px) 0 0;
}

.game-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game:hover .game-cover img { transform: scale(1.04); }

.game-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 20px 26px 26px;
}

.game h3 {
  margin: 0;
  font: 800 26px/1.15 "Baloo 2", "Trebuchet MS", sans-serif;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 3px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-shadow);
  font-size: 14px;
  font-weight: 800;
}

.btn {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 34px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 5px 0 var(--accent-shadow);
  color: #fff;
  font: 800 22px/1.4 "Baloo 2", "Trebuchet MS", sans-serif;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-shadow); }

/* kafelek „wkrótce” — bez interakcji */
.game-soon {
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 28px;
  border: 3px dashed rgba(255, 208, 222, 0.5);
  background: transparent;
  color: #e8cfc6;
  box-shadow: none;
  text-align: center;
}

.game-soon:hover { transform: none; box-shadow: none; }
.game-soon p { color: #e8cfc6; }
.soon-icon { font-size: 44px; line-height: 1; margin-bottom: 8px; }

/* ---------- stopka ---------- */
.footer {
  padding: 24px 16px 32px;
  color: #b89a8c;
  font-size: 14px;
  text-align: center;
}

.footer a { color: var(--pink-light); }
.footer a:hover { color: #fff4f6; }
.footer span { margin: 0 8px; }
.footer p { margin: 8px 0 0; }

@media (max-width: 520px) {
  .hero { padding-top: 32px; }
  .brand img { width: 140px; }
  .game-body { padding: 18px 20px 22px; }
  .btn { align-self: stretch; text-align: center; }
  .game-soon { min-height: 150px; padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
