/* Sila iStudio — animazioni legate allo scroll.
   Fuori dal blocco finale ci sono solo i @keyframes: senza supporto o con
   «riduci movimento» la pagina resta intera e ferma.
   Sole, luce, terra e scritta sono guidati da js/scena.js. */

@keyframes entra { from { opacity: 0; transform: translateY(60px); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes cresce { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ingrandisce { from { opacity: .3; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes rivela { from { clip-path: inset(0 0 100% 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes accendi { from { border-color: rgba(255, 255, 255, .14); } to { border-color: var(--arancio); } }
@keyframes accendiNum { from { color: var(--grigio-testo); } to { color: var(--arancio); } }
@keyframes colora { from { background-position: 100% 0; } to { background-position: 0 0; } }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .barra-avanzamento { animation: cresce linear both; animation-timeline: scroll(root); }
    .entra { animation: entra linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    .ingrandisce { animation: ingrandisce linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    .rivela { animation: rivela linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .passo { animation: accendi linear both; animation-timeline: view(); animation-range: cover 20% cover 45%; }
    .passo .num { animation: accendiNum linear both; animation-timeline: view(); animation-range: cover 20% cover 45%; }
    .linea-metodo { animation: cresce linear both; animation-timeline: view(); animation-range: entry 20% cover 55%; }
    .frase-colorata {
      color: transparent;
      background-image: linear-gradient(90deg, var(--nero) 50%, rgba(0, 0, 0, .24) 50%);
      background-size: 200% 100%;
      -webkit-background-clip: text;
      background-clip: text;
      animation: colora linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 60%;
    }
  }
}
