/* Desktop is drawn on the mockup's 1536px canvas: 1rem = 16 canvas px, and the root size follows the viewport
   so the layout lines up with the background art at any desktop width. Phones and tablets use a plain 16px rem. */
@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/pixelify-sans.woff2) format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/nunito.woff2) format("woff2");
}

:root {
  --navy: #0e1347;
  --ink: #232c6c;
  --pink: #fd80d0;
  --pink-ink: #20104f;
  --sky-top: #101a49;
  --sky-low: #3150a8;
  --lilac: #faf3fd;
  --purple-1: #4b42a8;
  --purple-2: #5c4cc8;
  --soft: #cbc1f2;
  color-scheme: light;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
@media (min-width: 1100px) {
  html { font-size: clamp(13px, calc(100vw / 96), 20px); }
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--lilac);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  min-height: 100vh; display: flex; flex-direction: column;
}
.foot { margin-top: auto; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid #5cc9ff; outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pix { image-rendering: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap;
  border-radius: .875rem; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn img { flex: none; }
.go::after {
  content: ""; width: 1rem; height: 1rem; flex: none; margin-left: .25rem; background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h10M8.5 3.5 13 8l-4.5 4.5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-pink { background: var(--pink); color: var(--pink-ink); box-shadow: 0 0 1.25rem rgba(253, 128, 208, .45); }
.btn-pink:hover { box-shadow: 0 0 1.75rem rgba(253, 128, 208, .7); }
.btn-night { background: #192a7c; color: #fff; border: 2px solid #aeb4ee; }
.btn-night:hover { background: #22379a; }
.btn-ghost { background: #eddeff; color: #2b1877; border: 2px solid #c6a4f4; font-size: .9375rem; }
.btn-ghost:hover { background: #e4cfff; }
.btn-dark { background: #10144a; color: #fff; font-size: .875rem; font-weight: 700; border-radius: 99px; }

/* Page frame: the scene art sits behind the header, hero and games */
.scene {
  background:
    url(/img/hero-bg.webp) top center / 96rem auto no-repeat,
    url(/img/section-bg.webp) center 26.25rem / 96rem auto no-repeat,
    linear-gradient(var(--sky-top), var(--sky-low) 28rem, #d4c8fa 33rem, #a99cf0 58rem);
}
.frame { width: 96rem; max-width: 100%; margin: 0 auto; position: relative; }

/* Header */
.top { height: 5.75rem; position: relative; }
.top::before { content: ""; position: absolute; left: 0; top: 0; width: 65.75rem; height: 5.625rem; background: rgba(8, 10, 40, .14); border-bottom-right-radius: 1.25rem; pointer-events: none; }
.logo { position: absolute; left: 6.875rem; top: .875rem; display: flex; align-items: center; gap: .625rem; }
.logo-ellie { width: 5.5rem; }
.logo-word { width: 9.75rem; }
.nav { position: absolute; left: 32.1875rem; top: 1.5625rem; display: flex; gap: .5rem; }
.nav a {
  display: flex; align-items: center; height: 2.5625rem; padding: 0 1.1875rem; border-radius: 1.25rem;
  color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent;
}
.nav a:hover { background: rgba(255, 255, 255, .08); }
.nav a[aria-current="page"] { border-color: #f07fcf; color: #ff8fd8; background: rgba(16, 20, 74, .35); }
.top-heart { position: absolute; left: 77.75rem; top: 2.125rem; width: 1.5rem; }
.top .btn-pink { position: absolute; left: 80.625rem; top: 1.1875rem; width: 11.5rem; height: 3.125rem; gap: .3125rem; }
.top .btn-pink img { width: 2.25rem; margin-right: .25rem; }

/* Hero */
.hero { text-shadow: 0 1px .5rem rgba(10, 14, 60, .85), 0 0 1.25rem rgba(10, 14, 60, .6); height: 26.5rem; padding: 2.125rem 0 0 7.4375rem; color: #fff; }
.eyebrow { margin: 0; font-size: .8125rem; font-weight: 800; letter-spacing: .34em; text-transform: uppercase; color: #e4def4; line-height: 1; }
.hero h1 { margin: .25rem 0 .625rem -.125rem; }
.hero h1 img { width: 23.5rem; filter: drop-shadow(0 .25rem .75rem rgba(10, 14, 60, .55)); }
.lead { margin: 0; font-size: 1.4375rem; font-weight: 800; line-height: 1.75rem; }
.hero .intro { margin: .375rem 0 0; font-size: 1.11rem; font-weight: 500; line-height: 1.375rem; max-width: 26rem; color: #edeaff; }
.actions { display: flex; gap: 1.25rem; margin-top: 1.1875rem; }
.actions .btn { font-size: .97rem; text-shadow: none; }
.actions .btn { height: 3rem; }
.actions .btn-pink { width: 12.375rem; }
.actions .btn-pink img { width: 2.25rem; }
.actions .btn-night { width: 9.0625rem; gap: .375rem; }
.actions .btn-night img { width: 1.125rem; margin-right: .25rem; }
.hero-art { display: none; }
.hero-scene { position: absolute; inset: 0; pointer-events: none; }
.ellie { position: absolute; left: 35rem; top: 18.6rem; width: 12.8rem; }
.otter { position: absolute; left: 29.625rem; top: 24.5rem; width: 5rem; }
.bubble {
  position: absolute; left: 44rem; top: 15.25rem; padding: .375rem .75rem;
  background: #fff; color: #3a2386; border: 3px solid #241552; border-radius: .375rem;
  font: 700 1.125rem/1 "Pixelify Sans", ui-monospace, monospace; white-space: nowrap;
  box-shadow: 0 3px 0 rgba(36, 21, 82, .35);
}
.bubble::before, .bubble::after { content: ""; position: absolute; top: 100%; left: .75rem; clip-path: polygon(0 0, 100% 0, 0 100%); }
.bubble::before { width: 1.125rem; height: 1.125rem; margin-left: -3px; background: #241552; }
.bubble::after { width: .75rem; height: .75rem; margin-top: -1px; background: #fff; }

/* Games */
.games { padding: .125rem 7rem 1.4375rem; }
.games-head { display: flex; align-items: flex-end; justify-content: space-between; }
.games-head h2 { margin: 0 0 0 -.375rem; }
.games-head h2 img { width: 17.5rem; }
.games-head p { margin: .3125rem 0 0; font-size: 1.11rem; font-weight: 500; color: var(--ink); }
.games-head .btn { width: 11.5rem; height: 3rem; margin-bottom: .875rem; border-radius: .75rem; }
.cards { list-style: none; margin: .6875rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.125rem; }
.card a {
  display: flex; flex-direction: column; align-items: flex-start; height: 100%; padding: .625rem .625rem .6875rem; text-decoration: none;
  background: rgba(255, 255, 255, .86); border-radius: 1rem; box-shadow: 0 .375rem 1.5rem rgba(110, 80, 190, .14);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card a:hover { transform: translateY(-3px); box-shadow: 0 .625rem 2rem rgba(110, 80, 190, .24); }
.thumb { position: relative; align-self: stretch; }
.thumb img { width: 100%; aspect-ratio: 413 / 183; object-fit: cover; border-radius: .75rem; image-rendering: pixelated; }
.badge {
  position: absolute; left: .6875rem; top: .6875rem; display: flex; align-items: center; gap: .3125rem;
  height: 1.8125rem; padding: 0 .625rem 0 .4375rem; border-radius: .5rem; background: #34278a; color: #fff;
  font-size: .8125rem; font-weight: 700;
}
.badge img { width: 1.125rem; }
.card h3 { margin: .375rem 0 0 .125rem; font-size: 1.15rem; font-weight: 800; color: var(--navy); line-height: 1.5rem; }
.card p { margin: .125rem 0 .625rem .125rem; font-size: .875rem; color: #2b315f; }
.card .btn-dark { margin: auto 0 0 .125rem; width: 8.5625rem; height: 2.375rem; }

/* Feature strip */
.perks { background: linear-gradient(var(--purple-1), var(--purple-2)); color: #fff; }
.perks ul { list-style: none; margin: 0 auto; padding: .625rem 6.5rem .6875rem 8rem; display: grid; grid-template-columns: 20.875rem 21.375rem 19.125rem 1fr; }
.perks li { display: flex; align-items: center; gap: .875rem; min-height: 4.375rem; }
.perks li > img, .perks li > a > img { flex: none; width: 3.25rem; }
.perks a { display: flex; align-items: center; gap: .875rem; text-decoration: none; }
.perks strong { display: block; font-size: 1rem; font-weight: 800; }
.perks span { display: block; font-size: .875rem; color: var(--soft); font-weight: 600; }

/* About and footer */
.about { padding: 3.5rem 7rem 4.5rem; max-width: 96rem; margin: 0 auto; }
.about-intro { display: grid; grid-template-columns: 21rem 1fr; gap: 3rem; align-items: center; }
.about-intro img { width: 21rem; border-radius: 1rem; box-shadow: 0 .5rem 1.5rem rgba(110, 80, 190, .2); }
.about h2, .page-head h1 { margin: 0; font-size: 2.25rem; font-weight: 800; color: var(--navy); line-height: 1.15; }
.about p { font-size: 1.0625rem; max-width: 46rem; }
.about .about-lead { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.learn { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.125rem; margin-top: 3rem; }
.learn-card { background: #fff; border-radius: 1rem; padding: 1.5rem 1.5rem 1.25rem; box-shadow: 0 .375rem 1.5rem rgba(110, 80, 190, .12); }
.learn-card > img { width: 3rem; height: 3rem; object-fit: contain; object-position: left center; }
.learn-card h3 { margin: .75rem 0 .5rem; font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.learn-card ol, .learn-card ul { margin: 0; padding-left: 1.25rem; display: grid; gap: .5rem; font-size: 1rem; }
.learn-card li::marker { color: #e45fb3; font-weight: 800; }
.learn-card strong { color: var(--navy); }
.grownups { margin-top: 1.125rem; padding: 1.25rem 1.5rem; border-radius: 1rem; background: #eddeff; border: 2px solid #d6bdf8; }
.grownups h3 { margin: 0 0 .25rem; font-size: 1.125rem; font-weight: 800; color: var(--navy); }
.grownups p { margin: 0; max-width: none; }
.more { padding: 3.5rem 7rem 0; max-width: 96rem; margin: 0 auto; }
.more h2 { margin: 0 0 1.25rem; font-size: 2.25rem; font-weight: 800; color: var(--navy); }
.more-grid { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.more-card { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.more-card:hover { transform: translateY(-3px); box-shadow: 0 .625rem 2rem rgba(110, 80, 190, .24); }
.more-card p { margin: 0; }
.made { padding: 0 7rem 4rem; }
.made h2 { margin: 1rem 0 .25rem; font-size: 2rem; font-weight: 800; color: var(--navy); }
.made-intro { font-size: 1.0625rem; max-width: 46rem; margin: 0 0 1.25rem; }
.made .learn { margin-top: 0; }
.made .learn-card h3 { margin-top: 0; }
.made .learn-card p { margin: 0; }
.ai-page { padding: 2rem 7rem 4rem; }
.ai-page h2 { margin: .75rem 0 .5rem; font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.ai-page p, .ai-page li { font-size: 1.0625rem; }
.ai-wide p { max-width: 56rem; }
.ai-wide p { margin: .5rem 0; }
.ai-page .learn { margin-top: 1.125rem; }
.ai-try { display: flex; align-items: center; gap: 2rem; margin-top: 1.125rem; padding: 1.5rem 2rem; border-radius: 1rem; background: linear-gradient(var(--sky-top), var(--sky-low)); color: #fff; }
.ai-try img { width: 9rem; flex: none; }
.ai-try h2 { color: #fff; margin-top: 0; }
.ai-try p { color: #edeaff; margin: 0 0 1rem; }
.ai-try .btn { height: 3rem; padding: 0 1.25rem; }
.ai-page .grownups ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.ai-page .grownups h2 { margin-top: 0; font-size: 1.125rem; }
.foot { background: var(--navy); color: #c9c6ee; font-size: .875rem; }
.foot div { max-width: 96rem; margin: 0 auto; padding: 1.5rem 7rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.foot a { color: #fff; }

/* Inner pages */
.page-head { padding: 2rem 7rem 0; color: #fff; }
.page-head h1 { color: #fff; }
.page-head p { font-size: 1.0625rem; color: #edeaff; margin: .5rem 0 0; max-width: 46rem; }
.crumbs { font-size: .875rem; color: #c9c6ee; margin-bottom: .75rem; }
.crumbs a { color: #fff; }
.band { background: linear-gradient(var(--sky-top), var(--sky-low)); padding-bottom: 2.5rem; }
.band .top::before { display: none; }
.band + main .games { padding-top: 2rem; }
.band + main .cards { grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); margin-top: 0; }
.prose { max-width: 58rem; padding: 2rem 7rem 4rem; }
.prose h2 { color: var(--navy); font-size: 1.375rem; margin: 2rem 0 .5rem; }
.prose p, .prose li { font-size: 1.0625rem; }

/* Phones and tablets */
@media (max-width: 1099.98px) {
  .scene { background: linear-gradient(var(--sky-top), var(--sky-low) 40rem, var(--lilac) 40rem); }
  .frame { width: auto; }
  .top { height: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: .75rem 1rem; }
  .logo, .nav, .top-heart, .top .btn-pink { position: static; }
  .logo-ellie { width: 4.25rem; }
  .logo-word { width: 7.5rem; }
  .top-heart, .top::before, .hero-scene { display: none; }
  .top .btn-pink { width: auto; height: 2.75rem; padding: 0 1rem; }
  .nav { order: 3; width: 100%; gap: .25rem; flex-wrap: wrap; }
  .nav a { height: 2.25rem; padding: 0 .875rem; font-size: .9375rem; flex: none; }
  .hero { height: auto; padding: 1.5rem 1rem 0; }
  .hero h1 { margin-left: -.375rem; }
  .hero h1 img { width: min(25.75rem, 100%); }
  .lead { font-size: 1.25rem; }
  .actions { flex-wrap: wrap; gap: .75rem; }
  .hero-art { display: block; width: calc(100% + 2rem); max-width: none; margin: 1rem -1rem 0; mask-image: linear-gradient(transparent, #000 18%); }
  .games { padding: 1.5rem 1rem 2rem; }
  .games-head { flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
  .perks ul { padding: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem 1rem; }
  .about { padding: 2.5rem 1rem; }
  .about-intro { grid-template-columns: 1fr; gap: 1rem; }
  .about-intro img { width: 100%; max-width: 24rem; }
  .learn { grid-template-columns: 1fr; margin-top: 1.5rem; }
  .ai-page { padding: 1.5rem 1rem 3rem; }
  .made { padding: 0 1rem 3rem; }
  .more { padding: 2.5rem 1rem 0; }
  .more-grid { grid-template-columns: 1fr 1fr; }
  .ai-try { flex-direction: column; align-items: flex-start; padding: 1.25rem; }
  .foot div, .page-head, .prose { padding-left: 1rem; padding-right: 1rem; }
  .band { padding-bottom: 1.75rem; }
  .band + main .cards { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
}

/* Keep pixel art edges hard whenever the browser has to enlarge a low resolution image. */
@media (min-width: 1537px), (min-resolution: 1.5dppx) {
  .games-head h2 img { image-rendering: pixelated; }
}
@media (min-width: 2057px), (min-resolution: 1.5dppx) {
  .scene { image-rendering: pixelated; }
}

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