/* Design tokens.
   Kid palette: candy blue / orange on play screens (home, stages, gameplay).
   Parent palette: warm neutrals with one calm accent on Progress, Leaderboard, and About.
   Load this file before every other stylesheet.

   Fredoka and Nunito are self-hosted variable fonts (SIL Open Font License, wwwroot/fonts)
   so neither host calls fonts.googleapis.com. */

@font-face {
    font-family: "Fredoka";
    font-style: normal;
    font-weight: 500 700;
    font-stretch: 100%;
    font-display: swap;
    src: url("../fonts/fredoka-hebrew.woff2") format("woff2");
    unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
    font-family: "Fredoka";
    font-style: normal;
    font-weight: 500 700;
    font-stretch: 100%;
    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;
}

@font-face {
    font-family: "Fredoka";
    font-style: normal;
    font-weight: 500 700;
    font-stretch: 100%;
    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: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/nunito-cyrillic-ext.woff2") format("woff2");
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/nunito-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/nunito-vietnamese.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 800;
    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;
}

:root {
    --font-display: "Fredoka", "Trebuchet MS", "Segoe UI", sans-serif;
    --font-body: "Nunito", "Segoe UI", sans-serif;

    --motion-fast: 120ms;
    --motion-normal: 240ms;
    --motion-slow: 500ms;
    --ease-playful: cubic-bezier(0.2, 0.9, 0.3, 1.2);
    --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);

    /* Kid palette */
    --color-play-orange: #ff8a3d;
    --color-play-orange-deep: #d45a12;
    --color-play-blue: #2f6fed;
    --color-play-blue-deep: #1b4fbd;
    --color-play-blue-bright: #5b9bff;
    --color-play-amber: #f5a623;
    --color-play-success: #3ecf8e;
    --color-play-ink: #163a7a;
    --color-on-play: #ffffff;

    /* Path accents (stage picker) */
    --color-path-treble: #2f6fed;
    --color-path-treble-tint: #e7f0ff;
    --color-path-bass: #7b4fd6;
    --color-path-bass-tint: #f3eaff;
    --color-path-grand: #0e8f8a;
    --color-path-grand-tint: #e5f7f6;
    --color-path-master: #d4920a;
    --color-path-master-tint: #fff6e0;

    /* Parent palette — calm dashboard, not the candy gradient */
    --color-parent-bg: #f3f1ec;
    --color-parent-surface: #ffffff;
    --color-parent-accent: #3d6d8c;
    --color-parent-accent-deep: #2a5168;
    --color-parent-ink: #1e2a36;
    --color-parent-muted: #5c6b78;

    --color-ink: #1e2a36;
    --color-muted: #5c6b78;
    --color-danger: #d64545;
    --color-danger-deep: #a83232;
    --color-star: #f5b700;

    --color-neutral-0: #ffffff;
    --color-neutral-50: #f7f5f2;
    --color-neutral-100: #eeeae4;
    --color-neutral-200: #e2ddd4;
    --color-neutral-300: #c9c2b6;
    --color-neutral-500: #6b7280;
    --color-neutral-700: #374151;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
    --space-8: 48px;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-pill: 999px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    font-family: var(--font-body);
}

h1,
h2,
h3,
.hp-btn-play,
.hp-btn-secondary,
.hp-btn-parent,
.hp-btn-danger,
.hp-btn-quiet,
.home-screen__stat,
.challenge-end-value,
.practice-streak-chip,
.practice-progress-label,
.stars-value {
    font-family: var(--font-display);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.hp-input {
    flex: 1;
    min-width: 0;
    font: inherit;
    color: var(--color-ink);
    background: var(--color-neutral-0);
    border: 2px solid var(--color-neutral-300);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
}

.hp-input:focus {
    outline: 2px solid var(--color-play-blue);
    outline-offset: 1px;
}
