@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --sky: #6bdefe;
  --sky-soft: #e7f8ff;
  --cream: #fff4dc;
  --orange: #ff9f1c;
  --sun: #ffc300;
  --grass: #80ed99;
  --outline: #3b2a20;
  --text: #243447;
  --muted: #4f5d70;
  --link: #0b5cad;
  --radius: 24px;
  --gutter: 16px;
}

* { box-sizing: border-box; }
img { max-width: 100%; }
.hero-grid > *, .steps > *, .more > *, .promises > * { min-width: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sky-soft);
  color: var(--text);
  font-family: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--link); }
a:focus-visible, .badge:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; border-radius: 8px; }

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

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(26px, 4vw, 36px); text-align: center; }
h3 { font-size: 21px; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--sky) 0%, #b9ecff 70%, var(--sky-soft) 100%);
  padding: 24px 0 40px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 22px; color: var(--outline); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--outline); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; margin-top: 28px; }
.hero-art {
  width: 100%; height: auto; display: block;
  border: 5px solid var(--outline); border-radius: var(--radius);
  box-shadow: 0 8px 0 rgba(59, 42, 32, 0.25);
  background: var(--sky);
}
.lead { font-size: 20px; color: var(--text); margin: 0 0 20px; }
.ages {
  display: inline-block; background: var(--sun); color: var(--outline);
  border: 3px solid var(--outline); border-radius: 999px;
  padding: 2px 14px; font-weight: 700; font-size: 16px; margin-bottom: 14px;
}
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
/* Google's badge art has its own clear space round it. */
.badge { display: inline-block; line-height: 0; }
.badge img { height: 80px; width: auto; }
.soon { font-size: 16px; color: var(--muted); margin: 0; }

/* Sections */
section { padding: 48px 0; }
.center { text-align: center; max-width: 640px; margin: 0 auto 28px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--cream); border: 4px solid var(--outline); border-radius: var(--radius);
  box-shadow: 0 6px 0 rgba(59, 42, 32, 0.2);
  overflow: hidden;
}
.card img { width: 100%; height: auto; display: block; border-bottom: 4px solid var(--outline); }
.card .body { padding: 16px 18px 20px; }
.card p { margin: 0; color: var(--muted); }

.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }

.promise { background: var(--cream); border-top: 4px solid var(--outline); border-bottom: 4px solid var(--outline); }
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.promises .item { background: #fff; border: 4px solid var(--outline); border-radius: var(--radius); padding: 20px; }
.dot {
  width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--outline);
  display: grid; place-items: center; margin-bottom: 12px;
}
.dot svg { width: 28px; height: 28px; fill: none; stroke: var(--outline); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.promises p { margin: 0; color: var(--muted); }

.price { max-width: 760px; margin: 0 auto; }
.price ul { padding-left: 22px; margin: 0; }
.price li { margin: 6px 0; }

.cta { text-align: center; }
.cta .get { justify-content: center; }

footer { padding: 32px 0 48px; color: var(--muted); font-size: 15px; border-top: 2px solid #cfe9f7; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
footer p { margin: 6px 0; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .steps, .more, .promises { grid-template-columns: 1fr; }
  .badge img { height: 72px; }
}

/* Navigation */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; font-size: 17px; }
.nav a { color: var(--outline); text-decoration: none; padding: 6px 2px; border-bottom: 3px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--orange); }

