/* =========================================================
   FX EXTRA — capa de animaciones (no toca el código original)
   Se activa con html.fxe-on (lo pone fx-extra.js). Respeta
   prefers-reduced-motion y el "Modo ligero" (html.fs-ligero).
   Para quitarla: borra las 2 líneas fx-extra.* de cada .html
   ========================================================= */

:root { --fxe-ease: cubic-bezier(.2,.8,.2,1); --fxe-spring: cubic-bezier(.34,1.56,.64,1); --fxe-glow: 207,255,31; }

/* ---------- 1. Aparición tipo presentación (cada elemento entra al verse) ---------- */
html.fxe-on .fxe-reveal { opacity: 0; will-change: opacity, transform; }
html.fxe-on .fxe-reveal.fxe-in {
  opacity: 1;
  animation: var(--fxe-anim, fxeUp) var(--fxe-dur, .85s) var(--fxe-curve, var(--fxe-ease)) backwards;
  animation-delay: var(--fxe-d, 0ms);
}
.fxe-e-up    { --fxe-anim: fxeUp; }
.fxe-e-left  { --fxe-anim: fxeLeft; }
.fxe-e-right { --fxe-anim: fxeRight; }
.fxe-e-zoom  { --fxe-anim: fxeZoom; }
.fxe-e-pop   { --fxe-anim: fxePop;    --fxe-dur: .7s;  --fxe-curve: var(--fxe-spring); }
.fxe-e-bounce{ --fxe-anim: fxeBounce; --fxe-dur: 1.1s; --fxe-curve: var(--fxe-spring); }
.fxe-e-wipe  { --fxe-anim: fxeWipe;   --fxe-dur: 1s; }

@keyframes fxeUp     { from { opacity: 0; transform: translateY(46px) scale(.96); filter: blur(6px); } }
@keyframes fxeLeft   { from { opacity: 0; transform: translateX(-70px); filter: blur(5px); } }
@keyframes fxeRight  { from { opacity: 0; transform: translateX(70px);  filter: blur(5px); } }
@keyframes fxeZoom   { from { opacity: 0; transform: scale(.78) translateY(20px); filter: blur(6px); } }
@keyframes fxePop    { from { opacity: 0; transform: scale(.55); } }
@keyframes fxeBounce { from { opacity: 0; transform: translateX(-90px) scale(.8) rotate(-6deg); } }
@keyframes fxeWipe   {
  from { opacity: 0; transform: translateX(-26px); clip-path: inset(-12px 100% -12px -12px); }
  to   { opacity: 1; transform: none;              clip-path: inset(-12px -12px -12px -12px); }
}

/* línea de luz que se dibuja en la parte alta de cada apartado */
html.fxe-on .hx-sec { position: relative; }
html.fxe-on .hx-sec::before {
  content: ""; position: absolute; top: 28px; left: 50%; width: min(1160px, 92%); height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--fxe-glow)), transparent);
  transform: translateX(-50%) scaleX(0); opacity: .55; pointer-events: none;
  transition: transform 1.3s var(--fxe-ease);
}
html.fxe-on .hx-sec.fxe-sec-in::before { transform: translateX(-50%) scaleX(1); }
#hx, .hx-sec, .hx-cierre { scroll-margin-top: 70px; }

/* ---------- 2. Tarjetas: levitan, se inclinan y tienen foco de luz ---------- */
html.fxe-on .fxe-card { position: relative; transform-style: preserve-3d;
  transition: transform .35s var(--fxe-ease), box-shadow .35s var(--fxe-ease), border-color .35s; }
html.fxe-on .fxe-card.fxe-in:hover {
  transform: translateY(-8px) perspective(900px) rotateX(var(--fxe-rx,0deg)) rotateY(var(--fxe-ry,0deg));
  box-shadow: 0 18px 40px -12px rgba(var(--fxe-glow), .35), 0 0 0 1px rgba(var(--fxe-glow), .35);
}
html.fxe-on .fxe-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx,50%) var(--my,50%), rgba(var(--fxe-glow), .16), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
html.fxe-on .fxe-card:hover::after { opacity: 1; }
html.fxe-on .product-card img { transition: transform .6s var(--fxe-ease), filter .6s; }
html.fxe-on .product-card:hover img { transform: scale(1.06); }

html.fxe-on img.fxe-img { opacity: 0; filter: blur(14px); transform: scale(1.04);
  transition: opacity .6s, filter .6s, transform .6s var(--fxe-ease); }
