/**
 * CFUL 2026 — Design tokens
 *
 * Single source of truth for color, typography, layout and spacing
 * custom properties. Loaded first in the design-system cascade
 * (see inc/enqueue.php) so every later stylesheet can rely on these.
 */

:root {
	/* Brand */
	--cful-black: #0c0c0c;
	--cful-black-rich: #0d0d0d; /* dark section bg + hero text */
	--cful-gray: #d4d4d4;
	--cful-white: #f6f0ed; /* page + header background */
	--cful-white-alt: #f2f0ef;
	--cful-accent: #c49a79; /* tan */
	--cful-taupe: #9d8778; /* section labels */

	/* Department palette */
	--dept-hphil: #206491; /* blue */
	--dept-lancog: #009191; /* teal */
	--dept-praxis: #c04418; /* rust */

	/* Per-site variant selector (each subsite overrides this single token) */
	--color-primary: var(--cful-accent);
	--color-primary-contrast: var(--cful-white);

	/* Semantic */
	--color-bg: var(--cful-white);
	--color-text: var(--cful-black);
	--color-border: var(--cful-black);
	--color-section-label: var(--cful-taupe);

	/* Footer (dark band) */
	--color-footer-bg: var(--cful-black);
	--color-footer-heading: var(--cful-white-alt); /* #F2F0EF */
	--color-footer-text: #d4d5d9;
	--color-footer-label: #d4d5d9;

	/* Typography */
	--font-sans: "Inter", system-ui, -apple-system, sans-serif;
	--font-serif: "STIX Two Text", Georgia, "Times New Roman", serif;
	--fw-regular: 400;
	--fw-medium: 500;
	--fw-semibold: 600;
	--fw-bold: 700;

	/*
	 * Type scale — respects the Figma step values exactly: 10, 14, 16, 18,
	 * 20, 24, 30, 36px. Each step's clamp MAX equals the true Figma px and is
	 * only reached at >=2100px; the interpolation runs on a 360->2100 track so
	 * "regular" ~1440 desktops land a bit under comp — the full Figma sizes
	 * read a touch large on a normal desktop. (Widening the anchor from 1920
	 * to 2100 shaves ~1px off each step at 1440 vs. the prior pass.) The
	 * preferred term keeps a rem part (not pure vw) so text still responds to
	 * browser zoom / user font-size. 10px is the floor (financiado-pela-UE
	 * caption only) and stays fixed. Comment shows min->max px; ~1440 landing
	 * noted where it differs.
	 */
	--text-2xs: 0.625rem; /* 10 (fixed — footer financiado caption only) */
	--text-xs: clamp(
		0.75rem,
		0.7241rem + 0.1149vw,
		0.875rem
	); /* 12 -> 14  (~13.2 @1440) */
	--text-footer: clamp(
		0.75rem,
		0.7241rem + 0.1149vw,
		0.875rem
	); /* 12 -> 14  (footer values) */
	--text-sm: clamp(
		0.8125rem,
		0.7737rem + 0.1724vw,
		1rem
	); /* 13 -> 16  (~14.9 @1440, body) */
	--text-md: clamp(
		0.875rem,
		0.8233rem + 0.2299vw,
		1.125rem
	); /* 14 -> 18  (~16.5 @1440) */
	--text-lg: clamp(
		0.9375rem,
		0.8728rem + 0.2874vw,
		1.25rem
	); /* 15 -> 20  (~18.1 @1440) */
	--text-xl: clamp(
		1.0625rem,
		0.972rem + 0.4023vw,
		1.5rem
	); /* 17 -> 24  (~21.3 @1440) */
	--text-2xl: clamp(
		1.1875rem,
		1.0453rem + 0.6322vw,
		1.875rem
	); /* 19 -> 30  (~25.8 @1440) */
	--text-3xl: clamp(
		1.375rem,
		1.194rem + 0.8046vw,
		2.25rem
	); /* 22 -> 36  (~30.7 @1440) */
	--leading-tight: 1.1;
	--leading-snug: 1.3;
	--leading-normal: 1.5;

	/* Layout */
	--container-max: 1440px;
	--container-pad: clamp(
		1.25rem,
		0.3413rem + 4.0385vw,
		5.1875rem
	); /* 20 -> 83, full at 1920 */
	--header-bar-h: 65px;
	--header-strip-h: 45px;

	/* Grid (12-column utility framework, see layout.css) */
	--grid-columns: 12;
	--grid-gap: var(--space-5);

	/* Radius / borders */
	--border-hairline: 0.5px solid var(--cful-black);
	--radius-card: 0px;

	/*
	 * Spacing scale — fluid on the same ~360px -> 1920px track as the type
	 * scale, so padding, gaps and vertical rhythm shrink with the viewport
	 * instead of staying comp-sized on smaller screens. --space-1 stays
	 * fixed (too small to be worth scaling). Comment shows min->max px.
	 */
	--space-1: 4px;
	--space-2: clamp(0.375rem, 0.3462rem + 0.1282vw, 0.5rem); /* 6 -> 8 */
	--space-3: clamp(0.5rem, 0.4423rem + 0.2564vw, 0.75rem); /* 8 -> 12 */
	--space-4: clamp(0.75rem, 0.6923rem + 0.2564vw, 1rem); /* 12 -> 16 */
	--space-5: clamp(1rem, 0.8846rem + 0.5128vw, 1.5rem); /* 16 -> 24 */
	--space-6: clamp(1.25rem, 1.0769rem + 0.7692vw, 2rem); /* 20 -> 32 */
	--space-7: clamp(1.75rem, 1.4615rem + 1.2821vw, 3rem); /* 28 -> 48 */
	--space-8: clamp(2.25rem, 1.8462rem + 1.7949vw, 4rem); /* 36 -> 64 */
	--space-9: clamp(3rem, 2.3077rem + 3.0769vw, 6rem); /* 48 -> 96 */
	--space-10: clamp(3.5rem, 2.4615rem + 4.6154vw, 8rem); /* 56 -> 128 */
	--space-11: clamp(4.5rem, 2.7692rem + 7.6923vw, 12rem); /* 72 -> 192 */
	--space-12: clamp(6rem, 3.6923rem + 10.2564vw, 16rem); /* 96 -> 256 */
}

/* Department theme variants — class added to <body> by cful_body_variant_class() in inc/template-tags.php */
.theme-hphil {
	--color-primary: var(--dept-hphil);
	--color-primary-contrast: #fff;
}
.theme-lancog {
	--color-primary: var(--dept-lancog);
	--color-primary-contrast: #fff;
}
.theme-praxis {
	--color-primary: var(--dept-praxis);
	--color-primary-contrast: #fff;
}
