/* CS-C09 · Shared CYBERSMART compass instrument. */
.cst-instrument {
  --cst-bearing-radius: 184px;
  position: absolute;
  z-index: 1;
  top: 35%;
  left: calc(53% - 50px);
  width: min(100%, 430px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  isolation: isolate;
}

.cst-instrument::before {
  content: "";
  position: absolute;
  inset: 2%;
  z-index: -2;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -.25deg,
    rgba(218, 226, 231, .23) 0 .48deg,
    rgba(0, 0, 0, .4) .45deg .9deg,
    transparent .9deg 5deg
  );
  opacity: .96;
  filter:
    drop-shadow(-1px -1px 0 rgba(255, 255, 255, .12))
    drop-shadow(1px 1px 0 rgba(0, 0, 0, .96))
    drop-shadow(0 0 12px rgba(195, 207, 214, .055));
  -webkit-mask-image: radial-gradient(
    circle,
    transparent 0 79%,
    #000 79% 82%,
    transparent 82% 87%,
    #000 87% 88%,
    transparent 88%
  );
  mask-image: radial-gradient(
    circle,
    transparent 0 79%,
    #000 79% 82%,
    transparent 82% 87%,
    #000 87% 88%,
    transparent 88%
  );
  animation: cst-instrument-breathe 22s ease-in-out infinite alternate;
}

.cst-instrument::after {
  content: "";
  position: absolute;
  inset: 7%;
  z-index: -1;
  border: 1px solid rgba(207, 217, 222, .3);
  border-radius: 50%;
  box-shadow:
    -1px -1px 0 rgba(255, 255, 255, .1),
    1px 1px 0 rgba(0, 0, 0, .9),
    inset -1px -1px 0 rgba(255, 255, 255, .075),
    inset 1px 1px 0 rgba(0, 0, 0, .82),
    0 0 22px rgba(181, 196, 204, .035);
}

.cst-logo-stage {
  position: relative;
  width: 86%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.cst-logo-stage::before {
  content: "";
  position: absolute;
  inset: 4%;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  box-shadow:
    inset 0 0 34px rgba(0, 0, 0, .5),
    inset -1px -1px 0 rgba(255, 255, 255, .045),
    0 0 52px rgba(0, 0, 0, .3);
}

.cst-compass-diamond {
  position: absolute;
  z-index: 0;
  width: 72%;
  aspect-ratio: 1;
  border: 1px dashed rgba(207, 217, 222, .28);
  transform: rotate(45deg);
  box-shadow:
    -1px -1px 0 rgba(255, 255, 255, .075),
    1px 1px 0 rgba(0, 0, 0, .82),
    inset -1px -1px 0 rgba(255, 255, 255, .025),
    inset 1px 1px 0 rgba(0, 0, 0, .6);
}

.cst-technical-ring {
  position: absolute;
  z-index: 1;
  width: 61%;
  aspect-ratio: 1;
  border: 1px dashed rgba(207, 217, 222, .23);
  border-radius: 50%;
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, .28),
    0 0 18px rgba(255, 255, 255, .018);
}

.cst-technical-ring::before,
.cst-technical-ring::after {
  content: "";
  position: absolute;
  background: rgba(211, 220, 225, .1);
}

.cst-technical-ring::before {
  top: 50%;
  left: -8%;
  width: 116%;
  height: 1px;
}

.cst-technical-ring::after {
  top: -8%;
  left: 50%;
  width: 1px;
  height: 116%;
}

.cst-compass-logo {
  position: relative;
  z-index: 2;
  width: 50%;
  aspect-ratio: 1;
  color: #9ba6ad;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, .12))
    drop-shadow(0 3px 16px rgba(0, 0, 0, .58))
    drop-shadow(0 0 22px rgba(255, 255, 255, .055));
}

.cst-compass-logo :is(svg, img) {
  width: 100%;
  height: 100%;
  display: block;
}

.cst-axis {
  position: absolute;
  z-index: 1;
  background: rgba(211, 220, 225, .32);
  box-shadow:
    -1px -1px 0 rgba(255, 255, 255, .045),
    1px 1px 0 rgba(0, 0, 0, .92);
}

.cst-axis.north,
.cst-axis.south {
  left: 50%;
  width: 1px;
  height: 22px;
  transform: translateX(-50%);
}

.cst-axis.east,
.cst-axis.west {
  top: 50%;
  width: 22px;
  height: 1px;
  transform: translateY(-50%);
}

