/* =========================================================
   JFC Soluciones · Portada orientada a ventas (solo index.html)
   Se carga después de styles.css. Mobile first.
   ========================================================= */

@property --giro { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.main-nav a { white-space: nowrap; }

/* ---------- Encabezado ---------- */
.hero-v2 { padding: 20px 0 56px; isolation: isolate; }
.hero-aura { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-aura span { position: absolute; border-radius: 50%; will-change: transform; }
.hero-aura span:nth-child(1) {
  width: 560px; height: 560px; right: -160px; top: -180px;
  background: radial-gradient(closest-side, rgb(230 0 0 / .20), transparent);
  animation: aura-a 16s var(--ease-in-out) infinite alternate;
}
.hero-aura span:nth-child(2) {
  width: 460px; height: 460px; left: -200px; top: 30%;
  background: radial-gradient(closest-side, rgb(255 140 50 / .16), transparent);
  animation: aura-b 20s var(--ease-in-out) infinite alternate;
}
.hero-aura span:nth-child(3) {
  width: 380px; height: 380px; right: 22%; bottom: -160px;
  background: radial-gradient(closest-side, rgb(230 0 80 / .12), transparent);
  animation: aura-a 24s var(--ease-in-out) 2s infinite alternate-reverse;
}
@keyframes aura-a { to { transform: translate(-70px, 60px) scale(1.15); } }
@keyframes aura-b { to { transform: translate(90px, -50px) scale(1.2); } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: rgb(255 255 255 / .8); border: 1px solid var(--line);
  font-size: 14px; font-weight: 700; color: var(--ink-2);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-badge .live-dot { background: #22C55E; animation-name: pulso-verde; }
@keyframes pulso-verde { 0% { box-shadow: 0 0 0 0 rgb(34 197 94 / .6); } 100% { box-shadow: 0 0 0 10px rgb(34 197 94 / 0); } }

/* Titular: cada palabra entra sola */
.hero-v2 h1 { animation: none; text-wrap: balance; }
.hero-v2 h1 .w {
  display: inline-block;
  animation: palabra 700ms var(--ease-out) backwards;
  animation-delay: calc(var(--w) * 55ms + 80ms);
}
@keyframes palabra { from { opacity: 0; transform: translateY(.45em); filter: blur(6px); } }
.hero-v2 h1 .subr { position: relative; white-space: nowrap; }
.hero-v2 h1 .subr::after {
  content: ""; position: absolute; z-index: -1; left: -.08em; right: -.08em; bottom: .04em; height: .4em;
  background: rgb(230 0 0 / .16); border-radius: .12em;
  transform-origin: 0 50%; animation: marcador 700ms var(--ease-in-out) 1000ms backwards;
}
@keyframes marcador { from { transform: scaleX(0); } }

/* Arranque rápido: elegir el rubro abre la cotización ya con ese dato */
.arranque {
  margin-top: 24px; padding: 16px; max-width: 560px;
  background: rgb(255 255 255 / .9); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.arranque-t { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 12px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.arranque-t span { font-size: 13.5px; font-weight: 700; color: var(--red); letter-spacing: 0; }
.arranque-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.arr-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 72px; padding: 10px 6px; border-radius: 14px;
  background: var(--bg-soft); border: 1.5px solid transparent;
  font-size: 14px; font-weight: 700; line-height: 1.15; text-align: center; text-decoration: none; color: var(--ink);
  transition: transform 160ms var(--ease-out), background-color 200ms, border-color 200ms, color 200ms, box-shadow 200ms;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.arr-chip .ico { width: 24px; height: 24px; color: var(--red); transition: transform 240ms var(--ease-out); }
.arr-chip:active { transform: scale(.95); background: var(--red-soft); border-color: var(--red); }
.hero-v2 .cta-group { margin-top: 16px; }
.hero-v2 .trust-list { margin-top: 20px; font-size: 15.5px; }

/* Brillo que cruza el botón principal */
.brillo { position: relative; overflow: hidden; }
.brillo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .35) 50%, transparent 65%);
  transform: translateX(-130%); animation: cta-brillo 5s ease-in-out 2s infinite;
}

/* Celular: halo giratorio, inclinación con el mouse y tarjetas flotantes */
.hero-v2 .hero-visual { perspective: 1100px; }
.hero-v2 .hero-visual::before {
  content: ""; position: absolute; inset: -9%; z-index: -1; border-radius: 50%;
  background: conic-gradient(from var(--giro), rgb(230 0 0 / .5), rgb(255 150 60 / .35), transparent 55%, rgb(230 0 0 / .5));
  filter: blur(46px); opacity: .55; animation: girar 14s linear infinite;
}
@keyframes girar { to { --giro: 360deg; } }
.hero-v2 .phone { transition: transform 500ms var(--ease-out); transform-style: preserve-3d; will-change: transform; }
.float-ok {
  position: absolute; left: -10px; top: 92px; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink); padding: 10px 14px 10px 10px; border-radius: 14px; border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.25; box-shadow: var(--shadow-lg);
  animation: floaty 6.5s var(--ease-in-out) .5s infinite alternate;
}
.float-ok strong { display: block; font-size: 15px; }
.float-ok-ico { width: 34px; height: 34px; flex: none; border-radius: 50%; background: #22C55E; color: #fff; display: grid; place-items: center; }
.float-ok-ico svg { width: 20px; height: 20px; }
.float-ok-ico path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: trazo 600ms var(--ease-out) 1500ms forwards; }
@keyframes trazo { to { stroke-dashoffset: 0; } }
.hero-v2 .float-note { top: auto; bottom: 150px; right: -14px; }
.hero-v2 .float-stat { bottom: 60px; }

/* ---------- Logos arriba ---------- */
main > .clients.clients-top { margin-top: 0; border-radius: 0; box-shadow: none; padding: 28px 0 36px; background: #fff; border-top: 1px solid var(--line); }
.clients-top .clients-title { font-size: 13px; margin-bottom: 16px; }

/* ---------- Cifras ---------- */
.stats { position: relative; overflow: hidden; padding-bottom: 64px; }
.stats::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(50% 120% at 0% 0%, rgb(230 0 0 / .28), transparent 70%),
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / .07) 1px, transparent 0) 0 0 / 24px 24px;
}
.stats .container { position: relative; }
.stats-grid li { padding-left: 16px; border-left: 2px solid var(--dark-line); }
.stats-grid li:first-child { border-left-color: var(--red); }

