/* Every page starts with a hero; the app showcase keeps its original height.
   Fixed heights follow the Hire Purchase banner at each responsive breakpoint. */
main > section:first-of-type:not(.app-showcase) {
  --hero-height: 636px;
  height: var(--hero-height);
  min-height: 0;
  padding-top: 176px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Left-aligned landing heroes use the same available content area. */
main > section:first-of-type > .hero-content,
.customer-landing .customer-hero-content {
  height: 100%;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Keep the Hire Purchase photograph below the floating navigation.
   Fade only the sky edge; retain the original photo and fixed banner height. */
.hp-hero-photo {
  position: absolute;
  top: 112px;
  left: 0;
  width: 100%;
  height: calc(100% - 112px);
  object-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30px);
  mask-image: linear-gradient(to bottom, transparent, #000 30px);
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hp-hero-photo {
    object-position: 78% top;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  main > section:first-of-type:not(.app-showcase) {
    --hero-height: 696px;
  }
}

@media (max-width: 767px) {
  main > section:first-of-type:not(.app-showcase) {
    --hero-height: 848px;
  }
}

/* Leave the next section visible on shorter laptop screens. */
@media (min-width: 1024px) and (max-height: 800px) {
  main > section:first-of-type:not(.app-showcase) {
    --hero-height: 500px;
    padding-top: 132px;
    padding-bottom: 36px;
  }

  main > section:first-of-type:not(.app-showcase) > .mt-10:has(a) {
    margin-top: 0;
  }

  main > section:first-of-type:not(.app-showcase) .space-y-6:has(a) > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem;
  }
}
