/* Interacciones compartidas (tienda y portfolio): halo al pasar el ratón, foco que sigue al cursor,
   apariciones al hacer scroll y franja de marcas en movimiento. Solo se activan con JS (html.fx). */
:root {
  --fx-ease: cubic-bezier(.22, 1, .36, 1);
  --fx-aura: 0 0 0 1px rgba(224, 53, 43, .28), 0 0 34px -4px rgba(224, 53, 43, .42), 0 0 80px -20px rgba(224, 53, 43, .45);
}

/* ---- Halo rojo alrededor de lo que señalas (solo con ratón: en móvil no se queda encendido) ---- */
.fx-aura { transition: box-shadow .8s ease-in-out, border-color .8s ease-in-out, transform .6s var(--fx-ease); }
@media (hover: hover) and (pointer: fine) {
  .fx-aura:hover, .fx-aura-host:hover .fx-aura { box-shadow: var(--fx-aura); border-color: rgba(224, 53, 43, .5); }
  .fx-lift:hover, .fx-aura-host:hover .fx-lift { transform: translateY(-3px); }
}

/* ---- Foco de luz que sigue al cursor dentro de la tarjeta ---- */
.fx-spot { --mx: 50%; --my: 50%; isolation: isolate; }
.fx-spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(224, 53, 43, .13), transparent 45%);
  opacity: 0; transition: opacity .8s ease-in-out;
}
@media (hover: hover) and (pointer: fine) { .fx-spot:hover::before { opacity: 1; } }

/* ---- Apariciones al entrar en pantalla ---- */
.fx .fx-reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--fx-ease), transform 1.1s var(--fx-ease); transition-delay: var(--d, 0s); }
.fx .fx-reveal.in { opacity: 1; transform: none; }

/* Titulares que suben línea a línea al cargar */
.fx-line { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.fx-line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--fx-ease); transition-delay: var(--d, 0s); }
.fx-line.in > span { transform: none; }

/* Letras de la firma del pie: caen una a una */
.fx-letters .fx-ch { display: inline-block; transform: translateY(.5em); opacity: 0; transition: transform 1s var(--fx-ease), opacity .8s var(--fx-ease); transition-delay: var(--d, 0s); white-space: pre; }
.fx-letters.in .fx-ch { transform: none; opacity: 1; }

/* ---- Marcas en movimiento ---- */
.fx-marquee { display: grid; gap: 30px; overflow: hidden; padding-block: 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.fx-track { display: flex; align-items: center; gap: 64px; width: max-content; animation: fx-marquee var(--dur, 70s) linear infinite; }
.fx-track.rev { animation-direction: reverse; }
.fx-marquee:hover .fx-track { animation-play-state: paused; }
.fx-track span { flex: none; height: 64px; display: flex; align-items: center; justify-content: center; }
.fx-track img { max-height: 58px; max-width: 150px; width: auto; height: auto; object-fit: contain; filter: grayscale(1) brightness(1.25); opacity: .72; transition: opacity .3s, filter .3s, transform .5s var(--fx-ease); }
.fx-track span:hover img { filter: none; opacity: 1; transform: scale(1.08); }
@keyframes fx-marquee { to { transform: translateX(calc(-50% - 32px)); } }
@media (max-width: 640px) { .fx-track { gap: 44px; } .fx-track span { height: 52px; } .fx-track img { max-height: 46px; max-width: 120px; } @keyframes fx-marquee { to { transform: translateX(calc(-50% - 22px)); } } }

/* ---- Línea de progreso de los pasos (se rellena al bajar) ---- */
.fx-steps li { position: relative; }
.fx .fx-steps li { border-top-color: var(--rule); }
.fx-steps li::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--rec, #E0352B); transform-origin: left; transform: scaleX(var(--fill, 0)); }

@media (prefers-reduced-motion: reduce) {
  .fx .fx-reveal, .fx-line > span, .fx-letters .fx-ch { opacity: 1 !important; transform: none !important; transition: none !important; }
  .fx-track { animation: none; }
}

/* Menú de arriba: al pasar el ratón la palabra sobresale un poco y se pone roja */
.top nav a { display: inline-block; transition: transform .35s var(--fx-ease), color .25s ease; }
@media (hover: hover) and (pointer: fine) {
  .top nav a:hover, .top nav a:focus-visible { color: var(--rec, #E0352B); transform: translateY(-2px) scale(1.08); }
}
