/* ==========================================================================
   Base: reset, elementos HTML, tipografía, foco
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--rm-paper);
  color: var(--rm-ink);
  font-family: var(--rm-font-body);
  font-size: var(--rm-text-base);
  line-height: var(--rm-leading-normal);
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--rm-space-4);
  font-family: var(--rm-font-display);
  font-weight: 600;
  line-height: var(--rm-leading-tight);
  letter-spacing: -0.015em;
  color: var(--rm-ink);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 32;
  text-wrap: balance;
}

h1 { font-size: var(--rm-text-4xl); font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 144; }
h2 { font-size: var(--rm-text-3xl); font-variation-settings: 'SOFT' 30, 'WONK' 1, 'opsz' 72; }
h3 { font-size: var(--rm-text-xl); }
h4, h5, h6 { font-size: var(--rm-text-lg); }

p { margin: 0 0 var(--rm-space-4); max-width: var(--rm-measure); text-wrap: pretty; }

a {
  color: var(--rm-accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: color var(--rm-duration-fast) var(--rm-ease),
              text-decoration-color var(--rm-duration-fast) var(--rm-ease);
}

a:hover { color: var(--rm-accent-hover); text-decoration-color: currentColor; }

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

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

hr { border: 0; border-top: 1px solid var(--rm-rule); margin: var(--rm-space-7) 0; }

code, kbd, samp, pre { font-family: var(--rm-font-mono); font-size: 0.92em; }

::selection { background: var(--rm-accent); color: var(--rm-accent-ink); }

/* Texto visible solo para lectores de pantalla */
.rm-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;
}

/* Enlace de salto al contenido */
.rm-skip-link {
  position: absolute;
  top: var(--rm-space-3);
  left: var(--rm-space-3);
  z-index: 1080;
  padding: var(--rm-space-3) var(--rm-space-4);
  background: var(--rm-solid);
  color: var(--rm-solid-ink);
  border-radius: var(--rm-radius-md);
  text-decoration: none;
  transform: translateY(-200%);
}

.rm-skip-link:focus-visible { transform: translateY(0); }

@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;
    scroll-behavior: auto !important;
  }
}
