/**
 * Base — reset y elementos tipográficos crudos.
 * Mobile-first. Sin frameworks externos.
 */

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

* {
	margin: 0;
}

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

body {
	min-height: 100vh;
	font-family: var(--font-body);
	font-size: var(--fs-400);
	line-height: var(--lh-normal);
	color: var(--color-ink);
	background: var(--vx-paper);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: var(--lh-tight);
	letter-spacing: -0.01em;
	color: var(--color-ink);
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-900);
}

h2 {
	font-size: var(--fs-800);
}

h3 {
	font-size: var(--fs-700);
}

h4 {
	font-size: var(--fs-600);
}

p {
	max-width: 65ch;
}

p,
li {
	color: var(--color-ink-soft);
}

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	list-style: none;
	padding: 0;
}

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

button {
	cursor: pointer;
	background: none;
	border: none;
}

table {
	border-collapse: collapse;
	width: 100%;
}

fieldset {
	border: none;
}

:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 3px;
}

::selection {
	background: var(--color-brand-primary);
	color: var(--color-surface);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	top: var(--space-3);
	left: var(--space-3);
	z-index: 999;
	width: auto;
	height: auto;
	padding: var(--space-3) var(--space-4);
	background: var(--color-surface);
	color: var(--color-ink);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-md);
	clip: auto;
}

/* El catálogo debe ser usable aunque el JS falle o el usuario pida menos
   movimiento — nunca ocultar contenido detrás de una animación que dependa
   de JS para revelarse. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
