/*
Theme Name: MuniMatic
Theme URI: https://munimatic.com
Author: Really Simple Ltd.
Author URI: https://munimatic.com
Description: Block theme for the MuniMatic marketing site. Brand tokens match the MuniMatic app (navy, Old Glory red, steel, signal yellow; Playfair Display and Public Sans).
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.2
Version: 0.3.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: munimatic
*/

/*
 * Most styling lives in theme.json. This file only holds what theme.json
 * can't express. Keep it short.
 */

/*
 * Focus ring: 3px signal yellow, 2px offset, as in the app, plus a 2px navy
 * band filling the gap. Yellow alone is only 1.8:1 against white (WCAG 2.1
 * 1.4.11 wants 3:1); the navy band carries the contrast on light backgrounds,
 * and the yellow carries it on navy (8.1:1).
 */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--signal);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--wp--preset--color--navy);
}

/* Thin yellow accent rule under the header, echoing the favicon's stripe. */
.mm-header {
	border-bottom: 4px solid var(--wp--preset--color--signal);
}

/* Header links on navy: hover in signal yellow (red on navy fails contrast). */
.mm-header a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--signal);
}

/* Visually hidden text that screen readers still announce. */
.mm-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Respect people who've asked their system for less motion. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
