/* The title and following overview form the service introduction together.
   Let that introduction breathe instead of forcing both sections into one
   viewport. Artwork, shared navigation and the elastic edge stay independent. */
body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) {
  --inner-hero-art-height: 504px;
}

body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero {
  height: calc(var(--inner-hero-art-height) * var(--art-scale, 1));
}

body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero-stage {
  height: var(--inner-hero-art-height);
}

body:is(.about-page, .services-page) .subpage-hero h1 {
  top: 204px;
}

body:is(.service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero h1 {
  top: 204px;
  left: 32px;
  width: 1408px;
  font-size: 140px;
  line-height: .95;
  letter-spacing: -.02em;
}

body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero-jp {
  top: 384px;
}

body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-breadcrumb {
  top: 462px;
}

body:is(.service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .service-overview {
  min-height: 520px;
  padding-block: 124px 110px;
}

.services-page .listing-intro {
  padding-block: 64px 88px;
}

.about-page .mission-inner {
  padding-top: 64px;
}

@media (min-width: 768px) and (max-width: 1023px) {
  body:is(.service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .service-overview {
    min-height: 0;
    padding-block: 88px 96px;
  }
}

@media (max-width: 767px) {
  body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero {
    height: clamp(420px, 90vw, 500px);
  }

  body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero-stage.art-stage {
    height: 100%;
    padding-top: 136px;
  }

  body:is(.service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero h1 {
    font-size: clamp(66px, 17vw, 108px);
    letter-spacing: -.02em;
  }

  /* Keep the subtitle after the title when a narrower device adds a line. */
  body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero h1 {
    position: relative;
    top: auto;
    left: auto;
    margin: 0 0 0 20px;
    width: calc(100% - 20px);
  }

  body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero-jp {
    position: relative;
    top: auto;
    left: auto;
    margin: 24px 24px 0;
  }

  body:is(.about-page, .services-page, .service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-breadcrumb {
    top: 104px;
  }

  body:is(.service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .service-overview {
    min-height: 0;
    padding-block: 72px 80px;
  }

  body:is(.service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .service-overview > .service-two-column {
    gap: 32px;
  }

  .services-page .listing-intro {
    padding-block: 40px 56px;
  }

  .services-page .listing-intro-grid {
    margin-top: 20px;
  }

  .services-page .listing-intro-copy {
    margin-top: 20px;
  }

  .about-page .mission-inner {
    padding-top: 40px;
  }

  .about-page .mission-grid {
    margin-top: 20px;
  }

  .about-page .mission-message {
    margin-top: 24px;
  }

  .about-page .mission-copy {
    margin-top: 20px;
  }
}

/* The complete service title stays readable when the visitor reduces motion. */
@media (prefers-reduced-motion: reduce) {
  body:is(.service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero h1 {
    font-size: 72px;
  }
}
@media (prefers-reduced-motion: reduce) and (max-width: 767px) {
  body:is(.service-web-page, .service-ai-page, .service-branding-page, .service-ec-page, .service-marketing-page) .subpage-hero h1 {
    width: calc(100% - 44px);
    font-size: clamp(30px, 7.8vw, 52px);
    line-height: 1.12;
  }
}
