/* Web de Yalufly: intro animada y portada del inicio (solo index.html). */

/* ---------- Inicio ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--bg); }
.intro, .cover { position: absolute; inset: 0; transition: opacity .45s ease, visibility .45s; }
.mode-cover .intro, .mode-cover .intro-ui { opacity: 0; visibility: hidden; pointer-events: none; }
.mode-intro .cover { opacity: 0; visibility: hidden; }
/* El título sigue en la página durante la intro, para lectores de pantalla y buscadores. */
.mode-intro .cover { visibility: visible; }
.mode-intro .cover > :not(.cover-text), .mode-intro .cover .cta-row, .mode-intro .cover .replay { display: none; }
.mode-intro .cover-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.scene { position: absolute; inset: 0; overflow: hidden; visibility: hidden; }
.scene.on { visibility: visible; }
.paused .intro, .paused .intro * { animation-play-state: paused !important; }

/* 1 · Mensaje principal */
.s-hook { background: radial-gradient(ellipse at 50% 10%, var(--bg2), var(--bg) 60%, #000); display: flex; align-items: center; justify-content: center; }
.s-hook.on { animation: shake .32s .06s linear both; }
.hook-screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; perspective: 1600px; --sc: calc(var(--k) * 1.2); }
.on .hook-screen .tilt { animation: hookScreen 2.9s var(--out) both; }
.hook-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(3, 8, 20, .86) 18%, rgba(3, 8, 20, .25) 72%); }
.hook-text { position: relative; text-align: center; padding: 0 6vw; display: flex; flex-direction: column; align-items: center; gap: .1em; }
.on .hook-text { animation: hookOut .42s 2.3s var(--io) forwards; }
.hook-a { font-size: clamp(58px, 11vw, 176px); font-weight: 900; letter-spacing: -.055em; line-height: 1; }
.hook-b { font-size: clamp(34px, 6vw, 98px); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; padding-bottom: .08em; }
.on .hook-a { animation: slam .55s .02s var(--out) both; }
.on .hook-b { animation: wipeRight .6s .72s var(--out) both; }
.hook-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.on .hook-flash { animation: flash .42s 2.42s ease-out both; }

@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translate(-7px, 3px); } 40% { transform: translate(6px, -4px); } 60% { transform: translate(-4px, 2px); } 80% { transform: translate(3px, -1px); } }
@keyframes hookScreen { from { opacity: 0; transform: translateY(45%) rotateX(58deg) scale(.88); filter: blur(18px); } 45% { opacity: .55; } to { opacity: .5; transform: translateY(16%) rotateX(22deg) scale(1); filter: blur(2px); } }
@keyframes slam { from { opacity: 0; transform: scale(1.75); filter: blur(26px); letter-spacing: .12em; } 55% { opacity: 1; } to { opacity: 1; transform: none; filter: none; letter-spacing: -.055em; } }
@keyframes wipeRight { from { clip-path: inset(-20% 100% -20% 0); transform: translateY(24px); } to { clip-path: inset(-20% 0 -20% 0); transform: none; } }
@keyframes hookOut { to { opacity: 0; transform: scale(.9) translateY(-24px); filter: blur(12px); } }
@keyframes flash { 0% { opacity: 0; } 35% { opacity: .9; } 100% { opacity: 0; } }

