/* ============================================================
   base.css — reset, tipografía por rol, contenedor, accesibilidad
   ============================================================ */

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--texto);
  background: var(--oscuro-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: rgba(118, 75, 162, 0.35);
}

/* Foco visible para teclado, invisible para mouse */
:focus-visible {
  outline: 2px solid var(--lavanda);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

.saltar {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--blanco);
  color: var(--texto);
  font-weight: 700;
}
.saltar:focus { top: 16px; }

/* ---- Contenedor ---- */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 1025px) { .container { max-width: var(--contenedor); } }
@media (max-width: 1024px) { .container { max-width: 760px; } }
@media (max-width: 767px)  { .container { padding-inline: 18px; } }

/* ---- Respiro de sección ---- */

.section {
  position: relative;
  padding-block: clamp(72px, 11vh, 128px);
  scroll-margin-top: 72px;
}

/* ---- Menos movimiento ---- */

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