/*
 * Crave kit tokens, kit v2. https://crave-rnd-games.vercel.app/kit/tokens.css
 *
 * The CraveFX palette as cravefx.com publishes it, and the surfaces, lines and
 * ink Cravings and Guess Who share: deep studio purples in dark with lime
 * actions, lavender and white in light with purple actions.
 *
 * Everything is namespaced --crave-* so linking this file never overrides a
 * game's own variables, and it sits in the `crave` cascade layer so any
 * unlayered game CSS wins. Dark is the default; light applies under
 * <html data-theme="light">, which the game sets before first paint.
 *
 * Roles: accent is the interface's own voice (focus, the mark, selection),
 * action is the one call to action on a screen, good / warn / bad are status
 * and never decoration.
 */

@layer crave {
  :root {
    color-scheme: dark;

    /* Palette, both themes */
    --crave-purple: #6214ff;
    --crave-blue: #2d57ff;
    --crave-cyan: #64acff;
    --crave-pink: #ff2dea;
    --crave-orange: #fd5003;
    --crave-yellow: #daff0b;
    --crave-violet: #b9a1ff;

    /* Surfaces, darkest to lightest */
    --crave-bg: #080211;
    --crave-surface-sunk: #0e0220;
    --crave-surface: #160a2e;
    --crave-surface-raised: #23103f;
    --crave-surface-lift: #35185c;
    --crave-line: #392052;
    --crave-line-strong: #674487;
    --crave-scrim: rgba(6, 2, 14, 0.78);

    /* Ink */
    --crave-ink: #f8f3ff;
    --crave-ink-muted: #c9bade;
    --crave-ink-faint: #ad99c9;
    --crave-on-fill: #ffffff;

    /* Accent: violet as type, purple as a fill behind white text */
    --crave-accent: var(--crave-violet);
    --crave-accent-strong: #d6c5ff;
    --crave-accent-ink: #160a2e;
    --crave-accent-soft: rgba(98, 20, 255, 0.15);
    --crave-accent-ring: rgba(185, 161, 255, 0.4);
    --crave-accent-fill: var(--crave-purple);
    --crave-accent-fill-hover: #7a3bff;

    /* Action, and the colour a heading puts one word in */
    --crave-action: var(--crave-yellow);
    --crave-action-hover: #e6ff66;
    --crave-action-ink: #160a2e;
    --crave-secondary: var(--crave-pink);
    --crave-info: var(--crave-cyan);
    --crave-hot: var(--crave-yellow);

    /* Status: -text colours read on the ground, -fill colours sit behind white */
    --crave-good: #8de4b5;
    --crave-good-soft: rgba(141, 228, 181, 0.1);
    --crave-good-fill: #56b37f;
    --crave-warn: #ffaf7e;
    --crave-warn-soft: rgba(253, 80, 3, 0.12);
    --crave-bad: #ff97aa;
    --crave-bad-soft: rgba(255, 45, 110, 0.1);
    --crave-bad-fill: #e8627a;

    /* Shape */
    --crave-radius-sm: 8px;
    --crave-radius: 12px;
    --crave-radius-lg: 16px;
    --crave-radius-pill: 999px;

    /* Depth */
    --crave-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.2);
    --crave-shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    --crave-shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, 0.75), 0 8px 24px -8px rgba(0, 0, 0, 0.5);

    /* Type: Archivo Black for display (load /kit/fonts.css), the system stack for content */
    --crave-font-display: 'Archivo Black', system-ui, sans-serif;
    --crave-font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --crave-fs-2xs: 0.625rem;
    --crave-fs-xs: 0.6875rem;
    --crave-fs-sm: 0.75rem;
    --crave-fs-md: 0.8125rem;
    --crave-fs-base: 0.875rem;
    --crave-fs-lg: 1rem;
    --crave-fs-xl: 1.25rem;
    --crave-fs-2xl: 1.5rem;

    /* Motion */
    --crave-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --crave-fast: 120ms;
    --crave-slow: 240ms;
    --crave-theme-fade: 0.35s;
  }

  :root[data-theme='light'] {
    color-scheme: light;

    --crave-bg: #f6f2ff;
    --crave-surface-sunk: #f0e8ff;
    --crave-surface: #ffffff;
    --crave-surface-raised: #f0e8ff;
    --crave-surface-lift: #e5d6ff;
    --crave-line: #e4d7f5;
    --crave-line-strong: #b49bcc;
    --crave-scrim: rgba(33, 12, 61, 0.55);

    --crave-ink: #210c3d;
    --crave-ink-muted: #58416e;
    --crave-ink-faint: #715881;

    --crave-accent: var(--crave-purple);
    --crave-accent-strong: #4d0dcc;
    --crave-accent-ink: #ffffff;
    --crave-accent-soft: rgba(98, 20, 255, 0.07);
    --crave-accent-ring: rgba(98, 20, 255, 0.25);
    --crave-accent-fill-hover: #4d0dcc;

    --crave-action: var(--crave-purple);
    --crave-action-hover: #4d0dcc;
    --crave-action-ink: #ffffff;
    --crave-secondary: #ae008f;
    --crave-info: var(--crave-blue);
    --crave-hot: var(--crave-purple);

    --crave-good: #217750;
    --crave-good-soft: #e2f2e9;
    --crave-good-fill: #217750;
    --crave-warn: #a13708;
    --crave-warn-soft: #fff0e5;
    --crave-bad: #b52554;
    --crave-bad-soft: #ffe7f0;
    --crave-bad-fill: #b52554;

    --crave-shadow-sm: 0 1px 3px rgba(33, 12, 61, 0.08);
    --crave-shadow-md: 0 6px 24px rgba(98, 20, 255, 0.08);
    --crave-shadow-lg: 0 16px 48px rgba(33, 12, 61, 0.18);
  }
}
