.float-1 {
  --drift: -36px;
}

.float-2 {
  --drift: -64px;
}

.float-3 {
  --drift: -22px;
}

.float-4 {
  --drift: -90px;
}

.float-5 {
  --drift: -120px;
}

.float-6 {
  --drift: -48px;
}

.float-7 {
  --drift: -30px;
}

@supports (animation-timeline: view()) {
  .layer-1 {
    animation: layer-first linear both;
    animation-timeline: --s1;
  }

  .layer-2 {
    animation: layer-swap linear both;
    animation-timeline: --s2;
  }

  .layer-3 {
    animation: layer-swap linear both;
    animation-timeline: --s3;
  }

  .layer-4 {
    animation: layer-swap linear both;
    animation-timeline: --s4;
  }

  .layer-5 {
    animation: layer-last linear both;
    animation-timeline: --s5;
  }

  .layer-dot-1 {
    animation: dot-first linear both;
    animation-timeline: --s1;
  }

  .layer-dot-2 {
    animation: dot-swap linear both;
    animation-timeline: --s2;
  }

  .layer-dot-3 {
    animation: dot-swap linear both;
    animation-timeline: --s3;
  }

  .layer-dot-4 {
    animation: dot-swap linear both;
    animation-timeline: --s4;
  }

  .layer-dot-5 {
    animation: dot-last linear both;
    animation-timeline: --s5;
  }

  .rail-1 {
    animation: rail-first linear both;
    animation-timeline: --s1;
  }

  .rail-1 .rail-node {
    animation: node-on linear both;
    animation-timeline: --s1;
  }

  .step-1 .step-card {
    animation: step-focus linear both;
    animation-timeline: --s1;
  }

  .rail-2 {
    animation: rail-swap linear both;
    animation-timeline: --s2;
  }

  .rail-2 .rail-node {
    animation: node-on linear both;
    animation-timeline: --s2;
  }

  .step-2 .step-card {
    animation: step-focus linear both;
    animation-timeline: --s2;
  }

  .rail-3 {
    animation: rail-swap linear both;
    animation-timeline: --s3;
  }

  .rail-3 .rail-node {
    animation: node-on linear both;
    animation-timeline: --s3;
  }

  .step-3 .step-card {
    animation: step-focus linear both;
    animation-timeline: --s3;
  }

  .rail-4 {
    animation: rail-swap linear both;
    animation-timeline: --s4;
  }

  .rail-4 .rail-node {
    animation: node-on linear both;
    animation-timeline: --s4;
  }

  .step-4 .step-card {
    animation: step-focus linear both;
    animation-timeline: --s4;
  }

  .rail-5 {
    animation: rail-last linear both;
    animation-timeline: --s5;
  }

  .rail-5 .rail-node {
    animation: node-on linear both;
    animation-timeline: --s5;
  }

  .step-5 .step-card {
    animation: step-focus linear both;
    animation-timeline: --s5;
  }

  .rail-fill {
    animation: fill-y linear both;
    animation-timeline: --steps;
    animation-range: contain 0% contain 100%;
  }

  .layer-3 .pop {
    animation: pop linear both;
    animation-timeline: --s3;
    animation-range: cover 24% cover 36%;
  }

  .layer-3 .pop-2 {
    animation-range: cover 28% cover 40%;
  }

  .roti-fill {
    animation: grow-y linear both;
    animation-timeline: --s5;
    animation-range: cover 22% cover 42%;
  }

  .mood-fill {
    animation: grow-x linear both;
    animation-timeline: --s5;
    animation-range: cover 24% cover 44%;
  }

  .reveal {
    animation: settle linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }

  @media (prefers-reduced-motion: no-preference) {
    .float {
      animation: drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 720px;
    }
  }

}

@supports not (animation-timeline: view()) {
  .layer-1 {
    animation: cycle 15s linear infinite both;
  }

  .layer-2 {
    animation: cycle 15s linear infinite both;
    animation-delay: 3s;
  }

  .layer-3 {
    animation: cycle 15s linear infinite both;
    animation-delay: 6s;
  }

  .layer-4 {
    animation: cycle 15s linear infinite both;
    animation-delay: 9s;
  }

  .layer-5 {
    animation: cycle 15s linear infinite both;
    animation-delay: 12s;
  }

  @media (prefers-reduced-motion: reduce) {
    .layer {
      animation: none;
      opacity: 0;
    }

    .layer-1 {
      opacity: 1;
    }
  }

}
