/* Shared by every page: the font, the palette, and a small reset. */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/fredoka-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/fredoka-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;

  --paper: #fff6e6;
  --card: #ffffff;
  --ink: #2a2342;
  --muted: #6e6685;

  --hue-1: #f0476c;
  --hue-2: #f7861c;
  --hue-3: #edb200;
  --hue-4: #33b86b;
  --hue-5: #14afc0;
  --hue-6: #3c82f6;
  --hue-7: #8c5cf2;
  --hue-8: #e054c6;

  /* A darker edge under big letters and shapes, so they read as chunky toys.
     currentColor resolves where the variable is used, not here. */
  --depth: color-mix(in oklab, currentColor 72%, #000);

  --font: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17132b;
    --card: #231d40;
    --ink: #f5efff;
    --muted: #a9a1c4;

    --hue-1: #ff6f8e;
    --hue-2: #ffa24a;
    --hue-3: #ffd64f;
    --hue-4: #5fe093;
    --hue-5: #4fd9e6;
    --hue-6: #74a7ff;
    --hue-7: #ae93ff;
    --hue-8: #f584e2;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.4;
}

.hue-1 { color: var(--hue-1); }
.hue-2 { color: var(--hue-2); }
.hue-3 { color: var(--hue-3); }
.hue-4 { color: var(--hue-4); }
.hue-5 { color: var(--hue-5); }
.hue-6 { color: var(--hue-6); }
.hue-7 { color: var(--hue-7); }
.hue-8 { color: var(--hue-8); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
