/* Magic Makers Family: one small stylesheet for every page except the games themselves. */
@import url("/assets/fonts/fonts.css");

:root {
  --bg: #f4f8ff;
  --panel: #ffffff;
  --ink: #1d1442;
  --soft: #4d4670;
  --line: #dfe3f3;
  --brand: #6b3fd6;
  --brand-ink: #ffffff;
  --sun: #ffcc33;
  --sky: #8fd3ff;
  --go: #ff8a1a;
  --go-shadow: #c96200;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(29, 20, 66, .10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15102b;
    --panel: #221a42;
    --ink: #f4f1ff;
    --soft: #c4bce4;
    --line: #3a3063;
    --brand: #b79bff;
    --brand-ink: #15102b;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, .brand { font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(32px, 7vw, 52px); margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 4.5vw, 32px); margin: 40px 0 12px; }
h3 { font-size: 22px; margin: 0 0 6px; }
p { margin: 0 0 14px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--panel); padding: 8px 12px; z-index: 10; }

/* header */
.top { padding: 14px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 6px; }
.nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"], .nav a:hover { background: var(--panel); box-shadow: var(--shadow); }

/* hero */
.hero { padding: 28px 0 12px; }
.lead { font-size: clamp(18px, 3.2vw, 21px); color: var(--soft); max-width: 40em; }
.crumbs { font-size: 14px; color: var(--soft); margin: 0 0 10px; }
.crumbs a { color: var(--soft); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 999px; border: 0;
  font: 600 21px/1 "Fredoka", ui-rounded, system-ui, sans-serif; text-decoration: none;
  background: linear-gradient(180deg, #ffb04a, var(--go)); color: #2a1400;
  box-shadow: 0 6px 0 var(--go-shadow); transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--go-shadow); }
.btn.quiet { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 2px var(--line); }
.btn svg { width: 22px; height: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 18px 0 8px; }

/* cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin: 20px 0; }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 1200 / 630; background: var(--sky); }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .meta { font-size: 14px; color: var(--soft); }
.card .actions { margin: auto 0 0; padding-top: 10px; }
.card .btn { min-height: 48px; font-size: 19px; padding: 0 22px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 10px; border-radius: 999px; background: #efe8ff; color: #4b2aa6; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .tag { background: #3a2c6e; color: #e2d8ff; } }

.shot { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin: 18px 0; background: var(--sky); }
.panel { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin: 18px 0; }
.list { padding-left: 1.2em; margin: 0 0 14px; }
.list li { margin: 4px 0; }
.two { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.courses { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 14px; list-style: none; }
.courses li { background: var(--panel); border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 15px; }

/* footer */
.foot { margin-top: 56px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--soft); font-size: 15px; }
.foot p { margin: 0 0 8px; }
.foot a { color: var(--soft); }

/* Games page: brighter and more playful for kids */
.fun-hero { background: linear-gradient(160deg, #8fd3ff 0%, #b9a0ff 55%, #ffb4d6 100%); color: #1d1442; padding: 26px 0 30px; margin-bottom: 8px; }
.fun-hero .lead { color: #2d2257; }
.fun-hero h1 { color: #1d1442; }
.bubbles { display: flex; gap: 10px; margin: 0 0 8px; font-size: 34px; }
.bubbles span { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.75); box-shadow: 0 6px 14px rgba(29,20,66,.15); animation: bob 2.4s ease-in-out infinite; }
.bubbles span:nth-child(2) { animation-delay: .3s; } .bubbles span:nth-child(3) { animation-delay: .6s; }
.bubbles span:nth-child(4) { animation-delay: .9s; } .bubbles span:nth-child(5) { animation-delay: 1.2s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .bubbles span { animation: none; } }
.promise-pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.promise-pills li { background: #fff; color: #1d1442; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 15px; box-shadow: 0 4px 10px rgba(29,20,66,.12); }
.kid-h { font-size: clamp(28px, 6vw, 40px); margin-top: 24px; }
.big-card h3 { font-size: 26px; }
.steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); counter-reset: step; }
.steps li { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 16px; }
.steps b { display: block; font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-weight: 600; font-size: 19px; margin-bottom: 4px; }
.step-ico { display: block; font-size: 40px; line-height: 1; margin-bottom: 8px; }

.made-with { border-left: 6px solid var(--sun); }

/* Home: the newest game, picture beside the text on wide screens */
.feature { display: grid; gap: 0; grid-template-columns: 1fr; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin: 16px 0; }
.feature .pic { display: block; aspect-ratio: 1200 / 630; background: var(--sky); }
.feature .pic img { width: 100%; height: 100%; object-fit: cover; }
.feature .body { padding: 18px 20px 20px; }
.feature .meta { font-size: 14px; color: var(--soft); }
@media (min-width: 760px) { .feature { grid-template-columns: 1.1fr 1fr; align-items: center; } .feature .pic { height: 100%; aspect-ratio: auto; } }
.nowrap { white-space: nowrap; }
