/* Times Table Island: the game's website. No web fonts, scripts, cookies or
   trackers: it's for a Kids Category app. Colours follow the app's cream,
   sand and ink, with dark values under prefers-color-scheme. */
:root {
  --ink: #3b2414;
  --cream: #fff7e6;
  --sand: #f6e3b4;
  --sky: #8fd6f0;
  --accent: #e2672b;
  --green: #1fa64a;
  --gold: #f5b81c;
  --muted: #6d5845;
  --card-shadow: 0 6px 18px rgba(59, 36, 20, 0.12);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #fbeedc; --cream: #2a1d14; --sand: #1d140d; --sky: #173547;
    --accent: #ff9a5c; --green: #3cc76a; --gold: #ffcc4d; --muted: #c9b39b;
    --card-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font: 17px/1.6 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; font-weight: 800; }

/* Header */
.site-header {
  max-width: 1080px; margin: 0 auto; padding: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-header nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--accent); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--sky) 0%, var(--sand) 100%); }
.hero-inner {
  max-width: 1080px; margin: 0 auto; padding: 32px 16px 48px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 12px; }
.hero .lead { font-size: 1.2rem; margin: 0 0 20px; }
.hero .app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--card-shadow); margin-bottom: 16px; }
.pill {
  display: inline-block; background: var(--green); color: #fff; font-weight: 800;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}
.facts { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: var(--cream); border-radius: 999px; padding: 6px 14px; margin: 0; font-weight: 700; font-size: 0.95rem; }
.phone { border-radius: 32px; box-shadow: var(--card-shadow); border: 6px solid var(--cream); }
.hero .phone { max-width: 320px; margin: 0 auto; }

/* Sections */
section { max-width: 1080px; margin: 0 auto; padding: 48px 16px; }
section > h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 8px; text-align: center; }
section > .intro { text-align: center; max-width: 640px; margin: 0 auto 28px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--cream); border-radius: 24px; padding: 22px; box-shadow: var(--card-shadow); }
.card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.card p { margin: 0; }
.card .emoji { font-size: 1.8rem; line-height: 1; margin-bottom: 10px; display: block; }

/* Worlds */
.worlds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.world { background: var(--cream); border-radius: 24px; overflow: hidden; box-shadow: var(--card-shadow); }
.world .art { height: 150px; display: grid; place-items: center; }
.world .art img { height: 130px; width: auto; }
.world .body { padding: 16px 20px 20px; }
.world .number { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.world h3 { margin: 2px 0 4px; font-size: 1.25rem; }
.world .who { margin: 0 0 8px; font-weight: 700; }
.world p { margin: 0; }
.world .tables { display: inline-block; margin-top: 10px; background: var(--sand); border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: 0.9rem; }
.beach { background: linear-gradient(#8fd6f0, #f6e3b4); }
.bakery { background: linear-gradient(#ffe0e6, #fff2e0); }
.space { background: linear-gradient(#2a2560, #6a9edb); }
.moon { background: linear-gradient(#1a1440, #8a7fcc); }
.dino { background: linear-gradient(#ffc999, #8cc76b); }
.snow { background: linear-gradient(#b3d1f7, #eff6ff); }
.reef { background: linear-gradient(#33b3cc, #f2e0b3); }
.jungle { background: linear-gradient(#7cc47a, #f4e3a8); }
.volcano { background: linear-gradient(#ff9a6b, #ffe0a8); }
.pirate { background: linear-gradient(#2f6fa3, #f2d9a0); }

/* Screens */
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.screens figure { margin: 0; text-align: center; }
.screens figcaption { margin-top: 10px; font-weight: 700; color: var(--muted); font-size: 0.95rem; }

/* Grown-ups */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { list-style: none; padding: 0; margin: 0; }
.check li { padding-left: 30px; position: relative; margin: 0 0 12px; }
.check li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 900; }

/* Article pages (privacy, support) */
main { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
main > article { background: var(--cream); border-radius: 24px; padding: 28px 24px; }
main > article h1 { font-size: 2rem; margin: 0 0 4px; }
main > article h2 { font-size: 1.25rem; margin: 32px 0 8px; }
p, li { margin: 0 0 12px; }
ul { padding-left: 1.2em; }
.updated { color: var(--muted); font-size: 0.95rem; }

/* Footer */
.site-footer { text-align: center; color: var(--muted); font-size: 0.95rem; padding: 24px 16px 40px; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }

@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 16px; }
  .hero .app-icon { margin-left: auto; margin-right: auto; }
  .facts { justify-content: center; }
  .screens { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
  .split { grid-template-columns: 1fr; }
}

/* Privacy policy: the other languages */
.languages { margin: -4px 0 24px; font-size: 0.95rem; color: var(--muted); }
.languages a, .languages strong { white-space: nowrap; }
