/* Mako Cats Math website styles.
   Colours come from the app (Theme.swift). Fonts are the visitor's own system
   fonts, so nothing loads from another server. */

:root {
  --sky: #6BBFFA;
  --sky-deep: #8FD0FC;
  --sky-light: #E6F5FF;
  --grass: #66C752;
  --grass-light: #7FD65E;
  --sunshine: #FFCC38;
  --orange: #FF8F26;
  --coral: #FF6B6B;
  --pink: #FF80B8;
  --purple: #9461E0;
  --teal: #2EBDC2;
  --plum: #573380;
  --plum-text: #4A2B6E;
  --plum-soft: #6C5689;
  --cream: #FFFDF5;
  --line: #E9E1F2;
  --radius: 26px;
  --shadow: 0 10px 30px rgba(87, 51, 128, .10), 0 2px 6px rgba(87, 51, 128, .06);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sky-light);
  color: var(--plum-text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-underline-offset: 3px; }
a:hover { color: var(--plum); }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { color: var(--plum); line-height: 1.15; margin: 0; letter-spacing: -0.01em; font-weight: 800; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 420px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 10px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum); font-weight: 800; font-size: 19px; min-height: 44px; }
.brand img { flex: none; width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 6px rgba(87, 51, 128, .2); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--plum); text-decoration: none; font-weight: 700; font-size: 16px; padding: 10px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255, 255, 255, .7); }
@media (max-width: 420px) {
  .brand { font-size: 17px; }
  .brand img { width: 36px; height: 36px; }
  .nav a { padding: 10px 9px; font-size: 15px; }
}