.cst-axis.north { top: 3.2%; }
.cst-axis.south { bottom: 3.2%; }
.cst-axis.east { right: 3.2%; }
.cst-axis.west { left: 3.2%; }

.cst-north-index {
  position: absolute;
  z-index: 1;
  top: 7.5%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-right: 7px solid transparent;
  border-bottom: 12px solid rgba(201, 211, 217, .18);
  border-left: 7px solid transparent;
  filter:
    drop-shadow(-1px -1px 0 rgba(255, 255, 255, .05))
    drop-shadow(1px 1px 0 rgba(0, 0, 0, .94));
}

.cst-bearing {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 3px;
  margin: -1.5px 0 0 -12px;
  border-radius: 2px;
  background: rgba(242, 122, 26, .78);
  box-shadow: 0 0 14px rgba(242, 122, 26, .3);
  will-change: transform;
}

.cst-bearing.one {
  animation: cst-bearing-east-sector 192s ease-in-out infinite;
}

.cst-bearing.two {
  animation: cst-bearing-west-sector 224s ease-in-out -28s infinite;
}

.cst-reference-marker {
  position: absolute;
  z-index: 3;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255, 183, 112, .52);
  border-radius: 50%;
  background: rgba(242, 122, 26, .96);
  box-shadow:
    0 0 0 4px rgba(242, 122, 26, .08),
    0 0 12px rgba(242, 122, 26, .52);
  transition: translate 2.8s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity, transform;
}

.cst-reference-marker.two-oclock {
  top: 29.5%;
  left: 84.5%;
  animation: cst-reference-pulse 6s ease-in-out infinite;
}

.cst-reference-marker.eight-oclock {
  top: 69.5%;
  left: 14.5%;
  animation: cst-reference-pulse-alt 6s ease-in-out -2.2s infinite;
}

.cst-reference-marker.green-target {
  top: 82%;
  left: 50%;
  border-color: rgba(139, 239, 178, .42);
  background: rgba(66, 185, 108, .76);
  box-shadow:
    0 0 0 3px rgba(60, 210, 116, .05),
    0 0 9px rgba(60, 210, 116, .3);
  animation: cst-reference-pulse-green 3.2s ease-in-out -.9s infinite;
}

.cst-target-trails {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.cst-target-trails polyline {
  fill: none;
  stroke: rgba(174, 185, 191, .3);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 3 5;
  vector-effect: non-scaling-stroke;
}

@keyframes cst-instrument-breathe {
  from { transform: scale(.997); opacity: .82; }
  to { transform: scale(1.004); opacity: .96; }
}

@keyframes cst-bearing-east-sector {
  0%, 100% { transform: rotate(-90deg) translateX(var(--cst-bearing-radius)); }
  12.5%, 87.5% { transform: rotate(-60deg) translateX(var(--cst-bearing-radius)); }
  25%, 75% { transform: rotate(-30deg) translateX(var(--cst-bearing-radius)); }
  37.5%, 62.5% { transform: rotate(0deg) translateX(var(--cst-bearing-radius)); }
  50% { transform: rotate(30deg) translateX(var(--cst-bearing-radius)); }
}

@keyframes cst-bearing-west-sector {
  0%, 100% { transform: rotate(150deg) translateX(var(--cst-bearing-radius)); }
  12.5%, 87.5% { transform: rotate(180deg) translateX(var(--cst-bearing-radius)); }
  25%, 75% { transform: rotate(210deg) translateX(var(--cst-bearing-radius)); }
  37.5%, 62.5% { transform: rotate(240deg) translateX(var(--cst-bearing-radius)); }
  50% { transform: rotate(270deg) translateX(var(--cst-bearing-radius)); }
}

@keyframes cst-reference-pulse {
  0%, 100% { opacity: .4; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes cst-reference-pulse-alt {
  0%, 100% { opacity: .48; transform: scale(.96); }
  50% { opacity: .94; transform: scale(1.07); }
}

@keyframes cst-reference-pulse-green {
  0%, 100% { opacity: .3; filter: brightness(.78); }
  45%, 65% { opacity: .78; filter: brightness(.98); }
}

@media (prefers-reduced-motion: reduce) {
  .cst-instrument::before,
  .cst-bearing,
  .cst-reference-marker {
    animation: none !important;
    transition: none !important;
  }
}
