/**
 * Ultra Desnivel — base.css
 * Reset ligero, tipografía base, layout y utilidades de accesibilidad.
 */

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

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

body {
	margin: 0;
	font-family: var(--ud-font-base);
	font-size: var(--ud-fs-base);
	line-height: var(--ud-lh-base);
	color: var(--ud-color-text);
	background: var(--ud-color-background);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a {
	color: var(--ud-color-accent-dark);
	text-decoration: none;
}

a:hover,
a:focus-visible {
	text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ud-font-heading);
	line-height: var(--ud-lh-snug);
	font-weight: var(--ud-weight-heading);
	color: var(--ud-color-primary);
	margin: 0 0 0.6em;
	letter-spacing: -0.01em;
}

h1 { font-size: var(--ud-fs-xxl); line-height: var(--ud-lh-tight); }
h2 { font-size: var(--ud-fs-xl); }
h3 { font-size: var(--ud-fs-large); }

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

blockquote {
	margin: 0 0 1em;
	padding-left: 1em;
	border-left: 3px solid var(--ud-color-accent);
	color: var(--ud-color-muted);
}

code, pre, kbd {
	font-family: var(--ud-font-mono);
	font-size: 0.95em;
}

hr {
	border: 0;
	border-top: var(--ud-border);
	margin: var(--ud-space-50) 0;
}

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

.ud-section {
	padding-block: var(--ud-space-60);
}

.ud-section__head {
	margin-bottom: var(--ud-space-50);
}

.ud-section__head--row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--ud-space-30);
	flex-wrap: wrap;
}

.ud-section__title {
	margin: 0;
}

.ud-section__subtitle {
	margin: 0.4em 0 0;
	color: var(--ud-color-muted);
	max-width: 60ch;
}

.ud-section__more {
	font-weight: var(--ud-weight-bold);
	white-space: nowrap;
}

.ud-section__demo-note,
.ud-guides__hint {
	font-size: var(--ud-fs-small);
	color: var(--ud-color-muted);
	font-style: italic;
	margin-top: 0.4em;
}

/* Eyebrow / etiqueta técnica en mayúsculas */
.ud-eyebrow {
	display: inline-block;
	font-size: var(--ud-fs-small);
	text-transform: uppercase;
	letter-spacing: var(--ud-tracking-eyebrow);
	color: var(--ud-color-accent-dark);
	font-weight: var(--ud-weight-bold);
}

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 0.75em 1.25em;
	background: var(--ud-color-primary);
	color: #fff;
	border-radius: 0 0 var(--ud-radius-sm) 0;
}

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

:focus-visible {
	outline: 3px solid var(--ud-color-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Honeypot anti-spam: fuera de pantalla, no display:none para no romper a11y de bots legítimos */
.ud-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 1px;
	overflow: hidden;
}

/* Estado "sin scroll" cuando hay un drawer/modal abierto */
body.ud-no-scroll {
	overflow: hidden;
}

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

body.ud-no-animations *,
body.ud-no-animations *::before,
body.ud-no-animations *::after {
	animation: none !important;
	transition: none !important;
}
