/* Base · reset mínimo, tipografía y utilidades */

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

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

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

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

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--marino);
  line-height: var(--lh-titulo);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--rojo-texto); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--marino); }

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

strong, b { font-weight: 700; }

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

/* Foco visible y consistente (DISENO.md 9) */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 3px;
  border-radius: 4px;
}
.fondo-oscuro :focus-visible,
.sitio-footer :focus-visible,
.hero--oscuro :focus-visible { outline-color: #fff; }

.tnum { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* Accesibilidad */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.saltar {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--marino); color: #fff; padding: .75rem 1rem; border-radius: var(--radio-btn);
  font-weight: 600; text-decoration: none;
}
.saltar:focus { top: 1rem; color: #fff; }

/* Layout */
.contenedor {
  width: 100%;
  max-width: calc(var(--contenedor) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.seccion { padding-block: var(--seccion); }
.seccion--alt { background: var(--fondo-alt); border-block: 1px solid var(--borde); }
.seccion--oscura { background: var(--marino); color: var(--texto-claro); }
.seccion--oscura h2, .seccion--oscura h3 { color: #fff; }
.seccion + .seccion--alt, .seccion--alt + .seccion { border-top: 0; }

.texto-legible { max-width: var(--texto-max); }

/* Texto pendiente (CLAUDE.md regla 8) */
.pendiente {
  background: #fff4c2; color: #5c4a00; outline: 1px dashed #b89500;
  padding: 0 .25em; border-radius: 3px; font-size: .9em;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
