/* Movimiento compartido · Alejandra García Franco · Oráculo Analytics */
:root { --ease: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.7, 0, .84, 0); }

/* Aparición */
.js .revelar { opacity: 0; translate: 0 32px; transition: opacity 1.1s var(--ease), translate 1.3s var(--ease); transition-delay: var(--d, 0s); }
.js .revelar.visible { opacity: 1; translate: none; }

.js [data-escalonado] > * { opacity: 0; translate: 0 26px; transition: opacity .9s var(--ease), translate 1.1s var(--ease); transition-delay: calc(var(--k, 0) * 90ms + var(--d, 0s)); }
.js [data-escalonado].visible > * { opacity: 1; translate: none; }

/* Títulos que emergen palabra por palabra */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .1em .14em 0; margin: 0 -.1em -.14em 0; }
[data-split] .wi { display: inline-block; }
.js [data-split] .wi { translate: 0 112%; transition: translate 1.25s var(--ease); transition-delay: calc(var(--i) * 60ms + var(--d, 0s)); }
.js [data-split].visible .wi { translate: none; }

/* Fotos que se revelan como una impresión */
.js [data-reveal="clip"] { clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="clip"].visible { clip-path: inset(0 0 0 0); }
.js [data-reveal="clip"] img { scale: 1.2; transition: scale 2.2s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="clip"].visible img { scale: 1; }

/* Texto que se ilumina con el scroll */
.js [data-ilumina] .wl { opacity: .16; transition: opacity .55s ease; }
.js [data-ilumina] .wl.on { opacity: 1; }

/* Parallax */
[data-parallax] { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; backface-visibility: hidden; }

/* Progreso de lectura */
.progreso { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: var(--progreso, currentColor); pointer-events: none; }

/* Banda en movimiento */
.marquesina { display: flex; overflow: hidden; user-select: none; }
.marquesina .pista { display: flex; flex: none; align-items: center; animation: desliza var(--dur, 48s) linear infinite; will-change: transform; backface-visibility: hidden; }
.marquesina:hover .pista { animation-play-state: paused; }
@keyframes desliza { to { transform: translateX(-100%); } }

/* Cursor de tinta */
.tinta-cursor { position: fixed; left: 0; top: 0; z-index: 4; width: 170px; height: 170px; margin: -85px 0 0 -85px; pointer-events: none;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%; background: var(--tinta, #D99A3A); mix-blend-mode: multiply; opacity: .9;
  scale: 0; transition: scale .5s var(--ease), background-color .5s ease; animation: tinta-gira 9s linear infinite; }
.tinta-cursor.on { scale: 1; }
@keyframes tinta-gira { to { rotate: 360deg; } }

/* Barra que se oculta al bajar */
.barra { transition: transform .7s var(--ease), background-color .4s ease, border-color .4s ease, box-shadow .4s ease; }
.barra.oculta { transform: translateY(-110%); }

/* Intro */
#intro { display: none; }
.con-intro body { overflow: hidden; }
.con-intro #intro { display: grid; position: fixed; inset: 0; z-index: 200; place-items: center; cursor: pointer;
  clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease-in); }
.intro-sale #intro { clip-path: inset(0 0 100% 0); }

@keyframes gira { to { rotate: 360deg; } }
@keyframes flota { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .js .revelar, .js [data-escalonado] > *, .js [data-split] .wi { opacity: 1 !important; translate: none !important; transition: none !important; }
  .js [data-reveal="clip"] { clip-path: none !important; }
  .js [data-reveal="clip"] img { scale: 1 !important; }
  .js [data-ilumina] .wl { opacity: 1 !important; }
  .marquesina .pista, .tinta-cursor { animation: none !important; }
  .boton:active, .sitios-boton:active { scale: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* Botón flotante de WhatsApp */
.wa-flotante{position:fixed; z-index:90; right:calc(18px + env(safe-area-inset-right,0px)); bottom:calc(18px + env(safe-area-inset-bottom,0px));
  width:58px; height:58px; border-radius:50%; display:grid; place-items:center; background:var(--wa-fondo,#3F3935); color:var(--wa-icono,#fff);
  box-shadow:0 14px 30px -12px rgba(30,24,20,.55); text-decoration:none; opacity:0; translate:0 24px; scale:.8; pointer-events:none;
  transition:opacity .5s var(--ease), translate .6s var(--ease), scale .6s var(--ease)}
.wa-flotante.ver{opacity:1; translate:none; scale:1; pointer-events:auto}
.wa-flotante:hover{scale:1.07}
.wa-flotante svg{width:28px; height:28px}
.wa-flotante::after{content:attr(data-etq); position:absolute; right:calc(100% + 12px); top:50%; translate:0 -50%; white-space:nowrap; padding:8px 14px; border-radius:999px;
  background:var(--wa-fondo,#3F3935); color:var(--wa-icono,#fff); font:600 .88rem/1 system-ui,sans-serif; opacity:0; transition:opacity .3s; pointer-events:none}
.wa-flotante:hover::after,.wa-flotante:focus-visible::after{opacity:1}
.wa-flotante:focus-visible{outline:2px solid var(--wa-fondo,#3F3935); outline-offset:4px}
.con-intro .wa-flotante{display:none}
@media print{.wa-flotante{display:none}}
