/*
 * Maps the GSF tokens to Avada's global variables. Loaded only when Avada Builder is active.
 *
 * Variable names verified on staging (Avada 7.16.2, 2026-10-07). Every reference falls back to
 * the --gsf-default-* value. Colour slots used the same way on all GSF sites:
 *   color1 house colour · color2 second colour · color4 button colour · color5 black · color6 white.
 * Avada's body/link colour points at the empty color8, so text maps to color5 instead.
 * The --gsf-on-color-* values are printed per site by the adapter (contrast against the palette).
 */
:root {
	--gsf-color-primary: var(--awb-color1, var(--gsf-default-color-primary));
	--gsf-color-secondary: var(--awb-color2, var(--gsf-default-color-secondary));
	--gsf-color-accent: var(--awb-color4, var(--gsf-default-color-accent));
	--gsf-color-text: var(--awb-color5, var(--gsf-default-color-text));
	--gsf-color-surface: var(--awb-color6, var(--gsf-default-color-surface));
	/* Fallback: color1 darkened. The adapter overrides this per site with the darkest palette
	   colour that has 7:1 contrast with white, when the palette has one (GSF_Avada_Palette). */
	--gsf-color-surface-dark: hsla(
		var(--awb-color1-h, 201),
		var(--awb-color1-s, 54%),
		calc(var(--awb-color1-l, 53%) - 25%),
		1
	);

	--gsf-color-heading-1: var(--h1_typography-color, var(--gsf-color-secondary));
	--gsf-color-heading-2: var(--h2_typography-color, var(--gsf-color-secondary));
	--gsf-color-heading-3: var(--h3_typography-color, var(--gsf-color-secondary));

	--gsf-font-heading: var(--awb-typography2-font-family, var(--gsf-default-font-heading));
	--gsf-font-body: var(--awb-typography4-font-family, var(--gsf-default-font-body));

	--gsf-text-h1-max: var(--awb-typography1-font-size, 62px);
	--gsf-text-h1-line-height: var(--awb-typography1-line-height, 1.3);
	--gsf-text-h1-letter-spacing: var(--awb-typography1-letter-spacing, -0.015em);
	--gsf-text-h1-transform: var(--awb-typography1-text-transform, uppercase);
	--gsf-text-h2-max: var(--awb-typography2-font-size, 38px);
	--gsf-text-h2-line-height: var(--awb-typography2-line-height, 1.3);
	--gsf-text-h2-letter-spacing: var(--awb-typography2-letter-spacing, 0);
	--gsf-text-h2-transform: var(--awb-typography2-text-transform, none);
	--gsf-text-h3-max: var(--awb-typography3-font-size, 26px);
	--gsf-text-h3-line-height: var(--awb-typography3-line-height, 1.3);
	--gsf-text-h3-letter-spacing: var(--awb-typography3-letter-spacing, 0.015em);
	--gsf-text-h3-transform: var(--awb-typography3-text-transform, none);
	--gsf-text-body-size: var(--awb-typography4-font-size, 20px);
	--gsf-text-body-line-height: var(--awb-typography4-line-height, 1.3);
	--gsf-text-body-letter-spacing: var(--awb-typography4-letter-spacing, 0.015em);
	--gsf-text-lead-size: var(--awb-typography5-font-size, 24px);
	--gsf-text-lead-weight: var(--awb-typography5-font-weight, 700);
	--gsf-text-lead-line-height: var(--awb-typography5-line-height, 1.3);
	--gsf-text-quote-size: var(--awb-custom_typography_1-font-size, 34px);
	--gsf-text-quote-font: var(--awb-custom_typography_1-font-family, var(--gsf-font-heading));
	--gsf-text-quote-line-height: var(--awb-custom_typography_1-line-height, 1.3);

	--gsf-radius: var(--button-border-radius-top-left, 10px);
	--gsf-content-width: var(--site_width, 1280px);
	/* Side padding of full-width blocks = Avada's padding for 100%-width containers, so their
	   content lines up with Avada containers at every width (20px on all GSF sites, 2026-11). */
	--gsf-space-gutter: var(--hundredp_padding, clamp(20px, 4vw, 30px));
}
