/* Reset, tipografía y utilidades mínimas. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: clip; /* clip (no hidden): no crea contenedor de scroll y no rompe el header sticky */
}

h1, h2, h3, h4 {
  margin: 0 0 .5rem;
  font-weight: 500;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  flex: none;
  vertical-align: middle;
}

.muted {
  color: var(--muted);
}

.text-accent {
  color: var(--accent);
}

.accent-line {
  width: 64px;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animación de entrada (js/reveal.js). Sin JS el contenido se ve normal. */
.js [data-reveal] {
  opacity: 0;
  transition: opacity .85s ease, transform .85s ease;
}

.js [data-reveal="up"] { transform: translateY(40px); }
.js [data-reveal="left"] { transform: translateX(60px); }
.js [data-reveal="right"] { transform: translateX(-60px); }

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
