/* Interactive ARGUS wheel (argus-wheel.php + assets/js/components/welcome-wheel.js) */

.argus-wheel {
  position: relative;
  /* side margin leaves room for the label pills on narrow screens */
  width: min(100% - 64px, 440px);
  aspect-ratio: 1;
  margin: 24px auto;
}

.argus-wheel__rotor {
  position: absolute;
  inset: 0;
  transform: rotate(var(--rot));
  transition: transform 1s cubic-bezier(.65, 0, .25, 1);
}

.argus-wheel__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.argus-wheel__segment {
  cursor: pointer;
  transform-box: view-box;
  transform-origin: 50% 50%;
  transition: transform .4s var(--ease), filter .4s, opacity .4s, fill .4s;
}

.argus-wheel__segment--1 { fill: #e8401c; }
.argus-wheel__segment--2 { fill: #f0583a; }
.argus-wheel__segment--3 { fill: #f57a5f; }
.argus-wheel__segment--4 { fill: #f8977f; }
.argus-wheel__segment--5 { fill: #cf3513; }
.argus-wheel__segment--6 { fill: #b52d0e; }

.argus-wheel__segment.is-hovered { transform: translate(calc(var(--dx) * .5), calc(var(--dy) * .5)); }

.argus-wheel__segment.is-active {
  fill: var(--color-primary);
  transform: translate(var(--dx), var(--dy));
  filter: drop-shadow(0 0 16px rgba(232, 64, 28, .45));
}

/* dim the others while one is selected */
.argus-wheel.has-active .argus-wheel__segment:not(.is-active) { opacity: .55; }
.argus-wheel.has-active .argus-wheel__segment.is-hovered { opacity: .8; }

/* icons & labels counter-rotate so they stay upright while the rotor turns */
.argus-wheel__icon,
.argus-wheel__label {
  position: absolute;
  transform: translate(-50%, -50%) rotate(calc(-1 * var(--rot)));
  transition: transform 1s cubic-bezier(.65, 0, .25, 1), color .2s, background-color .2s, box-shadow .25s;
}

.argus-wheel__icon {
  color: #fff;
  pointer-events: none;
}

.argus-wheel__icon.is-active { transform: translate(-50%, -50%) rotate(calc(-1 * var(--rot))) scale(1.15); }

.argus-wheel__center {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--color-line), var(--shadow-sm);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.argus-wheel__label {
  z-index: 1;
  padding: 9px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: 0 8px 22px rgba(34, 24, 18, .14);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
  cursor: pointer;
}

.argus-wheel__label:hover { color: var(--color-primary); }

.argus-wheel__label.is-active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

@media (max-width: 479.98px) {
  .argus-wheel__label {
    padding: 7px 14px;
    font-size: .9rem;
  }

  .argus-wheel__icon svg {
    width: 30px;
    height: 30px;
  }
}
