/**
 * ABZiel design tokens – the single source for colours, type, spacing, radii, depth and motion.
 *
 * Loaded on every front-end page before the child theme and all ABZiel component styles
 * (handle "abziel-tokens"). Use the tokens via var(--abz-…); do not introduce new hard-coded values.
 *
 * Brand colours and fonts follow the Elementor global kit (Elementor > Site Settings): Elementor
 * defines its --e-global-* variables on <body> (".elementor-kit-N"), so the tokens are declared on
 * :root (fallback values, used e.g. in the editor panel) and again on body, where the kit values
 * resolve. Changing a global colour in Elementor therefore changes the whole site.
 *
 * Rules and roles: CLAUDE.md (section "Design system") and docs/design-audit.md.
 */

:root,
body {
	/* ---------- Colour: brand (linked to the Elementor kit) ---------- */
	--abz-navy-900: var(--e-global-color-abznavy, #0A2552);   /* dark surfaces: hero, stats, CTA */
	--abz-navy-800: var(--e-global-color-primary, #0B2D6B);   /* headings, strong text, brand */
	--abz-blue-600: var(--e-global-color-secondary, #1366D6); /* links, focus ring, interactive icons */
	--abz-red-600: var(--e-global-color-accent, #D7141E);     /* primary action */
	--abz-red-700: var(--e-global-color-abzredhv, #B10F18);   /* hover of primary, red text on white */
	--abz-text: var(--e-global-color-text, #45526A);          /* body text */
	--abz-surface: var(--e-global-color-abzsurf, #EEF2F6);    /* tinted sections */
	--abz-line: var(--e-global-color-abzline, #E3E8EF);       /* hairlines, card borders */
	--abz-white: var(--e-global-color-abzwhite, #FFFFFF);

	/* ---------- Colour: extended palette ---------- */
	--abz-blue-700: #1274AE;        /* course-card titles (AA) */
	--abz-blue-50: #EAF2FD;         /* light-blue hover fill */
	--abz-red-50: #FDECEC;          /* light-red icon tile */
	--abz-green-700: #2B7F0E;       /* "Kostenlos" (AA) */
	--abz-text-strong: #2B3A55;     /* values in the course information list */
	--abz-text-muted: #5B6780;      /* secondary text, empty states */
	--abz-ink: #0F1851;             /* text of the course cards (client reference) */
	--abz-ink-soft: #4F5A82;        /* category badge text (client reference) */
	--abz-surface-subtle: #F1F4F8;  /* hover fill of menu items */
	--abz-line-subtle: #EEF1F5;     /* separators inside panels */
	--abz-line-control: #D9DFEA;    /* borders of buttons/controls (pagination, menu toggle) */
	--abz-line-input: #7D8AA3;      /* borders of form fields: search, select, view switch (3:1 on white) */
	--abz-line-on-dark: rgba(255, 255, 255, .14); /* separators on navy */
	--abz-text-on-dark: #DCE5F2;       /* lead text on navy (as in the Elementor data) */
	--abz-text-on-dark-muted: #C9D6EA; /* labels, breadcrumbs on navy */

	/* ---------- Typography ---------- */
	--abz-font-heading: var(--e-global-typography-primary-font-family, "Plus Jakarta Sans"), sans-serif;
	--abz-font-text: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
	--abz-fs-12: 12px;  /* uppercase labels */
	--abz-fs-13: 13px;  /* captions, file meta */
	--abz-fs-14: 14px;  /* small text, meta */
	--abz-fs-15: 15px;  /* UI text, menu, compact values */
	--abz-fs-16: 16px;  /* body */
	--abz-fs-17: 17px;  /* card footer actions */
	--abz-fs-18: 18px;  /* lead (mobile), small headings */
	--abz-fs-20: 20px;  /* card titles */
	--abz-fs-h1: clamp(34px, calc(25.6px + 1.8vw), 48px);   /* page titles, 390 → 1440 px */
	--abz-fs-h2: clamp(28px, calc(25px + .77vw), 36px);     /* section titles */
	--abz-fs-lead: clamp(17px, calc(16.25px + .19vw), 19px); /* intro text */
	--abz-lh-heading: 1.1;
	--abz-lh-tight: 1.2;
	--abz-lh-snug: 1.35;
	--abz-lh-text: 1.6;
	--abz-weight-text: 400;
	--abz-weight-nav: 500;   /* main navigation links */
	--abz-weight-ui: 600;
	--abz-weight-heading: 700;
	--abz-weight-display: 800;
	--abz-tracking-label: .06em;
	--abz-tracking-title: -.015em;

	/* ---------- Spacing (4 px base) ---------- */
	--abz-space-1: 4px;
	--abz-space-2: 8px;
	--abz-space-3: 12px;
	--abz-space-4: 16px;
	--abz-space-5: 20px;
	--abz-space-6: 24px;
	--abz-space-8: 32px;
	--abz-space-12: 48px;
	--abz-space-16: 64px;
	--abz-space-24: 96px;
	--abz-space-32: 128px;
	--abz-container: 1200px;
	--abz-gutter: 20px;

	/* ---------- Layout: sticky site header ---------- */
	/* Height of the sticky site header (Elementor header template) and of the WordPress admin bar.
	   Anything that sticks below the header uses --abz-sticky-top. Update the value here if the header changes. */
	--abz-site-header-height: 85px;
	--abz-admin-bar-height: 0px;
	--abz-sticky-top: calc(var(--abz-site-header-height) + var(--abz-admin-bar-height));

	/* ---------- Shape ---------- */
	--abz-radius-xs: 2px;   /* badges laid over images */
	--abz-radius-sm: 4px;   /* focus ring, icon-only toggles */
	--abz-radius-md: 6px;   /* buttons (= Elementor kit), menu items */
	--abz-radius-lg: 8px;   /* controls: pagination, menu toggle */
	--abz-radius-xl: 10px;  /* panels: dropdown, flyer cards, icon tiles */
	--abz-radius-2xl: 12px; /* homepage focus cards, mobile menu panel (legacy; course cards use no radius since P3) */

	/* ---------- Depth (shadow colour: navy 900) ---------- */
	--abz-navy-900-rgb: 10, 37, 82; /* navy 900 as RGB channels for rgba(): shadows, transparent navy */
	--abz-shadow-header: 0 6px 18px -16px rgba(var(--abz-navy-900-rgb), .5);
	--abz-shadow-pressed: 0 6px 14px -8px rgba(var(--abz-navy-900-rgb), .6);
	--abz-shadow-soft: 0 10px 28px -22px rgba(var(--abz-navy-900-rgb), .45);
	--abz-shadow-card: 0 14px 34px -18px rgba(var(--abz-navy-900-rgb), .35);
	--abz-shadow-card-hover: 0 20px 40px -18px rgba(var(--abz-navy-900-rgb), .45);
	--abz-shadow-overlay: 0 18px 40px -12px rgba(var(--abz-navy-900-rgb), .25);
	--abz-shadow-panel: 0 24px 50px -12px rgba(var(--abz-navy-900-rgb), .3);

	/* ---------- Motion ---------- */
	--abz-duration-fast: .15s;
	--abz-duration: .2s;
	--abz-duration-slow: .35s;
	--abz-ease: ease;
	--abz-lift: -3px;
	--abz-zoom: 1.04;
}

/* Header height per breakpoint (Elementor mobile ≤ 767 px); admin bar is fixed only above 782 px. */
@media (max-width: 767px) {
	:root,
	body {
		--abz-site-header-height: 69px;
	}
}

body.admin-bar {
	--abz-admin-bar-height: 32px;
}

@media (max-width: 782px) {
	body.admin-bar {
		--abz-admin-bar-height: 0px;
	}
}
