/* ==========================================================================
   Entrance motion. Every hidden starting state lives here, inside the
   no-preference query, so visitors who ask for reduced motion never have
   anything to wait for.
   ========================================================================== */

/* Day headings rise word by word from behind their line (script splits the words) */
.rise .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.rise .w > span {
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  .rise .w > span {
    transition: transform 1100ms var(--ease-tide);
    transition-delay: calc(var(--wi, 0) * 38ms);
  }

  .js .rise:not(.is-in) .w > span {
    transform: translateY(135%);
  }

  .rise.is-done .w > span {
    transition-delay: 0ms;
  }

  /* The yacht length lines draw when the fleet comes into view */
  .js .measure:not(.is-drawn)::before {
    transform: scaleX(0);
  }

  .js .measure:not(.is-drawn)::after,
  .js .measure:not(.is-drawn) span {
    opacity: 0;
  }

  /* Load: the photograph settles, the wordmark is drawn on like a wake (art only; text and photo show from the first frame) */
  .js .hero__img {
    transform: scale(1.045);
    transition: transform 2600ms var(--ease-settle);
  }

  .js .hero__mark img {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1800ms var(--ease-tide) 250ms;
  }

  .is-loaded .hero__img {
    transform: none;
  }

  .is-loaded .hero__mark img {
    clip-path: inset(0 0 0 0);
  }
}

/* Reduced motion: everything else (menu, header, hovers) happens at once */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}
