/* Services mobile only; preserve the validated type and desktop choreography. */
@media (max-width: 767px) {
  .services-page #serviceHeroTitle > .service-title-line,
  .services-page .service-hero-copy--intro .service-subtitle-line {
    display: block;
    white-space: nowrap;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  /* Add scroll distance only to the final shutter, preserving the hero's
     earlier timing through the matching piecewise mapping in services.js. */
  .services-page .service-orbit-hero {
    height: 300svh;
    min-height: calc(1736px + 20svh);
  }
  @media (max-width: 640px) {
    .services-page .service-orbit-hero {
      height: 270svh;
      min-height: calc(1400px + 20svh);
    }
  }

  .services-page .service-hero-reveal-panel {
    transform: translate3d(0, var(--service-reveal-y, 0px), 0);
  }

  /* Tall panels scroll through their copy before their bottom edge pins.
     The next panel can then cover them without hiding unread content. */
  .services-page .service-panel[data-service-panel] {
    position: sticky;
    top: min(0px, calc(100svh - var(--service-panel-height, 100svh)));
  }

  /* The stack ends at the last service: its sticky panels leave together,
     and Process follows their bottom edge without covering their content. */
  .services-page .process-scroll-section {
    position: relative;
    top: auto;
    z-index: 2;
  }

  .services-page #page-transition-root,
  .services-page .service-stack,
  .services-page .service-stack > .service-panel:last-child,
  .services-page .service-stack > .service-panel:last-child .service-panel-visual,
  .services-page .service-stack > .service-panel:last-child .service-panel-copy,
  .services-page .process-scroll-section {
    background: var(--services-process-surface, #fff) !important;
  }

  .services-page .service-expertise.has-rule-sequence li::after,
  .services-page .process-scroll-step::after {
    transition: transform 650ms var(--ease-out);
  }

  html.home-footer-enhanced body[data-page-type="services"] .site-footer {
    /* Follow the Process in normal flow, with no overlapping shutter. */
    margin-top: 0 !important;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@layer mobile-navigation {
  @media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
    /* Extend the dark surface behind the fixed header at the endpoint.
       The content keeps its existing screen position when the page ends. */
    .services-page .site-footer {
      padding-top: var(--footer-header-bottom) !important;
    }
  }
}
