/*
    Waterlijn design tokens: the ONLY place in the app where colour values are written down.
    Source: the approved Waterlijn mockup in docs/design/. Everything else references these custom properties;
    the MudBlazor theme (Theme/WaterlijnTheme.cs) repeats the same values in C# and a test keeps both in step.

    Light is the default; [data-theme="dark"] is set on <html> by the script in index.html before first paint
    (preference "Systeem" follows prefers-color-scheme).

    Deviations from the mockup values (contrast, see the task-17c report):
    - light --ink-3 is #5A6C75 instead of #62747D (the mockup value is 4.48:1 on --paper and 4.23:1 on --sunken).
    - --line-input is new: hairlines (--line, --line-strong) are below 3:1, so form-field borders get their own token.
    - --rail-focus is new: the petrol focus ring is 2.1:1 on the dark rail.
*/
:root {
    color-scheme: light;

    /* Surfaces */
    --paper: #F3F6F7;
    --surface: #FFFFFF;
    --sunken: #EAF0F2;
    --line: #D5DEE2;
    --line-strong: #B9C6CC;
    --line-input: #7D8F98;

    /* Ink */
    --ink: #10222B;
    --ink-2: #44565F;
    --ink-3: #5A6C75;

    /* Rail (navigation) */
    --rail: #0C2733;
    --rail-ink: #C9D8DE;
    --rail-ink-on: #FFFFFF;
    --rail-on: #16404F;
    --rail-hover: rgba(255, 255, 255, 0.06);
    --rail-divider: rgba(255, 255, 255, 0.08);
    --rail-focus: #7CC6DE;

    /* Action */
    --petrol: #0F5E7A;
    --petrol-hover: #0B4C63;
    --petrol-soft: #E1EEF2;
    --on-petrol: #FFFFFF;

    /* Antifouling red: ONLY the waterline stripe under the product name. */
    --menie: #B2452F;

    /* Status (always next to a word, never colour alone) */
    --ok: #1B7A4E;
    --ok-soft: #E3F2EA;
    --warn: #8F5B00;
    --warn-soft: #FBEFD5;
    --bad: #B3261E;
    --bad-soft: #FBE6E4;
    --info: var(--petrol);
    --info-soft: var(--petrol-soft);

    /* Overlays only (menus, dialogs, drawer on narrow screens) */
    --shadow-overlay: 0 12px 32px rgba(12, 39, 51, 0.18);
    --scrim: rgba(12, 39, 51, 0.45);
    --skeleton: #E1E8EB;

    /* Focus */
    --focus: #0F5E7A;
    --focus-width: 2px;
    --focus-offset: 2px;

    /* Radii */
    --r-control: 6px;
    --r-panel: 10px;
    --r-tag: 5px;
    --r-pill: 999px;

    /* Spacing scale (4px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-14: 56px;

    /* Component measures taken from the mockup */
    --rail-width: 232px;
    --topbar-height: 52px;
    --content-max: 1320px;
    --gutter: var(--space-7);
    --control-height: 36px;
    --control-height-sm: 30px;
    --cell-y: 9px;
    --cell-x: 14px;
    --panel-y: 14px;
    --panel-x: 18px;

    /* Type: one family, Archivo (variable: width 62–125, weight 400–800) */
    --font: "Archivo", "Archivo Fallback", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    --fs-caption: 12.5px;
    --fs-small: 13px;
    --fs-body: 14px;
    --fs-nav: 14.5px;
    --fs-panel: 15px;
    --fs-brand: 19px;
    --fs-figure: 22px;
    --fs-title: 26px;
    --fs-hull: 34px;
    --lh-body: 1.45;
    --lh-tight: 1.15;
    --fw-regular: 400;
    --fw-medium: 560;
    --fw-semibold: 640;
    --fw-bold: 680;
    --fw-title: 720;
    --fw-hull: 760;
    --wdth-num: 92%;
    --wdth-figure: 96%;
    --wdth-boat: 106%;
    --wdth-title: 112%;
    --wdth-brand: 118%;
    --wdth-hull: 120%;

    /* Layers */
    --z-sticky: 5;
    --z-topbar: 20;
    --z-scrim: 1190;
    --z-drawer: 1200;
    --z-popover: 1300;
    --z-dialog: 1400;
    --z-snackbar: 1500;
    --z-skip: 2000;

    /* Motion: only as feedback to an action */
    --dur-fast: 120ms;
    --dur-base: 160ms;
    --dur-slow: 200ms;
    --ease: cubic-bezier(0.2, 0, 0, 1);
}

[data-theme="dark"] {
    color-scheme: dark;

    --paper: #0B1A21;
    --surface: #11242D;
    --sunken: #0E1F27;
    --line: #22404D;
    --line-strong: #325666;
    --line-input: #5E8494;

    --ink: #E6EEF1;
    --ink-2: #B4C4CB;
    --ink-3: #8FA3AC;

    --rail: #07141A;
    --rail-ink: #A9BCC4;
    --rail-on: #143746;

    --petrol: #5FB6D3;
    --petrol-hover: #7CC6DE;
    --petrol-soft: #143746;
    --on-petrol: #06222C;

    --menie: #D2664E;

    --ok: #5CC492;
    --ok-soft: #143527;
    --warn: #E5B454;
    --warn-soft: #3A2C0C;
    --bad: #F08A80;
    --bad-soft: #40201D;

    --shadow-overlay: 0 12px 32px rgba(0, 0, 0, 0.5);
    --scrim: rgba(0, 0, 0, 0.55);
    --skeleton: #1A323D;

    --focus: #7CC6DE;
}

@media (max-width: 959.98px) {
    :root {
        --gutter: var(--space-4);
    }
}
