/* Microinteracciones del portfolio.
   Inspiradas en conceptos de React Bits; todo el codigo es propio (CSS + JS puros).
   Se activan desde js/microinteractions.js. Los efectos de mouse solo existen con puntero fino. */

/* ---------- 1. Foco de luz en tarjetas ---------- */
.fx-spot{position:relative;overflow:hidden}
.fx-spot>*{position:relative;z-index:1}
.fx-spot::before,.fx-spot::after{z-index:2;padding:1px;background:linear-gradient(135deg,rgba(139,92,246,1),rgba(139,92,246,.10) 40%,rgba(109,40,217,.12) 62%,rgba(124,58,237,.9));-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.fx-spot{transition:box-shadow .4s ease}
.fx-spot:hover{box-shadow:0 0 56px rgba(139,92,246,.18)}
.fx-spot:hover::before,.fx-spot:hover::after{opacity:1}

/* ---------- P10. Frame Border: borde nitido y luminoso ---------- */
.fx-frame{position:relative;box-shadow:0 0 46px rgba(139,92,246,.07);transition:box-shadow .4s ease}
.fx-frame::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;z-index:3;
  background:linear-gradient(135deg,rgba(139,92,246,.95),rgba(139,92,246,.07) 38%,rgba(109,40,217,.08) 62%,rgba(124,58,237,.8));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);opacity:.85;transition:opacity .35s ease}
.fx-frame:hover,.fx-frame:focus-within{box-shadow:0 0 64px rgba(139,92,246,.17)}
.fx-frame:hover::before,.fx-frame:focus-within::before{opacity:1}

.fx-frame-h{transition:box-shadow .4s ease}
.fx-frame-h::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;z-index:3;opacity:0;transition:opacity .35s ease;
  background:linear-gradient(135deg,rgba(139,92,246,1),rgba(139,92,246,.10) 40%,rgba(109,40,217,.12) 62%,rgba(124,58,237,.9));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.fx-frame-h:hover,.fx-frame-h:focus-within{box-shadow:0 0 64px rgba(139,92,246,.2)}
.fx-frame-h:hover::before,.fx-frame-h:focus-within::before{opacity:1}

/* ---------- P8. Depth Card: la tarjeta completa se inclina ---------- */
.fx-persp{perspective:1800px}
.fx-depth{position:relative;transition:rotate .55s cubic-bezier(.2,.8,.2,1),box-shadow .4s ease;will-change:rotate}
/* La imagen ya no se desplaza por su cuenta dentro del marco: tarjeta e imagen giran juntas, como un solo bloque. */
.fx-depth::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;border-radius:inherit;background:radial-gradient(520px circle at var(--gx,50%) var(--gy,50%),rgba(139,92,246,.10),transparent 60%);opacity:0;transition:opacity .4s ease}
.fx-depth:hover::after{opacity:1}

/* ---------- P4. Hover Preview en "Mas trabajos" ---------- */
.hp{position:fixed;left:0;top:0;width:min(340px,28vw);aspect-ratio:16/10;border-radius:10px;overflow:hidden;pointer-events:none;z-index:70;
  opacity:0;scale:.9;transition:opacity .25s ease,scale .3s cubic-bezier(.2,.8,.2,1);box-shadow:0 24px 60px rgba(0,0,0,.55),0 0 0 1px rgba(139,92,246,.55);background:#111}
.hp.on{opacity:1;scale:1}
.hp img,.hp video{width:100%;height:100%;object-fit:cover;display:block}

/* ---------- Como trabajamos: pasos con linea conectora ---------- */
.process .process-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:26px;position:relative;list-style:none;margin:0;padding:0}
.process .process-grid::before{content:"";position:absolute;left:22px;right:22px;top:22px;height:1px;background:linear-gradient(90deg,#a78bfa,rgba(167,139,250,.15))}
.process .process-step{position:relative;padding:64px 0 0;border:0;background:none;display:block}
.process .process-num{position:absolute;left:0;top:0;width:44px;height:44px;border-radius:50%;border:1px solid rgba(139,92,246,.75);background:var(--bg,#09090c);
  display:grid;place-items:center;font-size:14px;letter-spacing:.04em;color:#fff;box-shadow:0 0 22px rgba(139,92,246,.35);transition:background .3s ease,box-shadow .3s ease}
.process .process-step:hover .process-num{background:#8b5cf6;box-shadow:0 0 30px rgba(139,92,246,.7)}
.process .process-step h3{ letter-spacing:-.02em; margin:0 0 8px; }
.process .process-step p{ line-height:1.6; margin:0; }
@media(max-width:899px){
  .process .process-grid{grid-template-columns:1fr;gap:30px}
  .process .process-grid::before{left:22px;right:auto;top:22px;bottom:30px;width:1px;height:auto;background:linear-gradient(#a78bfa,rgba(167,139,250,.15))}
  .process .process-step{padding:4px 0 0 66px}
}

/* ---------- Titulos palabra por palabra ---------- */
.tw{display:inline-block;white-space:pre}
.tw-ready .tw{opacity:0;filter:blur(10px);transform:translateY(16px);transition:opacity .7s ease,filter .7s ease,transform .7s cubic-bezier(.2,.8,.2,1)}
.tw-ready.tw-go .tw{opacity:1;filter:none;transform:none}

