/* =========================================================================
 * Rodando Van — Base
 * Reset moderno + tipografía + layout primitives.
 * ========================================================================= */

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

html {
	-webkit-text-size-adjust: 100%;
	-moz-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--rv-header-h) + 16px);
}

body {
	margin: 0;
	background: var(--rv-bg);
	color: var(--rv-text);
	font-family: var(--rv-font-sans);
	font-size: var(--rv-text-base);
	line-height: var(--rv-leading-normal);
	font-feature-settings: "kern", "liga", "calt", "ss01";
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

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

a {
	color: var(--rv-primary-dark);
	text-decoration-color: color-mix(in srgb, var(--rv-primary) 40%, transparent);
	text-underline-offset: 3px;
	transition: color var(--rv-duration) var(--rv-ease);
}
a:hover { color: var(--rv-primary); }

::selection { background: var(--rv-primary); color: white; }

:focus-visible {
	outline: none;
	box-shadow: var(--rv-ring);
	border-radius: var(--rv-radius-sm);
}

/* --- Tipografía --- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--rv-font-serif);
	color: var(--rv-ink);
	letter-spacing: var(--rv-tracking-tight);
	line-height: var(--rv-leading-tight);
	margin: 0 0 var(--rv-space-4);
	font-weight: 700;
}

h1 { font-size: var(--rv-text-4xl); }
h2 { font-size: var(--rv-text-3xl); }
h3 { font-size: var(--rv-text-2xl); }
h4 { font-size: var(--rv-text-xl); }
h5 { font-size: var(--rv-text-lg); }
h6 { font-size: var(--rv-text-base); text-transform: uppercase; letter-spacing: var(--rv-tracking-wide); }

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

strong, b { font-weight: 700; color: var(--rv-ink); }
em, i { font-style: italic; }

small { font-size: var(--rv-text-sm); color: var(--rv-muted); }

hr {
	border: 0;
	border-top: 1px solid var(--rv-line);
	margin: var(--rv-space-7) 0;
}

ul, ol { padding-left: 1.25em; margin: 0 0 var(--rv-space-4); }
li { margin-bottom: var(--rv-space-2); }

blockquote {
	margin: var(--rv-space-6) 0;
	padding: var(--rv-space-4) var(--rv-space-5);
	border-left: 3px solid var(--rv-primary);
	background: var(--rv-primary-soft);
	border-radius: 0 var(--rv-radius) var(--rv-radius) 0;
	font-family: var(--rv-font-serif);
	font-style: italic;
	font-size: var(--rv-text-lg);
	color: var(--rv-ink);
}
blockquote p:last-child { margin-bottom: 0; }

code {
	font-family: var(--rv-font-mono);
	font-size: 0.9em;
	background: var(--rv-primary-soft);
	color: var(--rv-primary-dark);
	padding: 0.15em 0.4em;
	border-radius: var(--rv-radius-sm);
}

pre {
	background: var(--rv-ink);
	color: #E8EEF1;
	padding: var(--rv-space-5);
	border-radius: var(--rv-radius);
	overflow-x: auto;
	font-size: var(--rv-text-sm);
	line-height: 1.5;
}
pre code { background: transparent; color: inherit; padding: 0; }

table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--rv-space-6) 0;
	font-size: var(--rv-text-sm);
}
th, td {
	padding: var(--rv-space-3) var(--rv-space-4);
	text-align: left;
	border-bottom: 1px solid var(--rv-line);
	vertical-align: top;
}
th {
	font-weight: 600;
	color: var(--rv-ink);
	background: var(--rv-bg-soft);
}

/* --- Layout primitives --- */
.rv-container {
	width: 100%;
	max-width: var(--rv-container);
	margin: 0 auto;
	padding-inline: var(--rv-gutter);
}

.rv-container-narrow {
	width: 100%;
	max-width: var(--rv-container-narrow);
	margin: 0 auto;
	padding-inline: var(--rv-gutter);
}

.rv-container-wide {
	width: 100%;
	max-width: var(--rv-container-wide);
	margin: 0 auto;
	padding-inline: var(--rv-gutter);
}

/* Full-bleed (sustituye al .alignfull a mano) */
.alignfull {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: none;
}

.alignwide {
	width: 100%;
	max-width: var(--rv-container-wide);
	margin-inline: auto;
}

/* Skip link accesible */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
}
.skip-link:focus {
	left: var(--rv-space-4);
	top: var(--rv-space-4);
	z-index: var(--rv-z-toast);
	background: var(--rv-ink);
	color: white;
	padding: var(--rv-space-3) var(--rv-space-4);
	border-radius: var(--rv-radius);
}

/* Anchor invisible para "Volver arriba" */
#top { display: block; height: 0; overflow: hidden; }

/* Ocultar visualmente pero accesible */
.rv-sr-only {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* Estado vacío */
.rv-empty {
	text-align: center;
	color: var(--rv-muted);
	padding: var(--rv-space-7) var(--rv-space-4);
	font-style: italic;
}
