/* ============================================================
   Physical coordination — interactive image overlay styling.

   The photo + connector lines render inside one <svg> (.pc-svg)
   so there is a single paint layer. No CSS/SVG filters are used
   anywhere — a separate filtered layer over a plain <img> was
   blanking the photo on hover in Chrome. Beam glow = two stacked
   strokes (soft halo + bright core). HTML hit targets, captions
   and the hub badge overlay on top via z-index.
   ============================================================ */
.pc-section { --pc-beam: #3aa6ff; }

.pc-head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.pc-head .lede { margin: 14px auto 0; max-width: 640px; text-align: center; }

/* ---------- stage ---------- */
.pc-stage-wrap { width: 100%; }
.pc-stage { position: relative; margin: 0; width: 100%; }

/* The svg is the sizing element: width 100% + viewBox gives it an
   intrinsic aspect ratio, so the figure height follows the photo. */
.pc-svg {
  display: block; width: 100%; height: auto;
  border-radius: var(--wb-radius-xl, 20px);
  box-shadow: var(--wb-shadow-lg);
}
.pc-svg image { /* the photo */ }

/* Subtle scrim so the beams read against the bright photo. */
.pc-scrim { opacity: 0; transition: opacity 320ms var(--wb-ease-out); }
.pc-stage.is-active .pc-scrim { opacity: 1; }

/* ---------- connectors (stacked strokes, no filter) ---------- */
.pc-line {
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: stroke-dashoffset 680ms var(--wb-ease-out), opacity 240ms linear;
}
.pc-line-halo { stroke: rgba(58, 166, 255, 0.45); stroke-width: 9; }
.pc-line-core { stroke: #eaf6ff; stroke-width: 2.6; }
.pc-conn.is-on .pc-line { stroke-dashoffset: 0; opacity: 1; }

.pc-hub-ring { fill: none; stroke: var(--pc-beam); stroke-width: 2; opacity: 0; transition: opacity 240ms linear; }
.pc-hub-core { fill: #eaf6ff; opacity: 0; transition: opacity 240ms linear; }
.pc-hub.is-on .pc-hub-ring { opacity: 0.9; animation: pc-hub-pulse 1800ms var(--wb-ease-out) infinite; }
.pc-hub.is-on .pc-hub-core { opacity: 1; }
@keyframes pc-hub-pulse { 0% { r: 11; opacity: 0.9; } 100% { r: 26; opacity: 0; } }

/* ---------- hit targets + hint dots ---------- */
.pc-hit {
  position: absolute; z-index: 4;
  width: 4.4%; min-width: 40px; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  margin: 0; padding: 0; border: 0; background: none;
  display: grid; place-items: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pc-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--pc-beam);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6), 0 0 0 0 rgba(58, 166, 255, 0.55);
  animation: pc-dot-pulse 2400ms var(--wb-ease-out) infinite;
  transition: transform 200ms var(--wb-ease-out), box-shadow 200ms var(--wb-ease-out);
}
@keyframes pc-dot-pulse {
  0% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 0 0 0 rgba(58, 166, 255, 0.5); }
  70% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 0 0 14px rgba(58, 166, 255, 0); }
  100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55), 0 0 0 0 rgba(58, 166, 255, 0); }
}
.pc-hit:hover .pc-dot,
.pc-hit.is-on .pc-dot { transform: scale(1.25); animation: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 0 18px 4px rgba(58, 166, 255, 0.55); }
.pc-hit:focus-visible { outline: none; }
.pc-hit:focus-visible .pc-dot { box-shadow: 0 0 0 3px var(--wb-ink-0, #fff), 0 0 0 6px var(--pc-beam); }

/* ---------- captions ---------- */
.pc-cap {
  position: absolute; z-index: 5;
  width: max-content; max-width: 248px;
  padding: 9px 12px;
  border-radius: var(--wb-radius-md, 12px);
  background: rgba(9, 20, 40, 0.92);
  border: 1px solid rgba(58, 166, 255, 0.35);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex; flex-direction: column; gap: 2px;
  pointer-events: none; opacity: 0;
  transition: opacity 220ms var(--wb-ease-out);
  /* positioning transform is set inline (capTransform); fade is opacity-only */
}
.pc-cap.is-on { opacity: 1; }
.pc-cap-t { font: 600 13px/1.3 var(--wb-font-sans); letter-spacing: -0.01em; }
.pc-cap-s { font: 500 11.5px/1.35 var(--wb-font-sans); color: rgba(220, 235, 255, 0.78); }

/* ---------- hub medallion (logo only) + hint ---------- */
.pc-hub-badge {
  position: absolute; z-index: 5;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid rgba(58, 166, 255, 0.55);
  box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  transition: box-shadow 280ms var(--wb-ease-out);
}
.pc-hub-badge img { width: 30px; height: 30px; }
.pc-stage.is-active .pc-hub-badge { box-shadow: 0 0 0 4px rgba(58, 166, 255, 0.3), 0 10px 26px -10px rgba(0, 0, 0, 0.55); }

.pc-hint {
  position: absolute; z-index: 5; right: 16px; bottom: 14px;
  padding: 7px 13px; border-radius: var(--wb-radius-pill, 999px);
  background: rgba(9, 20, 40, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font: 600 12px/1 var(--wb-font-sans); color: #eaf3ff;
  pointer-events: none;
  transition: opacity 240ms var(--wb-ease-out);
}
.pc-stage.is-active .pc-hint { opacity: 0; }

/* ---------- responsive ---------- */
/* ---------- mobile chip control (hidden on desktop) ---------- */
.pc-chips { display: none; }

@media (max-width: 640px) {
  .pc-dot { width: 11px; height: 11px; }
  .pc-hub-badge { width: 38px; height: 38px; }
  .pc-hub-badge img { width: 24px; height: 24px; }

  /* The on-image dots stay as visual indicators; chips become the primary,
     reliably-tappable control on small screens. */
  .pc-chips {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    margin-top: 16px;
  }
  .pc-chip {
    display: inline-flex; align-items: center; min-height: 40px;
    padding: 8px 14px; border-radius: var(--wb-radius-pill, 999px);
    border: 1px solid var(--wb-border); background: var(--wb-ink-0, #fff);
    color: var(--wb-navy-900);
    font: 600 12.5px/1 var(--wb-font-sans);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background 160ms var(--wb-ease-out), color 160ms var(--wb-ease-out), border-color 160ms var(--wb-ease-out);
  }
  .pc-chip.is-on {
    background: var(--wb-navy-900); color: #fff;
    border-color: var(--pc-beam);
    box-shadow: 0 0 0 3px rgba(58, 166, 255, 0.22);
  }

  /* Active caption becomes a full-width bar pinned to the bottom of the image,
     so it is always readable and never lands on a cramped anchor. The inline
     anchor styles are overridden here. */
  .pc-cap {
    left: 10px !important; right: 10px !important;
    top: auto !important; bottom: 10px !important;
    transform: none !important;
    width: auto; max-width: none;
    padding: 10px 13px;
  }
  .pc-cap-t { font-size: 13px; }
  .pc-cap-s { font-size: 12px; }

  /* The hint chip is redundant once the tap-chips are visible. */
  .pc-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-line { transition: opacity 200ms linear; }
  .pc-dot { animation: none; }
  .pc-hub.is-on .pc-hub-ring { animation: none; }
}
