/**
 * BASE — reset, tipografía, utilidades.
 */

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

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

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--color-primary); }

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

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

/* ── Tipografía editorial ─────────────────────────────────────── */
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
	font-family: var(--font-serif);
	font-weight: var(--fw-normal);
	line-height: var(--lh-tight);
	letter-spacing: var(--tracking-tight);
	margin: 0 0 var(--sp-4);
	color: var(--color-text);
}
h1, .h1 { font-size: var(--fs-3xl); }
h2, .h2 { font-size: var(--fs-2xl); }
h3, .h3 { font-size: var(--fs-xl); }
h4, .h4 { font-size: var(--fs-lg); }
h5      { font-size: var(--fs-md); font-weight: var(--fw-medium); font-family: var(--font-sans); }
h6      { font-size: var(--fs-sm); font-family: var(--font-sans); font-weight: var(--fw-semi); }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

.eyebrow {
	display: inline-block;
	font-family: var(--font-sans);
	font-size: var(--fs-2xs);
	font-weight: var(--fw-semi);
	letter-spacing: var(--tracking-widest);
	text-transform: uppercase;
	color: var(--color-text-brand);
	margin-bottom: var(--sp-3);
}

.lead {
	font-size: var(--fs-md);
	line-height: var(--lh-loose);
	color: var(--color-text-muted);
	max-width: 60ch;
}

.display {
	font-family: var(--font-serif);
	font-size: var(--fs-hero);
	line-height: 0.95;
	letter-spacing: var(--tracking-tight);
	font-weight: var(--fw-normal);
}

.serif-italic { font-family: var(--font-serif); font-style: italic; }

/* ── Contenedores ────────────────────────────────────────────── */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-x);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

.section {
	padding-block: var(--sp-12);
}
.section--tight { padding-block: var(--sp-8); }
.section--loose { padding-block: var(--sp-16); }
.section--dark {
	background: var(--color-bg-invert);
	color: var(--color-text-invert);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-text-invert); }

/* ── Utilidades ──────────────────────────────────────────────── */
.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;
}
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.text-brand  { color: var(--color-text-brand); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-8); }

.divider {
	display: block; width: 40px; height: 1px;
	background: var(--color-border-strong);
	margin-block: var(--sp-5);
}
.divider--center { margin-inline: auto; }

/* Skip link */
.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--color-text); color: var(--color-cream-100);
	padding: var(--sp-3) var(--sp-4); z-index: var(--z-max);
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); }

/* Selección */
::selection { background: var(--c-rose-300); color: var(--c-ink-900); }

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