@layer components {
  /* The original photograph remains visible while the SVG is loading. */
  .c-hero__lighting {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-hero-fade) ease-in-out;
  }

  .c-hero.is-lit .c-hero__lighting {
    opacity: 1;
  }

  .c-hero__light-layer {
    transition: opacity var(--motion-hero-fade) ease-in-out;
  }

  .c-hero__light-layer--evening {
    opacity: var(--city-evening);
  }

  .c-hero__light-layer--night {
    opacity: var(--city-night);
  }

  .c-hero__light-layer--deep {
    opacity: var(--city-deep);
  }

  .c-hero__light-layer--core {
    opacity: var(--city-core-windows);
  }

  .c-hero__light-layer--office {
    opacity: var(--city-office-windows);
  }

  .c-hero__light-layer--extra {
    opacity: var(--city-extra-windows);
  }

  .c-hero__peak-windows {
    opacity: clamp(0, calc(var(--city-office-peak, 0) - var(--window-threshold) + 1), 1);
  }

  .c-hero__light-layer--traffic {
    opacity: var(--city-car-lights);
  }

  .c-hero__car {
    opacity: clamp(0, calc(var(--city-cars) - var(--car-index)), 1);
    transition: opacity var(--motion-hero-fade) ease-in-out;
  }

  .c-hero__windows {
    animation: office-lights 37s ease-in-out infinite;
  }

  .c-hero__windows--staggered {
    animation-duration: 49s;
    animation-delay: -19s;
  }

  .c-hero.is-paused .c-hero__windows {
    animation-play-state: paused;
  }

  .c-hero.is-lit .c-hero__heading {
    position: relative;
    isolation: isolate;
  }

  .c-hero.is-lit .c-hero__heading::before {
    position: absolute;
    z-index: -1;
    inset: -15% -13%;
    content: "";
    background: radial-gradient(ellipse, #f0f1ed99 5%, #dce3e788 39%, #cbd4e238 60%, transparent 77%);
    opacity: calc(var(--city-night) * .77 + var(--city-evening) * .18);
    filter: blur(4px);
  }

  .c-hero.is-lit .c-hero__logo {
    filter: drop-shadow(0 0 1px rgb(244 246 244 / calc(var(--city-night) * .9 + var(--city-evening) * .27))) drop-shadow(0 0 2px rgb(242 244 241 / calc(var(--city-night) * .68)));
  }

  @keyframes office-lights {
    0%,
    36%,
    100% {
      opacity: 1;
    }

    51%,
    64% {
      opacity: .52;
    }
  }
}
