/* El Ceibo · movimiento sutil
   Todo se desactiva con "reducir movimiento" del sistema operativo. */

/* Transición suave al cambiar de página (Chrome/Edge/Safari recientes; el resto navega normal) */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.28s;animation-timing-function:ease}

/* Entrada de la portada */
@keyframes ceibo-subir{from{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}
.hero .arbol,.hero h1 .marca,.hero h1 .bajada-h1,.hero h1 .claim,.hero .lema,.hero .hero-sub,.hero .hero-acciones,.hero .chips,
.perfil-hero .perfil-foto,.perfil-hero .perfil-info>*{animation:ceibo-subir .9s cubic-bezier(.2,.7,.2,1) both}
.hero h1 .marca{animation-delay:.12s}
.hero h1 .bajada-h1{animation-delay:.2s}
.hero h1 .claim{animation-delay:.3s}
.hero .lema{animation-delay:.42s}
.hero .hero-sub{animation-delay:.52s}
.hero .hero-acciones{animation-delay:.62s}
.hero .chips{animation-delay:.74s}
.perfil-hero .perfil-info>*:nth-child(2){animation-delay:.1s}
.perfil-hero .perfil-info>*:nth-child(3){animation-delay:.18s}
.perfil-hero .perfil-info>*:nth-child(4){animation-delay:.26s}
.perfil-hero .perfil-info>*:nth-child(5){animation-delay:.34s}

/* Aparición al desplazarse (la clase js-mov la agrega el script; sin JS todo se ve normal) */
.js-mov .rv{
  opacity:0;translate:0 26px;
  transition:opacity .8s ease var(--d,0s),translate .8s cubic-bezier(.2,.7,.2,1) var(--d,0s),transform .25s ease,box-shadow .25s ease;
}
.js-mov .rv.rv-in{opacity:1;translate:0 0}

/* Encabezado: sombra suave al bajar */
header{transition:box-shadow .3s ease}
header.scrolled{box-shadow:0 10px 26px -20px rgba(28,61,50,.65)}

/* Menú: subrayado animado y sección activa */
nav ul a:not(.btn){position:relative}
nav ul a:not(.btn)::after{
  content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;background:var(--rojo-ceibo);
  transform:scaleX(0);transform-origin:left;transition:transform .3s ease;
}
nav ul a:not(.btn):hover::after,nav ul a[aria-current="true"]::after{transform:scaleX(1)}
nav ul a[aria-current="true"]{color:var(--rojo-ceibo)}

/* Fotos del equipo: acercamiento lento al pasar el cursor */
.prof-foto img,.perfil-foto img{transition:transform .8s cubic-bezier(.2,.7,.2,1)}
.prof:hover .prof-foto img{transform:scale(1.04)}

/* Preguntas frecuentes: el texto aparece al abrir */
@keyframes ceibo-abrir{from{opacity:0;translate:0 -6px}to{opacity:1;translate:0 0}}
.faq-item[open] p{animation:ceibo-abrir .35s ease}

@media (prefers-reduced-motion:reduce){
  @view-transition{navigation:none}
  .hero .arbol,.hero h1 .marca,.hero h1 .bajada-h1,.hero h1 .claim,.hero .lema,.hero .hero-sub,.hero .hero-acciones,.hero .chips,
  .perfil-hero .perfil-foto,.perfil-hero .perfil-info>*,.faq-item[open] p{animation:none}
  .js-mov .rv{opacity:1;translate:none;transition:none}
  .prof-foto img,.perfil-foto img,nav ul a:not(.btn)::after,header{transition:none}
  .prof:hover .prof-foto img{transform:none}
}
