/*
 * Design tokens: a modern, slick, monochrome-plus-one-accent palette (near-
 * black ink, white, cool grays, one vivid indigo accent), a compact type
 * scale, spacing scale, radii, shadows, and motion easing. Every other
 * stylesheet reads from these custom properties only — no hard-coded colours
 * or sizes elsewhere, so the whole site restyles from this one file.
 *
 * Fonts: a safe, self-contained system stack (no external font requests, so
 * performance and "no CDN" requirements hold by default) — a single sans
 * family for both headings and body keeps the look modern/tech rather than
 * editorial. Drop licensed webfonts into assets/fonts/ and add @font-face
 * blocks here, then update --font-sans, to upgrade typography later.
 */

:root {
	/* Colour palette — monochrome base, one accent */
	--color-ink: #0a0a0c;
	--color-ink-soft: #17181c;
	--color-white: #ffffff;
	--color-gray-50: #f6f7f9;
	--color-gray-100: #eceef1;
	--color-gray-300: #d7dae0;
	--color-gray-500: #6b7280;
	--color-gray-700: #3a3f47;
	--color-accent: #375dfb;
	--color-accent-dark: #2547d6;
	--color-accent-soft: #eaefff;

	--color-surface: var(--color-white);
	--color-surface-alt: var(--color-gray-50);
	--color-surface-dark: var(--color-ink);
	--color-text: var(--color-ink);
	--color-text-inverse: var(--color-white);
	--color-text-muted: var(--color-gray-500);
	--color-text-muted-inverse: #a3a7b0;
	--color-border: var(--color-gray-300);
	--color-border-dark: rgba(255, 255, 255, 0.12);
	--color-link: var(--color-accent);
	--color-focus: var(--color-accent);

	--color-success-bg: #e9f7ef;
	--color-success-text: #16663f;
	--color-error-bg: #fdecec;
	--color-error-text: #92251f;

	/* Typography — compact scale, single sans family throughout */
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--text-xs: 0.75rem;
	--text-sm: 0.875rem;
	--text-base: 1rem;
	--text-md: 1.125rem;
	--text-lg: clamp(1.25rem, 1.15rem + 0.4vw, 1.4rem);
	--text-xl: clamp(1.5rem, 1.3rem + 0.8vw, 1.85rem);
	--text-2xl: clamp(1.85rem, 1.5rem + 1.4vw, 2.35rem);
	--text-3xl: clamp(2.15rem, 1.65rem + 2vw, 2.85rem);

	--leading-tight: 1.2;
	--leading-snug: 1.4;
	--leading-normal: 1.6;

	--tracking-tight: -0.01em;
	--tracking-normal: 0;
	--tracking-wide: 0.03em;
	--tracking-wider: 0.1em;

	--measure: 58ch;

	/* Spacing scale — kept tighter than a typical editorial layout */
	--space-3xs: 0.25rem;
	--space-2xs: 0.5rem;
	--space-xs: 0.75rem;
	--space-sm: 1rem;
	--space-md: 1.5rem;
	--space-lg: 2rem;
	--space-xl: 3rem;
	--space-2xl: 4rem;
	--space-3xl: 6rem;

	--container-max: 1240px;
	--container-narrow: 720px;

	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--radius-pill: 999px;

	--shadow-xs: 0 1px 2px rgba(10, 10, 12, 0.05);
	--shadow-sm: 0 4px 12px rgba(10, 10, 12, 0.06);
	--shadow-md: 0 12px 32px rgba(10, 10, 12, 0.12);
	--shadow-lg: 0 24px 56px rgba(10, 10, 12, 0.18);

	--ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
	--motion-fast: 160ms var(--ease-premium);
	--motion-normal: 280ms var(--ease-premium);
	--motion-slow: 440ms var(--ease-premium);
}

@media (prefers-color-scheme: dark) {
	:root {
		--color-surface: var(--color-ink);
		--color-surface-alt: #1c1d21;
		--color-text: var(--color-white);
		--color-text-muted: #a3a7b0;
		--color-border: #2b2c31;
		--color-border-dark: rgba(255, 255, 255, 0.12);
	}
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--motion-fast: 0ms;
		--motion-normal: 0ms;
		--motion-slow: 0ms;
	}
}
