/* Deskito design tokens — single source of truth (see docs/08 §4, docs/09 §4.4).
   Keep in sync with Shared/Ui/DeskitoTheme.cs (MudBlazor palette). */

@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url('../fonts/bricolage-grotesque-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: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url('../fonts/bricolage-grotesque-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: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-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: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-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 {
    color-scheme: light;

    /* Brand fills (identical in light and dark) */
    --c-mandarino: #FF7A3D;
    --c-mandarino-press: #F26A2C;
    --c-postit: #FFD36E;
    --c-pesca: #FFC9A8;
    --c-lilla: #D7C8FF;
    --c-salvia: #A8DDBF;

    /* Text on colored fills: always Inchiostro, also in dark theme */
    --c-on-fill: #2B2330;
    --c-on-fill-soft: #4A3F47;

    /* Surfaces and text */
    --c-bg: #FFF8F0;            /* Carta */
    --c-surface: #FFFFFF;       /* Bianco */
    --c-surface-2: #FFF1E4;     /* subtle warm fill (inputs, wells) */
    --c-icon-well: #FFF8F0;     /* icon square inside tiles */
    --c-ink: #2B2330;           /* Inchiostro */
    --c-ink-soft: #6B5E66;      /* Inchiostro tenue */
    --c-rust: #9A3412;          /* Ruggine */
    --c-line: rgba(43, 35, 48, 0.08);
    --c-scrim: rgba(43, 35, 48, 0.42);
    --c-focus: #9A3412;

    /* Typography */
    --font-head: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, 'Cascadia Mono', 'Roboto Mono', Consolas, monospace;
    --fs-12: 12px;
    --fs-14: 14px;
    --fs-16: 16px;
    --fs-18: 18px;
    --fs-22: 22px;
    --fs-28: 28px;
    --fs-34: 34px;
    --ls-head: -0.02em;
    --ls-head-xl: -0.03em;

    /* Spacing (base 4) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-7: 32px;
    --sp-8: 40px;

    /* Radii */
    --r-card: 20px;
    --r-btn: 18px;
    --r-icon: 14px;
    --r-pill: 999px;

    /* Misc */
    --shadow: 0 1px 2px rgba(122, 62, 22, 0.06), 0 6px 18px rgba(122, 62, 22, 0.08);
    --shadow-raised: 0 4px 10px rgba(122, 62, 22, 0.14), 0 12px 28px rgba(122, 62, 22, 0.16);
    --tap: 44px;
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --nav-h: 64px;
    --fab: 64px;
    --page-max: 720px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Dark theme (draft, docs/08 §4: to be validated) */
[data-theme=dark] {
    color-scheme: dark;

    --c-bg: #1E1A21;
    --c-surface: #2B2330;
    --c-surface-2: #362C3C;
    --c-icon-well: #FFF8F0;
    --c-ink: #FFF3E8;
    --c-ink-soft: #CBBDC5;
    --c-rust: #FFB38A;
    --c-line: rgba(255, 243, 232, 0.10);
    --c-scrim: rgba(0, 0, 0, 0.55);
    --c-focus: #FFB38A;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.30), 0 6px 18px rgba(0, 0, 0, 0.28);
    --shadow-raised: 0 4px 10px rgba(0, 0, 0, 0.40), 0 12px 28px rgba(0, 0, 0, 0.40);
}
