/* ============================================================
   Buen Jale — Sistema de animación e interactividad (v2, ligero)
   Regla de oro: nada queda oculto si el JS falla o tarda.
   ============================================================ */

/* ---------- Scroll reveal — solo tarjetas pequeñas, nunca bloques grandes ---------- */
.bj-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: var(--bj-delay, 0s);
}
.bj-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
/* Después de animar quitamos el "will-change" vía JS; aquí no se declara
   de forma permanente para no forzar capas GPU en todo el sitio */

/* Portadas de artículo de blog (nuevas) */
.article-cover {
  max-width: 900px;
  margin: 28px auto 0;
  padding: 0 20px;
  border-radius: 18px;
  overflow: hidden;
}
.article-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.article-cover img.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Contadores animados ---------- */
.odometer { font-variant-numeric: tabular-nums; }

/* ---------- Botones magnéticos ---------- */
.bj-magnetic {
  display: inline-block;
  transition: transform .25s ease;
}

/* ---------- Cursor personalizado (solo escritorio / puntero fino) ---------- */
.bj-cursor-dot, .bj-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.bj-cursor-dot { width: 8px; height: 8px; background: #0AABAE; }
.bj-cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(10,171,174,.6);
  transition: width .2s, height .2s, border-color .2s, background .2s;
}
.bj-cursor-ring.is-active {
  width: 54px; height: 54px;
  background: rgba(10,171,174,.12);
  border-color: #5EE3E0;
}
@media (pointer: coarse) {
  .bj-cursor-dot, .bj-cursor-ring { display: none !important; }
}

/* ---------- Transición entre páginas ---------- */
.bj-page-transition {
  position: fixed;
  inset: 0;
  background: #0B1315;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.bj-page-transition.is-leaving {
  opacity: 1;
  pointer-events: all;
}

@media (prefers-reduced-motion: reduce) {
  .bj-reveal, .article-cover img { opacity: 1 !important; transform: none !important; transition: none !important; }
  .bj-cursor-dot, .bj-cursor-ring, .bj-page-transition { display: none !important; }
}
