/* Decorative motion shared by city and service landing pages. */
:is(.gb-city-opening, .mxd-page-content, .mxd-hero-08__wrap, .gb-retainer-hero) {
  position: relative;
  isolation: isolate;
}

:is(.mxd-hero-08__wrap, .gb-retainer-hero) {
  overflow: clip;
}

:is(.gb-city-opening, .mxd-hero-08__wrap, .gb-retainer-hero)::before,
:is(.gb-city-opening, .mxd-page-content)::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

:is(.gb-city-opening, .mxd-hero-08__wrap, .gb-retainer-hero)::before {
  --drafting-cell: 76px;
  --drafting-line: #c7aaff21;
  inset: 0;
  background:
    linear-gradient(90deg, var(--drafting-line) 1px, transparent 1px) 0 0 / var(--drafting-cell) var(--drafting-cell),
    linear-gradient(var(--drafting-line) 1px, transparent 1px) 0 0 / var(--drafting-cell) var(--drafting-cell),
    radial-gradient(ellipse at 72% 24%, #5b34a33d, transparent 60%),
    radial-gradient(ellipse at 16% 40%, #4328792b, transparent 56%);
  mask-image: radial-gradient(ellipse 87% 76% at 66% 31%, #000 12%, transparent 96%);
}

.gb-city-opening::before {
  bottom: auto;
  height: min(100%, 1000px);
}

:is(.gb-city-opening, .mxd-page-content)::after {
  position: fixed;
  inset: 0;
  background: right top / max(100%, 940px) auto no-repeat;
  opacity: .77;
  mask-image: linear-gradient(180deg, #000 4%, #000 66%, transparent);
}

@media (max-width: 767px) {
  :is(.gb-city-opening, .mxd-hero-08__wrap, .gb-retainer-hero)::before {
    --drafting-cell: 54px;
    mask-image: radial-gradient(ellipse 99% 66% at 70% 38%, #000 5%, transparent 96%);
  }

  :is(.gb-city-opening, .mxd-page-content)::after {
    background-size: auto 92%;
    background-position: 66% top;
    opacity: .62;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) :is(.gb-city-opening, .mxd-page-content)::after {
    background-image: url("../images/landing-contours.svg?v=2");
  }

  html:not([data-motion="off"]) :is(.gb-city-opening, .mxd-hero-08__wrap, .gb-retainer-hero)::before {
    animation: gb-drafting-grid 34s linear infinite;
  }

  @supports (animation-timeline: scroll(root block)) {
    html:not([data-motion="off"]) :is(.gb-city-opening, .mxd-page-content)::after {
      animation: gb-atmosphere-scroll linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px 2400px;
    }
  }
}

@keyframes gb-drafting-grid {
  to { background-position: var(--drafting-cell) var(--drafting-cell), var(--drafting-cell) var(--drafting-cell), 0 0, 0 0; }
}

@keyframes gb-atmosphere-scroll {
  from { transform: scale(1.03); }
  to { transform: translate(-3%, -8%) rotate(-4deg) scale(1.13); }
}