/* 2 · Sectores */
.sec { position: absolute; inset: 0; display: flex; align-items: center; gap: 2vw; padding: 90px 5vw 120px; clip-path: circle(0% at var(--ox) var(--oy)); }
.s-sectors.on .sec { animation: secWipe .62s var(--b) var(--snap) both; }
@keyframes secWipe { from { clip-path: circle(0% at var(--ox) var(--oy)); } to { clip-path: circle(150% at var(--ox) var(--oy)); } }
.t-light { background: #fff; color: var(--ink); --acc: #245B80; }
.t-light2 { background: radial-gradient(ellipse at 70% 40%, #fff, #E1E8EE); color: var(--ink); --acc: #245B80; }
.t-blue { background: linear-gradient(135deg, #1B4A6B, #245B80 50%, #00B3D6); color: #fff; --acc: #9BE7F5; }
.t-dark { background: radial-gradient(ellipse at 70% 50%, #0E2A40, #05070D 65%); color: #fff; --acc: var(--cyan); }
.t-violet { background: linear-gradient(135deg, #1E1B4B, #5B21B6 50%, #245B80); color: #fff; --acc: #C4B5FD; }
.t-dark2 { background: radial-gradient(circle at 65% 50%, rgba(0, 179, 214, .35), #000 55%), #000; color: #fff; --acc: var(--cyan); }

.sec-text { flex: 0 0 44%; display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 2; }
.sec-label { font-size: clamp(18px, 2.3vw, 38px); font-weight: 600; opacity: .65; letter-spacing: -.01em; }
.sec-word { font-size: clamp(40px, 5.4vw, 96px); font-weight: 900; letter-spacing: -.05em; line-height: .98; perspective: 700px; }
.sec-word .sw { display: inline-block; white-space: nowrap; }
.sec-word .sw > span { display: inline-block; transform-origin: 50% 100%; }
.sec-word .w2 { color: var(--acc); }
.on .sec-word .sw > span { animation: flipIn .55s calc(var(--b) + .12s + var(--j) * 22ms) var(--out) both; }
@keyframes flipIn { from { opacity: 0; transform: rotateX(-100deg) translateY(.35em); } to { opacity: 1; transform: none; } }
.sec-chip { align-self: flex-start; font-size: clamp(14px, 1.4vw, 22px); font-weight: 600; padding: 9px 18px; border-radius: 999px; background: color-mix(in srgb, currentColor 10%, transparent); border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.sec-chip b { color: var(--acc); }
.on .sec-chip { animation: riseIn .5s calc(var(--b) + .32s) var(--out) both; }
.sec-dots { display: flex; gap: 8px; }
.sec-dots i { width: 16px; height: 5px; border-radius: 5px; background: currentColor; opacity: .22; }
.sec-dots i.past { opacity: .55; }
.sec-dots i.now { opacity: 1; background: var(--acc); }
.on .sec-dots i.now { animation: dotGrow .5s calc(var(--b) + .2s) var(--out) both; }
@keyframes dotGrow { from { width: 16px; } to { width: 52px; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.sec-stage { flex: 1; align-self: stretch; display: flex; align-items: center; justify-content: center; perspective: 1500px; position: relative; }
.sec-dev, .sec-drift { transform-style: preserve-3d; position: relative; }
.on .sec-drift { animation: drift 3.2s calc(var(--b) + .7s) linear both; }
@keyframes drift { from { transform: none; } to { transform: rotateY(9deg) translateY(-12px); } }
.sec-flare { position: absolute; right: 8%; top: 10%; width: 60%; height: 80%; border-radius: 50%; background: radial-gradient(closest-side, rgba(44, 196, 224, .55), rgba(0, 179, 214, .15) 60%, transparent); opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.t-light .sec-flare, .t-light2 .sec-flare { mix-blend-mode: multiply; background: radial-gradient(closest-side, rgba(0, 179, 214, .25), transparent); }
.on .sec-flare { animation: flare .9s var(--b) ease-out both; }
@keyframes flare { from { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } to { opacity: .2; transform: scale(1.2); } }

/* Aparatos: cada sector entra distinto */
.dev-tablet .sec-dev { animation: inTablet .95s var(--b) var(--out) both; }
.dev-phone .sec-dev { animation: inPhone 1s var(--b) var(--out) both; }
.dev-laptop .sec-dev { animation: inLaptop .9s var(--b) var(--out) both; }
.dev-float .sec-dev { animation: inFloat 1s var(--b) var(--out) both; }
.dev-orbit .sec-dev { animation: inOrbit 1s var(--b) var(--out) both; }
.dev-flip .sec-dev { animation: inFlip 1s var(--b) var(--out) both; }
.scene:not(.on) .sec-dev { animation: none; }
@keyframes inTablet { from { opacity: 0; transform: translateX(70%) translateZ(-400px) rotateY(-75deg) rotateZ(-6deg); } 30% { opacity: 1; } to { opacity: 1; transform: rotateX(8deg) rotateY(-16deg) rotateZ(2deg); } }
@keyframes inPhone { from { opacity: 0; transform: translateY(85%) rotateY(-200deg) scale(.7); } 30% { opacity: 1; } to { opacity: 1; transform: rotateX(6deg) rotateY(16deg) rotateZ(-3deg); } }
@keyframes inLaptop { from { opacity: 0; transform: translateY(45%) rotateX(60deg) scale(.8); } 30% { opacity: 1; } to { opacity: 1; transform: rotateX(12deg) rotateY(-10deg); } }
@keyframes inFloat { from { opacity: 0; transform: translateZ(-1600px) rotateX(25deg); } 30% { opacity: 1; } to { opacity: 1; transform: rotateX(12deg) rotateY(18deg); } }
@keyframes inOrbit { from { opacity: 0; transform: translateX(-70%) rotateY(55deg) rotateX(-30deg); } 30% { opacity: 1; } to { opacity: 1; transform: rotateX(10deg) rotateY(-16deg); } }
@keyframes inFlip { from { opacity: 0; transform: translateY(-30%) rotateX(-120deg); } 30% { opacity: 1; } to { opacity: 1; transform: rotateX(14deg) rotateY(10deg); } }

.d-tablet { padding: calc(20px * var(--k)); border-radius: calc(44px * var(--k)); background: #0E2433; box-shadow: 0 0 0 2px rgba(150, 214, 232, .4), 0 50px 140px rgba(36, 91, 128, .45); --sc: calc(var(--k) * .58); }
.d-ticket { position: absolute; left: -14%; bottom: -12%; --sc: calc(var(--k) * .6); transform: translateZ(140px); }
.d-phone { --sc: calc(var(--k) * .74); }
.d-side { position: absolute; left: 82%; top: 22%; --sc: calc(var(--k) * .8); transform: translateZ(120px); }
.d-laptop { display: flex; flex-direction: column; align-items: center; transform-style: preserve-3d; }
.d-lid { padding: calc(14px * var(--k)); background: #0E2433; border-radius: calc(26px * var(--k)) calc(26px * var(--k)) 0 0; box-shadow: 0 0 0 2px rgba(150, 214, 232, .35); transform-origin: 50% 100%; --sc: calc(var(--k) * .56); }
.on .d-lid { animation: lidOpen .85s calc(var(--b) + .12s) var(--out) both; }
@keyframes lidOpen { from { transform: rotateX(-95deg); } to { transform: none; } }
.d-deck { width: 118%; height: calc(24px * var(--k)); border-radius: 0 0 calc(30px * var(--k)) calc(30px * var(--k)); background: linear-gradient(#CBD5E1, #64748B); box-shadow: 0 40px 100px rgba(36, 91, 128, .45); }
.d-flat { --sc: calc(var(--k) * .56); }
.d-pop { position: absolute; --sc: calc(var(--k) * .66); }
.d-pop.p1 { left: -16%; top: 6%; }
.d-pop.p2 { right: -12%; bottom: -8%; }
.on .d-pop { animation: popOut .7s calc(var(--b) + .4s) var(--out) both; }
.on .d-pop.p2 { animation-delay: calc(var(--b) + .52s); }
@keyframes popOut { from { opacity: 0; transform: translateZ(0) scale(.6); } to { opacity: 1; transform: translateZ(230px); } }
.d-orbit { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.on .d-orbit { animation: orbit 4.5s calc(var(--b) + .1s) linear infinite; }
.d-orbit > div { position: absolute; left: 0; top: 0; --sc: calc(var(--k) * .62); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.d-orbit .o1 { transform: translate(-50%, -50%) rotateY(-50deg) translateZ(calc(470px * var(--k))) translateY(-40%); }
.d-orbit .o2 { transform: translate(-50%, -50%) rotateY(130deg) translateZ(calc(470px * var(--k))) translateY(50%); }
@keyframes orbit { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
.d-mini { position: absolute; right: -8%; bottom: -14%; --sc: calc(var(--k) * .4); transform: translateZ(200px); }
.on .d-mini, .on .d-side, .on .d-ticket { animation: riseIn .6s calc(var(--b) + .42s) var(--out) both; }
.on .d-mini { animation-name: riseZ; }
@keyframes riseZ { from { opacity: 0; transform: translateZ(0) translateY(40px); } to { opacity: 1; transform: translateZ(200px); } }

/* 3 · Todo en uno */
.s-all { background: radial-gradient(ellipse at 50% 0%, #123A58, var(--bg) 60%, #000); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.5vh; padding: 80px 4vw 130px; }
.s-all.on { animation: zoomIn .6s var(--out) both; }
@keyframes zoomIn { from { opacity: 0; transform: scale(1.25); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.floor { position: absolute; left: -50%; right: -50%; bottom: -20%; height: 60%; transform: perspective(900px) rotateX(68deg); background-image: linear-gradient(rgba(44, 196, 224, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(44, 196, 224, .16) 1px, transparent 1px); background-size: 70px 70px; -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%); }
.on .floor { animation: floorMove 4s linear infinite; }
@keyframes floorMove { to { background-position: 0 140px; } }
.all-title { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .3em; font-size: clamp(34px, 5vw, 84px); font-weight: 900; letter-spacing: -.045em; line-height: 1.05; text-align: center; }
.on .all-a { animation: fromLeft .6s .05s var(--out) both; }
.on .all-b { animation: fromRight .6s .3s var(--out) both; }
.on .all-title { animation: fadeUpOut .45s 3.25s var(--io) forwards; }
.all-a, .all-b { display: inline-block; padding-bottom: .06em; }
@keyframes fromLeft { from { opacity: 0; transform: translateX(-80px); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fromRight { from { opacity: 0; transform: translateX(80px); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fadeUpOut { to { opacity: 0; transform: translateY(-30px); filter: blur(8px); } }
.all-grid { position: relative; display: grid; grid-template-columns: repeat(3, auto); gap: 2.6vh 2vw; perspective: 1600px; transform-style: preserve-3d; --sc: calc(var(--k) * .9); }
.on .all-grid { animation: tiltAway .55s 3.2s var(--io) forwards; }
@keyframes tiltAway { to { opacity: 0; transform: rotateX(38deg) translateY(-8%) scale(.82); filter: blur(6px); } }
.mod { display: flex; flex-direction: column; gap: 8px; }
.on .mod { animation: modIn .8s var(--d) var(--out) both; }
@keyframes modIn { from { opacity: 0; transform: translate3d(var(--fx), var(--fy), var(--fz)) rotate(var(--fr)) scale(.7); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.mod-name { font-size: clamp(15px, 1.7vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.mod-card .m-frag { box-shadow: 0 24px 70px rgba(36, 91, 128, .3), 0 0 0 1px rgba(150, 214, 232, .3); }
.mod-where { font-size: clamp(11px, 1vw, 17px); font-weight: 600; color: var(--cyan); opacity: .9; }

/* 4 · Beneficios */
.s-ben { background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 5vw; padding: 90px 6vw 130px; }
.s-ben.on { animation: wipeCircle .6s var(--snap) both; }
@keyframes wipeCircle { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(150% at 50% 50%); } }
.ben-lines { display: flex; flex-direction: column; gap: .12em; font-size: clamp(38px, 6vw, 104px); font-weight: 900; letter-spacing: -.05em; line-height: 1.02; }
.ben-line { opacity: 0; }
.on .ben-line { animation: lineIn .55s calc(var(--i) * .85s + .2s) var(--out) both, dim .4s calc(var(--i) * .85s + 1.05s) ease forwards; }
.on .ben-line:last-child { animation: lineIn .55s calc(var(--i) * .85s + .2s) var(--out) both; }
@keyframes lineIn { from { opacity: 0; transform: translateY(55%); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(-10% -5% -15% -5%); } }
@keyframes dim { to { opacity: .18; } }
.ben-art { position: relative; flex: 0 0 auto; width: min(32vw, 420px); aspect-ratio: 1; }
.ben-v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; }
.on .ben-v.v0 { animation: popIn .5s .25s var(--out) both, popOut2 .3s 1s ease forwards; }
.on .ben-v.v1 { animation: popIn .5s 1.1s var(--out) both, popOut2 .3s 1.85s ease forwards; }
.on .ben-v.v2 { animation: popIn .5s 1.95s var(--out) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.8) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes popOut2 { to { opacity: 0; transform: scale(1.08); } }
.tasks { width: 100%; background: #F4F7FC; border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px rgba(36, 91, 128, .18); }
.task { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 14px 16px; font-size: clamp(13px, 1.2vw, 17px); }
.task b { font-weight: 700; }
.task em { margin-left: auto; font-style: normal; font-weight: 700; color: #16A34A; }
.tick { width: 26px; height: 26px; border-radius: 8px; background: #16A34A; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.on .task .tick, .on .task em { animation: tickIn .35s calc(.5s + var(--t) * .14s) var(--out) both; }
@keyframes tickIn { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
.tasks-foot { align-self: flex-end; font-size: 13px; font-weight: 700; color: #245B80; letter-spacing: .08em; text-transform: uppercase; }
.v1 svg { width: 70%; transform: rotate(-90deg); }
.ring-bg, .ring { fill: none; stroke-width: 12; }
.ring-bg { stroke: #E1E8EE; }
.ring { stroke: #245B80; stroke-linecap: round; stroke-dasharray: 301.6; stroke-dashoffset: 301.6; }
.on .ring { animation: ringFill 1s 1.2s var(--out) forwards; }
@keyframes ringFill { to { stroke-dashoffset: 0; } }
.v1 b { position: absolute; font-size: clamp(26px, 3vw, 44px); font-weight: 900; letter-spacing: -.04em; margin-top: -1.2em; }
.v1 small { position: absolute; font-size: clamp(12px, 1.1vw, 16px); font-weight: 600; color: #64748B; margin-top: 1.6em; }
.v2 svg { width: 100%; height: 62%; overflow: visible; }
.grow { fill: none; stroke: #245B80; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 420; vector-effect: non-scaling-stroke; }
.grow-fill { fill: rgba(36, 91, 128, .1); opacity: 0; }
.on .grow { animation: draw 1s 2s var(--out) forwards; }
.on .grow-fill { animation: fadeIn .8s 2.3s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

/* 5 · Calidad */
.s-q { background: radial-gradient(ellipse at 70% 50%, #0E2A40, #000 65%); display: flex; align-items: center; gap: 4vw; padding: 90px 5vw 130px; }
.s-q.on { animation: shutter .55s var(--snap) both; }
@keyframes shutter { from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0 0 0 0); } }
.q-words { position: relative; flex: 0 0 38%; height: 1.3em; font-size: clamp(36px, 5.2vw, 90px); font-weight: 900; letter-spacing: -.05em; line-height: 1.1; z-index: 2; }
.q-w { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; padding-bottom: .1em; }
.on .q-w { animation: qIn .5s calc(var(--i) * .9s + .15s) var(--out) both, qOut .3s calc(var(--i) * .9s + .95s) var(--io) forwards; }
.on .q-w:last-child { animation: qIn .5s calc(var(--i) * .9s + .15s) var(--out) both; }
@keyframes qIn { from { opacity: 0; transform: translateX(-50px); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes qOut { to { opacity: 0; transform: translateY(-36px); filter: blur(10px); } }
.q-stage { flex: 1; align-self: stretch; display: flex; align-items: center; justify-content: center; perspective: 2000px; position: relative; }
.q-rig { position: relative; transform-style: preserve-3d; }
.on .q-rig { animation: rig 3.3s var(--io) both; }
@keyframes rig { from { transform: rotateY(-30deg) rotateX(16deg) scale(.9); } to { transform: rotateY(-8deg) rotateX(8deg) scale(1); } }
.q-laptop { display: flex; flex-direction: column; align-items: center; }
.q-lid { padding: calc(14px * var(--k)); background: #0E2433; border-radius: calc(24px * var(--k)) calc(24px * var(--k)) 0 0; box-shadow: 0 0 0 2px rgba(150, 214, 232, .35), 0 40px 120px rgba(36, 91, 128, .4); --sc: calc(var(--k) * .54); }
.q-views { position: relative; }
.q-view:not(:first-child) { position: absolute; inset: 0; clip-path: inset(0 0 0 100%); }
.on .q-view:not(:first-child) { animation: viewIn .5s calc(var(--i) * .9s + .1s) var(--snap) forwards; }
@keyframes viewIn { to { clip-path: inset(0 0 0 0); } }
.q-base { width: 118%; height: calc(22px * var(--k)); border-radius: 0 0 calc(28px * var(--k)) calc(28px * var(--k)); background: linear-gradient(#CBD5E1, #64748B); }
.q-phone { position: absolute; right: -10%; bottom: -16%; --sc: calc(var(--k) * .46); transform: translateZ(150px); }
.on .q-phone { animation: riseZ2 .8s .2s var(--out) both; }
@keyframes riseZ2 { from { opacity: 0; transform: translateZ(0) translateY(120px); } to { opacity: 1; transform: translateZ(150px); } }
.q-links { position: absolute; inset: -10%; width: 120%; height: 120%; pointer-events: none; transform: translateZ(80px); overflow: visible; }
.q-links path { fill: none; stroke: var(--cyan); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-dasharray: 6 8; opacity: 0; filter: drop-shadow(0 0 6px var(--blue)); }
.on .q-links path { animation: fadeIn .4s 1.95s forwards, dash 1s 1.95s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.q-chip { position: absolute; font-size: clamp(12px, 1.1vw, 17px); font-weight: 700; padding: 9px 16px; border-radius: 999px; background: rgba(8, 14, 30, .8); border: 1px solid rgba(44, 196, 224, .5); color: #fff; box-shadow: 0 0 24px rgba(0, 179, 214, .45); opacity: 0; transform: translateZ(160px); white-space: nowrap; }
.q-chip.c1 { left: -6%; top: 8%; } .q-chip.c2 { right: 4%; top: -8%; } .q-chip.c3 { left: 18%; bottom: -12%; }
.on .q-chip { animation: chipIn .45s 2s var(--out) forwards; }
.on .q-chip.c2 { animation-delay: 2.12s; } .on .q-chip.c3 { animation-delay: 2.24s; }
@keyframes chipIn { from { opacity: 0; transform: translateZ(160px) scale(.5); } to { opacity: 1; transform: translateZ(160px); } }
.speed-lines { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: repeating-linear-gradient(0deg, transparent 0 34px, rgba(44, 196, 224, .18) 34px 36px, transparent 36px 90px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); }
.on .speed-lines { animation: speed .9s 1s linear both; }
@keyframes speed { 0% { opacity: 0; transform: translateX(-30%) scaleX(1.6); } 25% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateX(30%) scaleX(1.6); } }

/* 6 · Cierre de marca */
.s-brand { background: var(--bg); display: flex; align-items: center; justify-content: center; text-align: center; }
.s-brand.on { animation: fadeIn .6s ease both; }
.brand-glow { position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; background: radial-gradient(closest-side, rgba(36, 91, 128, .35), transparent); }
.on .brand-glow { animation: breathe 5s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(.85); opacity: .7; } to { transform: scale(1.05); opacity: 1; } }
.brand-phrase { position: absolute; padding: 0 8vw; font-size: clamp(30px, 4.4vw, 78px); font-weight: 800; letter-spacing: -.04em; line-height: 1.08; opacity: 0; }
.brand-phrase .grad { display: block; }
.on .brand-phrase { animation: riseBlur .8s .1s var(--out) both, fadeUpOut .4s 1.15s var(--io) forwards; }
@keyframes riseBlur { from { opacity: 0; transform: translateY(30px); filter: blur(14px); } to { opacity: 1; transform: none; filter: none; } }
.brand-final { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.logo-big { position: relative; display: inline-flex; align-items: center; gap: .3em; font-size: clamp(56px, 8vw, 132px); opacity: 0; overflow: hidden; padding: .06em .1em; }
.on .logo-big { animation: logoIn .9s 1.33s var(--out) both; }
@keyframes logoIn { from { opacity: 0; transform: scale(.8); filter: blur(18px); } to { opacity: 1; transform: none; filter: none; } }
.brand-mark.xl { width: 1em; height: 1em; border-radius: .28em; box-shadow: 0 0 .6em rgba(0, 179, 214, .6); }
.logo-word { font-weight: 900; letter-spacing: -.05em; }
.logo-shine { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%); background-size: 250% 100%; background-position: 120% 0; mix-blend-mode: overlay; pointer-events: none; }
.on .logo-shine { animation: shine 1s 1.75s var(--io) both; }
@keyframes shine { from { background-position: 120% 0; } to { background-position: -40% 0; } }
.brand-tag { font-size: clamp(18px, 2.2vw, 34px); font-weight: 500; color: var(--muted); }
.on .brand-tag { animation: riseIn .6s 1.8s var(--out) both; }
.brand-cue { position: absolute; bottom: 150px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; color: var(--muted); }
.on .brand-cue { animation: riseIn .6s 2.4s var(--out) both; }
.mouse { width: 26px; height: 42px; border-radius: 16px; border: 2px solid rgba(154, 169, 199, .6); display: flex; justify-content: center; padding-top: 7px; }
.mouse i { width: 5px; height: 10px; border-radius: 5px; background: var(--cyan); animation: wheel 1.3s ease-in-out infinite; }
@keyframes wheel { from { transform: none; opacity: 1; } to { transform: translateY(14px); opacity: 0; } }

/* ---------- Controles de la intro ---------- */
.intro-ui { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 18px 20px max(18px, env(safe-area-inset-bottom)); pointer-events: none; transition: opacity .45s, visibility .45s; }
.intro-ui > * { pointer-events: auto; }
.intro-ctas { display: flex; gap: 10px; }
.intro-bar { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 999px; background: rgba(8, 14, 30, .6); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 36px; padding: 0 10px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .08); cursor: pointer; font-size: 13px; font-weight: 600; transition: background-color .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .18); }
.i-pause { width: 12px; height: 12px; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.paused .i-pause { border: 0; width: 0; height: 0; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 2px; }
.i-sound { width: 16px; height: 14px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M2 7h4l6-5v16l-6-5H2z'/%3E%3Cpath d='M16 6l6 8M22 6l-6 8' stroke='%23000' stroke-width='2.4' fill='none'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M2 7h4l6-5v16l-6-5H2z'/%3E%3Cpath d='M16 6l6 8M22 6l-6 8' stroke='%23000' stroke-width='2.4' fill='none'/%3E%3C/svg%3E") center / contain no-repeat; }
.sound[aria-pressed="true"] { background: var(--blue-d); }
.sound[aria-pressed="true"] .i-sound { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M2 7h4l6-5v16l-6-5H2z'/%3E%3Cpath d='M16 6c2 2 2 6 0 8M19 3c4 4 4 10 0 14' stroke='%23000' stroke-width='2' fill='none'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M2 7h4l6-5v16l-6-5H2z'/%3E%3Cpath d='M16 6c2 2 2 6 0 8M19 3c4 4 4 10 0 14' stroke='%23000' stroke-width='2' fill='none'/%3E%3C/svg%3E"); }
.mode-intro .sound:not([aria-pressed="true"]) { animation: nudge 2.4s 3s ease-in-out 2; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(44, 196, 224, 0); } 50% { box-shadow: 0 0 0 6px rgba(44, 196, 224, .25); } }
.segs { display: flex; gap: 5px; }
.seg { width: 34px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.seg i { display: block; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); position: relative; overflow: hidden; }
.seg i::after { content: ""; position: absolute; inset: 0; background: var(--cyan); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.seg:hover i { background: rgba(255, 255, 255, .35); }
@media (max-width: 760px) {
  .intro-ui { flex-direction: column-reverse; align-items: stretch; gap: 10px; padding: 12px 14px max(14px, env(safe-area-inset-bottom)); }
  .intro-ctas { gap: 8px; }
  .intro-ctas a { flex: 1; padding: 13px 10px; font-size: 15px; }
  .intro-bar { justify-content: space-between; }
  .segs { flex: 1; }
  .seg { flex: 1; width: auto; }
  .sound .sound-txt { display: none; }
  .brand-cue { bottom: 170px; }
}

/* ---------- Celular y pantallas verticales ---------- */
.portrait .sec { flex-direction: column; justify-content: flex-start; padding: 96px 20px 150px; gap: 10px; }
.portrait .sec-text { flex: 0 0 auto; align-items: center; text-align: center; gap: 12px; }
.portrait .sec-chip { align-self: center; }
.portrait .sec-word { font-size: clamp(38px, 11vw, 64px); }
.portrait .sec-stage { width: 100%; }
.portrait .d-tablet { --sc: calc(var(--k) * .66); }
.portrait .d-phone { --sc: calc(var(--k) * 1.05); }
.portrait .d-side { left: 55%; top: 40%; --sc: calc(var(--k) * .9); }
.portrait .d-lid, .portrait .d-flat { --sc: calc(var(--k) * .64); }
.portrait .d-pop { --sc: calc(var(--k) * .8); }
.portrait .d-pop.p1 { left: -4%; top: -30%; }
.portrait .d-pop.p2 { right: -4%; bottom: -40%; }
.portrait .d-orbit > div { --sc: calc(var(--k) * .75); }
.portrait .d-ticket { left: -4%; bottom: auto; top: -26%; --sc: calc(var(--k) * .75); }
.portrait .d-mini { --sc: calc(var(--k) * .55); right: -2%; bottom: -60%; }
.portrait .s-all { padding: 90px 16px 150px; gap: 18px; }
.portrait .all-grid { grid-template-columns: repeat(2, auto); gap: 14px 12px; --sc: calc(var(--k) * .88); }
.portrait .s-ben { flex-direction: column; padding: 90px 22px 150px; gap: 28px; }
.portrait .ben-lines { font-size: clamp(36px, 10.5vw, 60px); text-align: center; align-items: center; }
.portrait .ben-art { width: min(78vw, 340px); }
.portrait .s-q { flex-direction: column; padding: 100px 20px 160px; gap: 30px; }
.portrait .q-words { flex: 0 0 auto; width: 100%; text-align: center; font-size: clamp(34px, 9.5vw, 56px); }
.portrait .q-w { left: 0; right: 0; }
.portrait .q-lid { --sc: calc(var(--k) * .66); }
.portrait .q-phone { --sc: calc(var(--k) * .55); right: -4%; }
.portrait .q-chip.c1 { left: 8%; top: -16%; }
.portrait .q-chip.c2 { right: 2%; }
.portrait .hook-screen { --sc: calc(var(--k) * 1.05); }

/* ---------- Portada estática ---------- */
.cover { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 2vw; padding: 100px 5vw 60px; }
.cover-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 75% 40%, rgba(36, 91, 128, .3), transparent 55%), radial-gradient(ellipse at 10% 90%, rgba(44, 196, 224, .12), transparent 50%), var(--bg); }
.cover-text { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 18px; }
.cover-title { margin: 0; font-size: clamp(40px, 4.7vw, 80px); font-weight: 900; letter-spacing: -.05em; line-height: 1.02; }
.cover-sub { margin: 0; font-size: clamp(20px, 2.2vw, 32px); font-weight: 600; color: #D7EEF5; letter-spacing: -.02em; }
.cover-sectors { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }
.replay { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 6px 0; border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; transition: color .2s; }
.replay:hover { color: #fff; }
.reduce .replay { display: none; }
.cover-art { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; justify-content: center; perspective: 1800px; }
.ca-rig { position: relative; transform-style: preserve-3d; transform: rotateY(-18deg) rotateX(8deg); }
.ca-screen { --sc: calc(var(--k) * .5); }
.ca-phone { position: absolute; right: -10%; bottom: -18%; --sc: calc(var(--k) * .42); transform: translateZ(120px); }
.ca-frag { position: absolute; left: -4%; top: 64%; --sc: calc(var(--k) * .62); transform: translateZ(90px); }
/* El texto se ve desde el primer instante (solo se acomoda); las pantallas entran con fundido. */
.mode-cover .cover-text > * { animation: settle .6s var(--out) both; }
.mode-cover .ca-rig { animation: riseIn .6s var(--out) both; }
@keyframes settle { from { transform: translateY(12px); } to { transform: none; } }
.mode-cover .cover-text > :nth-child(2) { animation-delay: .05s; } .mode-cover .cover-text > :nth-child(3) { animation-delay: .1s; }
.mode-cover .cover-text > :nth-child(n+4) { animation-delay: .15s; } .mode-cover .ca-rig { animation-delay: .1s; }
@media (max-width: 860px) {
  .hero { height: auto; min-height: 100svh; }
  .mode-intro .hero { height: 100svh; }
  .cover { position: relative; grid-template-columns: minmax(0, 1fr); padding: 96px 20px 40px; gap: 34px; }
  .mode-intro .cover { position: absolute; }
  .cover-art { height: 300px; }
  .ca-screen { --sc: calc(var(--k) * .68); }
  .ca-phone { --sc: calc(var(--k) * .6); }
  .ca-frag { --sc: calc(var(--k) * .8); left: -4%; }
  .cta-row a { flex: 1; }
}


/* ---------- Más movimiento entre escenas (11-23) ---------- */
/* El sector que se va retrocede y se oscurece mientras el siguiente entra encima. */
.on .sec:not(:last-child) .sec-text, .on .sec:not(:last-child) .sec-stage { animation: secBack .55s calc(var(--b) + .78s) var(--io) forwards; }
@keyframes secBack { to { transform: scale(.9) translateX(-4%); filter: brightness(.55) blur(3px); opacity: .6; } }
/* La palabra del sector sigue empujando hacia adelante mientras está en pantalla. */
.on .sec-word { animation: push 1.2s calc(var(--b) + .3s) linear both; }
@keyframes push { from { transform: none; } to { transform: translateX(14px) scale(1.03); } }

/* Barrido de luz que cruza la pantalla al cambiar de escena. */
.s-all::after, .s-ben::after, .s-q::after, .s-brand::after, .s-sectors::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 42%; pointer-events: none; z-index: 5;
  background: linear-gradient(90deg, transparent, rgba(0, 179, 214, .35) 40%, rgba(255, 255, 255, .5) 50%, rgba(0, 179, 214, .35) 60%, transparent);
  transform: translateX(-130%) skewX(-18deg); mix-blend-mode: screen; opacity: 0;
}
.s-ben::after { mix-blend-mode: multiply; background: linear-gradient(90deg, transparent, rgba(36, 91, 128, .18) 45%, rgba(36, 91, 128, .28) 50%, rgba(36, 91, 128, .18) 55%, transparent); }
.s-all.on::after, .s-ben.on::after, .s-q.on::after, .s-brand.on::after, .s-sectors.on::after { animation: sweep .7s .02s var(--io) both; }
@keyframes sweep { 0% { opacity: 0; transform: translateX(-130%) skewX(-18deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(300%) skewX(-18deg); } }

/* Partículas que suben en las escenas oscuras: el fondo nunca está quieto. */
.s-hook::before, .s-all::before, .s-q::before, .s-brand::before {
  content: ""; position: absolute; inset: -50% 0 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(1.5px 1.5px at 12% 30%, #9BE7F5, transparent), radial-gradient(1px 1px at 28% 70%, #fff, transparent),
    radial-gradient(2px 2px at 46% 20%, #2CC4E0, transparent), radial-gradient(1px 1px at 63% 55%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 80% 35%, #9BE7F5, transparent), radial-gradient(1px 1px at 92% 80%, #fff, transparent);
  background-size: 420px 420px;
}
.on.s-hook::before, .on.s-all::before, .on.s-q::before, .on.s-brand::before { animation: rise 9s linear infinite; }
@keyframes rise { to { transform: translateY(420px); } }

/* Mensaje principal: la cámara se acerca despacio; el texto respira. */
.on .hook-text { transform-origin: 50% 50%; }
.s-hook.on .hook-screen { animation: camIn 2.8s linear both; }
@keyframes camIn { from { transform: scale(1.12); } to { transform: scale(1); } }

/* Beneficios y calidad: un leve vaivén de cámara en lo que está a la derecha. */
.on .ben-art { animation: float 3s ease-in-out both; }
@keyframes float { from { transform: translateY(16px) rotate(-1.5deg); } to { transform: translateY(-10px) rotate(1deg); } }
.on .q-words { animation: push 3.2s linear both; }

/* Cierre: el logo late con el golpe final y suelta un anillo. */
.brand-final::before { content: ""; position: absolute; left: 50%; top: 40%; width: 20vmin; height: 20vmin; margin: -10vmin 0 0 -10vmin; border-radius: 50%; border: 2px solid rgba(44, 196, 224, .7); opacity: 0; pointer-events: none; }
.on .brand-final::before { animation: ring 1.2s 1.33s var(--out) both; }
@keyframes ring { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(4.5); } }

/* Sonido encendido pero esperando el primer toque: el botón late suave para invitar. */
.sound.waiting { box-shadow: 0 0 0 0 rgba(18, 115, 251, .6); animation: soundCall 1.6s ease-out infinite; }
@keyframes soundCall { 0% { box-shadow: 0 0 0 0 rgba(18, 115, 251, .55); } 100% { box-shadow: 0 0 0 14px rgba(18, 115, 251, 0); } }
@media (prefers-reduced-motion: reduce) { .sound.waiting { animation: none; } }
