/*
Theme Name: Matterevo
Theme URI: https://matterevo.com
Description: Block theme for the Matterevo marketing site, blog, contact page and tool directory. Colors, type and spacing come from the Matterevo design system and live in theme.json; this file only holds what theme.json cannot express.
Version: 0.1.0
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 8.1
Author: Matterevo
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: matterevo
*/

/* Focus: 2px focus ring at 3px offset on every interactive element. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--focus);
	outline-offset: 3px;
}

/* Hover transitions on color only, removed for reduced motion. */
:where(a, .wp-element-button, .wp-block-button__link) {
	transition: background-color 150ms, border-color 150ms, color 150ms;
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* Dark style variation inverts the logo and icons (see styles/dark.json). */
.mx-logo img { display: block; height: 28px; width: auto; }
.mx-icon img { display: block; width: 24px; height: 24px; }

/* Directory cards fill their grid cell so rows line up. */
.wp-block-post-template.is-layout-grid > li > .wp-block-group { height: 100%; }

/* Contact form, rendered by the matterevo-site plugin. */
.mx-form { display: grid; gap: var(--wp--preset--spacing--4); }
.mx-form p { margin: 0; }
.mx-field { display: grid; gap: var(--wp--preset--spacing--1); }
.mx-field label { font-size: var(--wp--preset--font-size--small); font-weight: 500; }
.mx-field input,
.mx-field textarea {
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--text);
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--wp--custom--radius--sm);
	padding: 10px var(--wp--preset--spacing--3);
}
.mx-hint { font-size: var(--wp--preset--font-size--caption); color: var(--wp--preset--color--muted); }
.mx-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mx-notice { border-radius: var(--wp--custom--radius--md); padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--5); }
.mx-notice p { margin: 0; }
.mx-notice--success { background: var(--wp--preset--color--success-bg); color: var(--wp--preset--color--success); }
.mx-notice--danger { background: var(--wp--preset--color--danger-bg); color: var(--wp--preset--color--danger); }

/* Taxonomy lists in the tool directory render as chips. */
.mx-chips { display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--2); list-style: none; margin: 0; padding: 0; }
.mx-chips li a {
	display: inline-block;
	padding: 4px var(--wp--preset--spacing--3);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--surface);
	text-decoration: none;
}
.mx-chips li a:hover { background: var(--wp--preset--color--surface-hover); }
.mx-chips .current-cat a { background: var(--wp--preset--color--brand); border-color: var(--wp--preset--color--brand); color: var(--wp--preset--color--on-brand); }

/* Header, main and footer sit flush; sections own their spacing. */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Pills size to their text (styles/pill.json). */
.is-style-pill { width: fit-content; }

/* Keep the header call to action on one line on phones. */
header .wp-block-button__link { white-space: nowrap; }
