/*
 * Design tokens for the rebuilt UI (grigoriangames.com, hresh.com, hresh.io).
 *
 * Every colour here was sampled from the studio's own pixel art, so the pages
 * look like they belong to the icons and logos rather than sitting around them:
 *   sapphire  the GG sword mark            #095F8F / #004272 / #73A9CE
 *   gold      the outline on every icon    #F5D470 / #FFDC73
 *   blood     the Hresh wordmark           #C22D23 / #560F0A
 *   teal      the SG Colure rings          #00CACD
 *
 * Layer order is declared once, here. Later layers win, so a page stylesheet
 * can always override a component without a specificity fight.
 */
@layer reset, base, components, page;

:root {
    color-scheme: dark;

    /* surfaces */
    --bg: #0b0e17;
    --bg-deep: #070910;
    --bg-raise: #111625;
    --panel: #151b2c;
    --panel-hi: #1c2439;
    --line: #26304a;
    --line-strong: #3a4768;

    /* text */
    --ink: #f3eedd; /* warm cream; the old site's page colour, now the ink */
    --ink-soft: #c9cbd6;
    --muted: #98a1b8;
    --dim: #7c86a0;

    /* brand */
    --gold: #f5d470;
    --gold-hi: #ffdc73;
    --gold-deep: #b8860b;
    --gold-ink: #1d1503;
    --sapphire: #095f8f;
    --sapphire-deep: #004272;
    --sapphire-hi: #2f8ec3;
    --sapphire-pale: #73a9ce;
    --teal: #00cacd;
    --blood: #c22d23;
    --blood-hi: #e23327;
    --blood-deep: #560f0a;
    --paper: #fcfdf5; /* the haiku page, and anything set on "paper" */
    --paper-ink: #28282b;

    /* the accent a site uses for its primary actions; Hresh pages swap it */
    --accent: var(--gold);
    --accent-hi: var(--gold-hi);
    --accent-ink: var(--gold-ink);

    --ok: #58c48a;
    --warn: #ffbd73;
    --danger: #e5564b;

    /* type */
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
    --font-pixel: "Press Start 2P", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --text-xs: 0.8125rem;
    --text-sm: 0.9375rem;
    --text-md: 1.0625rem;
    --text-lg: 1.25rem;
    --text-xl: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);

    /* space: a 4px grid, the same grid the pixel art is drawn on */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;
    --s-8: 64px;
    --s-9: 96px;

    --px: 2px; /* one "pixel" of the pixel frames */
    --radius: 14px;
    --radius-sm: 8px;

    /* layout */
    --container: 76rem;
    --gutter: clamp(16px, 4vw, 40px);
    --dock-size: 64px; /* the dock's footprint on its docked edge */
    --dock-gap: 16px;

    --shadow: 0 18px 50px -18px rgb(0 0 0 / 0.75);
    --glow-gold: 0 0 0 1px rgb(245 212 112 / 0.35), 0 0 28px -4px rgb(245 212 112 / 0.35);
    --glow-sapphire: 0 0 40px -6px rgb(47 142 195 / 0.55);

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --fast: 140ms;
    --slow: 420ms;
}

/* Hresh pages: same system, the accent turns to the wordmark's red. */
[data-site="hresh"] {
    --accent: var(--blood-hi);
    --accent-hi: #f0483c;
    --accent-ink: #fff4ee;
}
