/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-texto);
  background-color: var(--c-fondo);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: var(--fw-semi);
  line-height: var(--lh-tight);
  color: var(--c-texto);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

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

a {
  color: var(--c-capacidad);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
a:hover { color: var(--c-capacidad-oscuro); }

strong { font-weight: var(--fw-semi); }

/* Listas */
ul, ol {
  padding-left: var(--sp-5);
}
li { margin-bottom: var(--sp-2); }
li:last-child { margin-bottom: 0; }

/* Imágenes */
img, svg {
  display: block;
  max-width: 100%;
}

/* Inputs base */
input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* Accesibilidad: foco visible */
:focus-visible {
  outline: 3px solid var(--c-acento);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--c-acento);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius);
  font-weight: var(--fw-semi);
  z-index: 9999;
  text-decoration: none;
  transition: top var(--t-fast);
}
.skip-link:focus { top: var(--sp-4); }

/* Visualmente oculto pero accesible */
.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;
}

/* Contenedor */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--sp-6); }
}
@media (min-width: 1200px) {
  .container { padding-inline: var(--sp-8); }
}

/* Sección base */
.section {
  padding-block: var(--sp-12);
}
.section-alt {
  background-color: var(--c-institucional-claro);
}

/* Encabezado de sección */
.section-header {
  max-width: 64ch;
  margin-bottom: var(--sp-8);
}
.section-header.centered {
  margin-inline: auto;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-texto-secundario);
  margin-bottom: var(--sp-3);
}
.section-header h2 {
  margin-bottom: var(--sp-4);
}
.lead {
  font-size: var(--fs-md);
  color: var(--c-texto-secundario);
  line-height: var(--lh-snug);
  max-width: var(--max-w-prose);
}

/* Tabla base */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
th, td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--c-borde-claro);
}
th {
  font-weight: var(--fw-semi);
  background: var(--c-fondo);
  color: var(--c-texto-secundario);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .05em;
}
tr:last-child td { border-bottom: none; }
