/* base.css · tokens, reset, tipografía y utilidades
   Paleta de marca: navy #0A2D49 + periwinkle #7E8BFE sobre blanco.
   Los neutros derivan del navy; los semánticos son estándar de interfaz. */

:root {
  --navy: #0A2D49;
  --navy-profundo: #07223A;
  --peri: #7E8BFE;
  --peri-ink: #4653CB;      /* periwinkle oscurecido: texto/acentos sobre claro con AA */
  --peri-suave: #EBEDFF;
  --blanco: #FFFFFF;
  --papel: #F4F7FA;
  --tinta: #0A2D49;
  --tinta-suave: #45607A;
  --acero: #B9C9DD;         /* texto secundario sobre navy */
  --linea: #DCE4EC;
  --linea-navy: rgba(255, 255, 255, 0.12);

  --ok: #1E7A46;
  --ok-bg: #E9F5EE;
  --atencion: #8A5A00;
  --atencion-bg: #FFF4DC;
  --error: #B3261E;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-texto: "Inter", "Segoe UI", Roboto, Arial, sans-serif;

  --radio: 16px;
  --sombra-tarjeta: 0 10px 30px rgba(10, 45, 73, 0.08);
  --alto-cabecera: 64px;
}

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

* { margin: 0; }

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

body {
  font-family: var(--f-texto);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--blanco);
}

[id] { scroll-margin-top: calc(var(--alto-cabecera) + 16px); }

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

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

button { cursor: pointer; }

/* que [hidden] gane siempre a los display de las clases */
[hidden] { display: none !important; }

a { color: var(--peri-ink); }

h1, h2, h3 { line-height: 1.15; overflow-wrap: break-word; }

h1 {
  font-family: var(--f-display);
  font-weight: 650;
  font-size: clamp(2.25rem, 6.8vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--f-display);
  font-weight: 640;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.005em;
}

/* ── Estructura ── */

.contenedor {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.seccion { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.cabecera-seccion {
  max-width: 620px;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.cabecera-seccion .intro {
  margin-top: 0.9rem;
  font-size: 1.05rem;
  color: var(--tinta-suave);
}

.cabecera-seccion--clara h2,
.cabecera-seccion--clara h3 { color: var(--blanco); }
.cabecera-seccion--clara .intro { color: var(--acero); }
.cabecera-seccion--clara .eyebrow { color: var(--peri); }
.cabecera-seccion--clara .eyebrow::before { background: var(--peri); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--peri-ink);
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--peri);
  flex: none;
}

/* ── Encaje: la pestaña de puzzle entre secciones ── */

.tab { position: relative; }

.tab::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 32px;
  height: 32px;
  transform: translateX(-50%);
  border-radius: 50%;
  z-index: 1;
}

.tab--blanco::before { background: var(--blanco); }
.tab--papel::before { background: var(--papel); }

/* ── Utilidades ── */

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

.salto {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--blanco);
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  font-weight: 600;
}

.salto:focus-visible { top: 0; }

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

.nota-nojs {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--tinta-suave);
}

/* ── Aparición al hacer scroll (solo con JS y sin reduced-motion) ── */

.anima [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.anima [data-reveal].visto {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .anima [data-reveal] { opacity: 1; transform: none; }
}
