/* Design-rationale beacons (see beacons.js). Styled in the portfolio's voice
   — ink card, Newsreader title, the emerald→blue "Interactable" gradient —
   so they read as annotations on top of the HubSpot UI, not part of it. */
.bc-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  /* below the sticky global nav (z-index 10), so markers scroll under it */
  z-index: 5;
}

.bc {
  position: absolute;
  width: 0;
  height: 0;
  /* sit on the element's corner, counter-scaled to real size */
  transform: scale(var(--bc-inv, 1));
  transform-origin: 0 0;
}

.bc[hidden] {
  display: none;
}

.bc__dot {
  position: absolute;
  /* in the gutter beside the element, level with its first line */
  left: -28px;
  top: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: linear-gradient(120deg, #0e7a5a, #2563eb);
  color: #fff;
  font: 600 11px/1 "IBM Plex Mono", ui-monospace, monospace;
  cursor: pointer;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.55);
  transition: transform 0.2s ease;
}

/* A soft ping so the markers are discoverable */
.bc__dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #2563eb;
  opacity: 0;
  animation: bc-ping 2.4s ease-out infinite;
}

.bc.is-open .bc__dot,
.bc__dot:hover {
  transform: scale(1.08);
}

.bc.is-open .bc__dot::after {
  animation: none;
}

.bc__dot:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

@keyframes bc-ping {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  80%,
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

.bc--flip .bc__dot {
  left: 6px;
}

.bc__tip {
  position: absolute;
  left: 4px;
  top: -10px;
  width: 300px;
  padding: 16px 18px 18px;
  border-radius: 14px;
  background: #26291f;
  color: #f4f3ee;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
  pointer-events: none;
}

/* invisible bridge so the pointer can cross from marker to note */
.bc__tip::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -12px;
  width: 12px;
}

.bc--flip .bc__tip::before {
  left: auto;
  right: -12px;
}

.bc--flip .bc__tip {
  left: auto;
  right: 4px;
  transform: translateX(4px);
}

.bc--up .bc__tip {
  top: auto;
  bottom: -26px;
}

.bc.is-open .bc__tip {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.bc__title {
  margin: 0 0 6px;
  font: 600 18px/1.25 "Newsreader", Georgia, serif;
}

.bc__body {
  margin: 0;
  font: 400 14px/1.5 "Instrument Sans", system-ui, sans-serif;
  color: rgba(244, 243, 238, 0.86);
}

@media (prefers-reduced-motion: reduce) {
  .bc__dot::after {
    animation: none;
  }
}