/* ---------- buttons and chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px; border-radius: 999px;
  font: inherit; font-weight: 800; font-size: 18px; text-decoration: none; cursor: pointer;
  border: 0; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-candy {
  color: var(--plum);
  background: linear-gradient(180deg, #FFDB5C 0%, var(--sunshine) 35%, #FFA63A 100%);
  box-shadow: 0 5px 0 #E8892A, 0 10px 24px rgba(255, 143, 38, .35);
}
.btn-candy:hover { color: var(--plum); transform: translateY(-1px); }
.btn-candy:active { transform: translateY(3px); box-shadow: 0 2px 0 #E8892A, 0 6px 14px rgba(255, 143, 38, .3); }
.btn-soft { color: var(--plum); background: #fff; box-shadow: 0 3px 0 var(--line), 0 6px 16px rgba(87, 51, 128, .08); }
.btn-soft:hover { color: var(--plum); transform: translateY(-1px); }
.btn small { display: block; font-size: 13px; font-weight: 700; opacity: .8; line-height: 1.1; }
.btn .stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.soon { cursor: default; }
.soon:hover { transform: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li { background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 6px 13px; font-size: 15px; font-weight: 700; color: var(--plum); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 40% at 15% 20%, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(40% 30% at 85% 12%, rgba(255, 255, 255, .5), transparent 70%),
    linear-gradient(180deg, var(--sky-deep) 0%, #BFE4FE 55%, var(--sky-light) 100%);
  padding: 8px 0 76px;
}
.hero::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -100px; height: 160px;
  background: linear-gradient(180deg, var(--grass-light), var(--grass) 60px);
  border-radius: 50% 50% 0 0 / 60px 60px 0 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; padding-top: 28px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); }
.hero h1 span { color: var(--orange); }
.hero .lead { margin-top: 18px; font-size: clamp(18px, 2vw, 21px); color: var(--plum-text); max-width: 33em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; align-items: center; }
.hero .chips { margin-top: 24px; }
.hero-art img { width: 100%; max-width: 500px; margin: 0 auto; filter: drop-shadow(0 14px 24px rgba(87, 51, 128, .18)); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; padding-top: 4px; text-align: center; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 250px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .actions, .hero .chips { justify-content: center; }
}

/* ---------- sections ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); }
.section-head p { margin-top: 12px; font-size: 18px; color: var(--plum-soft); }
.green { background: linear-gradient(180deg, var(--grass) 0, #8DD877 120px, #EAF8E4 420px, var(--sky-light) 100%); padding-top: 24px; }

/* screenshots */
.shots {
  list-style: none; margin: 0; padding: 4px 20px 20px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px;
  max-width: 1120px; margin: 0 auto;
}
.shots figure { margin: 0; text-align: center; }
.shots img { border-radius: 24px; border: 5px solid #fff; box-shadow: var(--shadow); background: #fff; aspect-ratio: 540 / 1174; width: 100%; }
.shots figcaption { margin-top: 12px; font-weight: 800; color: var(--plum); font-size: 16px; }
@media (max-width: 1000px) {
  .shots {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    padding: 4px 20px 24px; scroll-padding: 0 20px;
  }
  .shots li { flex: 0 0 210px; scroll-snap-align: start; }
}

/* features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card { background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.feature { display: grid; grid-template-columns: 128px 1fr; gap: 20px; align-items: center; }
.feature img { width: 128px; height: 128px; object-fit: contain; }
.feature h3 { font-size: 22px; }
.feature p { margin-top: 8px; color: var(--plum-text); }
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .feature { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .feature img { margin: 0 auto; width: 120px; height: 120px; }
  .card { padding: 22px 18px; }
}

/* try-it game */
.try { position: relative; max-width: 560px; margin: 0 auto; text-align: center; overflow: hidden; }
.try-top { display: flex; align-items: center; justify-content: center; gap: 14px; }
.try-cat { width: 84px; height: 84px; }
.try-cat.hop { animation: hop .6s ease; }
.question {
  background: #fff; border: 3px solid #EEE6F7; border-radius: 22px; padding: 10px 22px;
  font-size: clamp(34px, 7vw, 46px); font-weight: 800; color: var(--plum); min-width: 220px;
  font-variant-numeric: tabular-nums;
}
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.answers button {
  font: inherit; font-size: 32px; font-weight: 800; color: var(--plum);
  min-height: 72px; border-radius: 20px; border: 0; cursor: pointer;
  background: #fff; box-shadow: 0 5px 0 #E3D9EF, 0 8px 18px rgba(87, 51, 128, .08);
  transition: transform .1s ease;
}
.answers button:hover { transform: translateY(-2px); }
.answers button:active { transform: translateY(3px); box-shadow: 0 2px 0 #E3D9EF; }
.answers button.right { background: var(--grass); color: #fff; box-shadow: 0 5px 0 #4FA43E; }
.answers button.wrong { background: #FFE3E3; color: #B23A3A; box-shadow: 0 5px 0 #F4C2C2; animation: shake .35s ease; }
.answers button:disabled { cursor: default; }
.feedback { min-height: 28px; margin-top: 16px; font-weight: 800; font-size: 18px; color: var(--plum); }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; background: #E3D9EF; }
.dots span.on { background: var(--sunshine); box-shadow: 0 0 0 2px #F0B21F inset; }
.try-done h3 { font-size: 28px; }
.try-done p { margin: 10px auto 22px; max-width: 26em; }
.try-note { margin-top: 18px; font-size: 14px; color: var(--plum-soft); }
.confetti { position: absolute; top: 40%; left: 50%; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; animation: burst 1s ease-out forwards; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-22px) rotate(-6deg); } 65% { transform: translateY(0) rotate(4deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes burst {
  from { opacity: 1; transform: translate(0, 0) rotate(0); }
  to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}

/* parents */
.parents { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }
.parents .stack { display: grid; gap: 22px; }
.parents h3 { font-size: 22px; margin-bottom: 14px; }
.safe { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.safe li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.safe .ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; }
.safe strong { display: block; color: var(--plum); font-size: 18px; }
.safe span.txt { color: var(--plum-text); font-size: 16px; }
.ic.a { background: #FFE9D6; } .ic.b { background: #E1F6F6; } .ic.c { background: #EFE6FB; } .ic.d { background: #E6F5FF; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 32px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--grass); color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center; margin-top: 2px; }
.levels { width: 100%; border-collapse: collapse; font-size: 16px; }
.levels th, .levels td { text-align: left; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.levels tr:last-child th, .levels tr:last-child td { border-bottom: 0; }
.levels th { color: var(--plum); font-weight: 800; }
.levels td { font-variant-numeric: tabular-nums; font-weight: 700; }
.small { font-size: 15px; color: var(--plum-soft); margin-top: 12px; }
@media (max-width: 860px) { .parents { grid-template-columns: 1fr; } }

/* faq */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--cream); border-radius: 20px; box-shadow: 0 4px 14px rgba(87, 51, 128, .07); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 54px 18px 22px; font-weight: 800; color: var(--plum); font-size: 18px; position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 700; color: var(--purple); }
.faq details[open] summary::after { content: "−"; }
.faq .ans { padding: 0 22px 20px; }
.faq .ans p + p, .faq .ans p + ul, .faq .ans ul + p { margin-top: 10px; }
.faq .ans ul { margin: 0; padding-left: 20px; }
.more { text-align: center; margin-top: 28px; }

/* closing call to action */
.cta { text-align: center; }
.cta .card { max-width: 760px; margin: 0 auto; padding: 36px 26px; background: linear-gradient(180deg, #FFF8DC, var(--cream)); }
.cta img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 16px; box-shadow: 0 6px 16px rgba(87, 51, 128, .2); }
.cta h2 { font-size: clamp(26px, 3.4vw, 36px); }
.cta p { margin: 12px auto 24px; max-width: 30em; }

/* ---------- inner pages ---------- */
.page-hero { padding-top: 36px; padding-bottom: 8px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 48px); }
.page-hero p { margin-top: 12px; font-size: 19px; max-width: 36em; }
.doc { padding-top: 24px; padding-bottom: 64px; }
.doc .card { max-width: 820px; }
.doc .card + .card { margin-top: 22px; }
.doc h2 { font-size: 26px; margin-bottom: 12px; }
.doc h3 { font-size: 19px; margin: 22px 0 6px; }
.doc p + p, .doc p + ul, .doc ul + p { margin-top: 10px; }
.doc ul { margin: 8px 0 0; padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc .meta { color: var(--plum-soft); font-size: 15px; margin-top: 6px; }
.contact { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.contact p { max-width: 30em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.toc a { background: #fff; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--plum); min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--plum); color: #F3ECFA; padding: 36px 0 44px; font-size: 15px; }
.site-footer a { color: #fff; }
.foot { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: flex-start; }
.foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.foot nav a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 8px; text-decoration: none; font-weight: 700; }
.foot nav a:hover { text-decoration: underline; }
.foot .who { max-width: 30em; }
.foot .who strong { color: #fff; }
.site-footer :focus-visible { outline-color: var(--sunshine); }

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

.site-header.on-sky { background: var(--sky-deep); }
.try-done h3:focus { outline: none; }
@media (max-width: 600px) {
  section { padding: 44px 0; }
  .section-head { margin-bottom: 26px; }
}

/* ---------- added with the German version and Android ---------- */
.nav a.lang { font-size: 14px; letter-spacing: .04em; border: 2px solid rgba(87, 51, 128, .18); padding: 8px 11px; }
@media (max-width: 420px) { .nav a.hide-sm { display: none; } }

.text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font-weight: 800; color: var(--plum); text-decoration: underline; text-decoration-color: rgba(87, 51, 128, .35); text-underline-offset: 4px; }
.text-link:hover { text-decoration-color: var(--plum); }

.btn-ghost { color: var(--plum); background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 2px rgba(87, 51, 128, .15); }

.shots figcaption small { display: block; font-size: 13px; font-weight: 700; color: var(--plum-soft); }

.safe .ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.a { color: #D9661A; } .ic.b { color: #1E8F93; } .ic.c { color: #7445C2; } .ic.d { color: #2D7FC0; }

.compare { margin-top: 22px; }
.compare h3 { font-size: 22px; margin-bottom: 6px; }
.plat { width: 100%; border-collapse: collapse; font-size: 16px; }
.plat th, .plat td { text-align: left; vertical-align: top; padding: 11px 10px; border-bottom: 1px solid var(--line); }
.plat thead th { color: var(--plum); font-size: 17px; font-weight: 800; border-bottom-width: 2px; }
.plat tbody th { color: var(--plum); font-weight: 800; width: 24%; }
.plat tbody tr:last-child th, .plat tbody tr:last-child td { border-bottom: 0; }
.plat td small { display: block; color: var(--plum-soft); font-size: 14px; }
@media (max-width: 520px) {
  .plat { font-size: 15px; }
  .plat th, .plat td { padding: 10px 5px; }
  .plat tbody th { width: 28%; }
}

/* makohippo badge in the header: back to all games on makohippo.com */
.nav a.studio { padding: 0; width: 44px; height: 44px; min-height: 44px; margin-left: 6px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: #FAF8F3; box-shadow: 0 2px 8px rgba(31, 45, 74, .25); transition: transform .2s; }
.nav a.studio:hover { background: #FAF8F3; transform: scale(1.08) rotate(-5deg); }
.nav a.studio img { width: 34px; height: 34px; display: block; }
@media (prefers-reduced-motion: reduce) { .nav a.studio { transition: none; } .nav a.studio:hover { transform: none; } }
@media (max-width: 440px) {
  .brand span { display: none; }      /* phones: icon only, like the other game sites, so the menu and badge fit */
  .nav a.studio { width: 38px; height: 38px; min-height: 38px; margin-left: 4px; }
  .nav a.studio img { width: 30px; height: 30px; }
}
