/* Dummy to Punny: a chalkboard for the welcome, an exercise book for everything else.
   Fonts are hosted with the site (no Google Fonts), so they load everywhere, including mainland China. */
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(fonts/poppins-medium.woff) format("woff"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/inter-regular.woff) format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(fonts/inter-bold.woff) format("woff"); }
:root {
  --board: #2f2c2a;
  --board-edge: #4a3b2c;
  --chalk: #f2efe8;
  --chalk-dim: #b9b2a8;
  --page: #f4f7fb;
  --rule: #cfdcea;
  --margin: #e6a3b2;
  --ink: #1f2633;
  --ink-soft: #4b5567;
  --lime: #d4ec3a;
  --pink: #e9a0b1;
  --grey-bulb: #9b9590;
  --hand: "Poppins", system-ui, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 18px/1.65 var(--text); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:focus-visible, .play:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

/* ---------- Chalkboard ---------- */
.board {
  margin: 16px; border-radius: 22px; padding: 56px 24px 64px; color: var(--chalk);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.07), transparent 55%),
    repeating-linear-gradient(-28deg, rgba(255,255,255,.025) 0 2px, transparent 2px 9px),
    var(--board);
  box-shadow: inset 0 0 0 10px var(--board-edge), inset 0 0 0 12px #5d4a37;
  position: relative; overflow: hidden;
}
.board-inner { max-width: 980px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
.logo { width: 120px; height: 120px; }
.title { font-family: var(--hand); font-weight: 500; filter: url(#chalk); font-size: clamp(50px, 10vw, 104px); line-height: .98; margin: 0; letter-spacing: -.01em; transform: rotate(-2deg); transform-origin: left; }
.title small { display: block; font-size: .62em; color: var(--chalk-dim); }
.lede { font-size: 21px; max-width: 34ch; margin: 14px 0 26px; color: var(--chalk); }
.play {
  display: inline-block; background: var(--lime); color: #1d2208; font-weight: 700; text-decoration: none;
  padding: 14px 22px; border-radius: 12px; font-size: 18px;
}
.play[aria-disabled="true"] { cursor: default; }
.note { display: block; color: var(--chalk-dim); font-size: 15px; margin-top: 10px; }

.bulbs { display: flex; gap: 22px; align-items: flex-end; }
.bulb { width: 70px; height: 96px; }
.bulb path, .bulb line { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.bulb .bolt { stroke: none; }
.b1 path, .b1 line { stroke: var(--grey-bulb); } .b1 .bolt { fill: var(--grey-bulb); }
.b2 path, .b2 line { stroke: var(--pink); } .b2 .bolt { fill: var(--pink); }
.b3 path, .b3 line { stroke: var(--lime); } .b3 .bolt { fill: var(--lime); }
.b3 { filter: drop-shadow(0 0 14px rgba(212,236,58,.55)); }

/* The one moment of motion: the bulbs switch on in order, dummy to punny. */
@media (prefers-reduced-motion: no-preference) {
  .board .bulb { opacity: .15; animation: on .5s ease-out forwards; }
  .board .b1 { animation-delay: .4s; }
  .board .b2 { animation-delay: 1s; }
  .board .b3 { animation: on .5s ease-out 1.6s forwards, flick 1.2s ease-in-out 2.1s 1; }
  @keyframes on { to { opacity: 1; } }
  @keyframes flick { 0%,100% { filter: drop-shadow(0 0 14px rgba(212,236,58,.55)); } 50% { filter: drop-shadow(0 0 28px rgba(212,236,58,.9)); } }
}

@media (min-width: 820px) {
  .board { padding: 72px 48px 80px; }
  .board-inner { grid-template-columns: 1.4fr 1fr; }
  .bulbs { justify-content: flex-end; }
  .bulb { width: 92px; height: 126px; }
}

/* ---------- Exercise book ---------- */
.book {
  max-width: 980px; margin: 0 auto; padding: 24px 20px 40px 20px; position: relative;
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(1.65em * 1 - 1px), var(--rule) calc(1.65em * 1 - 1px) calc(1.65em * 1));
  background-size: 100% 1.65em;
}
@media (min-width: 820px) {
  .book { padding-left: 120px; }
  .book::before { content: ""; position: absolute; top: 0; bottom: 0; left: 88px; width: 2px; background: var(--margin); }
}
.book h2 { font-family: var(--hand); font-weight: 500; font-size: 34px; letter-spacing: -.01em; line-height: 1.2; margin: 48px 0 8px; color: var(--ink); }
.book p { max-width: 62ch; margin: 0 0 1.65em; }

.steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 28px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; align-content: start; background: rgba(255,255,255,.7); border-radius: 14px; padding: 18px 18px 18px 12px; }
.steps .bulb { width: 48px; height: 66px; }
.steps h3 { margin: 0; font-size: 22px; }
.steps p { margin: 4px 0 0; color: var(--ink-soft); }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } .steps li { grid-template-columns: 1fr; } }

.games { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 8px 0 1.65em; list-style: none; }
.games li { background: var(--board); color: var(--chalk); font-family: var(--hand); font-weight: 500; font-size: 18px; padding: 8px 16px 7px; border-radius: 10px; transform: rotate(var(--r, 0deg)); }
.games li:nth-child(2n) { --r: 1.5deg; } .games li:nth-child(3n) { --r: -1.5deg; }

.facts { padding-left: 22px; max-width: 62ch; }
.facts li { margin: 0 0 6px; }

footer { max-width: 980px; margin: 0 auto; padding: 28px 20px 48px; color: var(--ink-soft); font-size: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
@media (min-width: 820px) { footer { padding-left: 120px; } }

/* ---------- Privacy page ---------- */
.board.slim { padding: 40px 24px 44px; }
.board.slim .title { font-size: clamp(44px, 8vw, 72px); }
.policy h2 { font-size: 28px; margin-top: 40px; }
.policy ul { max-width: 62ch; padding-left: 22px; margin: 0 0 1.65em; }
.policy li { margin-bottom: 4px; }
