/* Movimiento de LLEVO: solo con JS activo y si el usuario no pide menos animación */
@media (prefers-reduced-motion: no-preference) {

  /* Cabecera con sombra al hacer scroll */
  .site-header { transition: box-shadow .3s ease; }
  .site-header.scrolled { box-shadow: 0 6px 24px rgba(74,44,33,.08); }

  /* Portada: entrada escalonada del texto */
  .js .hero-text > * { opacity: 0; animation: llevoUp .8s cubic-bezier(.2,.8,.2,1) forwards; }
  .js .hero-text > :nth-child(1) { animation-delay: .1s; }
  .js .hero-text > :nth-child(2) { animation-delay: .22s; }
  .js .hero-text > :nth-child(3) { animation-delay: .36s; }
  .js .hero-text > :nth-child(4) { animation-delay: .5s; }

  /* Portada: las dos L llegan y encajan formando la caja */
  .js .hero-symbol { animation: llevoFloat 7s ease-in-out 2s infinite; }
  .js .hero-symbol .l-cacao { opacity: 0; animation: llevoLCacao 1.1s cubic-bezier(.2,.9,.25,1) .35s forwards; }
  .js .hero-symbol .l-caramelo { opacity: 0; animation: llevoLCaramelo 1.1s cubic-bezier(.2,.9,.25,1) .6s forwards; }
  .js .hero-tag { opacity: 0; animation: llevoTag 1s ease-out 1.5s forwards; }

  /* Aparición al hacer scroll */
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  /* Números de los pasos: pequeño rebote */
  .js .step .step-num { transform: scale(.4); transition: transform .5s cubic-bezier(.3,1.6,.5,1) .25s; }
  .js .step.is-visible .step-num { transform: scale(1); }

  /* Línea del tiempo que se dibuja */
  .js .timeline::before { transform: scaleX(0); transform-origin: left; transition: transform 1.6s cubic-bezier(.6,0,.2,1) .1s; }
  .js .timeline.is-visible::before { transform: scaleX(1); }
  .js .timeline li::before { transform: scale(0) rotate(45deg); transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
  .js .timeline li.is-visible::before { transform: scale(1) rotate(0); }

  /* Tarjetas y botones: respuesta al pasar el ratón */
  .card, .step, .contact-card { transition: transform .25s ease, box-shadow .25s ease; }
  .card:hover, .step:hover, .contact-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(74,44,33,.10); }
  .tags li { transition: background .2s, color .2s; }
  .tags li:hover { background: var(--cacao); color: var(--arena); }

  /* Cinta en movimiento */
  .ticker-track { animation: llevoTicker 38s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }

  @keyframes llevoUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes llevoLCacao { from { opacity: 0; transform: translate(-26px, 26px); } to { opacity: 1; transform: none; } }
  @keyframes llevoLCaramelo { from { opacity: 0; transform: translate(26px, -26px); } to { opacity: 1; transform: none; } }
  @keyframes llevoTag { from { opacity: 0; letter-spacing: .6em; } to { opacity: 1; letter-spacing: .3em; } }
  @keyframes llevoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
  @keyframes llevoTicker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
}

/* Cinta: estilos base (sin movimiento si se pide menos animación) */
.ticker { background: var(--arena); border-bottom: 1px solid var(--linea); overflow: hidden; padding: 22px 0; white-space: nowrap; }
.ticker-track { display: inline-flex; width: max-content; }
.ticker-group { display: inline-flex; }
.ticker-group span {
  font-family: var(--titulos); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: var(--cacao); padding: 0 28px; display: inline-flex; align-items: center; gap: 56px;
}
.ticker-group span::after { content: ""; width: 12px; height: 12px; background: var(--caramelo); display: inline-block; }
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .ticker-group { flex-wrap: wrap; justify-content: center; width: auto; display: flex; white-space: normal; row-gap: 8px; }
  .ticker-group[aria-hidden="true"] { display: none; }
}
