/* The services page reuses the header, content and CTA of the shared hero. */
.services-page { container: services-page / inline-size; }
.hero--services {
  --hero-title-font-size: 3.210625rem;
  --hero-compact-ratio: var(--service-compact-ratio, 760 / 733);
  --page-gutter: var(--compact-page-gutter);
  min-height: 0;
  padding-block: .5rem 0;
  border-radius: 0;
  background: var(--color-page);
  overflow: visible;
}
.hero--services::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-sky-image) left top / 350% auto no-repeat;
  mask-image: none;
  pointer-events: none;
}
.hero--services .hero__intro { order: 0; }
.hero--services .hero__content { width: 100%; padding: 1.75rem 0 1rem; text-align: center; }
.hero--services h1 { font-size: clamp(1.875rem, calc(1.42979rem + 2.22604vw), var(--hero-title-font-size)); line-height: 1; }
.hero--services .hero__description { max-width: var(--service-description-width, 26.8125rem); margin: 1.25rem auto 0; font-size: clamp(.875rem, calc(.826708rem + .24146vw), 1.019886374rem); font-weight: 500; line-height: 1.35; letter-spacing: -.03em; opacity: .8; }
.hero--services .hero__media { order: 1; position: relative; flex: none; width: 100%; min-height: 0; max-height: 38rem; aspect-ratio: var(--hero-compact-ratio); margin: 0; }
.hero--services .hero__art { --scene-edge-display: none; inset: 0; width: 100%; height: 100%; max-width: none; overflow: clip; mask-image: linear-gradient(transparent, #000 10%); }
.hero--services .hero__art picture { position: relative; display: block; width: 100%; height: 100%; background: var(--color-page); }
/* Continue only the empty edge outside the bounded scene. The illustration
   itself stays sharp; this ambient layer prevents stretched cloud stripes. */
.hero--services .hero__art picture::before { content: ""; position: absolute; inset: 0; background: var(--hero-edge-image) right top / auto 100% repeat-x; filter: blur(2rem); scale: 1.15; mask-image: linear-gradient(#000 70%, transparent); }
.hero--services .hero__art img { position: absolute; left: 50%; translate: calc(-1 * var(--service-compact-focal-x, 77.32%)) 0; width: auto; max-width: none; height: 100%; object-fit: fill; mask-image: linear-gradient(90deg, #000 97%, transparent); }
/* The exact Figma export already contains its gradients and blurred glow. */
.hero--services .hero__cta { order: 2; position: relative; z-index: 1; width: 100%; padding-inline: var(--page-gutter); margin-top: calc(-1 * var(--hero-compact-cta-overlap)); text-align: center; background: linear-gradient(transparent var(--hero-compact-cta-overlap), var(--color-page) var(--hero-compact-cta-overlap)); }
.hero--services .split-button { margin: 0; }

/* Overlap the lower fade; the CTA gradient covers any part below the artwork. */
@media (width < 75rem) {
  .hero--services { --hero-compact-cta-overlap: min(30vw, 13rem); }
}

@media (48rem <= width < 75rem) {
  .hero--services { padding-top: .75rem; }
}

/* A page may give a compact crop in scene pixels. The frame then shows only
   that right-hand part of the artwork at full width, so the actors fill the
   screen instead of a whole desktop canvas shrunk into it. The crop is
   anchored to the right edge, so no gap can open beside the image, and every
   edge dissolves on an eased curve: into the header sky above, into the page
   below; the left side is simply more of the same sky. */
@media (width < 75rem) {
  /* The scene rises behind the description: its top is sky and steam, which
     fades out over its top quarter, above the actors' heads, so it meets the header gradient
     without a visible boundary. The CTA overlaps less of the shorter frame. */
  .hero--cropped { --hero-compact-cta-overlap: min(18vw, 8rem); }
  .hero--cropped .hero__intro { position: relative; z-index: 1; }
  .hero--cropped .hero__media { max-height: 46rem; margin-top: calc(-1 * clamp(1rem, 5vw, 4rem)); aspect-ratio: var(--service-crop-width) / var(--service-crop-height); }
  /* --service-top-fade (crop data) sets how far the sky dissolves: longer where
     the faces sit low in the crop, so no edge shows under the description. */
  .hero--cropped .hero__art { --top-fade: var(--service-top-fade, 24%); mask-image: linear-gradient(transparent, rgb(0 0 0 / 8%) calc(var(--top-fade) / 6), rgb(0 0 0 / 28%) calc(var(--top-fade) / 3), rgb(0 0 0 / 56%) calc(var(--top-fade) / 2), rgb(0 0 0 / 82%) calc(var(--top-fade) * 2 / 3), rgb(0 0 0 / 96%) calc(var(--top-fade) * 5 / 6), #000 var(--top-fade)); }
  .hero--cropped .hero__art picture::before { display: none; }
  .hero--cropped .hero__art img {
    left: auto;
    right: 0;
    translate: none;
    height: calc(100% * var(--service-scene-px-height) / var(--service-crop-height));
    mask-image: linear-gradient(#000 70%, rgb(0 0 0 / 60%) 82%, rgb(0 0 0 / 20%) 92%, transparent);
  }
}

/* Capacity also responds to enlarged text; the media then returns to flow. */
@media (width >= 75rem) {
  .hero--services { --page-gutter: var(--desktop-page-gutter); }
  @container services-page (min-width: 70em) {
    .hero--services { min-height: calc(var(--service-min-height, 35.5rem) * var(--hero-scene-scale)); padding-block: .875rem var(--service-bottom-space, 9.0625rem); }
    .hero--services::before { display: none; }
    .hero--services .hero__content { width: min(100%, 39.375rem); padding: 1.8708rem 0 0; text-align: left; }
    .hero--services h1 { font-size: var(--hero-title-font-size); }
    .hero--services .hero__description { margin: 1.51625rem 0 0 .0625rem; font-size: 1.019886374rem; }
    .hero--services .hero__media { order: 2; position: static; max-height: none; aspect-ratio: auto; }
    .hero--services .hero__art {
      --scene-canvas-width: calc(87.5rem * var(--hero-scene-scale));
      --scene-edge-display: block;
      height: calc(var(--service-scene-height, 45.8125rem) * var(--hero-scene-scale));
      mask-image: none;
    }
    .hero--services .hero__art picture { width: calc(87.5rem * var(--hero-scene-scale)); position: absolute; left: 50%; translate: -50% 0; }
    .hero--services .hero__art picture::before { display: none; }
    /* The shared backdrop continues a scene by stretching its outermost pixel
       columns; the artwork's right column crosses clouds and a coin, which
       became coloured horizontal streaks on wide screens. Here the edges are
       taken from the empty sky strip instead: both of its outer columns are a
       plain vertical gradient, so the continuation is a smooth blurred band. */
    .hero--services .hero__art { --scene-image: var(--hero-sky-image); }
    .hero--services .hero__art picture { background: none; }
    .hero--services .hero__art img { position: static; translate: none; width: 100%; object-fit: fill; object-position: center top; mask-image: none; }
    .hero--services .hero__cta { order: 1; width: min(calc(100% - 2 * var(--page-gutter)), var(--container-width)); padding: 0; margin-top: 1.558rem; text-align: left; background: none; }
    .hero--services .split-button { --button-height: 4.875rem; width: min(100%, 23.6875rem); gap: 0; }
  }
}

/* From 1440 px the bounded artwork ends inside the screen: its sides dissolve
   gradually into that band instead of meeting it at a hard line. */
@media (width >= 90rem) {
  @container services-page (min-width: 70em) {
    .hero--services .hero__art img { mask-image: linear-gradient(90deg, transparent, rgb(0 0 0 / 12%) 2rem, rgb(0 0 0 / 45%) 4rem, rgb(0 0 0 / 82%) 6rem, #000 8rem, #000 calc(100% - 8rem), rgb(0 0 0 / 82%) calc(100% - 6rem), rgb(0 0 0 / 45%) calc(100% - 4rem), rgb(0 0 0 / 12%) calc(100% - 2rem), transparent); }
  }
}
