/* Revibit · landing de prueba con animaciones (inspiradas en polkadot.com).
   Todo en CSS/JS propio, sin librerías externas. Con «reducir movimiento» se muestra el estado final. */

/* ---------- Aparición al hacer scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rd, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Titular que entra palabra a palabra */
.js .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: wordIn .7s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i) * 70ms + 120ms); }
@keyframes wordIn { to { opacity: 1; transform: none; } }

/* Brillo que sigue al ratón en la portada */
.hero { position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px 420px at var(--mx, 75%) var(--my, 30%), rgba(0,255,179,.16), transparent 70%); transition: background .2s; }

/* ---------- Móvil con preview de la app ---------- */
.hero-visual { position: relative; justify-self: center; perspective: 1200px; padding: 20px 0; }
.phone { position: relative; width: 290px; border-radius: 44px; padding: 12px; background: #0e1720; box-shadow: 0 40px 80px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.08); transform-style: preserve-3d; transition: transform .25s ease-out; animation: floatY 6s ease-in-out infinite; }
@keyframes floatY { 50% { translate: 0 -10px; } }
.notch { position: absolute; top: 18px; left: 50%; width: 90px; height: 24px; border-radius: 999px; background: #0e1720; transform: translateX(-50%); z-index: 2; }
.screen { --s1: #0a2836; --s2: #123649; --t2: #b9c7cf; --t3: #8ea2ad; position: relative; background: #021b28; border-radius: 34px; overflow: hidden; padding: 12px 14px 0; color: #fff; font-size: 12px; height: 560px; display: flex; flex-direction: column; }
.screen svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sb { display: flex; justify-content: space-between; align-items: center; padding: 2px 10px 0; height: 22px; font-size: 12px; }
.sb-i { display: flex; gap: 2px; align-items: flex-end; }
.sb-i i { width: 3px; background: #fff; border-radius: 1px; } .sb-i i:nth-child(1){height:5px} .sb-i i:nth-child(2){height:7px} .sb-i i:nth-child(3){height:9px}
.sb-i em { width: 18px; height: 9px; border: 1.5px solid #fff; border-radius: 3px; margin-left: 5px; box-shadow: inset -6px 0 0 #021b28, inset 0 0 0 1px #021b28; background: #fff; }
.ph-head { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.ph-back { display: inline-flex; align-items: center; gap: 3px; background: var(--s2); border-radius: 999px; padding: 5px 10px 5px 6px; font-weight: 600; font-size: 11px; }
.ph-r { display: flex; gap: 6px; align-items: center; }
.ph-pill.fict { background: #3d2a17; color: #f1d3a8; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 600; }
.ph-heart { width: 26px; height: 26px; border-radius: 999px; background: #f2f2f2; color: #021b28; display: grid; place-items: center; }
.ph-heart svg { width: 13px; height: 13px; }
.ph-media { position: relative; margin-top: 10px; height: 150px; border-radius: 16px; overflow: hidden; background: var(--s1); }
.ph-media img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); animation: kenburns 14s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.14) translate(-2%, 1%); } }
.ph-tag { position: absolute; left: 8px; bottom: 8px; background: rgba(2,27,40,.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 600; }
.ph-dots { display: flex; justify-content: center; gap: 4px; margin: 7px 0 2px; }
.ph-dots i { width: 4px; height: 4px; border-radius: 999px; background: var(--t3); opacity: .5; } .ph-dots i.on { opacity: 1; background: #fff; }
.ph-chips { display: flex; gap: 5px; margin-top: 4px; }
.ph-chips span { display: inline-flex; align-items: center; gap: 3px; background: var(--s2); color: var(--t2); border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 600; }
.ph-chips svg { width: 11px; height: 11px; }
.ph-title { margin: 8px 0 8px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.ph-seg { display: flex; background: var(--s1); border-radius: 999px; padding: 3px; gap: 2px; }
.ph-seg span { flex: 1; text-align: center; padding: 5px 0; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--t2); }
.ph-seg span.on { background: var(--s2); color: #fff; }
.ph-card { background: var(--s1); border-radius: 16px; padding: 11px 12px 4px; margin-top: 9px; }
.scr-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--t2); }
.scr-row b { color: #fff; font-size: 13px; }
.scr-bar { height: 7px; border-radius: 999px; background: var(--s2); margin-top: 7px; overflow: hidden; }
.scr-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #007a55, var(--neon)); transition: width 1.6s cubic-bezier(.2,.7,.2,1) .4s; }
.hero.go .scr-bar span { width: 45%; }
.scr-feed { list-style: none; margin: 8px 0 0; padding: 0; }
.scr-feed li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 11px; border-bottom: 1px solid rgba(255,255,255,.07); opacity: 0; transform: translateX(-10px); transition: all .5s ease; }
.scr-feed li > span { flex: 1; display: flex; justify-content: space-between; }
.scr-feed small { color: var(--t3); font-size: 10px; }
.scr-feed li.now small { color: var(--neon); font-weight: 600; }
.scr-feed li:last-child { border-bottom: 0; }
.hero.go .scr-feed li { opacity: 1; transform: none; }
.hero.go .scr-feed li:nth-child(1) { transition-delay: .8s; } .hero.go .scr-feed li:nth-child(2) { transition-delay: 1.1s; }
.hero.go .scr-feed li:nth-child(3) { transition-delay: 1.4s; } .hero.go .scr-feed li:nth-child(4) { transition-delay: 1.7s; }
.scr-feed i { width: 15px; height: 15px; border-radius: 999px; border: 2px solid var(--neon); flex-shrink: 0; position: relative; }
.scr-feed i.ok { background: var(--neon); }
.scr-feed i.ok::after { content: ""; position: absolute; left: 3.5px; top: 1px; width: 3px; height: 7px; border: solid #021b28; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.scr-feed li.now i { animation: ping 1.6s infinite; }
.ph-tabs { margin: auto -14px 0; display: flex; justify-content: space-around; padding: 8px 6px 16px; background: rgba(10,40,54,.96); border-top: 1px solid rgba(255,255,255,.06); }
.ph-tabs span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9px; font-weight: 600; color: var(--t3); }
.ph-tabs svg { width: 18px; height: 18px; }
.ph-tabs span.on { color: var(--neon); }
.preview-tag { text-align: center; margin: 18px 0 0; font-size: 12px; color: rgba(255,255,255,.6); }

/* Cuadrados que flotan alrededor del móvil (parallax con el ratón) */
.float { position: absolute; width: 46px; height: 46px; border-radius: 22%; border: 1.5px solid rgba(255,255,255,.2); transform: translate(calc(var(--px, 0) * var(--k, 1px)), calc(var(--py, 0) * var(--k, 1px))); transition: transform .3s ease-out; }
.float.on { background: var(--neon); border-color: var(--neon); box-shadow: 0 0 30px rgba(0,255,179,.35); }
.f1 { top: 2%; left: -18%; --k: 18px; } .f2 { top: 18%; right: -16%; --k: -24px; width: 34px; height: 34px; }
.f3 { bottom: 26%; left: -24%; --k: -14px; width: 60px; height: 60px; } .f4 { bottom: 10%; right: -10%; --k: 22px; }
.f5 { top: 46%; right: -26%; --k: 12px; width: 28px; height: 28px; } .f6 { top: 60%; left: -12%; --k: -20px; width: 24px; height: 24px; }

/* ---------- Banda de palabras en movimiento ---------- */
.marquee { background: var(--neon); color: var(--navy); overflow: hidden; white-space: nowrap; padding: 16px 0; font-weight: 700; font-size: 20px; }
.marquee .track { display: inline-flex; gap: 22px; animation: marquee 32s linear infinite; padding-left: 22px; }
.marquee i { font-style: normal; opacity: .55; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- La app, por dentro ---------- */
.kicker { margin: 0 0 10px; font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
.app-cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }
.app-card { border-radius: 28px; padding: 32px; min-height: 460px; position: relative; overflow: hidden; }
.app-card h3 { font-size: 30px; }
.app-card > p { margin: 8px 0 24px; }
.app-card.blue { color: #fff; background: radial-gradient(600px 400px at 100% 0%, rgba(0,255,179,.25), transparent 60%), linear-gradient(150deg, var(--navy) 0%, var(--port) 100%); }
.app-card.blue > p { color: rgba(255,255,255,.8); }
.app-card.light { background: radial-gradient(500px 360px at 0% 100%, rgba(0,255,179,.35), transparent 60%), linear-gradient(160deg, #ffffff 0%, var(--sand) 100%); box-shadow: var(--shadow); }
.app-card.light > p { color: var(--text-2); }

.bubbles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bubbles li { display: flex; align-items: flex-end; gap: 10px; opacity: 0; transform: translateY(16px) scale(.96); transition: all .5s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--d) * .7s + .2s); }
.app-card.play .bubbles li { opacity: 1; transform: none; }
.bubbles .av { width: 34px; height: 34px; border-radius: 999px; background: var(--neon); color: var(--navy); display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.bubbles span { background: rgba(255,255,255,.12); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.14); padding: 12px 14px; border-radius: 18px 18px 18px 6px; font-size: 15px; max-width: 80%; }
.bubbles small { display: block; margin-top: 4px; font-size: 11px; opacity: .6; text-align: right; }
.bubbles li.me { justify-content: flex-end; }
.bubbles li.me span { background: #fff; color: var(--navy); border-radius: 18px 18px 6px 18px; }

.compare { position: relative; aspect-ratio: 5 / 4; background: #e9e9e9; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 40px rgba(2,27,40,.18); }
.cmp-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-after { clip-path: inset(0 0 0 var(--cut, 50%)); overflow: hidden; }
.cmp-after img { width: 100%; height: 100%; object-fit: cover; display: block; transform: translate(-1.9%, -2.3%) scale(1.07); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 3px; background: #fff; transform: translateX(-50%); pointer-events: none; }
.cmp-handle span { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; border-radius: 999px; background: var(--neon); border: 3px solid #fff; transform: translate(-50%, -50%); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.cmp-range:focus-visible + .cmp-label { outline: none; }
.compare:focus-within .cmp-handle span { outline: 3px solid var(--navy); outline-offset: 2px; }
.cmp-label { position: absolute; bottom: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(2,27,40,.75); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.cmp-label.l { left: 12px; } .cmp-label.r { right: 12px; }
.illus { margin: 12px 0 0; font-size: 12px; color: var(--text-2); }

/* ---------- Parcelas que encajan con el scroll ---------- */
.assemble { position: relative; height: 260vh; background: var(--navy); color: #fff; }
.asm-sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; padding-top: 40px; box-sizing: border-box; overflow: hidden; }
.asm-grid { position: relative; flex: none; display: grid; grid-template-columns: repeat(5, auto); gap: min(14px, 1.6vh); }
.asm-grid span { width: min(72px, 8vh); height: min(72px, 8vh); border-radius: 22%; border: 1.5px solid rgba(255,255,255,.2); will-change: transform; transition: background .5s, box-shadow .5s, border-color .5s; }
.asm-grid span.lit { background: var(--neon); border-color: var(--neon); box-shadow: 0 0 40px rgba(0,255,179,.4); }
.asm-text { position: relative; text-align: center; max-width: 720px; padding: 0 20px; opacity: var(--t, 0); transform: translateY(calc((1 - var(--t, 0)) * 30px)); }
.asm-text h2 { font-size: clamp(28px, 4.2vw, 48px); text-shadow: 0 4px 30px rgba(2,27,40,.9); }
.asm-text p { color: rgba(255,255,255,.85); font-size: 19px; text-shadow: 0 2px 20px rgba(2,27,40,.9); }

/* Tarjetas que se elevan al pasar el ratón */
.card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 2px 4px rgba(2,27,40,.06), 0 24px 50px rgba(2,27,40,.14); }

/* ---------- Responsive ---------- */
@media (min-width: 921px) {
  .app-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-rows: auto auto 1fr; column-gap: 56px; padding: 48px; min-height: 0; }
  .app-card > h3, .app-card > p:not(.illus) { grid-column: 1; }
  .app-card > h3 { align-self: end; margin-top: 0; }
  .app-card > .bubbles, .app-card > .compare { grid-column: 2; grid-row: 1 / 4; }
  .app-card > .illus { grid-column: 1; grid-row: 3; align-self: end; }
  .app-card .compare { max-width: 600px; justify-self: end; width: 100%; }
}
@media (max-width: 920px) {
  .app-cards { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 12px; }
}
@media (max-width: 640px) {
  .phone { width: 260px; } .screen { height: 520px; } .ph-media { height: 130px; }
  .float { display: none; }
  .app-card { padding: 24px; min-height: 0; }
  .compare { aspect-ratio: 1 / 1; }
  .asm-grid { grid-template-columns: repeat(5, 48px); gap: 10px; }
  .asm-grid span { width: 48px; height: 48px; }
  .marquee { font-size: 16px; padding: 12px 0; }
}

/* ---------- Movimiento reducido: estado final, sin animaciones ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js .hero h1 .w { opacity: 1 !important; transform: none !important; animation: none !important; }
  .phone, .marquee .track, .ph-media img { animation: none !important; }
  .scr-bar span { width: 45% !important; }
  .scr-feed li, .bubbles li { opacity: 1 !important; transform: none !important; }
  .assemble { height: auto; }
  .asm-sticky { position: relative; height: auto; padding: 96px 0; gap: 32px; display: flex; flex-direction: column; }
  .asm-grid { position: relative; }
  .asm-grid span { transform: none !important; }
  .asm-text { opacity: 1; transform: none; }
}
.assemble .dot { color: var(--neon); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(0,255,179,.55); } 100% { box-shadow: 0 0 0 9px rgba(0,255,179,0); } }
.compare img { object-position: 50% 22%; }
