.dashboard-hero {
  --_progress: var(--dashboard-hero-progress, 0);

  position: relative;
  overflow: clip;
  background: var(--color-dark) url('./bg-hero-mobile.jpg') center top / cover no-repeat;
  background-position: center bottom 15rem;
  background-repeat: no-repeat;
  background-size: 200%;
  padding: 6rem 0 0;

  @media (min-width: 64rem) {
    background: var(--color-dark) url('./bg-hero.jpg') center top / cover no-repeat;
  }
}

/* -- Background video (desktop only) -- */
.dashboard-hero__video {
  display: none;

  @media (min-width: 64rem) {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }
}

/* Win over theme/Elementor (e.g. .elementor-video) on small viewports */
@media (max-width: 63.9375rem) {
  .dashboard-hero .dashboard-hero__video {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
  }
}

/* -- Header (title + subtitle) -- */
.dashboard-hero__header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 51.75rem;
  margin: 0 auto 4.5rem;
  gap: 1rem;

  @media (min-width: 64rem) {
    margin-bottom: 0;
    opacity: calc(1 - var(--_progress));
    transform: scale(calc(1 - var(--_progress) * 0.08)) translateY(calc(var(--_progress) * 8rem));
    transition: none;
    will-change: transform, opacity;
  }
}

/* -- Subtitle -- */
.dashboard-hero__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.3125em;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  opacity: 0.8;
}

.dashboard-hero__subtitle-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* -- Title -- */
.dashboard-hero__title {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 3rem;
  line-height: 1.1em;
  letter-spacing: -0.05em;
  color: #f4f4f4;

  @media (max-width: 63.9375rem) {
    font-size: 2.5rem;
  }

  @media (max-width: 37.4375rem) {
    font-size: 2rem;
  }
}

/* -- Content (rich-text) -- */
.dashboard-hero__content {
  margin: 0;
  max-width: 32.5rem;
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.4em;
  color: #f4f4f4;
  opacity: 0.8;

  @media (max-width: 37.4375rem) {
    font-size: 1rem;
  }

  & > * {
    margin: 0;
    color: inherit;
  }
}

/* -- Form shortcode placeholder -- */
.dashboard-hero__form {
  margin-top: 1rem;
  width: 100%;
  max-width: 30rem;
}

/* -- Dashboard -- */
.dashboard-hero__dashboard {
  z-index: 2;
  max-width: 67.5rem;
  margin: 0 auto;

  @media (min-width: 64rem) {
    position: sticky;
    top: 0;
    transform: translateY(calc((1 - var(--_progress)) * 3rem));
    will-change: transform;
  }
}
