/* Preserve the original services design while repairing layout and stacking. */
@media(min-width:1024px) {
  body.home-page #services .services-layout {
    grid-template-columns: minmax(0,.42fr) minmax(0,.58fr);
    gap: clamp(32px,5vw,80px);
  }
  body.home-page #services .services-cards { align-self: stretch; }
  body.home-page #services .service-stacked-card {
    min-height: var(--service-card-height,330px);
    flex-shrink: 0;
    position: sticky;
    top: calc(120px + var(--card-sticky-offset,0px));
    opacity: 1;
    visibility: visible;
    transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
  }
}
@media(max-width:1023px) {
  body.home-page #services .services-layout { width: 100%; }
}
@media(prefers-reduced-motion:reduce) {
  body.home-page #services .service-stacked-card { position: relative; top: auto; }
}

/* Stacked cards must be opaque so earlier content cannot bleed through. */
body.home-page #services .service-stacked-card.active,
body.home-page #services .service-stacked-card.is-active {
  background: linear-gradient(135deg,
    rgba(255,41,0,.16) 0%,
    rgba(255,41,0,.07) 45%,
    #0B1015 100%), #0B1015 !important;
}

/* Later cards always pass above earlier cards, including before scripts load. */
body.home-page #services .service-stacked-card:nth-child(1) { z-index: 11 !important; }
body.home-page #services .service-stacked-card:nth-child(2) { z-index: 12 !important; }
body.home-page #services .service-stacked-card:nth-child(3) { z-index: 13 !important; }
body.home-page #services .service-stacked-card:nth-child(4) { z-index: 14 !important; }
body.home-page #services .service-stacked-card:nth-child(5) { z-index: 15 !important; }
