/* ==========================================================================
   tokens.css — theme-agnostic design tokens for Owlet.
   Colours live in themes.css (one block per theme). Everything here is
   spacing, type, radius, size, z-index and motion. Components must read
   these variables instead of hard-coded values.
   ========================================================================== */

:root {
    /* ---- Font families ---- */
    --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, Consolas, "Courier New", monospace;
    --editor-ligatures: none;

    /* ---- Type scale (px) ---- */
    --fs-2xs: 10px;
    --fs-xs: 11px;
    --fs-sm: 12px;
    --fs-base: 13px;
    --fs-md: 14px;
    --fs-lg: 16px;
    --fs-xl: 20px;
    --fs-2xl: 24px;

    --lh-tight: 1.25;
    --lh-base: 1.5;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* ---- Spacing (4px grid) ---- */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* ---- Radius scale ---- */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 999px;

    /* ---- Component sizes ---- */
    --control-h-sm: 26px;
    --control-h-md: 30px;
    --control-h-lg: 36px;
    --row-h: 24px;
    --icon-size: 16px;
    --icon-size-sm: 14px;
    --icon-stroke: 1.75;

    /* ---- Shell sizes ---- */
    --topbar-h: 44px;
    --statusbar-h: 26px;
    --rail-w: 52px;
    --tabbar-h: 36px;
    --panel-header-h: 34px;
    --gap: 6px;                 /* gap between floating panels */
    --side-w: 256px;            /* default explorer width */
    --right-w: 440px;           /* default preview width */
    --bottom-h: 240px;          /* default bottom dock height */
    --divider-size: 6px;        /* hit area of a resize handle */

    /* ---- Z-index scale ---- */
    --z-base: 1;
    --z-sticky: 10;
    --z-dropdown: 50;
    --z-popover: 60;
    --z-toast: 80;
    --z-modal: 100;
    --z-palette: 110;

    /* ---- Motion ---- */
    --dur-instant: 80ms;
    --dur-fast: 120ms;
    --dur-base: 180ms;
    --dur-slow: 220ms;
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.3, 1.25, 0.5, 1);

    /* ---- Focus ---- */
    --focus-width: 2px;
    --focus-offset: 2px;
}

/* Users who ask for less motion get instant transitions everywhere. */
@media (prefers-reduced-motion: reduce) {
    :root {
        --dur-instant: 0ms;
        --dur-fast: 0ms;
        --dur-base: 0ms;
        --dur-slow: 0ms;
    }
    *, *::before, *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}
