html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-stage);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  display: flow-root;
}

@media (min-width: 1024px) {
  main {
    padding: var(--stage-pad-desktop);
  }
}

/* Headings — regla del sistema: H1–H6 siempre weight 700, nunca extrabold */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); line-height: var(--lh-snug); }
h4 { font-size: var(--text-lg); line-height: var(--lh-snug); }
h5 { font-size: var(--text-md); line-height: var(--lh-snug); }
h6 { font-size: var(--text-base); line-height: var(--lh-snug); }

p { line-height: var(--lh-normal); }

a { transition: color var(--duration-base) var(--ease-out); }

.r {
  font-size: 0.55em;
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
  font-weight: inherit;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent);
  color: var(--color-ink);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-sm);
  z-index: var(--z-modal);
}

.skip-link:focus {
  top: var(--space-4);
}

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

@media (min-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }
}
