/**
 * DAMF design tokens.
 *
 * Single source of truth for the brand system. These same values are pushed
 * into Elementor's Global Colors / Global Fonts in inc/elementor.php, so an
 * editor picking "Primary" in the Elementor UI gets exactly --damf-navy.
 *
 * Brand palette is from DAMF_Brand_Guidelines.pptx (slide 03). The neutrals
 * below it are the working greys the guidelines call for as "structure" —
 * table stripes, hairlines, muted captions.
 */

:root {
	/* --- Brand ------------------------------------------------------ */
	--damf-navy: #3e4792;        /* Primary. Headings, table headers, footers. */
	--damf-red: #ed3337;         /* Accent. Eyebrows, warnings, one per page.  */
	--damf-lavender: #d5d5e4;    /* Supporting. Never a primary brand colour.  */
	--damf-white: #ffffff;       /* Base. */

	/* --- Neutrals --------------------------------------------------- */
	--damf-navy-deep: #24284a;   /* Footer field, body headings on light.      */
	--damf-text: #24284a;        /* Default text.                              */
	--damf-text-muted: #55597c;  /* Body copy, paragraphs.                     */
	--damf-text-faint: #8b8fb0;  /* Captions, meta, disabled.                  */
	--damf-rule: #e4e4ee;        /* Hairlines, card borders.                   */
	--damf-tint: #f7f7fb;        /* Panel fill.                                */
	--damf-tint-alt: #fafafd;    /* Alternating section fill.                  */

	/* --- Type ------------------------------------------------------- *
	 * Cambria/Calibri are Microsoft system fonts and cannot be served as
	 * webfonts. Caladea and Carlito are metrically identical open-licence
	 * substitutes, so line breaks match the Word-based TDS/SDS documents
	 * on machines that lack the Microsoft originals.
	 */
	--damf-font-heading: Cambria, Caladea, Georgia, "Times New Roman", serif;
	--damf-font-body: Calibri, Carlito, Candara, "Segoe UI", system-ui, sans-serif;
	--damf-font-arabic: Tajawal, var(--damf-font-body);

	/* Type scale. Body 16/26 and eyebrow 13 bold tracked come straight
	   from the guidelines (slide 04); the rest extends that ratio. */
	--damf-text-xs: 0.6875rem;   /* 11px — card eyebrows            */
	--damf-text-sm: 0.8125rem;   /* 13px — eyebrow / meta           */
	--damf-text-base: 1rem;      /* 16px — body                     */
	--damf-text-md: 1.0625rem;   /* 17px — lead-in body             */
	--damf-text-lg: 1.25rem;     /* 20px — sub-header               */
	--damf-text-xl: 1.5rem;      /* 24px — section header           */
	--damf-text-2xl: 1.75rem;    /* 28px — page section header      */
	--damf-text-3xl: 2.125rem;   /* 34px — page title               */
	--damf-text-4xl: 2.875rem;   /* 46px — hero                     */

	--damf-leading-tight: 1.15;
	--damf-leading-snug: 1.35;
	--damf-leading-normal: 1.625; /* 16/26 */
	--damf-leading-loose: 2;      /* advantage lists, footer columns */

	--damf-tracking-eyebrow: 0.1em;
	--damf-tracking-wordmark: 0.02em;

	/* --- Space ------------------------------------------------------ */
	--damf-space-1: 0.25rem;
	--damf-space-2: 0.5rem;
	--damf-space-3: 0.75rem;
	--damf-space-4: 1rem;
	--damf-space-5: 1.25rem;
	--damf-space-6: 1.5rem;
	--damf-space-8: 2rem;
	--damf-space-10: 2.5rem;
	--damf-space-12: 3rem;
	--damf-space-14: 3.5rem;
	--damf-space-16: 4rem;

	--damf-gutter: clamp(1.25rem, 3.334vw, 3rem);
	--damf-container: 1440px;
	--damf-container-prose: 72ch;

	/* --- Form ------------------------------------------------------- */
	--damf-radius: 3px;          /* Buttons, inputs, tags. */
	--damf-radius-lg: 6px;       /* Media, hero imagery.   */
	--damf-border: 1px solid var(--damf-rule);
	--damf-focus-ring: 2px solid var(--damf-red);
	--damf-focus-offset: 2px;

	--damf-shadow-sm: 0 4px 12px rgba(36, 40, 74, 0.08);
	--damf-shadow-md: 0 12px 32px rgba(36, 40, 74, 0.14);

	--damf-transition: 160ms ease;
}

/* The navy→red footer rule, per guidelines slide 05. Flips with direction so
   the red stays on the trailing edge in RTL. */
.damf-rule {
	block-size: 4px;
	background: linear-gradient(
		to var(--damf-rule-dir, right),
		var(--damf-navy) 70%,
		var(--damf-red) 70%
	);
}

[dir="rtl"] .damf-rule {
	--damf-rule-dir: left;
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--damf-transition: 0ms;
	}
}