html.fxe-on img.fxe-img.fxe-ok { opacity: 1; filter: none; transform: none; }

/* ---------- 3. Botones ---------- */
html.fxe-on .btn { position: relative; overflow: hidden; isolation: isolate; transition: transform .25s var(--fxe-ease), box-shadow .25s; }
html.fxe-on .btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -75%; width: 50%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .7s var(--fxe-ease);
}
html.fxe-on .btn:hover::before { left: 130%; }
html.fxe-on .btn:active { transform: scale(.94); }
html.fxe-on .btn-primary { box-shadow: 0 0 0 0 rgba(207,255,31,.5); animation: fxePulso 2.8s ease-out infinite; }
@keyframes fxePulso {
  0%   { box-shadow: 0 0 0 0 rgba(207,255,31,.45); }
  70%  { box-shadow: 0 0 0 16px rgba(207,255,31,0); }
  100% { box-shadow: 0 0 0 0 rgba(207,255,31,0); }
}

/* ---------- 4. Títulos: línea que se dibuja ---------- */
html.fxe-on .hx-h2.fxe-in::after, html.fxe-on .cx-titulo.fxe-in::after {
  content: ""; display: block; height: 3px; width: 0; margin-top: 10px; border-radius: 3px;
  background: linear-gradient(90deg, rgb(var(--fxe-glow)), transparent);
  animation: fxeLinea .9s .5s var(--fxe-ease) forwards;
}
@keyframes fxeLinea { to { width: min(180px, 40%); } }

/* ---------- 5. Menú: subrayado animado ---------- */
html.fxe-on #site-header nav a { position: relative; }
html.fxe-on #site-header nav a::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -4px; height: 2px;
  background: rgb(var(--fxe-glow)); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--fxe-ease);
}
html.fxe-on #site-header nav a:hover::after { transform: scaleX(1); }

/* ---------- 6. Chispas del cursor ---------- */
.fxe-spark { position: fixed; z-index: 99999; pointer-events: none; width: 7px; height: 7px;
  background: rgb(var(--fxe-glow)); box-shadow: 0 0 8px rgb(var(--fxe-glow)); image-rendering: pixelated;
  left: 0; top: 0; opacity: 0; animation: fxeSpark .8s ease-out forwards; }
@keyframes fxeSpark {
  0%   { opacity: 1; transform: translate(var(--x), var(--y)) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) scale(.2) rotate(120deg); }
}

