/**
 * RCS design tokens.
 *
 * Clinical / trust-first palette. Custom properties only — this file paints nothing.
 *
 * NOTE: the base theme sets `html { font-size: 62.5% }`, so 1rem = 10px at default
 * browser settings. All rem values below are written against that base and still
 * scale with the user's browser font-size preference.
 *
 * Contrast ratios (WCAG 2.x) are listed in UI-MODERNIZATION.md.
 */

/* IBM Plex, self-hosted (SIL OFL 1.1, see assets/fonts/plex/OFL.txt). Latin subset. */
@font-face {
	font-display: swap;
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 400;
	src: url("../fonts/plex/ibm-plex-sans-400.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 500;
	src: url("../fonts/plex/ibm-plex-sans-500.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 600;
	src: url("../fonts/plex/ibm-plex-sans-600.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "IBM Plex Serif";
	font-style: normal;
	font-weight: 500;
	src: url("../fonts/plex/ibm-plex-serif-500.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "IBM Plex Serif";
	font-style: normal;
	font-weight: 600;
	src: url("../fonts/plex/ibm-plex-serif-600.woff2") format("woff2");
}

:root {

	/* Primary blue */
	--rcs-blue-50: #f2f7fc;
	--rcs-blue-100: #e1edf8;
	--rcs-blue-200: #bfd8ef;
	--rcs-blue-500: #2873b8;
	--rcs-blue-600: #1a5fa0;
	--rcs-blue-700: #124e82;
	--rcs-blue-800: #0e3d66;
	--rcs-blue-900: #0a2540;

	/* Neutrals (cool grey) */
	--rcs-white: #ffffff;
	--rcs-grey-50: #f8fafb;
	--rcs-grey-100: #f1f4f7;
	--rcs-grey-200: #e1e6eb;
	--rcs-grey-300: #c9d1d9;
	--rcs-grey-500: #5f6c79;
	--rcs-grey-600: #4f5d6b;
	--rcs-grey-700: #3a4856;
	--rcs-grey-900: #15202b;

	/* Status */
	--rcs-success-700: #1b6b3a;
	--rcs-success-50: #e6f4ea;
	--rcs-warning-800: #7a4d00;
	--rcs-warning-50: #fff4d6;
	--rcs-danger-700: #a32020;
	--rcs-danger-50: #fdeaea;

	/* Accent: the warm end of the nuclear-medicine colour scale. Graphics only, never text. */
	--rcs-amber-300: #f0b35a;
	--rcs-amber-500: #c2710c;

	/* Semantic aliases */
	--rcs-color-bg: var(--rcs-white);
	--rcs-color-bg-subtle: var(--rcs-grey-50);
	--rcs-color-bg-tint: var(--rcs-blue-50);
	--rcs-color-surface: var(--rcs-white);
	--rcs-color-border: var(--rcs-grey-200);
	--rcs-color-border-strong: var(--rcs-grey-300);
	--rcs-color-text: var(--rcs-grey-900);
	--rcs-color-text-muted: var(--rcs-grey-600);
	--rcs-color-heading: var(--rcs-blue-900);
	--rcs-color-link: var(--rcs-blue-600);
	--rcs-color-link-hover: var(--rcs-blue-800);
	--rcs-color-action: var(--rcs-blue-600);
	--rcs-color-action-hover: var(--rcs-blue-700);
	--rcs-color-on-action: var(--rcs-white);
	--rcs-color-focus: var(--rcs-blue-500);

	/* Spacing (4px grid) */
	--rcs-space-1: 0.4rem;
	--rcs-space-2: 0.8rem;
	--rcs-space-3: 1.2rem;
	--rcs-space-4: 1.6rem;
	--rcs-space-5: 2.4rem;
	--rcs-space-6: 3.2rem;
	--rcs-space-7: 4.8rem;
	--rcs-space-8: 6.4rem;
	--rcs-space-9: 9.6rem;

	/* Radii */
	--rcs-radius-sm: 0.4rem;
	--rcs-radius-md: 0.8rem;
	--rcs-radius-lg: 1.2rem;
	--rcs-radius-pill: 999px;

	/* Shadows */
	--rcs-shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06);
	--rcs-shadow-md: 0 2px 4px rgba(10, 37, 64, 0.05), 0 8px 24px rgba(10, 37, 64, 0.07);
	--rcs-shadow-focus: 0 0 0 3px var(--rcs-white), 0 0 0 6px var(--rcs-color-focus);

	/* Typography */
	--rcs-font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--rcs-font-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;
	--rcs-text-xs: 1.3rem;
	--rcs-text-sm: 1.5rem;
	--rcs-text-base: 1.7rem;
	--rcs-text-lg: 2rem;
	--rcs-text-xl: 2.4rem;
	--rcs-text-2xl: 3.2rem;
	--rcs-text-3xl: clamp(3.2rem, 2.2rem + 3.2vw, 5.2rem);
	--rcs-leading-tight: 1.15;
	--rcs-leading-snug: 1.35;
	--rcs-leading-body: 1.65;
	--rcs-weight-regular: 400;
	--rcs-weight-medium: 500;
	--rcs-weight-semibold: 600;
	--rcs-weight-bold: 600; /* Plex is loaded up to 600 */

	/* Containers */
	--rcs-container-narrow: 72rem;
	--rcs-container: 112rem;
	--rcs-container-wide: 128rem;
	--rcs-gutter: clamp(1.6rem, 4vw, 4rem);

	/* Motion */
	--rcs-duration: 160ms;
	--rcs-ease: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-reduced-motion: reduce) {

	:root {
		--rcs-duration: 0ms;
	}
}
