/*
 * Meltingplot — WCAG Switchable Contrast System
 *
 * Level A  (default): CI-faithful colors. Best brand fidelity.
 * Level AA (body.contrast-aa): All text ≥4.5:1 on respective backgrounds.
 * Level AAA (body.contrast-aaa): All text ≥7:1 on respective backgrounds.
 *
 * The theme uses semantic tokens:
 *   accent / accent-light   — blue on light / dark backgrounds
 *   muted / muted-light     — gray on light / dark backgrounds
 *   neutral-400             — light gray for dark backgrounds (footer, subtitles)
 *
 * Each contrast level only overrides the CSS custom property values.
 * No context selectors needed — the correct token is chosen in the markup.
 *
 * Switching: WordPress Customizer → WCAG-Kontraststufe
 * OS-level: @media (prefers-contrast: more) auto-enables AA
 */

/* ================================================================
   LEVEL A — CI-Faithful (default)
   theme.json values are the CI colors. No overrides.
   ================================================================ */

/* Hero text box: semi-transparent dark background for guaranteed contrast
   on cover images, regardless of image content. */
.mp-hero-text-box {
	background: rgba(26, 31, 36, 0.75);
	border-radius: var(--wp--custom--border-radius--medium);
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
}

/* Trust card borders */
.mp-trust-card {
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--accent) 25%, transparent);
	border-radius: var(--wp--custom--border-radius--medium);
}

/* Accent text utility (tables, highlights) */
.mp-accent-text {
	color: var(--wp--preset--color--accent);
}

/* CTA hint box (white semi-transparent border on dark bg) */
.mp-cta-hint {
	border: 1px solid rgba(255, 255, 255, 0.19);
}

/* ================================================================
   LEVEL AA — Recommended
   Darken light-bg colors, brighten dark-bg colors for 4.5:1 minimum.
   ================================================================ */
body.contrast-aa {
	--wp--preset--color--accent: #006FA3;       /* 4.7:1 on white, 4.5:1 on surface */
	--wp--preset--color--accent-light: #5CC4E8; /* 5.5:1 on #1A1F24 */
	--wp--preset--color--muted-light: #B8C8D6;  /* 7.0:1 on #1A1F24 */
}

/* ================================================================
   LEVEL AAA — Maximum Contrast
   All text ≥7:1 on respective backgrounds.
   ================================================================ */
body.contrast-aaa {
	--wp--preset--color--accent: #005A8C;        /* 7.3:1 on white */
	--wp--preset--color--accent-light: #A0DFEF;  /* 8.0:1 on #1A1F24 */
	--wp--preset--color--muted: #3A4555;         /* 7.5:1 on white */
	--wp--preset--color--muted-light: #C0D0DC;   /* 8.5:1 on #1A1F24 */
	--wp--preset--color--neutral-400: #D0DDE8;   /* 9.0:1 on #1A1F24 */
}

/* ================================================================
   OS-LEVEL: prefers-contrast
   Auto-enable AA for users with OS accessibility settings.
   ================================================================ */
@media (prefers-contrast: more) {
	body:not(.contrast-aa):not(.contrast-aaa) {
		--wp--preset--color--accent: #006FA3;
		--wp--preset--color--accent-light: #5CC4E8;
		--wp--preset--color--muted-light: #B8C8D6;
	}
}
