/*
 * Kcorp Prime: design tokens.
 *
 * The single source of truth for colour, type, spacing, radius and motion.
 * To re-brand the whole site, override a handful of --kp-* variables in
 * Dashboard > Pages & Themes > Customize > Custom CSS, for example:
 *
 *     :root { --kp-accent: light-dark(#c2410c, #fdba74); }
 *
 * Colours use light-dark(), so every token is declared once and resolves to
 * the light or dark value depending on the colour scheme of the element using
 * it (set on .kp-site in base.css). Needs a 2024+ browser; older ones simply
 * fall back to the browser's default colours instead of breaking the layout.
 */
:root {
    /* Brand */
    --kp-accent: light-dark(#3358e6, #8aa2ff);
    --kp-accent-strong: light-dark(#2342b8, #b4c3ff);
    --kp-accent-2: light-dark(#0e9f95, #3dd6c9);
    --kp-on-accent: light-dark(#ffffff, #0a1020);
    --kp-gradient: linear-gradient(120deg, var(--kp-accent), var(--kp-accent-2));

    /* Neutrals */
    --kp-ink: light-dark(#0f172a, #eef1f9);
    --kp-ink-soft: light-dark(#334155, #c3cbe0);
    --kp-muted: light-dark(#5b6a80, #94a0ba);
    --kp-bg: light-dark(#ffffff, #070c19);
    --kp-bg-soft: light-dark(#f5f7fc, #0c1325);
    --kp-surface: light-dark(#ffffff, #101831);
    --kp-line: color-mix(in srgb, var(--kp-ink) 11%, transparent);
    --kp-line-strong: color-mix(in srgb, var(--kp-ink) 22%, transparent);
    --kp-accent-soft: color-mix(in srgb, var(--kp-accent) 12%, transparent);
    --kp-dark-surface: #0b1226; /* panels that stay dark in both schemes */

    /* Status */
    --kp-success: light-dark(#127a4b, #4ade99);
    --kp-warning: light-dark(#9a5b00, #fbbf4a);
    --kp-danger: light-dark(#b42318, #ff8a80);

    /* Typography: system stacks only, so no font downloads and no layout shift.
       Override --kp-font-sans to self-host a brand font. */
    --kp-font-sans: "Inter var", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --kp-font-display: "Inter var", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --kp-font-serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --kp-font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;

    /* Fluid type scale */
    --kp-fs-sm: 0.875rem;
    --kp-fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
    --kp-fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.4rem);
    --kp-fs-h4: clamp(1.15rem, 1.1rem + 0.25vw, 1.3rem);
    --kp-fs-h3: clamp(1.35rem, 1.2rem + 0.75vw, 1.8rem);
    --kp-fs-h2: clamp(1.9rem, 1.4rem + 2.2vw, 3.1rem);
    --kp-fs-h1: clamp(2.4rem, 1.6rem + 3.8vw, 4.6rem);

    /* Space */
    --kp-gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);
    --kp-gap-lg: clamp(1.75rem, 1.2rem + 2.5vw, 3.5rem);
    --kp-gutter: clamp(1.25rem, 0.5rem + 3.5vw, 3rem);

    /* Layout */
    --kp-container: 1200px;
    --kp-wide: 1440px;
    --kp-narrow: 760px;
    --kp-header-h: 72px;
    --kp-toolbar-h: 0px; /* becomes 48px under the Concrete toolbar, see chrome.css */

    /* Shape and depth */
    --kp-radius-sm: 8px;
    --kp-radius: 14px;
    --kp-radius-lg: 24px;
    --kp-shadow-sm: 0 1px 2px rgb(10 19 48 / 0.08), 0 1px 1px rgb(10 19 48 / 0.04);
    --kp-shadow: 0 10px 30px -12px rgb(10 19 48 / 0.22);
    --kp-shadow-lg: 0 30px 70px -24px rgb(10 19 48 / 0.35);

    /* Motion */
    --kp-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --kp-fast: 160ms;
    --kp-slow: 600ms;
}
