/* KidsArt's website: the app's own look. Warm paper, dark ink outlines, and
   bright sticker colours. No scripts, no external files. */
:root {
  --ink: #2d2a4a;
  --soft: #5a5674;
  --paper: #fff8ec;
  --card: #ffffff;
  --line: #efe4d0;
  --edge: #2d2a4a;
  --shadow: #2d2a4a;
  --tint: #eef3ff;

  --blue: #4f8bff;
  --purple: #8b6cff;
  --green: #2fbf7a;
  --orange: #ff8a3d;
  --pink: #e5689c;
  --yellow: #ffc93c;

  /* Deep versions: dark enough for white text on top. */
  --blue-deep: #2f62d9;
  --purple-deep: #6a4be0;
  --green-deep: #14804f;
  --orange-deep: #c2540a;
  --pink-deep: #c4336f;

  --link: #2f56c4;
  --cta: #2d2a4a;
  --cta-ink: #fff8ec;
  --glow-a: rgba(79, 139, 255, 0.2);
  --glow-b: rgba(229, 104, 156, 0.18);
  --glow-c: rgba(255, 201, 60, 0.22);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f1fb;
    --soft: #bcb8d2;
    --paper: #171529;
    --card: #24213d;
    --line: #37335a;
    --edge: #0d0c1a;
    --shadow: #0d0c1a;
    --tint: #262b4d;
    --link: #9bb8ff;
    --cta: #ffc93c;
    --cta-ink: #2d2a4a;
    --glow-a: rgba(79, 139, 255, 0.22);
    --glow-b: rgba(229, 104, 156, 0.16);
    --glow-c: rgba(139, 108, 255, 0.2);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(640px 420px at 8% -4%, var(--glow-a), transparent 70%),
    radial-gradient(560px 420px at 98% 6%, var(--glow-b), transparent 70%),
    radial-gradient(620px 460px at 50% 38%, var(--glow-c), transparent 72%);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 17px/1.6 ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Noto Sans", "Noto Naskh Arabic", "Geeza Pro", sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

[lang="ar"] body, body[lang="ar"] {
  font-family: "Noto Kufi Arabic", "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.9;
}

img { max-width: 100%; }

a { color: var(--link); }

a:focus-visible, summary:focus-visible, .reel:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 10px;
}

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -80px;
  background: var(--card);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 30;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------------------------------------------------------------- header */

header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -20px;
  padding: 12px 20px;
  --bar: var(--paper);
  background: var(--bar);
  /* Stretch the bar to the window's edges without leaving the column. */
  box-shadow: 0 0 0 100vmax var(--bar);
  clip-path: inset(0 -100vmax);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(79, 99, 255, 0.3);
}

.links { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }

.links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 999px;
}
.links a:hover { background: var(--tint); }

.lang {
  border: 2.5px solid var(--edge);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 16px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lang:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow); }

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 28px;
  padding: 34px 0 20px;
}

.hero h1 {
  font-size: clamp(38px, 6.4vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-weight: 900;
  margin: 14px 0 16px;
}
[lang="ar"] .hero h1 { line-height: 1.35; letter-spacing: 0; }

.c-blue { color: var(--blue-deep); }
.c-green { color: var(--green-deep); }
.c-pink { color: var(--pink-deep); }
@media (prefers-color-scheme: dark) {
  .c-blue { color: #8fb2ff; }
  .c-green { color: #5fe0a2; }
  .c-pink { color: #ff9cc4; }
}

.hero .intro { font-size: 20px; color: var(--soft); margin: 0 0 24px; max-width: 32em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  padding: 4px 14px 4px 6px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 3px 3px 0 var(--shadow);
  margin: 0;
}
[dir="rtl"] .eyebrow { padding: 4px 6px 4px 14px; }
.eyebrow img { width: 24px; height: 24px; }

/* "Coming soon": plain text, not a store link or badge. */
.cta { margin: 0 0 22px; }
.cta strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cta);
  color: var(--cta-ink);
  border-radius: 20px;
  padding: 14px 24px;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.3;
  box-shadow: 0 10px 24px rgba(45, 42, 74, 0.28);
}
.cta strong img { width: 26px; height: 26px; }
.cta > span { display: block; margin-top: 10px; color: var(--soft); font-size: 15px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }

.badges li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 0 var(--line);
}
[dir="rtl"] .badges li { padding: 7px 8px 7px 14px; }
.badges img { width: 22px; height: 22px; }

/* Phones: real screenshots in a simple frame. */
.phone {
  margin: 0;
  border: 5px solid var(--edge);
  border-radius: 34px;
  overflow: hidden;
  background: var(--edge);
  box-shadow: 0 22px 44px rgba(45, 42, 74, 0.3);
}
.phone img { display: block; width: 100%; height: auto; }

.phones { position: relative; height: 540px; max-width: 470px; width: 100%; margin: 0 auto; }
.phones .phone { position: absolute; }
.phones .p1 { width: 236px; left: 50%; top: 6px; margin-left: -118px; z-index: 3; }
.phones .p2 { width: 190px; left: 0; top: 78px; transform: rotate(-9deg); z-index: 2; animation: bob 7s ease-in-out infinite; }
.phones .p3 { width: 190px; right: 0; top: 78px; transform: rotate(9deg); z-index: 1; animation: bob 7s ease-in-out -3.5s infinite; }

.spark { position: absolute; z-index: 4; animation: twinkle 4s ease-in-out infinite; }
.spark.s1 { width: 54px; left: -6px; top: 6px; }
.spark.s2 { width: 34px; right: 6px; top: 20px; animation-delay: -1.3s; }
.spark.s3 { width: 42px; right: 34px; bottom: 0; animation-delay: -2.6s; }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
@keyframes twinkle {
  0%, 100% { scale: 1; rotate: 0deg; }
  50% { scale: 1.18; rotate: 12deg; }
}

/* A row of letter blocks, like the ones a child traces. Decoration only. */
.blocks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
}
.blocks li {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid var(--edge);
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--shadow);
}
.blocks li:nth-child(odd) { transform: rotate(-5deg); }
.blocks li:nth-child(even) { transform: rotate(4deg) translateY(4px); }

