/**
 * Reset ligero, tipografia base y elementos HTML.
 *
 * Los valores de color se toman siempre de tokens.css.
 */

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

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

body {
	margin: 0;
	font-family: var(--psc-font-body);
	font-size: var(--psc-text-base);
	line-height: 1.6;
	color: var(--psc-ink);
	background-color: var(--psc-surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--psc-space-4);
	font-family: var(--psc-font-heading);
	font-weight: 700;
	line-height: 1.15;
	color: var(--psc-ink);
	text-wrap: balance;
}

h1 {
	font-size: clamp(2rem, 5vw, var(--psc-text-3xl));
}

h2 {
	font-size: clamp(1.5rem, 3.5vw, var(--psc-text-2xl));
}

h3 {
	font-size: var(--psc-text-xl);
}

h4 {
	font-size: var(--psc-text-lg);
}

p {
	margin: 0 0 var(--psc-space-4);
}

a {
	color: var(--psc-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--psc-transition);
}

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

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

ul,
ol {
	padding-inline-start: var(--psc-space-6);
}

blockquote {
	margin: var(--psc-space-8) 0;
	padding-inline-start: var(--psc-space-6);
	border-inline-start: 4px solid var(--psc-accent);
	font-size: var(--psc-text-md);
}

code,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
}

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

th,
td {
	padding: var(--psc-space-3);
	border-bottom: 1px solid var(--psc-neutral-200);
	text-align: start;
}

/* El foco debe ser visible en todos los elementos interactivos. */
:focus-visible {
	outline: 2px solid var(--psc-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Visible solo para lectores de pantalla. */
.psc-sitio .screen-reader-text,
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.psc-sitio .screen-reader-text:focus {
	position: fixed;
	top: var(--psc-space-4);
	inset-inline-start: var(--psc-space-4);
	z-index: 1000;
	width: auto;
	height: auto;
	padding: var(--psc-space-3) var(--psc-space-4);
	clip: auto;
	color: var(--psc-ink);
	background: var(--psc-surface);
	border: 2px solid var(--psc-accent);
	border-radius: var(--psc-radius-sm);
	font-weight: 600;
}

/* Respetar la preferencia de movimiento reducido. */
@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;
	}
}

/* El icono hereda el color del texto. */
.psc-icono {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
	color: currentColor;
}