/* ---------- Aparición escalonada ---------- */
.js [data-escalonar] > * { opacity: 0; transform: translateY(26px) scale(.98); }
.js [data-escalonar].visto > * {
  opacity: 1; transform: none;
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-escalonar].hecho > * { transition-delay: 0ms; }

/* Luz que sigue al mouse dentro de la tarjeta */
.luz { position: relative; overflow: hidden; }
.luz::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 300ms;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgb(230 0 0 / .10), transparent 70%);
}

/* ---------- El problema ---------- */
.riesgo-grid { display: grid; gap: 14px; }
.riesgo-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.js [data-escalonar].hecho > .riesgo-card { transition: transform 240ms var(--ease-out), box-shadow 240ms, border-color 240ms; }
.riesgo-n { position: absolute; right: 18px; top: 10px; font-size: 56px; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--bg-soft); }
.riesgo-ico { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); margin-bottom: 18px; }
.riesgo-ico .ico { width: 26px; height: 26px; }
.riesgo-card h3 { position: relative; font-size: 1.2rem; margin-bottom: 8px; }
.riesgo-card p { position: relative; color: var(--muted); font-size: 16.5px; line-height: 1.5; }
.riesgo-cierre { margin-top: 36px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.riesgo-cierre .statement .hl { color: var(--red); }
.flecha-baja { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; text-decoration: none; animation: rebote 1.8s var(--ease-in-out) infinite; }
.flecha-baja .ico { transform: rotate(90deg); width: 20px; height: 20px; }
@keyframes rebote { 50% { transform: translateY(7px); } }

/* ---------- La solución: 4 pasos ---------- */
.pasos-wrap { display: grid; gap: 40px; }
.pasos-copy h2 { margin-bottom: 18px; }
.pasos-copy .btn { margin-top: 26px; }
.tu-solo { margin-top: 22px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.tu-solo p { font-size: 13.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tu-solo li { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; font-size: 16.5px; color: var(--ink-2); }
.tu-solo .ico { width: 20px; height: 20px; padding: 3px; margin-top: 3px; background: var(--red-soft); color: var(--red); border-radius: 50%; }

.pasos { position: relative; display: grid; gap: 0; --p: 0; }
.pasos-linea { position: absolute; left: 22px; top: 22px; bottom: 60px; width: 3px; margin-left: -1.5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.pasos-linea i { position: absolute; inset: 0; background: linear-gradient(var(--red), #FF6A3D); transform-origin: 50% 0; transform: scaleY(var(--p)); }
.paso { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding-bottom: 22px; }
.paso:last-child { padding-bottom: 0; }
.paso-n {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
  background: #fff; color: var(--muted); border: 2px solid var(--line);
  transition: background-color 350ms, color 350ms, border-color 350ms, transform 450ms var(--ease-out), box-shadow 350ms;
}
.paso-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px;
  opacity: .55; transform: translateX(10px);
  transition: opacity 450ms var(--ease-out), transform 550ms var(--ease-out), box-shadow 350ms, border-color 350ms;
}
.paso.activo .paso-n { background: var(--red); border-color: var(--red); color: #fff; transform: scale(1.08); box-shadow: 0 0 0 6px var(--red-soft); }
.paso.activo .paso-card { opacity: 1; transform: none; box-shadow: var(--shadow-lg); border-color: #DAD7D2; }
.paso-tag { display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.paso:last-child .paso-tag { background: var(--red); color: #fff; }
.paso-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.paso-card p { color: var(--muted); font-size: 16.5px; line-height: 1.5; }

/* ---------- Comparación ---------- */
.vs-grid { display: grid; gap: 16px; align-items: stretch; }
.vs { border-radius: 24px; padding: 26px 22px; }
.vs-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.vs li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; font-size: 17px; line-height: 1.4; }
.vs li .ico { width: 24px; height: 24px; padding: 5px; border-radius: 50%; flex: none; margin-top: 1px; }
.vs-solo { background: #fff; border: 1px dashed #CFCBC6; color: var(--muted); }
.vs-solo .vs-label { color: var(--ink-2); }
.vs-solo li .ico { background: #EFEDEA; color: #8B8B93; }
.vs-jfc { position: relative; background: var(--dark); color: var(--on-dark); isolation: isolate; box-shadow: 0 30px 70px -24px rgb(230 0 0 / .45); }
.vs-jfc::before { /* borde de luz que gira */
  content: ""; position: absolute; inset: -2px; z-index: -2; border-radius: 26px;
  background: conic-gradient(from var(--giro), var(--red), #FF8A3D 18%, transparent 36%, transparent 64%, var(--red));
  animation: girar 6s linear infinite;
}
.vs-jfc::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 24px; background: radial-gradient(80% 60% at 100% 0%, rgb(230 0 0 / .28), transparent 70%), var(--dark); }
.vs-jfc .vs-label { color: #fff; }
.vs-pill { padding: 5px 12px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.vs-jfc li { font-weight: 600; }
.vs-jfc li .ico { background: #22C55E; color: #fff; }
.js .vs-jfc li { opacity: 0; transform: translateX(-12px); }
.js .vs-jfc.visto li { opacity: 1; transform: none; transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms + 150ms); }
.js .vs-jfc li .ico { transform: scale(0); }
.js .vs-jfc.visto li .ico { transform: scale(1); transition: transform 500ms cubic-bezier(.3, 1.6, .5, 1); transition-delay: calc(var(--i, 0) * 80ms + 300ms); }
.vs-pie { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--dark-line); display: grid; gap: 14px; }
.vs-pie p { color: var(--on-dark-muted); font-size: 16px; }
.vs-pie p strong { color: #fff; }

/* ---------- Franja 20 días ---------- */
.promo-band { position: relative; overflow: hidden; }
.promo-band::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; margin: -450px 0 0 -450px; pointer-events: none;
  background: radial-gradient(closest-side, rgb(230 0 0 / .32), transparent);
  animation: latido 5s var(--ease-in-out) infinite alternate;
}
@keyframes latido { from { transform: scale(.75); opacity: .6; } to { transform: scale(1.1); opacity: 1; } }
.promo-band .container { position: relative; }
.promo-hl { border-radius: .14em; font-variant-numeric: tabular-nums; }
.promo-cta { display: flex; justify-content: center; margin-top: 32px; }
.promo-cta .btn { width: 100%; max-width: 420px; }
.rubros-cinta { position: relative; margin-top: 44px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.rubros-cinta ul { display: flex; width: max-content; animation: cinta 34s linear infinite; }
.rubros-cinta li { display: flex; align-items: center; gap: 22px; padding-right: 22px; font-size: clamp(1.05rem, 3vw, 1.4rem); font-weight: 800; letter-spacing: -.01em; color: rgb(255 255 255 / .55); white-space: nowrap; }
.rubros-cinta li::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--red); transform: rotate(45deg); }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ---------- Garantía ---------- */
.js .guarantee .g-badge { opacity: 0; transform: rotate(-16deg) scale(.7); }
.js .guarantee.is-visible .g-badge, .js .guarantee:not(.reveal) .g-badge { opacity: 1; transform: none; transition: opacity 500ms 200ms, transform 800ms cubic-bezier(.3, 1.5, .5, 1) 200ms; }
.guarantee .btn { margin-top: 20px; }

/* ---------- Cierre ---------- */
.cierre { position: relative; overflow: hidden; background: linear-gradient(135deg, #E60000, #B00000 70%); color: #fff; text-align: center; padding: 72px 0; isolation: isolate; }
.cierre::before, .cierre::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.cierre::before { width: 520px; height: 520px; left: -180px; top: -220px; background: radial-gradient(closest-side, rgb(255 160 60 / .5), transparent); animation: aura-b 14s var(--ease-in-out) infinite alternate; }
.cierre::after { width: 620px; height: 620px; right: -220px; bottom: -320px; background: radial-gradient(closest-side, rgb(0 0 0 / .35), transparent); animation: aura-a 18s var(--ease-in-out) infinite alternate; }
.cierre h2 { font-size: clamp(2rem, 7vw, 3.6rem); letter-spacing: -.035em; max-width: 16ch; margin: 0 auto 16px; text-wrap: balance; }
.cierre p { font-size: 1.15rem; max-width: 520px; margin: 0 auto; color: rgb(255 255 255 / .9); }
.cierre .cta-group { justify-content: center; align-items: stretch; margin-top: 30px; }
.btn-blanco { background: #fff; color: var(--red-dark); text-transform: uppercase; letter-spacing: .04em; box-shadow: 0 16px 36px -14px rgb(0 0 0 / .55); }
.btn-borde-blanco { background: transparent; color: #fff; border-color: rgb(255 255 255 / .7); }
.cierre-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 28px; font-size: 15.5px; font-weight: 700; }
.cierre-checks li { display: flex; align-items: center; gap: 8px; }
.cierre-checks .ico { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgb(255 255 255 / .2); }

/* ---------- Barra fija en el celular ---------- */
.barra-movil {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgb(255 255 255 / .94); border-top: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 -10px 30px -14px rgb(17 17 19 / .3);
  transform: translateY(110%); transition: transform 400ms var(--ease-out);
}
.barra-movil.visible { transform: none; }
.barra-movil .btn { min-height: 52px; }
.barra-movil .btn-primary { flex: 1; font-size: 15.5px; padding-inline: 14px; }
.barra-movil .barra-wa { width: 56px; padding: 0; flex: none; }
.barra-movil .barra-wa .ico { width: 26px; height: 26px; }
body:has(.cz-modal[open]) .barra-movil { transform: translateY(110%); }
@media (max-width: 639px) { .wa-float { display: none; } }
@media (min-width: 640px) { .barra-movil { display: none; } }

/* ================= Tablet ================= */
@media (min-width: 640px) {
  .arr-chip { flex-direction: row; min-height: 52px; gap: 8px; padding: 8px 10px; }
  .arr-chip .ico { width: 20px; height: 20px; }
  .hero-v2 .trust-list { display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .riesgo-grid { grid-template-columns: repeat(3, 1fr); }
  .vs-grid { grid-template-columns: 1fr 1.15fr; gap: 20px; }
  .vs { padding: 32px 30px; }
  .promo-cta .btn { width: auto; }
  .cierre { padding: 96px 0; }
}

/* ================= Escritorio ================= */
@media (min-width: 1000px) {
  .hero-v2 { padding: 28px 0 80px; }
  .float-ok { left: -64px; top: 110px; }
  .hero-v2 .float-note { right: -60px; bottom: 190px; }
  .hero-v2 .float-stat { bottom: 70px; }
  .stats { padding-bottom: 76px; }
  .pasos-wrap { grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: start; }
  .pasos-copy { position: sticky; top: calc(var(--header-h) + 32px); }
  .paso { grid-template-columns: 52px 1fr; gap: 22px; padding-bottom: 28px; }
  .paso-n { width: 52px; height: 52px; font-size: 20px; }
  .pasos-linea { left: 26px; top: 26px; }
  .paso-card { padding: 24px 28px; }
  .cierre { padding: 128px 0; }
}

/* Hover solo con mouse */
@media (hover: hover) and (pointer: fine) {
  .arr-chip:hover { background: #fff; border-color: var(--red); color: var(--red); box-shadow: 0 10px 22px -12px rgb(230 0 0 / .5); transform: translateY(-2px); }
  .arr-chip:hover .ico { transform: scale(1.15) rotate(-6deg); }
  .luz:hover::before { opacity: 1; }
  .riesgo-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #DAD7D2; }
  .btn-blanco:hover { background: #111113; color: #fff; }
  .btn-borde-blanco:hover { background: #fff; color: var(--red-dark); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-aura span, .hero-v2 .hero-visual::before, .float-ok, .brillo::after, .flecha-baja,
  .vs-jfc::before, .promo-band::before, .rubros-cinta ul, .cierre::before, .cierre::after { animation: none; }
  .hero-v2 h1 .w { animation-name: fade-only; }
  .hero-v2 h1 .subr::after { animation: none; }
  .float-ok-ico path { animation: none; stroke-dashoffset: 0; }
  .js [data-escalonar] > *, .js .vs-jfc li, .js .vs-jfc li .ico, .js .guarantee .g-badge { opacity: 1; transform: none; transition: none; }
  .paso-card, .paso-n, .hero-v2 .phone, .barra-movil { transition: none; }
  .paso-card { opacity: 1; transform: none; }
  .rubros-cinta { overflow-x: auto; }
}
