/* A compact photo band dissolves into the service copy on phones. */
@media (max-width: 767px) {
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] {
    --mobile-hero-photo-height: clamp(300px,56svh,480px);
    --breadcrumb-copy-top: calc(var(--breadcrumb-top) + 2 * var(--breadcrumb-line) + 24px);
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero,.hero-training,.hero-training-grid,.hero-grid,.hero-main) {
    min-height: 0 !important;
    height: auto !important;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero,.hero-main) {
    background: var(--site-black);
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-grid,.hero-main) {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: minmax(160px,auto) auto auto;
    align-items: start;
    align-content: start;
    gap: 0;
    padding-inline: 20px !important;
    padding-bottom: 24px !important;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-copy,.hero-top-row) {
    display: contents;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) :is(.service-wordmark,.hero-headline-en,.ap-hero-title) {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
    display: block;
    width: auto;
    max-width: none;
    margin: 0 0 24px;
    padding: 0;
    writing-mode: horizontal-tb;
    text-align: left;
    font-size: clamp(24px,7.2vw,30px) !important;
    line-height: 1.08;
    letter-spacing: -.02em;
    text-wrap: initial;
    white-space: normal;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) :is(.service-wordmark,.hero-headline-en,.ap-hero-title) .heading-band-content {
    display: block;
    font: inherit;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) :is(.service-wordmark,.hero-headline-en) :is(.heading-band-content > span,.hero-headline-line) {
    display: inline;
    margin: 0;
    white-space: normal;
  }
  body.aitria-panel.page-ai-ux-sprint main #top .ap-hero-title :is(.ap-line,.ap-line-inner) {
    display: inline;
  }
  body.aitria-panel.page-ai-ux-sprint main #top .ap-hero-title .ap-line-mask {
    display: none;
  }
  body.aitria-panel.page-ai-ux-sprint main #top .ap-hero-title .ap-line-active .ap-line-inner {
    animation-name: site-band-ink;
  }
  body.aitria-panel.page-ai-ux-sprint main #top .ap-hero-panel-copy {
    padding: 0;
    background: transparent;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-label,.hero-eyebrow) {
    grid-column: 1;
    grid-row: 2;
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.6;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main .editorial-hero-panel {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    width: 100% !important;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) .editorial-hero-panel :is(h1,h2) {
    font-size: clamp(24px,6.4vw,28px) !important;
    line-height: 1.4;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main .editorial-hero-panel :is(.sub,.hero-desc,.hero-note) {
    max-width: none;
    margin: 16px 0 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.75;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main .editorial-hero-panel .hero-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 20px 0 0;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main .hero-cta .panel-split-button {
    flex: none;
    width: 100%;
    min-width: 0;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main .hero-scroll-cue {
    display: none !important;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-fig,.hero-bg-stack) {
    inset: 0 0 auto !important;
    width: 100%;
    height: var(--mobile-hero-photo-height) !important;
    overflow: hidden;
    transform: none !important;
    opacity: 1 !important;
    mask-image: linear-gradient(to bottom,#000 60%,rgba(0,0,0,.8) 78%,transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom,#000 60%,rgba(0,0,0,.8) 78%,transparent 100%);
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main .hero-fig img {
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top.hero,.hero-main)::after {
    inset: 0;
    background: linear-gradient(to bottom,
      rgba(var(--site-black-rgb),.1) 0,
      rgba(var(--site-black-rgb),.18) calc(var(--mobile-hero-photo-height) * .55),
      rgba(var(--site-black-rgb),.65) calc(var(--mobile-hero-photo-height) * .88),
      var(--site-black) var(--mobile-hero-photo-height),
      var(--site-black) 100%);
  }
}

/* Every service fills one first screen; the photo row takes the spare height. */
@media (max-width: 767px) {
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top.hero,.hero-training),
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-grid,.hero-main) {
    min-height: calc(100svh - 1px) !important;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-grid,.hero-main) {
    grid-template-rows: minmax(64px,1fr) auto auto;
  }
}
@media (max-width: 767px) and (max-height: 680px) {
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-grid,.hero-main) {
    padding-top: calc(var(--breadcrumb-top) + 2 * var(--breadcrumb-line) + 16px) !important;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) .hero-cta {
    flex-direction: row;
    gap: 8px;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) .hero-cta :is(.ap-legacy-cta,.panel-split-button) {
    flex: 1;
    min-width: 0;
    width: auto;
    font-size: 13px;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) .hero-cta .button-text {
    padding-inline: 8px;
    white-space: normal;
  }
}
@media (max-width: 767px) and (max-height: 600px) {
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-grid,.hero-main) {
    grid-template-rows: minmax(48px,1fr) auto auto;
    padding-bottom: 16px !important;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-label,.hero-eyebrow) {
    margin-bottom: 12px;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main .editorial-hero-panel :is(.sub,.hero-desc,.hero-note) {
    font-size: 13px;
    line-height: 1.6;
    margin-top: 12px;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) .hero-cta {
    margin-top: 16px;
  }
  @layer service-hero-titles {
    body.editorial-site.service-panel[data-site-page] main .editorial-hero-panel .service-hero-message {
      font-size: 22px !important;
      line-height: 1.35 !important;
    }
  }
}
@media (max-width: 767px) and (max-height: 520px) {
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(.hero-grid,.hero-main) {
    grid-template-rows: minmax(44px,1fr) auto auto;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main :is(#top,.hero-training) .hero-cta .button-text {
    padding-block: 8px;
  }
  body:is(.editorial-site.service-panel,.aitria-panel.page-ai-ux-sprint)[data-site-page] main .editorial-hero-panel :is(.sub,.hero-desc,.hero-note) {
    font-size: 12px;
    line-height: 1.5;
  }
  @layer service-hero-titles {
    body.editorial-site.service-panel[data-site-page] main .editorial-hero-panel .service-hero-message {
      font-size: 20px !important;
      line-height: 1.3 !important;
    }
  }
}
