/* =============================================================
   KAIROS — BASE  (reset + tipografía + layout base)
   ============================================================= */

/* Figtree — variable, self-host woff2 (latin + latin-ext) */
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("../fonts/figtree-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

* { margin: 0; }

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

body {
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: var(--lh-normal);
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
}

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

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

a { color: var(--link); text-decoration-color: color-mix(in oklch, var(--link) 40%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

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

p { text-wrap: pretty; }

::selection { background: oklch(0.80 0.07 190 / 0.4); }

ul, ol { padding-left: 1.25rem; }

/* --- Layout helpers --- */
.wrap {
	width: 100%;
	max-width: var(--wrap-max);
	margin-inline: auto;
	padding-inline: var(--wrap-pad);
}

.section {
	padding-block: var(--space-10);
}
.section--center { text-align: center; }
.section--alt { background: var(--bg-alt); }

.section__title {
	font-size: var(--fs-2xl);
	margin-bottom: var(--space-6);
}
.section--center .section__title { margin-inline: auto; }

.section__lead {
	color: var(--text-muted);
	font-size: var(--fs-lg);
	margin-bottom: var(--space-6);
}

/* Prosa de contenido editable (the_content) */
.prose { max-width: var(--wrap-narrow); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--space-8); }
.prose h3 { font-size: var(--fs-lg); margin-top: var(--space-6); }
.prose img { border-radius: var(--radius); margin-block: var(--space-5); }

/* Accesibilidad */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: -999px; top: 0; z-index: var(--z-nav);
	background: var(--color-primary); color: #fff; padding: .75rem 1rem;
	border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}