/* ---------- 7. Flotación suave ---------- */
html.fxe-on .hx-chip { animation: fxeFlota 4s ease-in-out infinite; }
@keyframes fxeFlota { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---------- 8. Indicador "desliza hacia abajo" (portada) ---------- */
.fxe-scrolldown {
  position: fixed; left: 50%; bottom: 16px; z-index: 40; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: 0; padding: 6px 12px; cursor: pointer; color: var(--text, #f6faee);
  font: 700 .7rem/1 inherit; letter-spacing: .18em; text-transform: uppercase;
  opacity: 0; animation: fxeHintIn .9s 1.6s ease forwards;
  transition: transform .5s var(--fxe-ease), opacity .4s;
}
.fxe-scrolldown.fxe-hide { opacity: 0 !important; transform: translate(-50%, 16px); pointer-events: none; }
.fxe-sd-txt { text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.fxe-mouse { position: relative; width: 24px; height: 38px; border: 2px solid var(--neon, #cfff1f); border-radius: 14px;
  box-shadow: 0 0 14px rgba(var(--fxe-glow), .35), inset 0 0 8px rgba(var(--fxe-glow), .15); }
.fxe-mouse i { position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px;
  background: var(--neon, #cfff1f); animation: fxeRueda 1.7s ease-in-out infinite; }
.fxe-chevs { display: flex; flex-direction: column; align-items: center; margin-top: -2px; }
.fxe-chevs b { width: 10px; height: 10px; margin-top: -3px; border-right: 2px solid var(--neon, #cfff1f); border-bottom: 2px solid var(--neon, #cfff1f);
  transform: rotate(45deg); opacity: 0; animation: fxeChev 1.7s ease-in-out infinite; }
.fxe-chevs b:nth-child(2) { animation-delay: .22s; }
.fxe-scrolldown:hover .fxe-mouse { box-shadow: 0 0 20px rgba(var(--fxe-glow), .6); }
@keyframes fxeHintIn { to { opacity: .95; } }
@keyframes fxeRueda  { 0% { opacity: 0; transform: translateY(0); } 25% { opacity: 1; } 80% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes fxeChev   { 0% { opacity: 0; transform: translateY(-4px) rotate(45deg); } 50% { opacity: .95; } 100% { opacity: 0; transform: translateY(6px) rotate(45deg); } }

/* ---------- 9. Navegación lateral por apartados (como diapositivas) ---------- */
.fxe-dots { position: fixed; right: 18px; top: 50%; z-index: 40; transform: translateY(-50%);
  display: none; flex-direction: column; gap: 14px; padding: 12px 8px; border-radius: 999px;
  background: rgba(11,10,8,.55); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.fxe-dot { position: relative; width: 11px; height: 11px; padding: 0; border-radius: 50%; cursor: pointer;
  background: transparent; border: 2px solid rgba(255,255,255,.4); transition: transform .3s var(--fxe-spring), background .3s, border-color .3s, box-shadow .3s; }
.fxe-dot:hover { border-color: var(--neon, #cfff1f); transform: scale(1.25); }
.fxe-dot.on { background: var(--neon, #cfff1f); border-color: var(--neon, #cfff1f); transform: scale(1.3); box-shadow: 0 0 12px rgba(var(--fxe-glow), .8); }
.fxe-dot::before { content: attr(data-label); position: absolute; right: 26px; top: 50%; transform: translate(8px, -50%);
  white-space: nowrap; font: 600 .72rem/1 inherit; letter-spacing: .04em; color: #0b0d00; background: var(--neon, #cfff1f);
  padding: 6px 10px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--fxe-ease); }
.fxe-dot:hover::before, .fxe-dot:focus-visible::before { opacity: 1; transform: translate(0, -50%); }
@media (min-width: 1100px) { .fxe-dots { display: flex; } }
@media (max-width: 700px) {
  .fxe-sd-txt, .fxe-mouse { display: none; }
  .fxe-scrolldown { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); padding: 4px 10px; }
  .fxe-chevs b { width: 14px; height: 14px; margin-top: -5px; filter: drop-shadow(0 0 6px rgba(var(--fxe-glow), .7)); }
}

/* ---------- 10. Eslogan en la pantalla de entrada ---------- */
.intro-slogan { margin: 12px auto 0; max-width: min(92vw, 480px); text-align: center; text-wrap: balance;
  font-size: clamp(.92rem, 2.8vw, 1.08rem); font-weight: 600; line-height: 1.4; color: #d9d0e6; opacity: 0;
  animation: fxeSlogan .9s .45s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes fxeSlogan { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.footer p b { color: var(--text, #fff); }

/* ---------- Apagado: movimiento reducido / modo ligero ---------- */
@media (prefers-reduced-motion: reduce) {
  html.fxe-on .fxe-reveal { opacity: 1 !important; animation: none !important; }
  html.fxe-on .hx-sec::before { transform: translateX(-50%) scaleX(1); transition: none; }
  html.fxe-on .btn-primary, html.fxe-on .hx-chip, .fxe-mouse i, .fxe-chevs b { animation: none !important; }
  .fxe-chevs b { opacity: .8; }
  .fxe-spark { display: none; }
  .intro-slogan { animation: none; opacity: 1; }
  .fxe-scrolldown { animation: none; opacity: .95; }
}
html.fs-ligero .fxe-spark { display: none; }
html.fs-ligero .intro-slogan { animation: none; opacity: 1; }
html.fs-ligero .fxe-reveal { opacity: 1 !important; animation: none !important; }
html.fs-ligero.fxe-on .btn-primary, html.fs-ligero.fxe-on .hx-chip { animation: none; }
html.fs-ligero .fxe-mouse i, html.fs-ligero .fxe-chevs b { animation: none; }

/* ---------- 11. Barra "Paga desde tu país": siempre en bucle, sin scroll manual ----------
   El CSS original la detenía (y mostraba una barra de scroll) cuando el sistema tiene
   activado "reducir movimiento". Aquí se fuerza el bucle automático. Se pausa al pasar
   el ratón por encima o al enfocarla con el teclado. */
html .hx-cinta .hx-cinta-ventana { overflow: hidden !important; scrollbar-width: none; }
html .hx-cinta .hx-cinta-ventana::-webkit-scrollbar { display: none; }
html .hx-cinta .hx-cinta-track {
  animation: hxCinta calc(var(--n, 12) * 3.2s) linear infinite !important;
}
html .hx-cinta:hover .hx-cinta-track,
html .hx-cinta:focus-within .hx-cinta-track { animation-play-state: paused !important; }
