/* ==========================================================================
   Base · reset acotado, tipografía de documento y accesibilidad
   ========================================================================== */

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 8%, #079fd314, transparent 30rem),
    var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3, h4 {
  color: var(--forest);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

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

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

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: #80bf2347;
}

/* El atributo hidden debe ganar siempre. Sin esto, cualquier regla de clase
   con `display` (por ejemplo .unlock-banner{display:flex}) lo anula por
   especificidad y el elemento sigue visible. */
[hidden] {
  display: none !important;
}

/* --- Foco visible ---------------------------------------------------------
   Se aplica a todo lo enfocable por teclado; el ratón no lo dispara. */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

/* Salto al contenido: visible solo al tabular. */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-xs);
  background: var(--forest);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

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

/* Texto solo para lectores de pantalla. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