/* --------------------------------------------------------------- numbers */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0;
  margin: 44px 0 0;
  list-style: none;
}
.stats li {
  background: var(--card);
  border: 2.5px solid var(--edge);
  border-radius: 22px;
  padding: 16px 16px 14px;
  box-shadow: 5px 5px 0 var(--accent);
}
.stats b { display: block; font-size: 38px; line-height: 1.1; font-weight: 900; }
.stats span { color: var(--soft); font-weight: 700; font-size: 15px; }

/* -------------------------------------------------------------- sections */

section { scroll-margin-top: 84px; }

h2 {
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.2;
  font-weight: 900;
  margin: 76px 0 10px;
}
[lang="ar"] h2 { line-height: 1.5; }

.lead { color: var(--soft); font-size: 18px; max-width: 40em; margin: 0 0 24px; }

/* Accent colours (classes, so the security policy can forbid inline styles). */
.accent-blue { --accent: var(--blue); --deep: var(--blue-deep); }
.accent-purple { --accent: var(--purple); --deep: var(--purple-deep); }
.accent-green { --accent: var(--green); --deep: var(--green-deep); }
.accent-orange { --accent: var(--orange); --deep: var(--orange-deep); }
.accent-pink { --accent: var(--pink); --deep: var(--pink-deep); }
.accent-yellow { --accent: var(--yellow); --deep: #8a6500; }

/* The games: one bright card each, like the app's home screen. */
.games {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.game {
  grid-column: span 2;
  position: relative;
  background: var(--deep);
  color: #fff;
  border: 3px solid var(--edge);
  border-radius: 28px;
  padding: 22px 22px 20px;
  box-shadow: 6px 6px 0 var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}
.game:nth-child(4), .game:nth-child(5) { grid-column: span 3; }
.game:hover { transform: translate(-2px, -3px); box-shadow: 9px 10px 0 var(--shadow); }

.game > img {
  width: 76px;
  height: 76px;
  padding: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--edge);
}

.game h3 { margin: 12px 0 6px; font-size: 24px; font-weight: 900; line-height: 1.25; }
.game p { margin: 0; color: #fff; }
.game .learn {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 15.5px;
}
.game .learn b { display: block; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.9; }
[lang="ar"] .game .learn b { letter-spacing: 0; font-size: 14px; }

/* A look inside: a row of phones to swipe through. */
.reel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 214px;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 10px 6px 26px;
  margin: 0 -6px;
  scrollbar-width: thin;
}
.reel figure { margin: 0; scroll-snap-align: center; }
.reel .phone { box-shadow: 6px 6px 0 var(--accent); }
.reel figcaption { margin-top: 14px; text-align: center; font-weight: 800; font-size: 15.5px; }
.swipe { color: var(--soft); font-size: 14px; margin: -8px 0 0; }

/* Stories. */
.stories {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 34px;
  margin-top: 76px;
  background: var(--card);
  border: 3px solid var(--edge);
  border-radius: 34px;
  padding: 34px;
  box-shadow: 8px 8px 0 var(--pink);
}
.stories h2 { margin-top: 12px; }
.stories .phone { width: 220px; transform: rotate(4deg); }
[dir="rtl"] .stories .phone { transform: rotate(-4deg); }

.books { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 18px 0 0; list-style: none; }
.books li {
  background: var(--deep);
  color: #fff;
  font-weight: 800;
  font-size: 15.5px;
  border: 2.5px solid var(--edge);
  border-radius: 12px 16px 16px 12px;
  padding: 8px 14px;
  border-inline-start-width: 9px;
}
[dir="rtl"] .books li { border-radius: 16px 12px 12px 16px; }

/* Promises to parents. */
.promise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.promise li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
  background: var(--card);
  border: 2.5px solid var(--edge);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 5px 5px 0 var(--shadow);
}
.promise img { width: 44px; height: 44px; grid-row: span 2; }
.promise b { display: block; font-size: 18px; line-height: 1.35; }
.promise span { color: var(--soft); font-size: 15.5px; }

