/* Base: reinicio, tipografía y piezas genéricas (botones, etiquetas, tarjetas, revelado). */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 50;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip-link:focus { left: 8px; }

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 16px; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
p { margin: 0 0 14px; color: var(--muted); font-size: 1.05rem; }
p.lead { font-size: 1.15rem; }
/* Primera frase del texto de bienvenida (el planteamiento): en una línea propia y con la tipografía de los títulos */
p.lead .lead-first { display: block; margin-bottom: 8px; color: var(--ink); font-family: var(--font-title, inherit); font-size: 1.2rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.note { font-size: 0.85rem; color: var(--muted); margin: 12px 0 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  font: 600 0.92rem "Plus Jakarta Sans", sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.icon { width: 38px; height: 38px; padding: 0; }
.btn svg { width: 18px; height: 18px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* Etiquetas y tarjetas */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--muted);
  background: var(--bg2);
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}
mark { background: var(--highlight); color: inherit; border-radius: 3px; padding: 0 2px; }
/* En los títulos, el resaltador va DETRÁS del texto: si no, el de una línea se pintaba encima de lo que sobresale de la línea anterior (la cola de la «g», la «y»...) y se la comía.
   El título crea su propio contexto de apilamiento (isolation) para que el resaltador no se vaya detrás del fondo de la slide. */
h1, h2 { isolation: isolate; }
h1 mark, h2 mark { position: relative; z-index: -1; }

/* Revelado al desplazar (solo si hay JavaScript: js/theme-init.js agrega la clase «js») */
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.in { opacity: 1; transform: none; }
