:has(> .ns-inner-hero-background) {
    position: relative;
    isolation: isolate;
}

#main-content > article > .content-section:where(:has(> .ns-inner-hero-background)) {
    min-height: 55vh;
    min-height: 55svh;
    align-content: center;
    --ns-hero-padding: clamp(2rem, 4vw, 3rem);
    padding-block: calc(var(--ns-hero-padding) + var(--ns-masthead-clearance, 0px)) var(--ns-hero-padding);
    overflow-wrap: anywhere;
    color: #f0f6fc;
}

.content-section:has(> .ns-inner-hero-background) :is(h1, h2, h3) {
    color: #fff;
}

.content-section:has(> .ns-inner-hero-background) h1 {
    font-size: clamp(2.375rem, 4.5vw, 4.75rem);
}

.content-section:has(> .ns-inner-hero-background) a:not(.ns-action) {
    color: inherit;
}

:has(> .ns-inner-hero-background) a:focus-visible {
    outline-color: currentColor;
}

.ns-inner-hero-background,
.ns-inner-gradient {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ns-inner-hero-background {
    z-index: -1;
    background:
        radial-gradient(ellipse at var(--ns-hero-glow, 90% 12%), #176a82, transparent 65%),
        linear-gradient(125deg, #091827 25%, #13364e 74%, #24385d);
}

.portfolio-detail .ns-inner-hero-background {
    inset-inline: calc(-1 * var(--ns-gallery-gutter));
}

.ns-inner-hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgb(6 15 29 / .86), rgb(6 15 29 / .6) 85%);
}

.ns-page-agencies .ns-inner-hero-background { --ns-hero-glow: 100% 40%; }
.ns-page-businesses .ns-inner-hero-background { --ns-hero-glow: 80% 90%; }
.ns-page-services .ns-inner-hero-background { --ns-hero-glow: 65% 35%; }
.ns-page-contact .ns-inner-hero-background { --ns-hero-glow: 40% 0%; }
.ns-page-privacy .ns-inner-hero-background { --ns-hero-glow: 45% 75%; }
.ns-page-works .ns-inner-hero-background { --ns-hero-glow: 100% 65%; }
.ns-page-work .ns-inner-hero-background { --ns-hero-glow: 50% 0%; }

.ns-inner-gradient {
    width: 100%;
    height: 100%;
    visibility: hidden;
    opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .ns-inner-gradient {
        transition: opacity .3s ease-out;
    }

    .ns-inner-gradient.is-ready {
        visibility: visible;
        opacity: 1;
    }
}
