/* ==========================================================================
   base.css — reset mínimo y elementos base.
   ========================================================================== */

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

html {
  min-height: 100%;
  background: linear-gradient(180deg, var(--bfc-marfil-alto) 0%, var(--bfc-marfil-bajo) 100%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: transparent;
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }

/* El [hidden] del navegador lo pisa cualquier regla de autor que declare
   display — .btn-back es inline-flex y se seguía viendo oculto o no. Esto
   cierra el agujero para toda la página. */
[hidden] { display: none !important; }

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

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { color: var(--link-hover); }
a:not([class]) { text-decoration: underline; text-underline-offset: 2px; }

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

/* Foco visible y consistente en toda la página. El diseño original lo
   suprimía con outline:none en los campos de texto. */
:focus-visible {
  outline: 2px solid var(--action-primary);
  outline-offset: 2px;
  border-radius: var(--space-1);
}

/* Los elementos con tabindex="-1" reciben el foco por código, no porque el
   usuario haya llegado a ellos: al cambiar de pregunta se enfoca el titular
   para que un lector de pantalla la anuncie. Pintarle un recuadro azul a un
   texto que nadie enfocó a propósito confunde. El anuncio se conserva. */
[tabindex='-1']:focus,
[tabindex='-1']:focus-visible {
  outline: none;
}

/* Sólo para lectores de pantalla. */
.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;
}

/* --- Animaciones compartidas -------------------------------------------- */
@keyframes bfc-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes bfc-slide {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes bfc-draw {
  to { stroke-dashoffset: 0; }
}

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