/* ===========================================================================
   Followspot cursor
   Its own file so the inquiry forms, which do not load site.css, can mount
   the cursor without pulling the whole site stylesheet in.
   Behaviour lives in /src/cursor/cursor.js.
   =========================================================================== */

.cursor-child {
  position: fixed;
  top: 0;
  left: 0;
  will-change: transform;
}
.cursor-parent {
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cursor-parent.is-active {
  opacity: 1;
}
/* A followspot, not a ring: a warm beam pool with the lamp's hotspot at its
   centre. The parent blends in `screen`, so it adds light to the dark grounds
   the way a stage lamp would. Only the ten dark agency pages mount it. */
.cursor-child::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle closest-side,
    rgba(255, 243, 219, 0.22) 0%,
    rgba(255, 230, 176, 0.12) 30%,
    rgba(214, 180, 94, 0.055) 54%,
    transparent 74%
  );
  transition:
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease;
}

.cursor-dot {
  /* the hotspot: the filament, not an outline */
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 247, 232, 0.92);
  box-shadow: 0 0 26px 8px rgba(255, 236, 194, 0.5);
  transform: translate(-50%, -50%);
  transition:
    width 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
}

/* over something interactive the spot opens up */
.cursor-parent.is-hover .cursor-child::before {
  transform: scale(1.55);
}
.cursor-parent.is-hover .cursor-dot {
  width: 30px;
  height: 30px;
}

/* pressing irises the beam down */
.cursor-parent.is-press .cursor-child::before {
  transform: scale(0.7);
}
.cursor-parent.is-press .cursor-dot {
  width: 13px;
  height: 13px;
}

/* a page transition flares the lamp */
.cursor-parent.is-loading .cursor-child::before {
  transform: scale(3.2);
  opacity: 0.75;
}
.cursor-parent.is-loading .cursor-dot {
  width: 42px;
  height: 42px;
}

html.mod-touch .cursor-parent {
  display: none;
}
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-parent {
    display: none;
  }
}
