.objectives-section {
  padding: 160px var(--padding-page);
  padding-top: clamp(32px, 4vw, 64px);
}

.objectives-heading {
  max-width: 970px;
  margin-bottom: 100px;
  color: var(--color-blue);
}

.objectives-wrapper {
  display: flex;
  flex-flow: row wrap;
  gap: clamp(84px, 8vw, 128px) 8.6vw;
}

.objective-wrapper {
  display: flex;
  flex-direction: row;
}

.objective-index-wrapper {
  margin-right: 20px;
}

.objective-index {
  display: block;
  width: clamp(120px, 14.55vw, 220px);
  color: var(--color-yellow);
  font-size: clamp(120px, 11.9vw, 180px);
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: clamp(120px, 11.9vw, 180px);
}

.objective-text-wrapper {
  width: clamp(300px, 19.84vw, 340px);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .objective-wrapper {
      --objective-depth: 48px;
      --objective-motion-scale: 1;

      /* Share one local timeline, but give each content layer its own depth. */
      view-timeline: --objective-float block;
    }

    .objective-index-wrapper,
    .objective-heading,
    .objective-paragraph {
      animation: reboat-objective-drift 1s linear both;
      animation-timeline: --objective-float;
      animation-range: cover 0% cover 100%;
    }

    .objective-index-wrapper {
      --objective-layer-speed: 1;
    }

    .objective-heading {
      --objective-layer-speed: 0.85;

      /* Reserve the maximum relative travel so the paragraph stays readable. */
      margin-bottom: calc(var(--objective-depth) * var(--objective-motion-scale) * 0.15 + 8px);
    }

    .objective-paragraph {
      --objective-layer-speed: 0.7;
    }

    @media (width <= 480px) {
      .objective-index-wrapper {
        margin-bottom: calc(var(--objective-depth) * var(--objective-motion-scale) * 0.15 + 8px);
      }
    }

    .objective-wrapper:nth-child(6n + 2) {
      --objective-depth: 96px;
    }

    .objective-wrapper:nth-child(6n + 3) {
      --objective-depth: 64px;
    }

    .objective-wrapper:nth-child(6n + 4) {
      --objective-depth: 120px;
    }

    .objective-wrapper:nth-child(6n + 5) {
      --objective-depth: 80px;
    }

    .objective-wrapper:nth-child(6n + 6) {
      --objective-depth: 144px;
    }
  }
}

@keyframes reboat-objective-drift {
  from {
    transform: translateY(calc(var(--objective-depth) * var(--objective-motion-scale) * var(--objective-layer-speed)));
  }

  to {
    transform: translateY(calc(-1 * var(--objective-depth) * var(--objective-motion-scale) * var(--objective-layer-speed)));
  }
}

@media screen and (width <= 1024px) {
  .objective-wrapper {
    --objective-motion-scale: 0.7;
  }

  .objectives-section {
    padding-bottom: 60px;
  }

  .objectives-heading {
    max-width: 700px;
    margin-bottom: 60px;
  }

  .objective-index {
    width: 140px;
  }

  .objective-text-wrapper {
    width: 100%;
  }
}

@media screen and (width <= 769px) {
  .objectives-section {
    padding-bottom: 80px;
  }

  .objectives-heading {
    max-width: 100%;
    margin-bottom: 40px;
  }
}

@media screen and (width <= 480px) {
  .objectives-section {
    padding-bottom: 0;
  }

  .objectives-heading {
    margin-bottom: 20px;
  }

  .objective-wrapper {
    flex-direction: column;
  }
}
