/*
  Design direction: paper playground.
  Thick ink outlines, cut-paper cards, warm daylight background.
  Not a dark theme, not a default template: shapes are chunky and hand-cut.
*/

/*
  The two typefaces, served from this domain.

  Google's stylesheet blocked the first paint for 780ms: the browser had to
  fetch fonts.googleapis.com, read it, then open a second connection to
  fonts.gstatic.com. These are the same variable files, one hop closer, and
  they also keep the visitor's address off a third-party server.

  latin-ext carries the Polish letters. The unicode-range keeps it out of the
  way until a page actually needs one.
*/

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 600;
  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 600;
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/nunito-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: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/nunito-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  /* Surfaces */
  --paper: #fff8ec;
  --paper-deep: #f6e7cd;
  --card: #ffffff;
  --ink: #23201c;
  --ink-soft: #5d554b;

  /* Play colours — each module owns one */
  --write: #ff8c42;
  --write-deep: #e06a1d;
  --english: #3aa0ff;
  --english-deep: #1b6fc4;
  --maths: #38c172;
  --maths-deep: #1f8e50;
  --polish: #e4495c;
  --world: #14b8a6;
  --logic: #64748b;
  --chess: #8b5e34;
  --it: #0ea5e9;
  --science: #84cc16;
  --reading: #a855f7;
  --arts: #ec4899;
  --shape: #a855f7;
  --shape-deep: #7c31c9;

  /* Feedback */
  --good: #2fb673;
  --retry: #ffc93c;
  --star: #ffb703;

  /* Lines and depth */
  --line: 3px solid var(--ink);
  --line-thin: 2px solid var(--ink);
  --lift: 0 6px 0 var(--ink);
  --lift-sm: 0 4px 0 var(--ink);
  --lift-press: 0 2px 0 var(--ink);

  /* Type */
  --font-display: 'Fredoka', 'Trebuchet MS', 'Verdana', system-ui, sans-serif;
  --font-body: 'Nunito', 'Verdana', system-ui, sans-serif;
  --text-sm: 1rem;
  --text-base: 1.25rem;
  --text-lg: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --text-xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-huge: clamp(2.75rem, 1.6rem + 5vw, 5rem);

  /* Space and shape */
  --radius: 18px;
  --radius-lg: 28px;
  --tap: 64px; /* minimum touch target for a 7-year-old */
  --gap: 14px;
  --gap-sm: 8px;
  --space-block: clamp(1rem, 0.6rem + 2vw, 2.25rem);

  /* Motion */
  --fast: 120ms;
  --normal: 260ms;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
