/* One contextual panel image and up to two low-opacity section vignettes per page. */

.nshHasPanelAtmosphere,
.nshHasSectionAtmosphere {
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
}

.nshHasPanelAtmosphere {
  min-height: 180px;
  padding-right: clamp(108px, 29%, 184px) !important;
}

.nshHasPanelAtmosphere > :not(.nshPanelAtmosphereVisual),
.nshHasSectionAtmosphere > :not(.nshSectionAtmosphereVisual) {
  position: relative;
  z-index: 2;
}

.nshHasPanelAtmosphere > span.nshPanelAtmosphereVisual.nshPanelAtmosphereVisual {
  position: absolute;
  z-index: 1;
  right: 0;
  display: block;
  width: min(36%, 218px);
  height: auto;
  aspect-ratio: 3 / 2;
  top: 50%;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-image: url('/assets/img/section-atmosphere-v1/section-atmosphere-atlas.webp?v=20260829b');
  background-repeat: no-repeat;
  background-size: 400% 400%;
  background-position: var(--nsh-atmosphere-x, 0%) var(--nsh-atmosphere-y, 0%);
  opacity: .28;
  transform: translateY(-50%);
  pointer-events: none;
  color: transparent;
  font-size: 0;
  line-height: 0;
  filter: saturate(.78) contrast(.94);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .42) 28%, #000 66%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .42) 28%, #000 66%);
}

.nshHasPanelAtmosphere--dark > span.nshPanelAtmosphereVisual.nshPanelAtmosphereVisual {
  opacity: .2;
  filter: saturate(.7) brightness(1.25) contrast(.9);
  mix-blend-mode: screen;
}

.nshHasSectionAtmosphere > span.nshSectionAtmosphereVisual.nshSectionAtmosphereVisual {
  position: absolute;
  z-index: 1;
  right: clamp(-52px, -2.6vw, -22px);
  bottom: clamp(-48px, -3vw, -18px);
  display: block;
  width: clamp(190px, 24vw, 330px);
  aspect-ratio: 3 / 2;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  background-image: url('/assets/img/section-atmosphere-v1/section-atmosphere-atlas.webp?v=20260829b');
  background-repeat: no-repeat;
  background-size: 400% 400%;
  background-position: var(--nsh-atmosphere-x, 0%) var(--nsh-atmosphere-y, 0%);
  opacity: .13;
  pointer-events: none;
  color: transparent;
  font-size: 0;
  line-height: 0;
  filter: saturate(.7) contrast(.93);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 36%, rgba(0, 0, 0, .72) 58%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 36%, rgba(0, 0, 0, .72) 58%, transparent 78%);
}

.nshHasSectionAtmosphere::after {
  content: '';
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  width: min(34vw, 430px);
  height: min(26vw, 300px);
  background: radial-gradient(ellipse at 100% 100%, rgba(39, 164, 150, .07), transparent 68%);
  pointer-events: none;
}

@media screen and (max-width: 640px) {
  .nshHasPanelAtmosphere {
    min-height: 160px;
    padding-right: 86px !important;
  }

  .nshHasPanelAtmosphere > span.nshPanelAtmosphereVisual.nshPanelAtmosphereVisual {
    top: auto;
    bottom: 0;
    width: 106px;
    height: auto;
    opacity: .22;
    transform: none;
  }

  .nshHasSectionAtmosphere > span.nshSectionAtmosphereVisual.nshSectionAtmosphereVisual {
    right: -34px;
    bottom: -26px;
    width: 154px;
    opacity: .09;
  }

  .nshHasSectionAtmosphere::after {
    width: 180px;
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nshHasPanelAtmosphere,
  .nshHasSectionAtmosphere { scroll-behavior: auto; }
}
