/* Invest page headline: every phrase sits in the same grid cell so the hero keeps one height while the text changes.
   The outgoing phrase fades out first, then the next one fades in, so two phrases never sit on top of each other. */
.fn-hero-rotate {
  display: grid;
}

.fn-hero-rotate__item {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.fn-hero-rotate__item.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 240ms ease 180ms;
}

@media (prefers-reduced-motion: reduce) {
  .fn-hero-rotate__item {
    transition: none;
  }
}

/* Home hero: the site's own rule forces h1 spans onto one line. Rotating
   phrases are longer than the column, so they must be allowed to wrap. */
.fish-ik-hero h1.fn-hero-rotate .fn-hero-rotate__item {
  white-space: normal;
}
