/* ==== partial: 01-tokens.css ====
   Demande design system - tokens. Loads first; every other partial reads these custom properties.
   ======================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */

:root {
	--demande-primary: var(--wp--preset--color--primary, #60479b);
	--demande-primary-hover: var(--wp--preset--color--primary-hover, #4c377e);
	--demande-primary-active: color-mix(in srgb, var(--demande-primary) 64%, #000);
	--demande-primary-soft: var(--wp--preset--color--primary-soft, #ede7f8);
	--demande-heading: var(--wp--preset--color--heading, #281b40);
	--demande-body: var(--wp--preset--color--body, #453d52);
	--demande-muted: var(--wp--preset--color--muted, #6e637b);
	/* Fine print: helper copy is smaller and greyer than body text. */
	--demande-muted-fine: #767082;
	--demande-surface: var(--wp--preset--color--surface, #ffffff);
	--demande-lavender: var(--wp--preset--color--lavender, #f5f2fa);
	--demande-border: var(--wp--preset--color--border, #e7e0ef);
	--demande-border-strong: color-mix(in srgb, var(--demande-primary) 18%, var(--demande-border));
	--demande-border-input: var(--wp--preset--color--border-input, #958aa8);
	--demande-footer: var(--wp--preset--color--footer, #392653);

	--demande-success: var(--wp--preset--color--success, #1f6b45);
	--demande-success-soft: var(--wp--preset--color--success-soft, #e4f2e9);
	--demande-warning: var(--wp--preset--color--warning, #8a5a00);
	--demande-warning-soft: var(--wp--preset--color--warning-soft, #fbf0dc);
	--demande-danger: var(--wp--preset--color--danger, #a32b2b);
	--demande-danger-soft: var(--wp--preset--color--danger-soft, #fbe9e9);

	/* Footer ink (dark plum surface). */
	--demande-footer-fg: var(--wp--preset--color--footer-fg, #e8e2f3);
	--demande-footer-muted: var(--wp--preset--color--footer-muted, #c3b6da);
	/* Tint behind the unified header search field. */
	--demande-header-tint: var(--wp--preset--color--header-tint, #f8f6fb);

	--demande-radius-sm: 4px;
	--demande-radius: 8px;
	--demande-radius-lg: 12px;
	--demande-radius-pill: 999px;

	--demande-shadow-sm: 0 1px 2px color-mix(in srgb, var(--demande-heading) 5%, transparent);
	--demande-shadow-md: 0 4px 16px color-mix(in srgb, var(--demande-heading) 8%, transparent);
	--demande-shadow-lg: 0 12px 32px color-mix(in srgb, var(--demande-heading) 12%, transparent);
	--demande-shadow-button-hover: 0 6px 16px color-mix(in srgb, var(--demande-primary) 22%, transparent);
	--demande-shadow-button-focus: 0 0 0 3px color-mix(in srgb, var(--demande-primary) 28%, transparent);
	--demande-shadow-input-focus: 0 0 0 3px color-mix(in srgb, var(--demande-primary) 18%, transparent);

	--demande-container: 1320px;
	--demande-focus-ring: 2px solid var(--demande-primary);
	--demande-control-height: 48px;
	/* Compact control height for dense rows only (product-card CTA, inline links). */
	--demande-control-height-compact: 40px;
	--demande-border-thin: 1px solid var(--demande-border);
	/* One tracking value for every uppercase micro-label (eyebrows, chips, counters). */
	--demande-tracking-label: 0.14em;
	/* One section rhythm for every band; patterns must not set inline padding. */
	--demande-section-pad: 40px;
	--demande-section-pad-compact: 32px;

	/* Control typography shared by buttons, fields and commerce inputs. */
	--demande-font-body: var(--wp--preset--font-family--inter, "Inter", system-ui, sans-serif);
	--demande-font-heading: var(--wp--preset--font-family--dm-serif-display, "DM Serif Display", Georgia, serif);
	--demande-control-font-size: 1rem;
	--demande-control-line-height: 1.5;
	--demande-control-weight: 600;
	--demande-control-padding-block: 11px;
	--demande-control-padding-inline: var(--wp--preset--spacing--40, 24px);

	/* Compact spacing ramp used by the shared control geometry layer. */
	--demande-space-1: var(--wp--preset--spacing--20, 8px);
	--demande-space-2: var(--wp--preset--spacing--30, 16px);
	--demande-space-3: var(--wp--preset--spacing--40, 24px);
	--demande-space-4: var(--wp--preset--spacing--50, 32px);
	--demande-space-5: var(--wp--preset--spacing--60, 32px);
	--demande-space-6: var(--wp--preset--spacing--70, 40px);

	/* Shared responsive geometry: one content edge across every shell.
	   Tablet and mobile overrides live in the responsive block below. */
	--demande-gutter: var(--wp--custom--layout--gutter-desktop, 32px);

	--demande-transition: 160ms ease;
	--demande-transition-fast: 120ms ease;

	/* Sticky header row height (unified header: 88px single row, 127px once
	   the search field wraps below). theme.js replaces it with the measured
	   value; this is the no-JS and first-paint value. */
	--demande-header-height: 88px;
}

@media (max-width: 782px) {
	:root {
		--demande-header-height: 127px;
		--demande-section-pad: 24px;
		--demande-section-pad-compact: 24px;
	}
}

/* Legacy guard: older saved global styles can still reference the previous
 * spacing--60 (36px). Desktop presets now match theme.json (60=32, 70=40,
 * 80=48), so these pins only compress further on tablet/mobile. */
:is(.wp-site-blocks, .editor-styles-wrapper) {
	--wp--preset--spacing--60: 32px;
	--wp--preset--spacing--70: 40px;
	--wp--preset--spacing--80: 48px;
}

@media (max-width: 782px) {
	:is(.wp-site-blocks, .editor-styles-wrapper) {
		--wp--preset--spacing--60: 24px;
		--wp--preset--spacing--70: 32px;
		--wp--preset--spacing--80: 40px;
	}
}

