:root {
  color-scheme: light;
  --ink: #19152f;
  --muted: #655f78;
  --paper: #fffdf8;
  --panel: #ffffff;
  --purple: #6d4aff;
  --purple-dark: #4c2fd4;
  --yellow: #ffd84a;
  --pink: #ff7ab6;
  --mint: #73e0c1;
  --line: #ded8ee;
  --shadow: 0 18px 50px rgb(45 31 92 / 12%);
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 12%, rgb(255 216 74 / 28%), transparent 24rem),
    radial-gradient(circle at 92% 24%, rgb(115 224 193 / 22%), transparent 28rem),
    var(--paper);
}
button, input { font: inherit; }
a { color: inherit; }
.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;
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: -0.04em;
}
.brand span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--purple);
  color: white;
  transform: rotate(-7deg);
}
.header-note { color: var(--muted); font-weight: 700; }
main { overflow: hidden; }
.hero {
  width: min(1120px, calc(100% - 2rem));
  margin: 1.5rem auto 5rem;
  min-height: 29rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 4rem;
  padding: clamp(2rem, 5vw, 4.75rem);
  border: 1px solid rgb(109 74 255 / 15%);
  border-radius: 2.5rem;
  background: linear-gradient(135deg, #f1edff, #fff5d0);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--purple-dark);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, h3 { margin-top: 0; letter-spacing: -0.045em; }
h1 { margin-bottom: 1.25rem; font-size: clamp(2.55rem, 6vw, 5rem); line-height: 0.98; }
h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.2rem); }
.hero-description { max-width: 39rem; color: var(--muted); font-size: 1.1rem; line-height: 1.7; }
.primary-action {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  color: white;
  background: var(--purple);
  box-shadow: 0 8px 0 var(--purple-dark);
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 10px 0 var(--purple-dark); }
.primary-action:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--purple-dark); }
.hero-art { position: relative; min-height: 19rem; }
.shape, .hero-score { position: absolute; display: grid; place-items: center; }
.shape-star {
  inset: 8% auto auto 8%;
  width: 10rem;
  height: 10rem;
  border-radius: 2.7rem;
  background: var(--yellow);
  color: var(--ink);
  font-size: 5rem;
  transform: rotate(-12deg);
  box-shadow: 0 14px 0 #e8b81e;
}
.shape-circle {
  width: 8rem;
  height: 8rem;
  right: 2%;
  top: 17%;
  border: 1.8rem solid var(--pink);
  border-radius: 50%;
  transform: rotate(10deg);
}
.shape-zigzag { left: 20%; bottom: 4%; color: var(--purple); font-size: 7rem; transform: rotate(-20deg); }
.hero-score {
  right: 4%;
  bottom: 5%;
  padding: 0.7rem 1rem;
  border-radius: 1rem;
  background: var(--ink);
  color: white;
  font-size: 1.5rem;
  font-weight: 900;
  transform: rotate(7deg);
}
.library { width: min(1120px, calc(100% - 2rem)); margin: 0 auto 6rem; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.search-field {
  min-width: min(100%, 19rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: white;
}
.search-field:focus-within { border-color: var(--purple); outline: 3px solid rgb(109 74 255 / 16%); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.tag-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 2rem 0 1rem; }
.tag-filter {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  cursor: pointer;
  font-weight: 800;
}
.tag-filter[aria-pressed="true"] { border-color: var(--ink); color: white; background: var(--ink); }
.catalog-status { min-height: 1.5rem; margin: 0.75rem 0 1.25rem; color: var(--muted); }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.game-card {
  position: relative;
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: var(--panel);
  box-shadow: 0 8px 22px rgb(45 31 92 / 8%);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.game-card::after {
  content: "";
  position: absolute;
  width: 9rem;
  height: 9rem;
  right: -3.5rem;
  top: -3.5rem;
  border-radius: 50%;
  background: var(--card-color, var(--mint));
  opacity: 0.42;
}
.game-card:hover, .game-card:focus-visible { transform: translateY(-5px) rotate(-0.5deg); box-shadow: var(--shadow); }
.game-card:focus-visible { outline: 4px solid rgb(109 74 255 / 30%); }
.game-icon { font-size: 2.4rem; }
.game-card h3 { margin: auto 0 0.65rem; font-size: 1.6rem; }
.game-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.game-meta { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1.2rem; color: var(--purple-dark); font-size: 0.8rem; font-weight: 900; }
.empty-state { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.empty-state span { font-size: 4rem; color: var(--purple); }
.empty-state h3 { margin: 0.6rem 0 0; color: var(--ink); }
footer { padding: 3rem 1rem; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-art { min-height: 15rem; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .header-note { display: none; }
  .hero { margin-top: 0.5rem; padding: 2rem 1.25rem; border-radius: 1.75rem; }
  .shape-star { width: 8rem; height: 8rem; font-size: 4rem; }
  .shape-circle { width: 6rem; height: 6rem; border-width: 1.25rem; }
  .library-heading { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .game-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