/* Questions. */
.faq { max-width: 820px; }
.faq details {
  background: var(--card);
  border: 2.5px solid var(--edge);
  border-radius: 18px;
  margin: 0 0 12px;
  padding: 0 20px;
}
.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
  padding: 15px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #2d2a4a;
  border: 2.5px solid var(--edge);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; background: var(--green); }
.faq details p { margin: 0 0 16px; color: var(--soft); }

/* Donations. */
.support {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  margin: 76px 0 0;
  background: var(--card);
  border: 3px solid var(--edge);
  border-radius: 28px;
  padding: 26px 28px;
  box-shadow: 6px 6px 0 var(--yellow);
}
.support img { width: 72px; height: 72px; }
.support h2 { margin: 0 0 6px; font-size: 26px; }
.support p { margin: 0; color: var(--soft); }

/* The last call. */
.cta-band {
  position: relative;
  overflow: hidden;
  margin: 76px 0 0;
  background: linear-gradient(135deg, var(--blue-deep), var(--purple-deep));
  color: #fff;
  border: 3px solid var(--edge);
  border-radius: 34px;
  padding: 44px 24px 34px;
  text-align: center;
  box-shadow: 8px 8px 0 var(--shadow);
}
.cta-band h2 { margin: 0 0 18px; color: #fff; }
.cta-band .cta strong { background: #fff8ec; color: #2d2a4a; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
.cta-band .cta > span { color: #fff; opacity: 0.92; }
.cta-band .spark { opacity: 0.95; }
.cta-band .s1 { left: 5%; top: 16%; }
.cta-band .s2 { right: 7%; top: 14%; width: 46px; }
.cta-band .s3 { right: 18%; bottom: 10%; width: 30px; }

footer {
  margin-top: 60px;
  padding: 24px 0 40px;
  border-top: 2px solid var(--line);
  color: var(--soft);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ------------------------------------------- the policy and help pages */

.doc { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 900; margin: 30px 0 6px; line-height: 1.25; }
.doc .date { color: var(--soft); margin: 0 0 24px; }
.doc h2 { font-size: 23px; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-inline-start: 22px; }
.doc li { margin: 6px 0; }

.summary {
  background: var(--card);
  border: 2.5px solid var(--edge);
  border-radius: 22px;
  padding: 6px 22px;
  box-shadow: 5px 5px 0 var(--blue);
}

.steps { padding-inline-start: 22px; }
.steps li { margin: 8px 0; }
.note {
  background: var(--tint);
  border-radius: 20px;
  padding: 4px 22px;
  margin: 24px 0;
}

/* ---------------------------------------------------------- small screens */

@media (max-width: 900px) {
  .links { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 18px; gap: 34px; }
  .hero .intro { margin-inline: auto; }
  .badges { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .game, .game:nth-child(4), .game:nth-child(5) { grid-column: span 3; }
  .game:nth-child(5) { grid-column: span 6; }
  .promise { grid-template-columns: repeat(2, 1fr); }
  .stories { grid-template-columns: 1fr; text-align: center; padding: 28px 22px; }
  .stories .phone { margin: 0 auto; }
  .books { justify-content: center; }
}

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .phones { height: 430px; max-width: 350px; }
  .phones .p1 { width: 188px; margin-left: -94px; }
  .phones .p2, .phones .p3 { width: 146px; top: 66px; }
  .spark.s1 { width: 42px; }
  .blocks li { width: 48px; height: 48px; font-size: 25px; border-radius: 14px; }
  .blocks li:nth-child(n+6) { display: none; }
  .game, .game:nth-child(4), .game:nth-child(5) { grid-column: span 6; }
  .promise { grid-template-columns: 1fr; }
  .support { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .reel { grid-auto-columns: 190px; gap: 18px; }
  h2 { margin-top: 60px; }
  .stories, .support, .cta-band { margin-top: 60px; }
  .cta strong { font-size: 17px; padding: 13px 20px; }
}

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