/* Polymodel blueprint foundation tokens. */

@font-face {
    font-family: "Proza Libre";
    font-style: normal;
    font-weight: 400;
    src: url("/assets/ProzaLibre-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "Proza Libre";
    font-style: italic;
    font-weight: 400;
    src: url("/assets/ProzaLibre-Italic.woff2") format("woff2");
}

@font-face {
    font-family: "Proza Libre";
    font-style: normal;
    font-weight: 500;
    src: url("/assets/ProzaLibre-Medium.woff2") format("woff2");
}

@font-face {
    font-family: "Proza Libre";
    font-style: normal;
    font-weight: 600;
    src: url("/assets/ProzaLibre-SemiBold.woff2") format("woff2");
}

@font-face {
    font-family: "Proza Libre";
    font-style: normal;
    font-weight: 700;
    src: url("/assets/ProzaLibre-Bold.woff2") format("woff2");
}

@font-face {
    font-family: "Ioskeley Mono";
    font-style: normal;
    font-weight: 400;
    src: url("/assets/IoskeleyMono-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "Ioskeley Mono";
    font-style: normal;
    font-weight: 700;
    src: url("/assets/IoskeleyMono-Bold.woff2") format("woff2");
}

:root {
    color-scheme: light dark;

    --color-base: oklab(0.980696 -0.001930 -0.004746);
    --color-surface: oklab(1.000000 0.000000 0.000000);
    --color-overlay: oklab(0.940351 -0.008108 -0.017910);
    --color-text: oklab(0.252380 -0.009714 -0.034170);
    --color-muted: oklab(0.550853 -0.008208 -0.033125);
    --color-subtle: oklab(0.436442 -0.012368 -0.044729);
    --color-emphasis: oklab(0.218461 -0.012406 -0.039864);
    --color-primary: oklab(0.479428 -0.035191 -0.111636);
    --color-secondary: oklab(0.613677 -0.025079 -0.065437);
    --color-tertiary: oklab(0.367809 -0.026626 -0.097956);
    --color-error: oklab(0.499559 0.115162 0.066600);
    --color-warning: oklab(0.528919 0.016251 0.103026);
    --color-success: oklab(0.503030 -0.080259 0.021719);
    --color-border: oklab(0.776085 -0.009713 -0.026566);
    --color-link: oklab(0.485173 -0.035448 -0.128511);
    --color-highlight: oklab(0.902143 -0.011298 -0.030437);
    --color-grid-line: color-mix(in srgb, var(--color-primary) 16%, transparent);
    --color-action: oklab(0.516800 -0.033898 -0.129915);

    --font-ui: "Proza Libre", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-heading: "Proza Libre", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "Ioskeley Mono", "IBM Plex Mono", Consolas, monospace;

    --spacing-base: 16px;
    --spacing-line-height: 1.55;
    --spacing-scale: 1.25;
    --radius-panel: 2px;
    --radius-pill: 999px;

    /* Scheme-independent lighting overlays for the 3D viewer stage and SVG
       preview. Pure white/black at low alpha read as highlight/shadow in both
       schemes; defined as tokens so call sites never inline raw rgb(). */
    --overlay-highlight-soft: rgb(255 255 255 / 0.06);
    --overlay-highlight: rgb(255 255 255 / 0.12);
    --overlay-shadow: rgb(0 0 0 / 0.22);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-base: oklab(0.176154 -0.007764 -0.032073);
        --color-surface: oklab(0.215442 -0.009550 -0.037250);
        --color-overlay: oklab(0.285117 -0.013120 -0.061969);
        --color-text: oklab(0.952023 -0.004426 -0.015339);
        --color-muted: oklab(0.712425 -0.010427 -0.037918);
        --color-subtle: oklab(0.850584 -0.011008 -0.036559);
        --color-emphasis: oklab(0.986205 -0.002567 -0.006321);
        --color-primary: oklab(0.747996 -0.020067 -0.113276);
        --color-secondary: oklab(0.644236 -0.026081 -0.109450);
        --color-tertiary: oklab(0.860427 -0.009380 -0.067849);
        --color-error: oklab(0.726139 0.114649 0.072209);
        --color-warning: oklab(0.782530 0.004064 0.111403);
        --color-success: oklab(0.780344 -0.086383 0.024957);
        --color-border: oklab(0.385469 -0.016889 -0.062851);
        --color-link: oklab(0.808828 -0.013072 -0.094844);
        --color-highlight: oklab(0.351947 -0.019583 -0.081890);
        --color-grid-line: color-mix(in srgb, var(--color-primary) 22%, transparent);
        --color-action: oklab(0.740366 -0.013739 -0.116173);
    }
}
