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

:root {
  --bg:       #fbf8f4;
  --surface:  #ffffff;
  --border:   #ece5dc;
  --text:     #1f1d2b;
  --muted:    #5f5c6d;
  --accent:   #e8534a;
  --btn-bg:   #1f1d2b;
  --btn-text: #ffffff;
  --radius:   20px;
  --width:    1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #14131a;
    --surface:  #1d1c25;
    --border:   #2c2a36;
    --text:     #f1eff5;
    --muted:    #a7a4b4;
    --btn-bg:   #f1eff5;
    --btn-text: #14131a;
  }
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
}
.logo span { color: var(--accent); }
header nav { display: flex; gap: 24px; }
header nav a {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
header nav a:hover { color: var(--text); }

/* HERO */
.hero {
  text-align: center;
  padding: 72px 0 56px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 20ch;
  text-wrap: balance;
  margin: 0 auto 16px;
}
.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 34rem;
  margin: 0 auto;
}

/* GAMES */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.game {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.game-cover {
  height: 200px;
  display: grid;
  place-items: center;
  font-size: 5rem;
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.paint  { background: linear-gradient(135deg, #ffe1d6, #ffb49f); }
.cosmo  { background: linear-gradient(135deg, #d9ccf2, #9277d8); }

.game-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.game h2 { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.game-meta { color: var(--muted); font-size: 0.9rem; font-weight: 700; }
.game-body p { color: var(--muted); }

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.15s;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 16px; height: 16px; fill: currentColor; }

/* ABOUT */
.about {
  text-align: center;
  padding: 96px 0;
}
.about h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.about p {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 24px;
}
.about .store { font-size: 1rem; padding: 12px 24px; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* LEGAL PAGE */
.legal {
  max-width: 720px;
  padding-top: 48px;
  padding-bottom: 96px;
}
.legal h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.legal .updated {
  color: var(--muted);
  margin: 4px 0 32px;
}
.legal h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 40px 0 12px;
}
.legal p, .legal li { color: var(--muted); }
.legal p { margin-bottom: 16px; }
.legal strong { color: var(--text); }
.legal ul { padding-left: 20px; margin-bottom: 16px; }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--accent); }
.legal a { color: var(--accent); }
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
}
.note p { margin: 0; }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  header nav { gap: 16px; }
  .hero { padding: 48px 0 40px; }
  .game-cover { height: 160px; font-size: 4rem; }
  .game-body { padding: 20px; }
  .about { padding: 72px 0; }
}