/* Inner pages */
.page-head { background: linear-gradient(180deg, var(--sky) 0%, #b9ecff 80%, var(--sky-soft) 100%); padding: 24px 0 36px; }
.page-head h1 { margin-top: 28px; }
.page-head .lead { max-width: 720px; margin: 0; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { text-align: start; margin-top: 8px; }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose li { margin: 6px 0; }
.prose p { margin: 0 0 14px; }
.prose section { padding: 28px 0; border-bottom: 2px solid #cfe9f7; }
.prose section:last-child { border-bottom: 0; }
.shot { width: 100%; height: auto; display: block; border: 4px solid var(--outline); border-radius: var(--radius); margin: 8px 0 18px; }

/* Free and full game table */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 4px solid var(--outline); border-radius: var(--radius); overflow: hidden; font-size: 17px; }
.compare th, .compare td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 2px solid #e3eef5; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--cream); border-bottom: 3px solid var(--outline); }
.compare td + td, .compare th + th { border-inline-start: 2px solid #e3eef5; }
.table-scroll { overflow-x: auto; }

/* Questions */
details { background: #fff; border: 3px solid var(--outline); border-radius: 18px; padding: 0 18px; margin: 0 0 12px; }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
details[open] summary { border-bottom: 2px solid #e3eef5; margin-bottom: 12px; }
details p, details ol, details ul { color: var(--muted); }
details > :last-child { margin-bottom: 16px; }

.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 8px; }
.next a { display: block; background: var(--cream); border: 3px solid var(--outline); border-radius: 18px; padding: 14px 16px; font-weight: 600; color: var(--outline); text-decoration: none; }
.next a:hover { background: #ffe9b8; }


.more-link { margin-top: 28px; margin-bottom: 0; }

/* Privacy policy and terms: long text, so smaller type and calm headings */
.legal { font-size: 17px; padding: 32px 0 8px; }
.legal h2 { font-size: 22px; margin: 36px 0 10px; padding-top: 20px; border-top: 2px solid #cfe9f7; text-align: start; }
.legal h3 { font-size: 18px; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--text); overflow-wrap: anywhere; }
.legal ul, .legal ol { margin: 0 0 14px; }
.legal address { font-style: normal; margin: 0 0 14px; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; display: block; overflow-x: auto; }
.legal th, .legal td { border: 2px solid #cfe9f7; padding: 8px 10px; text-align: start; vertical-align: top; background: #fff; }
.legal th { background: var(--cream); }

/* Promo video: a local poster, and the YouTube player loads only when pressed. */
.video {
  position: relative; display: block; max-width: 860px; margin: 0 auto;
  aspect-ratio: 16 / 9; border: 4px solid var(--outline); border-radius: var(--radius);
  box-shadow: 0 6px 0 rgba(59, 42, 32, 0.2); overflow: hidden; background: var(--outline);
}
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
.video .play {
  position: absolute; top: 50%; left: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px;
  border-radius: 50%; background: var(--orange); border: 4px solid var(--outline);
  box-shadow: 0 6px 0 rgba(59, 42, 32, 0.25); transition: transform 0.15s ease;
}
.video .play::after {
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 18px 0 18px 30px; border-color: transparent transparent transparent var(--outline);
}
.video:hover .play, .video:focus-visible .play { transform: scale(1.08); }
.video-note { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 14px auto 0; max-width: 640px; }
@media (max-width: 600px) { .video .play { width: 72px; height: 72px; margin: -36px 0 0 -36px; } .video .play::after { border-width: 14px 0 14px 23px; } }

/* ---------- Downloading is the main action ---------- */

/* "Get the game" button in the page menu */
.nav a.nav-get {
  background: var(--sun); color: var(--outline); border: 3px solid var(--outline);
  border-radius: 999px; padding: 6px 16px; box-shadow: 0 4px 0 rgba(59, 42, 32, 0.25);
}
.nav a.nav-get:hover { border-bottom-color: var(--outline); background: #ffd23f; }

/* Hero download block: big badge, framed so it reads as the one thing to do */
.get-main {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: #fff; border: 4px solid var(--outline); border-radius: var(--radius);
  box-shadow: 0 6px 0 rgba(59, 42, 32, 0.25); padding: 14px 20px 14px 14px; max-width: min(100%, 430px);
}
.get-main .badge img { height: 96px; }
.get-main .free { font-weight: 700; font-size: 18px; color: var(--outline); margin: 0 0 0 10px; }
.get-main .soon { margin-left: 10px; }

/* Download block between sections */
.mid-get { text-align: center; padding: 8px 0 0; }
.mid-get .badge img { height: 84px; }

/* Final call to action */
.cta { background: var(--sun); border-top: 4px solid var(--outline); border-bottom: 4px solid var(--outline); }
.cta h2 { color: var(--outline); }
.cta p { margin: 0 0 16px; color: var(--outline); font-size: 19px; }
.cta .badge img { height: 104px; }

/* Phones: a download bar slides up once the page's own buttons are out of view */
.getbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 50; display: none; align-items: center; gap: 12px;
  background: #fff; border: 4px solid var(--outline); border-radius: 22px;
  box-shadow: 0 6px 0 rgba(59, 42, 32, 0.3); padding: 8px 8px 8px 10px;
  transform: translateY(160%); transition: transform 0.25s ease;
}
.getbar.show { transform: none; }
.getbar img.ic { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--outline); flex: none; }
.getbar .t { flex: 1; min-width: 0; line-height: 1.2; }
.getbar .t b { display: block; color: var(--outline); font-size: 17px; }
.getbar .t span { color: var(--muted); font-size: 14px; }
.getbar a {
  flex: none; background: var(--sun); color: var(--outline); font-weight: 700; font-size: 18px;
  text-decoration: none; border: 3px solid var(--outline); border-radius: 14px; padding: 8px 16px;
  box-shadow: 0 3px 0 rgba(59, 42, 32, 0.3);
}
@media (prefers-reduced-motion: reduce) { .getbar { transition: none; } }
@media (max-width: 820px) {
  .getbar { display: flex; }
  body.has-getbar { padding-bottom: 92px; }
  .get-main { align-items: center; width: 100%; padding: 14px; }
  .get-main .free, .get-main .soon { margin-left: 0; text-align: center; }
  .get-main .badge img { height: 88px; }
  .hero .get-main { margin: 0 auto; }
}

/* iPhone and iPad: note that the game is Android only for now */
.gp-ios { display: none; }
.is-ios .gp-ios { display: block; }

/* ---------- /homelings/get/: one screen, one action ---------- */
body.getpage {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sky) 0%, #b9ecff 60%, var(--sky-soft) 100%);
  text-align: center;
}
.gp { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 36px 20px 24px; display: flex; flex-direction: column; align-items: center; }
.gp-icon {
  width: 128px; height: 128px; border-radius: 30px; border: 5px solid var(--outline);
  box-shadow: 0 8px 0 rgba(59, 42, 32, 0.25); background: #fff;
}
.gp-name { font-size: clamp(42px, 11vw, 60px); color: var(--outline); margin: 18px 0 0; letter-spacing: 0.5px; }
.gp-tag { font-size: clamp(20px, 5vw, 24px); font-weight: 600; color: var(--outline); margin: 2px 0 22px; }
.gp-badge { display: block; line-height: 0; border-radius: 16px; transition: transform 0.15s ease; }
.gp-badge img { width: min(320px, 82vw); height: auto; }
.gp-badge:hover, .gp-badge:focus-visible { transform: scale(1.04); }
.gp-badge:focus-visible { outline: 4px solid var(--orange); outline-offset: 4px; }
.gp-free { font-weight: 700; color: var(--outline); margin: 4px 0 0; }
.gp-ios { max-width: 360px; margin: 12px auto 0; background: #fff; border: 3px solid var(--outline); border-radius: 16px; padding: 10px 14px; font-size: 16px; }
.gp-chips { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gp-chips li { background: #fff; border: 3px solid var(--outline); border-radius: 999px; padding: 3px 14px; font-weight: 600; font-size: 16px; color: var(--outline); }
.gp-art { width: 100%; height: auto; border: 5px solid var(--outline); border-radius: var(--radius); box-shadow: 0 8px 0 rgba(59, 42, 32, 0.25); background: var(--sky); }
.gp-foot { padding: 18px 16px 28px; font-size: 14px; color: var(--muted); }
.gp-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; }
.gp-foot nav a { display: inline-block; padding: 10px 0; }
.gp-studio { display: inline-block; margin: 8px 0 4px; line-height: 0; }
.gp-studio img { height: 30px; width: auto; }
.gp-foot p { margin: 4px 0 0; }
@media (prefers-reduced-motion: reduce) { .gp-badge { transition: none; } }

/* Phones: name, headline and download button come first, then the picture and the description */
@media (max-width: 820px) {
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-top: 18px; }
  .hero-text { display: contents; }
  .hero .ages { order: 1; align-self: flex-start; }
  .hero h1 { order: 2; }
  .hero .get-main { order: 3; margin: 6px 0 22px; }
  .hero .hero-art { order: 4; margin-bottom: 18px; }
  .hero .lead { order: 5; margin: 0; }
  .nav a.nav-get { display: none; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; gap: 0 18px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}
