/*
 * Homepage social proof (#artists): real artists as glass orbs floating around the count.
 * Markup: buildProofOrbsSectionHtml() · behavior: marketing-proof-orbs.js
 */

.dims-orbs {
  --dims-orbs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dims-orbs-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  overflow: clip;
  background: #fff;
  color: #000;
}

.dims-orbs *,
.dims-orbs *::before,
.dims-orbs *::after {
  box-sizing: border-box;
}

.dims-orbs__field {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 1320px;
  min-height: 560px;
  margin: 5.5rem auto 2.5rem;
}

.dims-orbs__sky {
  position: absolute;
  inset: 0 clamp(1rem, 4vw, 2.5rem);
}

/* ---------- Orb: position + pointer parallax on the wrapper, drift + glass on the ball ---------- */

.dims-orbs__orb {
  --k: 1;
  position: absolute;
  /* --spread pulls every orb toward the centre (mobile tightens the field around the count) */
  left: calc(50% + (var(--x) - 50%) * var(--spread-x, 1));
  top: calc(50% + (var(--y) - 50%) * var(--spread-y, 1));
  width: calc(var(--s) * var(--k));
  height: calc(var(--s) * var(--k));
  margin: calc(var(--s) * var(--k) / -2) 0 0 calc(var(--s) * var(--k) / -2);
  translate: calc(var(--mx, 0) * var(--d) * -34px) calc(var(--my, 0) * var(--d) * -24px);
  will-change: translate;
}

.dims-orbs__ball {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background: #dde3ee center / cover no-repeat;
  font-size: calc(var(--s) * var(--k) / 3.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 -0.22em 0.45em -0.05em rgba(8, 18, 48, 0.55),
    inset 0 0.18em 0.35em -0.1em rgba(255, 255, 255, 0.6),
    0 0.5em 1em -0.5em rgba(0, 0, 0, 0.18);
  animation: dims-orbs-drift var(--t) ease-in-out var(--dl) infinite alternate;
  animation-play-state: paused;
  transition:
    scale 1.1s var(--dims-orbs-spring),
    opacity 0.9s var(--dims-orbs-ease);
  transition-delay: calc(var(--i) * 45ms);
}

.dims-orbs.is-live .dims-orbs__ball {
  animation-play-state: running;
}

.dims-orbs-js .dims-orbs__field:not(.is-in) .dims-orbs__ball {
  opacity: 0;
  scale: 0.4;
}

/* Far (small) orbs sit slightly out of focus */
.dims-orbs__orb--hm .dims-orbs__ball {
  filter: blur(0.8px) saturate(0.9);
}

/* Specular dot + soft highlight (lean away from the pointer) + back-reflection crescent + fresnel rim */
.dims-orbs__ball::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at calc(30% + var(--mx, 0) * -7%) calc(17% + var(--my, 0) * -5%),
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.9) 3.5%,
      rgba(255, 255, 255, 0) 7%
    ),
    radial-gradient(ellipse 34% 9% at 58% 94%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 70%),
    radial-gradient(
      ellipse 40% 26% at calc(34% + var(--mx, 0) * -7%) calc(20% + var(--my, 0) * -5%),
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.42) 42%,
      rgba(255, 255, 255, 0) 72%
    ),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.18) 74%, rgba(255, 255, 255, 0.62) 100%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Caustic: light refracted through the glass pools at the bottom edge */
.dims-orbs__ball::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 58% 24% at 50% 93%, rgba(150, 196, 255, 0.75), rgba(140, 150, 255, 0.35) 55%, rgba(140, 150, 255, 0) 78%),
    radial-gradient(circle at 64% 70%, rgba(0, 0, 0, 0) 45%, rgba(4, 12, 40, 0.28) 100%);
  mix-blend-mode: screen;
  pointer-events: none;
}

@keyframes dims-orbs-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(var(--ax), var(--ay), 0);
  }
}

/* ---------- Count ---------- */

.dims-orbs__msg {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.dims-orbs__eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--dims-font-medium);
  font-size: 1rem;
  letter-spacing: -0.005em;
  color: #1d1d1f;
}

.dims-orbs__num {
  margin: 0;
  font-family: var(--dims-font);
  font-weight: 600;
  font-size: clamp(4.5rem, 10vw, 8.75rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  color: #000;
}

.dims-orbs__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.dims-orbs__line {
  margin: 0.9rem 0 0;
  font-family: var(--dims-font-medium);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  letter-spacing: -0.015em;
  color: #6e6e73;
}

@media (max-width: 640px) {
  /* Lock the section: it can never pan sideways on touch, and nothing paints outside it. */
  .dims-orbs {
    min-height: 0;
    overflow: hidden;
    touch-action: pan-y;
  }
  .dims-orbs__field {
    flex: none;
    min-height: 0;
    height: 500px;
    margin: 3rem auto;
    overflow: hidden;
    contain: paint;
    --spread-x: 0.9;
    --spread-y: 0.84;
  }
  .dims-orbs__sky {
    inset: 0 1.25rem;
  }
  .dims-orbs__orb {
    --k: 0.62;
  }
  .dims-orbs__orb--hm {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dims-orbs__ball {
    animation: none;
    transition: none;
  }
  .dims-orbs-js .dims-orbs__field:not(.is-in) .dims-orbs__ball {
    opacity: 1;
    scale: 1;
  }
}
