/* =========================
   FX LOAD (sin JS)
========================= */

/* Base: animación al cargar */
.fx-in {
  animation-duration: 760ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both; /* mantiene el estado final */
  will-change: transform, opacity, filter, clip-path;
}

/* Delays */
.fx-d1 { animation-delay: 90ms; }
.fx-d2 { animation-delay: 170ms; }
.fx-d3 { animation-delay: 250ms; }
.fx-d4 { animation-delay: 330ms; }
.fx-d5 { animation-delay: 410ms; }

/* Variantes */
.fx-fade { animation-name: fxFade; }
.fx-rise { animation-name: fxRise; }
.fx-drop { animation-name: fxDrop; }
.fx-left { animation-name: fxLeft; }
.fx-right { animation-name: fxRight; }
.fx-zoom { animation-name: fxZoom; }
.fx-clip { animation-name: fxClip; }

/* Keyframes (se sienten “pro”, no tailwind vibe) */
@keyframes fxFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fxRise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); filter: blur(6px); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}

@keyframes fxDrop {
  from { opacity: 0; transform: translate3d(0, -18px, 0); filter: blur(5px); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}

@keyframes fxLeft {
  from { opacity: 0; transform: translate3d(26px, 0, 0); filter: blur(6px); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}

@keyframes fxRight {
  from { opacity: 0; transform: translate3d(-26px, 0, 0); filter: blur(6px); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}

@keyframes fxZoom {
  from { opacity: 0; transform: scale(0.96); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* Reveal con clip-path (muy elegante) */
@keyframes fxClip {
  from { opacity: 1; clip-path: inset(12% 0 0 0 round 18px); filter: blur(6px); }
  to   { opacity: 1; clip-path: inset(0 0 0 0 round 18px); filter: blur(0); }
}

.btnx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 16px;
  border-radius: 14px;

  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: inherit;
  text-decoration: none;
  cursor: pointer;

  transform: translate3d(0,0,0);
  transition:
    transform 180ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 240ms cubic-bezier(0.2, 0.9, 0.2, 1),
    background-color 240ms ease,
    border-color 240ms ease,
    opacity 200ms ease;
  will-change: transform;
}

.btnx:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.28);
}

.btnx:active {
  transform: translate3d(0, 0, 0) scale(0.985);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.btnx:focus-visible {
  outline: 2px solid rgba(255,255,255,0.55);
  outline-offset: 3px;
}

.btnx--primary {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.26);
}
.btnx--ghost {
  background: transparent;
}

.imgx-wrap {
  border-radius: 18px;
  overflow: hidden;
  transform: translate3d(0,0,0);
}

.imgx {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
              filter 520ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, filter;
}

.imgx-wrap:hover .imgx {
  transform: scale(1.035);
  filter: saturate(1.05) contrast(1.03);
}

.cardx {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);

  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 240ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 240ms ease,
    border-color 240ms ease;
}

.cardx:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 22px 55px rgba(0,0,0,0.22);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
}

@media (prefers-reduced-motion: reduce) {
  .fx-in { animation: none !important; }
  .btnx, .cardx, .imgx { transition: none !important; transform: none !important; }
}
