/*
 * Base: reset, tipografía y accesibilidad transversal.
 * Usa los tokens de theme.json (impresos como custom properties --wp--preset--*).
 */

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

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

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	line-height: 1.6;
}

img,
picture,
svg {
	max-width: 100%;
	display: block;
	height: auto;
}

a {
	color: var(--wp--preset--color--primary);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--wp--preset--color--accent);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--wp--preset--font-family--heading);
	line-height: 1.2;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

/* Foco visible en toda interacción de teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Salto al contenido */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--wp--preset--color--ink);
	color: #fff;
	padding: 0.75em 1.25em;
	border-radius: 0 0 8px 0;
}

.skip-link:focus {
	left: 0;
}

/* Formularios */
label {
	font-weight: 600;
	display: block;
	margin-bottom: 0.35em;
}

input[type="text"],
input[type="search"],
input[type="email"],
select {
	font: inherit;
	padding: 0.6em 0.8em;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
}

fieldset {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	padding: 1rem 1.25rem 1.25rem;
	margin: 0;
}

legend {
	font-weight: 700;
	padding: 0 0.4em;
}

button,
.wp-block-button__link {
	font: inherit;
	cursor: pointer;
}

/* Screen-reader only */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
