@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fredoka:wght@500;600;700&display=swap');

:root {
  --ink: #143352;
  --blue: #173c61;
  --sky: #dff2f4;
  --yellow: #ffd34e;
  --coral: #ff7d63;
  --green: #4aa879;
  --cream: #fffdf6;
  --paper: #f7f3e8;
  --line: rgba(20, 51, 82, .16);
  --shadow: 0 18px 45px rgba(20, 51, 82, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.visually-hidden { 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; left: 1rem; top: -5rem; z-index: 50; padding: .8rem 1rem; background: white; border-radius: 999px; }
.skip-link:focus { top: 1rem; }

.site-header {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo {
  width: clamp(118px, 11vw, 158px);
  height: auto;
  transition: transform .2s ease;
}
.brand:hover .brand-logo { transform: translateY(-1px) rotate(-1deg); }
nav { display: flex; align-items: center; gap: 1.8rem; font-weight: 600; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav-social { padding: .62rem 1rem; border: 1px solid var(--line); border-radius: 999px; }

main { overflow: hidden; }
.hero {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.2rem 0 6rem;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.eyebrow { margin: 0 0 .75rem; color: var(--coral); font-size: .8rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { font-family: "Fredoka", sans-serif; line-height: 1.02; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(3.5rem, 7vw, 6.6rem); }
h1 em { color: var(--green); font-style: normal; }
.hero-copy h1 { font-size: clamp(3.2rem, 4.8vw, 4.7rem); letter-spacing: -.04em; }
.hero-line { display: block; }
.hero-spark { display: inline-block; margin-left: .12em; color: #ffc62f; font-size: .7em; line-height: 1; transform: rotate(12deg); }
.hero-intro { max-width: 36rem; margin: 1.6rem 0 2rem; font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: #39536a; }
.hero-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: .75rem; padding: .95rem 1.25rem; border-radius: 999px; font-weight: 700; text-decoration: none; }
.button-primary { color: white; background: var(--blue); box-shadow: 0 7px 0 #0d2943; }
.button-primary:hover { transform: translateY(2px); box-shadow: 0 5px 0 #0d2943; }
.free-note { color: #617386; font-size: .9rem; }
.hero-art { position: relative; padding: 1.1rem; border-radius: 46% 54% 50% 50% / 45% 44% 56% 55%; background: var(--yellow); transform: rotate(1deg); }
.hero-art::before { content: ""; position: absolute; inset: 8% -10% -5% 16%; z-index: -1; border-radius: 45% 55% 42% 58%; background: var(--sky); transform: rotate(-7deg); }
.hero-art img { width: 100%; aspect-ratio: 1.18; object-fit: cover; border-radius: inherit; }
.hero-sticker { position: absolute; padding: .6rem .85rem; border-radius: 999px; font: 600 .82rem/1 "Fredoka", sans-serif; box-shadow: 0 5px 0 rgba(20, 51, 82, .18); }
.sticker-one { left: -1rem; top: 18%; color: white; background: var(--coral); transform: rotate(-9deg); }
.sticker-two { right: -1.2rem; bottom: 15%; background: white; transform: rotate(7deg); }

.game-library { padding: 5.5rem max(1rem, calc((100vw - 1180px) / 2)); background: var(--sky); }
.section-heading { margin-bottom: 2.2rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.section-heading h2 { margin: 0; font-size: clamp(2.3rem, 4vw, 4.2rem); }
.section-heading > p { max-width: 30rem; margin: 0; color: #49677b; }
.library-tools { margin: 0 0 .8rem; padding: .85rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: rgba(255, 255, 255, .72); border: 1px solid rgba(20, 51, 82, .08); border-radius: 1.2rem; }
.search-box { min-width: min(25rem, 100%); display: flex; align-items: center; gap: .55rem; padding: .72rem .9rem; background: white; border: 1px solid var(--line); border-radius: .85rem; }
.search-icon { color: var(--green); font: 700 1.45rem/1 "Fredoka", sans-serif; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; }
.search-box:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(74, 168, 121, .16); }
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-chip { padding: .65rem .85rem; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; font: 700 .86rem/1 "DM Sans", sans-serif; cursor: pointer; }
.filter-chip:hover, .filter-chip.is-active { color: white; background: var(--blue); border-color: var(--blue); }
.results-status { margin: .55rem 0 1.2rem; color: #5c7385; font-size: .86rem; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.game-card[hidden] { display: none; }
.game-card { overflow: hidden; background: white; border: 1px solid rgba(20, 51, 82, .09); border-radius: 1.6rem; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.game-card:hover { transform: translateY(-6px) rotate(-.3deg); box-shadow: 0 25px 50px rgba(20, 51, 82, .18); }
.card-image { position: relative; display: block; overflow: hidden; aspect-ratio: 1.25; background: var(--paper); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.game-card:hover .card-image img { transform: scale(1.035); }
.age-chip { position: absolute; top: .8rem; right: .8rem; padding: .45rem .68rem; color: var(--blue); background: rgba(255, 255, 255, .92); border-radius: 999px; font-size: .78rem; font-weight: 700; }
.card-body { padding: 1.35rem 1.35rem 1.5rem; }
.card-kicker { margin: 0; color: var(--green); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.card-body h3 { margin: .5rem 0 .65rem; font-size: 1.75rem; }
.card-body h3 a { text-decoration: none; }
.card-body > p:not(.card-kicker) { min-height: 3.1em; margin: 0 0 1.2rem; color: #536a7d; }
.card-link { font-weight: 800; text-decoration: none; }
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-moon .card-kicker { color: #7e65ba; }
.card-explorer .card-kicker { color: #db694e; }
.no-results { padding: 3rem 1rem; text-align: center; color: #49677b; background: rgba(255, 255, 255, .56); border: 2px dashed rgba(20, 51, 82, .18); border-radius: 1.5rem; }
.no-results strong, .no-results span { display: block; }
.no-results strong { margin-bottom: .3rem; color: var(--ink); font: 700 1.4rem/1.2 "Fredoka", sans-serif; }
.no-results button { margin-top: 1rem; padding: .7rem 1rem; color: white; background: var(--blue); border: 0; border-radius: 999px; font: 700 .9rem "DM Sans", sans-serif; cursor: pointer; }

.story-section { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 7rem 0; }
.story-heading { margin-bottom: 3rem; }
.story-heading h2 { max-width: 850px; margin: 0; font-size: clamp(2.7rem, 5vw, 5rem); }
.story-heading h2 em { color: var(--green); font-style: normal; }
.story-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .72fr); align-items: start; gap: clamp(2rem, 6vw, 6rem); }
.story-copy { max-width: 730px; color: #3c566d; font-size: clamp(1.05rem, 1.55vw, 1.18rem); }
.story-copy p { margin: 0 0 1.25rem; }
.story-copy .story-lead { margin-bottom: 1.6rem; color: var(--ink); font: 600 clamp(1.3rem, 2vw, 1.65rem)/1.35 "Fredoka", sans-serif; }
.story-copy strong { color: var(--ink); }
.story-copy a, .story-social { color: var(--coral); font-weight: 800; text-underline-offset: 5px; }
.story-card {
  position: sticky;
  top: 1.5rem;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  overflow: hidden;
  color: white;
  background: var(--blue);
  border-radius: 2rem;
  box-shadow: 12px 14px 0 var(--yellow);
}
.story-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -55px; bottom: -65px; border-radius: 50%; background: var(--green); opacity: .75; }
.story-date { position: relative; z-index: 1; color: var(--yellow); font-size: .76rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.story-card blockquote { position: relative; z-index: 1; margin: 1.3rem 0; font: 600 clamp(1.9rem, 3vw, 2.75rem)/1.03 "Fredoka", sans-serif; letter-spacing: -.02em; }
.story-card p { position: relative; z-index: 1; margin: 0 0 1.5rem; color: #d7e8f1; }
.story-social { position: relative; z-index: 1; display: inline-block; color: white; }
.site-footer { padding: 2.2rem max(1rem, calc((100vw - 1180px) / 2)); display: flex; justify-content: space-between; gap: 2rem; color: white; background: var(--blue); }
.site-footer p { margin: 0; }
.site-footer span { color: #b8d2df; }

@media (max-width: 860px) {
  .site-header { min-height: 74px; }
  nav a:not(.nav-social) { display: none; }
  .hero { padding-top: 2rem; grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-intro { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { width: min(650px, 94%); margin: 0 auto; }
  .story-section { padding: 5rem 0; }
  .story-heading { margin-bottom: 2rem; }
  .story-layout { grid-template-columns: 1fr; }
  .story-card { position: relative; top: auto; max-width: 560px; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .game-card:last-child { grid-column: 1 / -1; max-width: calc(50% - .7rem); margin: 0 auto; }
  .section-heading { align-items: start; flex-direction: column; }
  .library-tools { align-items: stretch; flex-direction: column; }
  .search-box { min-width: 0; }
}

@media (max-width: 580px) {
  nav { gap: .5rem; }
  .nav-social { padding: .52rem .72rem; font-size: .86rem; }
  .hero { padding-bottom: 4rem; }
  h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero-copy h1 { font-size: clamp(2.7rem, 12vw, 4.2rem); }
  .hero-sticker { font-size: .72rem; }
  .game-library { padding-top: 4rem; padding-bottom: 4rem; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card:last-child { grid-column: auto; max-width: none; }
  .site-footer { flex-direction: column; }
}

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