/* Pure Gamify — site styles. Mobile first: base rules are for phones,
   min-width media queries add layout for bigger screens. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #14101F;
  --ink-2: #221B33;
  --ink-3: #342A4D;
  --text: #14101F;
  --muted: #4A4561;
  --line: #DCE4F0;
  --bg: #FFFFFF;
  --bg-sky: #EAF5FF;
  --sky: #53B8FF;
  --sky-deep: #1E7FD8;
  --sun: #FFC83A;
  --sun-dark: #C98A00;
  --flame: #FF6A13;
  --flame-soft: #FFB27A;
  --on-dark: #F7F4FF;
  --on-dark-muted: #CFC8E3;
  --radius: 18px;
  --radius-lg: 28px;
  --wrap: 1120px;
  --font-display: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 8vw, 3.4rem); margin-bottom: 14px; text-wrap: balance; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.08rem;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .12s, box-shadow .12s, background .2s;
}
.btn:active { transform: translateY(3px); }
.btn-primary { background: var(--sun); color: var(--ink); box-shadow: 0 5px 0 var(--sun-dark); }
.btn-primary:active { box-shadow: 0 2px 0 var(--sun-dark); }
.btn-primary:hover { background: #FFD465; }
.btn-secondary { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #B9C6DA, inset 0 0 0 2px var(--ink); }
.btn-secondary:active { box-shadow: 0 2px 0 #B9C6DA, inset 0 0 0 2px var(--ink); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 1rem; border-radius: 12px; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-tile {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, var(--ink-3), var(--ink) 70%);
  box-shadow: 0 3px 0 rgba(20,16,31,.25);
}
.brand-tile img { width: 40px; height: 40px; }
.brand-tile-sm { width: 32px; height: 32px; border-radius: 9px; }
.brand-tile-sm img { width: 28px; height: 28px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(20,16,31,.08);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; flex-wrap: wrap; }
.nav-toggle {
  display: none; width: 48px; height: 48px; border: 0; border-radius: 12px;
  background: transparent; cursor: pointer; place-items: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--ink);
  transition: transform .2s, opacity .2s; content: ''; position: relative;
}
.nav-toggle-bars::before { position: absolute; top: -7px; }
.nav-toggle-bars::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Phones: links sit in a scrollable row without JS, a drop-down panel with JS. */
.nav-links {
  display: flex; gap: 4px; width: 100%; overflow-x: auto; padding-bottom: 10px;
}
.nav-links a:not(.btn) {
  font-weight: 700; font-size: 1rem; text-decoration: none;
  padding: 12px 12px; border-radius: 10px; white-space: nowrap;
}
.nav-links a:not(.btn):hover { background: var(--bg-sky); }
.nav-quiet { color: var(--muted); }

.js .nav-toggle { display: inline-grid; }
.js .nav-links {
  display: none; flex-direction: column; overflow: visible; padding: 4px 0 16px;
}
.js .nav-links.open { display: flex; }
.js .nav-links .btn { margin-top: 8px; }

@media (min-width: 900px) {
  .nav-bar { flex-wrap: nowrap; }
  .js .nav-toggle { display: none; }
  .nav-links, .js .nav-links {
    display: flex; flex-direction: row; align-items: center;
    width: auto; padding: 0; gap: 2px; overflow: visible;
  }
  .js .nav-links .btn { margin: 0 0 0 10px; }
  .nav-links a:not(.btn) { font-size: .95rem; padding: 10px 12px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 36px 0 170px;
  background:
    url(images/scene.svg) center bottom / auto 220px repeat-x,
    linear-gradient(180deg, #5BBEFF 0%, #A9DCFF 48%, #FFF1D2 100%);
}
.hero-grid { display: grid; gap: 36px; position: relative; }
.game-tag {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.9); border-radius: 999px;
  padding: 4px 16px 4px 4px; font-weight: 700; font-size: .92rem;
  box-shadow: 0 3px 0 rgba(20,16,31,.12); margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.3rem, 9.5vw, 4.3rem); line-height: 1; margin-bottom: 20px; color: var(--ink); text-wrap: balance; }
