/* Movimiento ligado al scroll — solo CSS, sin librerías ni JavaScript.
   Si el navegador no lo soporta, o la persona tiene activado «reducir movimiento», la página se ve estática. */
.nav{position:sticky;top:0;z-index:20}

@supports (animation-timeline:view()){
@media (prefers-reduced-motion:no-preference){

  /* 1 · Cabecera: se compacta al empezar a bajar */
  @keyframes nav-h{to{height:60px}}
  @keyframes nav-s{to{box-shadow:0 10px 30px rgba(11,37,55,.08)}}
  .nav{animation:nav-s linear both;animation-timeline:scroll(root);animation-range:0px 140px}
  .nav__in{animation:nav-h linear both;animation-timeline:scroll(root);animation-range:0px 140px}

  /* 2 · Portada: las piezas se mueven a velocidades distintas (profundidad). Solo en escritorio */
  @media (min-width:761px){
    @keyframes d1{to{transform:translateY(-24px)}}
    @keyframes d2{to{transform:translateY(-78px)}}
    @keyframes d3{to{transform:translateY(-54px)}}
    @keyframes d4{to{transform:translateY(-128px)}}
    @keyframes d0{to{background-position:-1px 27px}}
    .stage{animation:d0 linear both;animation-timeline:scroll(root);animation-range:0px 780px}
    .stage .sheet{animation:d1 linear both;animation-timeline:scroll(root);animation-range:0px 780px}
    .stage .sheet--b1{animation:d4 linear both;animation-timeline:scroll(root);animation-range:0px 780px}
    .stage .sheet--b2{animation:d2 linear both;animation-timeline:scroll(root);animation-range:0px 780px}
  }

  /* 3 · Fotos: la imagen se desplaza despacio dentro de su marco */
  @keyframes pan{from{transform:scale(1.1) translateY(-3.5%)}to{transform:scale(1.1) translateY(3.5%)}}
  .together__photo img,.close__photo img{animation:pan linear both;animation-timeline:view();animation-range:entry 0% exit 100%}

  /* 4 · Las dos audiencias suben sobre la foto, una detrás de otra */
  @keyframes rise{from{transform:translateY(64px)}to{transform:none}}
  .aud__c{animation:rise linear both;animation-timeline:view();animation-range:entry 0% cover 22%}
  .aud__c--teal{animation-range:entry 30% cover 32%}

  /* 5 · Calendario VERI*FACTU: las fechas aparecen en orden */
  @keyframes node{from{opacity:.14;transform:translateY(18px)}to{opacity:1;transform:none}}
  .tl__n{animation:node linear both;animation-timeline:view();animation-range:entry 40% cover 24%}
  .tl__n:nth-child(2){animation-range:entry 90% cover 32%}
  .tl__n:nth-child(3){animation-range:cover 14% cover 40%}
}}
