/* TodAps — movimiento del inicio (2026-12-01).
   Reemplaza el movimiento calculado en cada cuadro: cada bloque entra UNA vez, con opacity + translate,
   y siempre termina completo. Los detalles de fondo usan animaciones ligadas al scroll del navegador. */

/* html ya recorta en horizontal; con "hidden" el body era un segundo contenedor de scroll
   y dejaba sin efecto position: sticky y animation-timeline: view(). */
body { overflow-x: clip !important; }
#productos, #tab-inicio .home-bio { overflow: clip !important; }

/* 1) Entradas */
html #tab-inicio :is(.home-service-list > li, .home-product-grid > li, .home-proof-card).td-rv { opacity: 1; will-change: auto !important; }
html #tab-inicio :is(.home-service-list > li, .home-product-grid > li).td-rv { transform: none; }
html.td-motion #tab-inicio .td-rv:not(.td-done) {
  transition: opacity 560ms cubic-bezier(.22, 1, .36, 1) var(--td-delay, 0ms), translate 680ms cubic-bezier(.22, 1, .36, 1) var(--td-delay, 0ms) !important;
}
html.td-motion #tab-inicio .td-rv:not(.td-in) { opacity: 0 !important; translate: 0 28px; }
html.td-motion #tab-inicio .td-rv.td-in { opacity: 1 !important; translate: none; }
/* El contenedor ya no se anima además de sus tarjetas (antes se sumaban dos o tres entradas). */
html.td-motion #tab-inicio .home-motion-group :is(.home-service-list, .dw-syslist) { opacity: 1 !important; transform: none !important; transition: none !important; }

/* 2) Fila de servicio destacada: un estado completo, nunca a medias */
html #tab-inicio .home-service-row::before { opacity: 0; transform: none; transition: opacity 240ms ease; }
html #tab-inicio .home-service-row.is-scroll-focus::before { opacity: .98 !important; transform: none !important; transition: opacity 240ms ease !important; }
@media (hover: hover) and (pointer: fine) {
  html #tab-inicio .home-service-list:hover .home-service-row.is-scroll-focus:not(:hover)::before { opacity: 0 !important; }
}
#tab-inicio .home-service-row { transition: transform 220ms cubic-bezier(.22, 1, .36, 1), background-color 200ms ease, color 200ms ease !important; }

/* 3) Cinta: cuatro grupos idénticos, vuelta exacta sin salto ni hueco en pantallas anchas */
.home-kinetic-track { padding-inline: 0 !important; transform: none !important; gap: 0 !important; animation-name: td-kinetic-loop !important; will-change: auto; }
.home-kinetic-track > * { margin-right: clamp(1rem, 2.5vw, 2.5rem); }
.home-kinetic-rail.motion-in-view .home-kinetic-track { will-change: translate; }
@keyframes td-kinetic-loop { from { translate: 0 0; } to { translate: -25% 0; } }

/* 4) Fondos ligados al scroll, sin JavaScript */
#tab-inicio .home-services::after, #productos::before, #tab-inicio .home-bio::after { transform: none; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    #tab-inicio .home-services::after { animation: td-mobile-services-word-scroll linear both; animation-timeline: view(block); }
    #productos::before { animation: td-mobile-product-orb-scroll linear both; animation-timeline: view(block); }
    #tab-inicio .home-bio::after { animation: td-mobile-bio-orb-scroll linear both; animation-timeline: view(block); }
  }
}

/* 5) Contraste de los iconos de producto sobre tarjeta clara (antes 2.9:1) */
#productos .dw-product-icon { color: #006b94 !important; }

@media (prefers-reduced-motion: reduce) {
  html.td-motion #tab-inicio .td-rv:not(.td-in) { translate: none; }
}

/* 6) "Quiero promocionar mi marca" no tenía color asignado y su fondo quedaba transparente */
#tab-inicio a.home-service-row[href="/publicidad-ia/"] {
  --nav-accent: #ff2d46; --nav-accent-readable: #c8102e; --nav-accent-dark: #ff5f69; --nav-accent-rgb: 255 45 70;
}
/* El icono grande también pasa a blanco cuando la fila se destaca al bajar */
#tab-inicio .home-service-row.is-scroll-focus .home-need-icon { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  #tab-inicio .home-service-list:hover .home-service-row.is-scroll-focus:not(:hover) .home-need-icon { color: var(--nav-accent-dark, #38bdf8); }
}

/* Fotografía: sin panel encima. El contenido va directo sobre el fondo de la página, igual que las demás. */
html .fe.photo-redesign { --fe-bg: var(--tds-bg, #f7f7f8); --fe-soft: #ececf0; background: none; border-radius: 0; margin: 0; padding-inline: 0; }
html.dark .fe.photo-redesign { --fe-bg: var(--tds-bg, #0e1116); --fe-soft: #181c24; }
/* Modo oscuro: el fondo de la página es el mismo de la barra de arriba (antes se notaba una franja distinta). */
html.dark, html.dark body { background-color: var(--tds-bg, #0e1116) !important; }
