/* Easy Game Maker site. The night sky of the app's Home, then the cream storybook panels of its games. */
:root {
  --night: #0d1330;
  --night-2: #1a2257;
  --paper: #fff8ec;
  --paper-2: #f6ead3;
  --ink: #3d2b22;
  --ink-soft: #6e5a4e;
  --butter: #ffd23f;
  --butter-dark: #c99a12;
  --grass: #5bc236;
  --lavender: #a77bff;
  --sky-text: #e9ecff;
  --sky-soft: #aab3d9;
  --r: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  font-family: Nunito, system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--butter); color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-weight: 900; line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(32px, 5vw, 48px); }
h3 { font-size: 24px; }
p { margin: 0; }

/* ---------- buttons: the game's chunky "lip" button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 28px;
  border: 4px solid var(--ink); border-radius: 16px;
  font-weight: 900; font-size: 19px; text-decoration: none;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn.yellow { background: linear-gradient(180deg, #ffe066, var(--butter)); color: var(--ink); }

/* ---------- hero: the night launcher with the cover art ---------- */
.sky {
  position: relative;
  color: var(--sky-text);
  background:
    linear-gradient(180deg, rgba(13,19,48,.55) 0%, rgba(13,19,48,.92) 62%, var(--night) 100%),
    url("assets/cover.webp") center top / cover no-repeat,
    var(--night);
  padding-bottom: 72px;
  overflow: hidden;
}
.nav { width: min(1120px, 100% - 32px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 900; font-size: 20px; }
.brand img { border-radius: 12px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { text-decoration: none; font-weight: 800; color: var(--sky-soft); }
.nav-links a:hover { color: #fff; }

.hero { width: min(1120px, 100% - 32px); margin: 0 auto; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; padding-top: 40px; }
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); letter-spacing: -0.015em; text-shadow: 0 4px 0 #1b1450; }
.lede { margin-top: 22px; font-size: 21px; color: var(--sky-text); max-width: 34em; }
.ctas { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }
.stores { margin-top: 16px; color: var(--sky-soft); font-weight: 700; font-size: 16px; }

/* The live demo: a phone that loads the real game on tap. */
.phone { margin: 0; justify-self: center; width: min(340px, 100%); }
.phone-screen {
  position: relative;
  aspect-ratio: 412 / 893;
  border-radius: 40px;
  padding: 10px;
  background: linear-gradient(160deg, #3b3170, #1c1840);
  box-shadow: 0 30px 60px rgba(0,0,0,.55), inset 0 0 0 2px rgba(255,255,255,.12);
}
.phone-screen img, .phone-screen iframe { width: 100%; height: 100%; border: 0; border-radius: 30px; object-fit: cover; object-position: top; background: #0b1029; }
.demo-play {
  position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  min-height: 52px; padding: 0 22px;
  font: inherit; font-weight: 900; font-size: 18px; color: var(--ink);
  background: linear-gradient(180deg, #8ff07a, var(--grass)); border: 4px solid var(--ink); border-radius: 16px;
  box-shadow: 0 6px 0 var(--ink); cursor: pointer;
}
.demo-play:active { transform: translate(-50%, 4px); box-shadow: 0 2px 0 var(--ink); }
.play-dot { width: 0; height: 0; border-left: 14px solid var(--ink); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.phone figcaption { margin-top: 14px; text-align: center; font-size: 14px; color: var(--sky-soft); }

/* ---------- storybook sections ---------- */
.paper-section { padding: 88px 0; }
.section-lede { margin-top: 12px; font-size: 20px; color: var(--ink-soft); max-width: 36em; }
.panel { background: #fff; border: 4px solid var(--ink); border-radius: var(--r); box-shadow: 0 6px 0 rgba(61,43,34,.18); }

.steps h2 { margin-bottom: 36px; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step-list li { padding: 18px 18px 24px; counter-increment: step; }
.step-list img { width: 100%; aspect-ratio: 412 / 560; object-fit: cover; object-position: top; border-radius: 10px; border: 2px solid rgba(61,43,34,.15); }
.step-list h3 { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.step-list h3::before {
  content: counter(step);
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--butter); border: 3px solid var(--ink); font-size: 19px;
}
.step-list p { margin-top: 8px; color: var(--ink-soft); }

/* Game types sit on the night colour again: it's the app's "pick a template" moment. */
.games { background: var(--night); color: var(--sky-text); padding: 88px 0; }
.games .section-lede { color: var(--sky-soft); }
/* Compact rows: 348×232 thumbnails shown at 116×77 (only ever shrunk, so the pixel art stays crisp). */
.game-grid { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.game-grid li { position: relative; display: grid; grid-template-columns: 116px 1fr; grid-template-rows: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: start; background: var(--night-2); border-radius: var(--r); padding: 10px 14px 10px 10px; border: 2px solid rgba(167,123,255,.35); }
.game-grid img { grid-row: 1 / span 2; width: 116px; height: 77px; object-fit: cover; border-radius: 8px; }
.game-grid b { font-size: 17px; font-weight: 900; line-height: 1.25; padding-top: 4px; }
.game-grid span { color: var(--sky-soft); font-size: 14px; line-height: 1.4; }
.game-grid li.soon { border-style: dashed; border-color: rgba(167,123,255,.25); }
.game-grid li.soon img { opacity: .75; }
.game-grid li.soon em { position: absolute; left: 14px; top: 14px; font-style: normal; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--night); background: var(--sky-soft); border-radius: 999px; padding: 2px 7px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }

.features .wrap { display: grid; gap: 80px; }
.feature { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.feature.flip { grid-template-columns: 1fr 300px; }
.feature.flip img { order: 2; }
.feature img { width: 300px; aspect-ratio: 412 / 700; object-fit: cover; object-position: top; border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 rgba(61,43,34,.18); }
.feature h3 { font-size: clamp(30px, 4vw, 40px); }
.feature p { margin-top: 14px; font-size: 20px; color: var(--ink-soft); max-width: 30em; }

.parents { background: var(--paper-2); padding: 88px 0; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.parent-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.parent-grid h3 { font-size: 21px; }
.parent-grid p { margin-top: 10px; color: var(--ink-soft); }

.final { padding: 96px 0; text-align: center; }
.final h2 { margin-bottom: 28px; }
.final .stores { color: var(--ink-soft); }

.footer { background: var(--night); color: var(--sky-soft); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 15px; }
.footer .wrap { display: grid; gap: 16px; }
.footer .brand { color: var(--sky-text); }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer nav a { color: var(--sky-text); font-weight: 800; }

/* ---------- support page ---------- */
.page-head { padding: 24px 0 56px; }
.page-head h1 { font-size: clamp(36px, 5vw, 56px); width: min(1120px, 100% - 32px); margin: 24px auto 0; }
.page-head p { width: min(1120px, 100% - 32px); margin: 14px auto 0; color: var(--sky-soft); font-size: 20px; }
.faq { padding: 64px 0 88px; }
.faq .wrap { max-width: 760px; }
.faq h2 { font-size: 30px; margin: 48px 0 14px; }
.faq h2:first-child { margin-top: 0; }
.faq details { border: 3px solid var(--ink); border-radius: 14px; background: #fff; margin-top: 12px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 900; font-size: 19px; list-style-position: inside; }
.faq details p { padding: 0 18px 18px; color: var(--ink-soft); }
.contact { margin-top: 18px; padding: 22px; }
.contact a { font-weight: 900; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 16px; }
  .phone { width: min(300px, 86%); }
  .step-list, .parent-grid { grid-template-columns: 1fr; }
  .step-list img { aspect-ratio: 412 / 480; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 24px; }
  .feature.flip img { order: 0; }
  .feature img { width: min(280px, 100%); }
  .paper-section, .games, .parents { padding: 64px 0; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .nav-links a:not(:last-child) { display: none; }
  .lede { font-size: 19px; }
  .game-grid { grid-template-columns: 1fr; gap: 10px; }
  .btn { width: 100%; }
}