.hl {
  color: var(--flame);
  text-shadow: 0 4px 0 var(--ink);
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
}
.lede { font-size: 1.15rem; color: var(--ink); max-width: 44ch; margin-bottom: 26px; font-weight: 500; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-note { font-weight: 600; font-size: .98rem; color: var(--ink); }

.hero-phone { display: flex; justify-content: center; }
.hero-phone .phone { width: min(260px, 70vw); transform: rotate(3deg); }

@media (min-width: 900px) {
  .hero { padding: 72px 0 200px; background-size: auto 300px, auto; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; }
  .hero-phone .phone { width: 290px; }
}

/* ---------- Phone frame (screenshots are portrait) ---------- */
.phone {
  aspect-ratio: 9 / 19.5; border-radius: 38px; padding: 9px;
  background: var(--ink);
  box-shadow: 0 0 0 2px #3B3352 inset, 0 24px 50px rgba(20,16,31,.28);
}
.phone-screen {
  position: relative; height: 100%; border-radius: 30px; overflow: hidden;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--c, var(--sky)) 85%, #fff) 0%, var(--c, var(--sky)) 55%, color-mix(in srgb, var(--c, var(--sky)) 70%, #000) 100%);
}
.phone-screen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.phone-splash { background: radial-gradient(circle at 50% 40%, var(--ink-3) 0%, var(--ink) 65%); }
.splash {
  position: absolute; inset: 0; display: grid; grid-template-columns: 100%; align-content: center; justify-items: center;
  text-align: center; color: var(--on-dark); gap: 10px; padding: 12px;
}
.splash img { width: 100%; height: auto; }
.splash p { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.15; }
.splash strong { font-weight: 800; font-size: 1.9rem; color: var(--sun); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Sections ---------- */
.section { position: relative; padding: 72px 0; }
.section-sky { background: var(--bg-sky); }
.section-dark { background: var(--ink); color: var(--on-dark); overflow: hidden; }
.intro { font-size: 1.12rem; color: var(--muted); max-width: 46ch; margin-bottom: 32px; }
.prose > * + * { margin-top: 16px; }
.prose p { font-size: 1.12rem; max-width: 62ch; }
.prose .fine { font-size: .92rem; color: var(--muted); }
.prose .fine a { color: var(--sky-deep); }
@media (min-width: 900px) { .section { padding: 104px 0; } }

/* ---------- How a level works ---------- */
.gift-row { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 24px 0 26px !important; }
.gift {
  display: grid; justify-items: center; gap: 4px; text-align: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
}
/* Hex badge. An exported model render (transparent PNG/WebP) sits on top of it;
   the emoji underneath only shows while the image file is missing. */
.gift-art { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.gift-art::before {
  content: ''; position: absolute; inset: 6px;
  background: color-mix(in srgb, var(--c) 24%, #fff);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.gift-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
.gift-fallback { position: relative; font-size: 2.5rem; line-height: 1; }

/* ---------- The question ---------- */
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
.question-grid { position: relative; display: grid; gap: 40px; }
.question-copy p { color: var(--on-dark-muted); font-size: 1.1rem; max-width: 48ch; }
.question-copy p + p { margin-top: 14px; }
.question-copy em { color: #fff; font-style: normal; font-weight: 700; }
.q-stack { display: grid; gap: 18px; align-content: start; }
.q-card {
  background: var(--ink-2); border: 3px solid #fff; border-radius: var(--radius-lg);
  padding: 20px; box-shadow: 0 8px 0 rgba(0,0,0,.35);
}
.q-level {
  display: inline-block; background: var(--c); color: var(--ink);
  font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px;
}
.q-text { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem, 5vw, 1.45rem); line-height: 1.22; color: #fff; }
.q-text strong { color: var(--sun); text-transform: uppercase; }
/* Answer options styled like in-game buttons. None is marked correct. */
.q-options { list-style: none; display: grid; gap: 10px; margin-top: 16px; }
.q-options li {
  display: flex; align-items: center; gap: 12px; min-height: 56px;
  background: #fff; color: var(--ink); border-radius: 14px; padding: 10px 14px 10px 10px;
  font-weight: 600; font-size: 1rem; line-height: 1.3;
  box-shadow: 0 4px 0 #9C95B8;
}
.q-letter {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--c); color: var(--ink); font-family: var(--font-display); font-weight: 800;
}
.q-twist {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  background: var(--flame); color: var(--ink); font-weight: 800; font-family: var(--font-display);
  font-size: 1.05rem; padding: 10px 16px; border-radius: 12px; box-shadow: 0 4px 0 #A33D00;
}
@media (min-width: 900px) {
  .question-grid { grid-template-columns: 1fr 1.05fr; align-items: center; gap: 64px; }
}

/* ---------- Levels ---------- */
.level-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; counter-reset: lvl; margin: 20px 0 22px !important; }
.level-strip li {
  counter-increment: lvl;
  display: inline-flex; align-items: baseline; gap: 8px;
  background: var(--c); color: var(--ink); border-radius: 999px; padding: 8px 16px 8px 12px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 65%, #000);
}
.level-strip li::before { content: counter(lvl); font-size: .85rem; opacity: .7; }

/* ---------- Screenshots ---------- */
.shots {
  list-style: none; display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding: 4px 16px 24px; scrollbar-width: thin;
}
.shot { flex: none; width: 200px; scroll-snap-align: center; text-align: center; }
.shot p { font-family: var(--font-display); font-weight: 800; margin-top: 12px; }
.shot-ph {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.3; text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.swipe-hint { margin-bottom: 8px; }
@media (min-width: 1100px) {
  .shots { justify-content: center; overflow: visible; }
  .swipe-hint { display: none; }
}

/* ---------- Download ---------- */
/* Store badges. Pre-launch these are plain, non-interactive "coming soon" shapes.
   At launch, official badge images go inside .badge-link (see the comment in index.html). */
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 !important; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 20px 0 14px; border-radius: 12px;
  background: #000; color: #fff; border: 1px solid #A6A6A6;
  cursor: default; user-select: none;
}
.badge-icon { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge-text { display: grid; line-height: 1.1; }
.badge-text small { font-size: .74rem; font-weight: 500; opacity: .85; }
.badge-text strong { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.badge-link { display: inline-block; border-radius: 12px; }
.badge-link img { height: 58px; width: auto; }

/* ---------- Parents band ---------- */
.parents-band { background: var(--sun); padding: 40px 0; }
.parents-inner { display: grid; gap: 18px; justify-items: start; }
.parents-band h2 { font-size: clamp(1.5rem, 6vw, 2.1rem); margin-bottom: 6px; }
.parents-band p { max-width: 52ch; }
@media (min-width: 900px) { .parents-inner { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 48px 0 40px; }
.footer-inner { display: grid; gap: 22px; }
.site-footer .brand-name { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-left: -10px; }
.footer-links a { color: #fff; font-weight: 700; text-decoration: none; padding: 10px; border-radius: 8px; }
.footer-links a:hover { background: var(--ink-2); }
.footer-company { font-size: .95rem; line-height: 1.7; }
.footer-company strong { color: #fff; }
.footer-company a { color: var(--sun); }
.footer-copy { font-size: .85rem; }

/* ---------- Text pages (About, Privacy, Parents) ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 16px 72px; }
.legal .section-label {
  font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sky-deep); margin-bottom: 10px;
}
.legal h1 { font-size: clamp(2.2rem, 9vw, 3.4rem); margin-bottom: 12px; text-wrap: balance; }
.legal .gold-line { width: 64px; height: 6px; border-radius: 3px; background: var(--sun); margin: 6px 0 28px !important; }
.legal .updated { color: var(--muted); margin-bottom: 28px; }
.legal h2 { font-size: clamp(1.4rem, 5.5vw, 1.8rem); margin: 44px 0 12px; }
.legal h3 { margin: 28px 0 8px; }
.legal p, .legal li { color: #2A2540; }
.legal p + p { margin-top: 14px; }
.legal ul, .legal ol { margin: 12px 0 0 1.3rem; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--sky-deep); font-weight: 600; }
.summary-box {
  background: var(--bg-sky); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 28px;
  border: 2px solid #CFE6FB;
}
.summary-box h2 { margin-top: 0; }
.company-card {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-top: 14px;
}
.company-card dl { display: grid; grid-template-columns: 1fr; gap: 2px; }
.company-card dt {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.company-card dd { margin-bottom: 12px; font-weight: 600; }
.company-card dd:last-child { margin-bottom: 0; }
.company-card address { font-style: normal; }
@media (min-width: 640px) {
  .company-card dl { grid-template-columns: max-content 1fr; gap: 12px 24px; }
  .company-card dt { padding-top: 3px; }
  .company-card dd { margin: 0; }
}
.legal .q-card { margin-top: 18px; }
.legal .q-card + p { margin-top: 26px; }
.legal .q-options { margin: 16px 0 0; }
.legal ul + p, .legal ol + p { margin-top: 14px; }
.legal .q-card .q-text { color: #fff; }

/* ---------- Reveal on scroll (only when JS is running and motion is OK) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
  .js .reveal.visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none; }
}
