/*
  La capa de vida del sitio: imágenes generadas (public/img), el hero oscuro, íconos 3D y las
  interacciones de app/plugins/fx.client.ts. Todo lo que se mueve se apaga con prefers-reduced-motion.
*/

/* ---------------------------------------------------------------- hero oscuro (inicio) */
.hero--dark { position: relative; overflow: hidden; isolation: isolate; background: #0d1026; color: #f5f5f2; }
.hero--dark .hero__bg { position: absolute; inset: 0 0 0 28%; z-index: -2; pointer-events: none; }
.hero--dark .hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; opacity: .9;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 82%, transparent 100%), linear-gradient(#000 70%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 82%, transparent 100%), linear-gradient(#000 70%, transparent); mask-composite: intersect;
  scale: 1.04; transition: translate .2s linear; }
.hero--dark::before { content: ""; position: absolute; inset: 0; z-index: -3;
  background: radial-gradient(60% 70% at 85% 30%, rgb(212 17 95 / .22), transparent 70%), radial-gradient(50% 60% at 10% 100%, rgb(60 70 180 / .25), transparent 70%), #0d1026; }
.hero--dark::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 80% at 30% 40%, #000, transparent 75%); mask-image: radial-gradient(70% 80% at 30% 40%, #000, transparent 75%); }
.hero--dark h1 { color: #fff; }
.hero--dark h1 .hl, .hero--dark .hero__lead [data-assumed] { color: #ff5a98; }
.hero--dark .hero__lead { color: rgb(245 245 242 / .82); }
.hero--dark .hero__proof { color: rgb(245 245 242 / .62); }
.hero--dark .btn--secondary { background: rgb(255 255 255 / .1); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); backdrop-filter: blur(8px); }
.hero--dark .btn--secondary:hover { background: rgb(255 255 255 / .16); }
.hero--dark .hero__art { background: none; box-shadow: none; }
.hero--dark .ly-piece { box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6), 0 0 0 1px rgb(255 255 255 / .08); transition: translate .1s linear; }
.hero--dark .ly-piece--main { backdrop-filter: blur(18px); }
@media (max-width: 1023px) { .hero--dark .hero__bg { inset: auto 0 0 0; height: 62%; } .hero--dark .hero__bg img { object-position: 50% 40%; } }

/* el halo que sigue el puntero dentro de un hero */
.hero__glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(520px circle at var(--gx, 60%) var(--gy, 35%), rgb(212 17 95 / .28), transparent 62%); }

/* ---------------------------------------------------------------- productos: hero y capítulos con render */
.hero__window--img { position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(60% 80% at 50% 0%, rgb(212 17 95 / .35), transparent 70%), url(/img/saas-inventario.webp) center 40% / cover, #0d1026 !important; }
.hero__window--img .hero__glow { z-index: 0; }
.hero__window--img > .ly-piece { z-index: 1; }
.chapter-frame--img { background: linear-gradient(180deg, rgb(13 16 38 / .15), rgb(13 16 38 / .35)), var(--img) center / cover, #0d1026 !important; }
.chapter-frame--img::after { background: linear-gradient(transparent, rgb(13 16 38 / .55)) !important; }
.chapter-frame--img .d-win, .chapter-frame--img .phone, .chapter-frame--img .ui { box-shadow: 0 30px 80px -24px rgb(0 0 0 / .7); }

/* ---------------------------------------------------------------- íconos 3D */
.svc-head { display: flex; align-items: center; gap: var(--s-4); }
.svc-head h3 { margin: 0; }
.svc-ic, .chapter-ic { flex: none; border-radius: 22%; box-shadow: 0 14px 30px -12px rgb(20 24 51 / .55), 0 0 0 1px rgb(20 24 51 / .06);
  transform: perspective(500px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.svc-ic { width: 56px; height: 56px; }
.chapter-title { display: grid; gap: var(--s-5); align-content: start; }
.chapter-ic { width: 88px; height: 88px; animation: fx-float 6s ease-in-out infinite; }
.card:hover .svc-ic, [data-tilt]:hover { box-shadow: 0 22px 40px -14px rgb(212 17 95 / .55), 0 0 0 1px rgb(212 17 95 / .2); }
@keyframes fx-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ---------------------------------------------------------------- franja oscura con la red */
.band-network { position: relative; isolation: isolate; }
.band-network::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url(/img/bg-network.webp) right center / cover no-repeat; opacity: .55;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); }
.band-network .stack-frame { background: rgb(255 255 255 / .03); backdrop-filter: blur(6px); border-color: rgb(255 255 255 / .08); }

/* ---------------------------------------------------------------- acceso */
.auth__side { background: url(/img/bg-auth.webp) center / cover, var(--p-inv-bg) !important; }
.auth__side::before { display: none; }
.auth__side > *:not(.hero__glow) { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- spot: brillo bajo el puntero */
:is(.card, .p-card, .card--plan, .contact-card, .faq__item) { --spot: 0; }
.fx :is(.card, .p-card, .card--plan, .contact-card) {
  background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgb(212 17 95 / calc(.09 * var(--spot))), transparent 60%); }
.fx .is-spot { --spot: 1; }
.fx :is(.card, .p-card, .card--plan) { transition: box-shadow .3s, translate .3s cubic-bezier(.2,.8,.2,1), border-color .3s; }
.fx :is(.card, .card--plan).is-spot { box-shadow: 0 24px 50px -28px rgb(20 24 51 / .35); }

/* ---------------------------------------------------------------- botón magnético */
.fx .btn--primary { translate: var(--tx, 0) var(--ty, 0); transition: translate .25s cubic-bezier(.2,.8,.2,1), background-color .2s, box-shadow .25s; }
.fx .btn--primary:hover { box-shadow: 0 10px 28px -10px rgb(212 17 95 / .7); }

/* ---------------------------------------------------------------- reveal escalonado */
.fx [data-rv]:not(.is-in) { opacity: 0; translate: 0 28px; }
.fx [data-rv] { transition: opacity .7s cubic-bezier(.2,.8,.2,1) var(--rv-d, 0ms), translate .7s cubic-bezier(.2,.8,.2,1) var(--rv-d, 0ms); }

/* ---------------------------------------------------------------- statement con halo animado */
.statement { position: relative; isolation: isolate; overflow: hidden; }
.statement::before { content: ""; position: absolute; width: 60vmax; aspect-ratio: 1; left: 50%; top: 50%; z-index: -1; pointer-events: none;
  translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgb(212 17 95 / .12), transparent);
  animation: fx-orbit 18s ease-in-out infinite; }
@keyframes fx-orbit { 0%, 100% { translate: -70% -55%; } 50% { translate: -30% -45%; } }

@media (prefers-reduced-motion: reduce) {
  .chapter-ic, .statement::before { animation: none; }
  .fx [data-rv] { opacity: 1 !important; translate: none !important; }
}
.chapter-frame--net { --img: url(/img/bg-network.webp); background-position: center, 70% center !important; }
.chapter-frame--net .ic-tile { background: rgb(255 255 255 / .92); }
@media (max-width: 1023px) {
  .hero--dark .hero__bg { height: 55%; }
  .hero--dark .hero__bg img { -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); opacity: .75; }
}
@media (max-width: 1023px) {
  .band-network::before { background-position: 70% bottom; background-size: 220% auto; opacity: .45;
    -webkit-mask-image: linear-gradient(transparent 35%, #000 70%); mask-image: linear-gradient(transparent 35%, #000 70%); }
}
