/* ==========================================================================
   Base — reset, typography, accessibility helpers.

   Design tokens come from theme.json:
     --wp--preset--color--{slug}       --wp--preset--spacing--{10..70}
     --wp--preset--font-size--{slug}   --wp--preset--shadow--{sm|md|lg}
     --wp--custom--radius--{sm|md|lg}  --wp--custom--transition
   Never hard-code colors or spacing here: add a token to theme.json instead.
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
video {
	max-width: 100%;
	height: auto;
}

h1, h2, h3, h4, h5, h6 {
	margin-block: 0 0.5em;
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

a {
	text-underline-offset: 0.15em;
	transition: color var(--wp--custom--transition);
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

[tabindex="-1"]:focus {
	outline: none;
}

input,
textarea,
select,
button {
	font: inherit;
	color: inherit;
}

/* Icons (inline SVG from /assets/icons, see clica_icon()) */
.icon {
	display: inline-block;
	width: 1.25em;
	height: 1.25em;
	flex-shrink: 0;
	vertical-align: middle;
}

/* Accessibility --------------------------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

.skip-link:focus {
	position: fixed !important;
	top: var(--wp--preset--spacing--20);
	left: var(--wp--preset--spacing--20);
	z-index: 100000;
	width: auto;
	height: auto;
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	clip: auto;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--md);
	border-radius: var(--wp--custom--radius--sm);
}

/* WordPress core classes ------------------------------------------------ */
.alignleft {
	float: left;
	margin-inline-end: var(--wp--preset--spacing--40);
}

.alignright {
	float: right;
	margin-inline-start: var(--wp--preset--spacing--40);
}

.aligncenter {
	margin-inline: auto;
}

.wp-caption-text,
.wp-element-caption {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
