/*
 * En Masse house style: design tokens and fonts.
 * This file defines custom properties and fonts only. It sets no style on an element,
 * so a page that has its own chrome (an admin panel of a framework) can load it safely.
 * base.css sets the base typography. components.css builds the components.
 *
 * The brand values come from skills/en-masse-brand/brand.css in the _conventions
 * repository. Change a brand value there first, then copy it here.
 *
 * Mint is a surface colour. It is never the colour of text on paper.
 * The semantic colours (success, danger, warning, info) are not part of the brand.
 * Each pair below has a contrast of at least 4.5:1.
 *
 * Source: design-system/styles/ in the _conventions repository. A copy in a product
 * repository is a derived file. Change the rule there first, then run the sync script.
 */

@font-face {
    font-family: 'Archivo';
    src: url("../fonts/archivo-variable-latin-StE8AAs.woff2") format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Archivo Black';
    src: url("../fonts/archivo-black-400-latin-VgUkuOr.woff2") format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url("../fonts/jetbrains-mono-variable-latin-UKAvhI1.woff2") format('woff2');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}

:root {
    /* The version of the design system. The showcase prints it, and the sync script
       reads it. Raise it with each change of a shared stylesheet: the rules are in the
       README of the design system. */
    --ds-version: "1.1.2";

    /* Surfaces and text */
    --paper: #F5F5F2;
    --paper-raise: #EDEEE9;
    --white: #FFFFFF;
    --ink: #131613;
    --ink-2: #50564F;
    --ink-3: #646A63;
    --line: rgba(19, 22, 19, .14);
    --line-strong: rgba(19, 22, 19, .32);
    --mint: #36E0A0;

    /* The brand colour of the app shell: the house mint.
       --brand is a surface colour. --brand-ink is the colour of text on that surface.
       --brand-on-dark is the same hue for text and lines on the dark chrome. */
    --brand: var(--mint);
    --brand-ink: #131613;
    --brand-on-dark: var(--mint);

    /* Semantic colours: a solid for buttons and borders, a tint and a text colour for alerts */
    --success: #0F6B46;
    --success-tint: #E3F4EA;
    --success-ink: #0B4F34;
    --danger: #B42318;
    --danger-tint: #FBE9E7;
    --danger-ink: #8A1A10;
    --warning: #F2B01E;
    --warning-tint: #FFF4D6;
    --warning-ink: #5C4100;
    --info: #1F5A8A;
    --info-tint: #E3EEF8;
    --info-ink: #173F63;

    /* Typography */
    --font-display: 'Archivo Black', 'Archivo', sans-serif;
    --font-text: 'Archivo', 'Helvetica Neue', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

    /* Shape */
    --radius-card: 14px;
    --radius-field: 10px;
    --radius-pill: 999px;
    /* Depth. A raised surface (card, button) casts a soft layered shadow and has a faint
       gradient. An inset surface (field, unchecked box) is pressed into the page. This departs
       from the hard outline and offset shadow of the house-style skill on purpose. */
    --shadow-card: 0 1px 2px rgba(19, 22, 19, .05), 0 2px 6px rgba(19, 22, 19, .04), 0 14px 30px -14px rgba(19, 22, 19, .18);
    --shadow-card-hover: 0 1px 2px rgba(19, 22, 19, .06), 0 4px 10px rgba(19, 22, 19, .06), 0 20px 36px -14px rgba(19, 22, 19, .24);
    --shadow-card-mint: 0 1px 2px rgba(19, 22, 19, .05), 0 2px 6px rgba(19, 22, 19, .04), 0 14px 30px -12px rgba(54, 224, 160, .6);
    --shadow-raised-sm: 0 1px 2px rgba(19, 22, 19, .08), 0 3px 8px -3px rgba(19, 22, 19, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
    --shadow-inset: inset 0 1px 3px rgba(19, 22, 19, .12), inset 0 0 0 1px rgba(19, 22, 19, .02);
    --surface-raised: linear-gradient(180deg, #FFFFFF 0%, #FAFAF8 100%);
    --surface-inset: linear-gradient(180deg, #F2F2EF 0%, #FBFBFA 100%);
    /* The border of a field holds 3:1 against the field, so the field never relies on shadow alone. */
    --field-line: #868C85;
    --ring: 0 0 0 4px rgba(54, 224, 160, .55);

    /* Spacing scale: the five steps the components use. The steps are not linear. */
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 3rem;
}

/* The dark skin flips the surfaces for a subtree, for example the header. Mint stays. */
.dark {
    --paper: #131613;
    --paper-raise: #1E231E;
    --white: #1E231E;
    --ink: #F5F5F2;
    --ink-2: #C6CAC4;
    --ink-3: #9AA097;
    --line: rgba(245, 245, 242, .16);
    --line-strong: rgba(245, 245, 242, .34);
}
