/* Retain the original full-width compositions and constrain their overlay copy. */
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) {
    --banner-type: 3.25rem;
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(36rem, 46vw, 52rem);
    height: auto;
    box-sizing: border-box;
    padding: 7rem 0 4rem;
    isolation: isolate;
    overflow: hidden;
    background: #031523;
}
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) > img {
    position: absolute;
    inset: auto 0;
    top: 50%;
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    transform: translateY(-50%);
    z-index: -2;
    border-radius: 0;
}
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"])::after, body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) > [class$="__hero-shade"] {
    position: absolute;
    display: block;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: linear-gradient(90deg, rgba(2,16,26,.25), transparent 56%);
}
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) > :is(.xwrap, [class*="__hero-content"]) {
    position: relative;
    inset: auto;
    width: 41%;
    min-width: 0;
    max-width: 43rem;
    margin: 0 0 0 4%;
    padding: 0;
    text-align: left;
}
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) .xcopy {
    width: 100%;
    max-width: none;
}
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) h1 {
    width: auto;
    max-width: 100%;
    margin: 0 0 1.25rem;
    font-size: var(--banner-type);
    line-height: 1.07;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) :is(.xkicker, [class$="__eyebrow"]) {
    margin: 0 0 1rem;
    font-size: .8125rem;
    line-height: 1.45;
}
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) :is(.xcopy > p, [class$="__hero-copy"]) {
    max-width: 100%;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.55;
}
body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) :is(.xactions, [class$="__actions"]) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .875rem 1.125rem;
    margin: 1.65rem 0 0;
}
body .ejx #explore .ej-patch-demo {
    width: 100%;
    max-width: 25rem;
    justify-self: center;
    margin: 0 auto;
}
@media (max-width: 68rem) {
    body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) { --banner-type: 2.625rem; }
}
@media (min-width: 48.001rem) and (max-width: 58rem) {
    body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) { --banner-type: 2.25rem; }
}
@media (max-width: 48rem) {
    body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) {
        --banner-type: 2.25rem;
        display: block;
        min-height: 0;
        padding: 5.5rem 5% 66%;
    }
    body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) > img {
        top: auto;
        bottom: 0;
        transform: none;
    }
    body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) > :is(.xwrap, [class*="__hero-content"]) {
        width: 100%;
        max-width: 35rem;
        margin: 0 auto;
    }
    body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"])::after, body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) > [class$="__hero-shade"] {
        background: linear-gradient(180deg, #031523, transparent 85%);
    }
    body .ejx #explore .ej-patch-demo { max-width: 22rem; }
}

/* Patch compositions have a narrower empty area than the studio images. */
@media (min-width: 48.001rem) {
    body :is(section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > [class$="__hero"] {
        --banner-type: 2.875rem;
    }
    body :is(section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > [class$="__hero"] > [class*="__hero-content"] {
        width: 31%;
    }
    body :is(section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > [class$="__hero"] [class$="__hero-copy"] {
        font-size: 1rem;
    }
    body :is(section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > [class$="__hero"] [class$="__actions"] {
        gap: .75rem;
    }
    body :is(section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > [class$="__hero"] [class$="__actions"] > a {
        min-width: 0;
        max-width: 100%;
        padding: 1rem 1.125rem;
        font-size: .8125rem;
        line-height: 1.4;
        white-space: normal;
        text-align: center;
    }
}
@media (min-width: 48.001rem) and (max-width: 68rem) {
    body :is(section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > [class$="__hero"] { --banner-type: 2rem; }
}

/* Actions form a separate row; the narrow copy above stays constrained. */
@media (min-width: 48.001rem) {
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) :is(.xactions, [class$="__actions"]) {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
    gap: 1rem;
  }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) :is(.xactions, [class$="__actions"]) > a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) [class$="__actions"] > a {
    min-width: 0 !important;
    padding: .9375rem 1.25rem !important;
  }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) [class$="__actions"] > a b {
    letter-spacing: .05em !important;
  }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) .xactions .xbtn {
    padding-inline: 1.25rem;
    gap: 1rem;
  }
  /* Extend the lower breathing room while keeping the artwork clear of the header. */
  body #ej-embroidery-custom_embroidery_patch_pCbiUX > .ej-emb__hero {
    min-height: clamp(40rem, calc(46vw + 4rem), 56rem);
  }
  body #ej-embroidery-custom_embroidery_patch_pCbiUX > .ej-emb__hero > img {
    top: calc(50% + 1.5rem);
    transform: translateY(-50%);
  }
}
@media (min-width: 48.001rem) and (max-width: 68rem) {
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) :is(.xactions, [class$="__actions"]) { gap: .625rem; }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) .xactions > a { font-size: .8125rem; }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) .xactions .xbtn { padding-inline: .875rem; gap: .5rem; }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) [class$="__actions"] > a { padding-inline: .75rem !important; }
}
@media (max-width: 48rem) {
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) [class$="__actions"] {
    display: flex;
    flex-flow: row nowrap;
    gap: .5rem;
    width: 100%;
  }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) [class$="__actions"] > a {
    flex: 1 1 0;
    min-width: 0 !important;
    padding: .875rem .5rem !important;
  }
  body :is(article.ejx, section[id], #ej-embroidery-custom_embroidery_patch_pCbiUX) > :is(.xhero, [class$="__hero"]) [class$="__actions"] > a b {
    font-size: .75rem !important;
    letter-spacing: 0 !important;
  }
}
