/*
 * Single source of truth for the project palette and design tokens.
 */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/inter/Inter-Regular.3875f8357497.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/inter/Inter-SemiBold.b72fa2728a8e.woff2") format("woff2");
}

html {
    color-scheme: light dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

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

/* html[data-theme] matches the specificity of the admin's own theme blocks so these tokens win the cascade. */
:root,
html[data-theme] {
    --primary: light-dark(#3a4361, #313a54);
    --secondary: light-dark(#2c3447, #232b40);
    --accent: #818cf8;
    --primary-fg: light-dark(#ffffff, #f8fafc);

    --body-fg: light-dark(#1e293b, #e2e8f0);
    --body-bg: light-dark(#ffffff, #313a54);
    --body-quiet-color: light-dark(#64748b, #94a3b8);
    --body-loud-color: light-dark(#0f172a, #f8fafc);

    --header-color: #cbd5e1;
    --header-branding-color: var(--accent);
    --header-bg: var(--secondary);
    --header-link-color: #e2e8f0;

    --breadcrumbs-fg: #94a3b8;
    --breadcrumbs-link-fg: light-dark(#6366f1, #a5b4fc);
    --breadcrumbs-bg: light-dark(#f1f5f9, #1b2133);

    --link-fg: light-dark(#6366f1, #818cf8);
    --link-hover-color: light-dark(#4f46e5, #a5b4fc);
    --link-selected-fg: light-dark(#4f46e5, #a5b4fc);

    --hairline-color: light-dark(#e2e8f0, #434c68);
    --border-color: light-dark(#e2e8f0, #434c68);

    --error-fg: light-dark(#dc2626, #f87171);

    --message-success-bg: light-dark(#f0fdf4, #14532d);
    --message-warning-bg: light-dark(#fefce8, #713f12);
    --message-error-bg: light-dark(#fef2f2, #7f1d1d);

    --darkened-bg: light-dark(#f8fafc, #232b40);
    --selected-bg: light-dark(#eef2ff, #312e81);
    --selected-row: light-dark(#eef2ff, #312e81);

    --button-fg: light-dark(#ffffff, #f8fafc);
    --button-bg: #475569;
    --button-hover-bg: light-dark(#334155, #64748b);
    --default-button-bg: #6366f1;
    --default-button-hover-bg: light-dark(#4f46e5, #818cf8);
    --close-button-bg: light-dark(#94a3b8, #475569);
    --close-button-hover-bg: #64748b;
    --delete-button-bg: light-dark(#dc2626, #ef4444);
    --delete-button-hover-bg: light-dark(#b91c1c, #f87171);

    --object-tools-fg: light-dark(#ffffff, #f8fafc);
    --object-tools-bg: #6366f1;
    --object-tools-hover-bg: light-dark(#4f46e5, #818cf8);

    --font-family-primary:
        "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol";

    --app-page-bg: light-dark(#f1f5f9, #1b2133);
    --app-card-shadow: 0 1px 2px light-dark(rgba(15, 23, 42, 0.06), rgba(0, 0, 0, 0.4)),
        0 1px 3px light-dark(rgba(15, 23, 42, 0.05), transparent);
    --app-radius: 8px;
    --app-radius-sm: 6px;

    --site-max-width: 1080px;
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 40px;
    --space-5: 64px;
}

/* Public site palette — light-only by design (base.css pins color-scheme: light). */
:root {
    --color-primary: #2D4182;
    --color-secondary: #FF9E0C;
    --color-grey-text: #8D8D8D;
    --color-bg: #FBFBFB;
    --color-bg-footer: #F5F5F5;
    --color-placeholder: #9C9C9C;
    --color-grey-border: #DFDFDF;
    --color-danger: #FA4040;
    --color-success: #2EA915;
    --color-status-draft: #DFDFDF;
    --color-status-pending: var(--color-secondary);
    --color-status-confirmed: var(--color-primary);
    --color-status-completed: #8D8D8D;
    --color-status-declined: var(--color-danger);
    --color-status-cancelled: var(--color-danger);
    --color-status-sent: var(--color-secondary);
    --color-status-signed: #2EA915;
    --color-status-superseded: #8D8D8D;
    --color-status-blocked: #4B5563;
    --color-status-blocked-stripe: #6B7280;
}
