/* Service Hero: exploded-view units carousel. Everything is scoped under .uc.
   Uses the v2 site's tokens when present (--orange, --sans, --serif), with fallbacks. */
.uc {
  --uc-orange: var(--orange, #EE5F2A);
  --uc-text: #F5F4F0;
  --uc-muted: rgba(245, 244, 240, 0.64);
  --uc-sans: var(--sans, "Inter Tight", system-ui, sans-serif);
  --uc-serif: var(--serif, "Instrument Serif", Georgia, serif);
  --uc-ease: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  font-family: var(--uc-sans);
  color: var(--uc-text);
}
.uc *, .uc *::before, .uc *::after { box-sizing: border-box; }

.uc-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 420px;
  max-height: 760px;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #2A2A2A 0%, #1B1B1B 100%);
  isolation: isolate;
}
.uc-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: grab;
  outline: none;
}
.uc-canvas.is-on { opacity: 1; }
.uc-canvas:active { cursor: grabbing; }

/* caption, top left */
.uc-caption {
  position: absolute; left: 24px; top: 20px; max-width: calc(100% - 48px);
  z-index: 2; pointer-events: none;
  opacity: 0; transition: opacity 0.3s ease;
}
.uc-caption.is-on { opacity: 1; }
.uc-title {
  margin: 0;
  font: 600 clamp(19px, 2vw, 24px) / 1.15 var(--uc-sans);
  letter-spacing: -0.02em;
  color: var(--uc-text);
}
.uc-sep { color: var(--uc-muted); font-weight: 400; }
.uc-kind {
  font-family: var(--uc-serif); font-style: italic; font-weight: 400;
  font-size: 1.14em; letter-spacing: -0.01em;
  color: var(--uc-orange);
}
.uc-meta { margin: 6px 0 0; font: 500 13px / 1.3 var(--uc-sans); color: var(--uc-muted); }

/* part labels, shown while the unit is apart */
.uc-labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; opacity: 0; }
.uc-label { position: absolute; left: 0; top: 0; display: flex; align-items: center; will-change: transform; transition: opacity .18s ease; }
.uc-label.is-left { flex-direction: row-reverse; }
.uc-pin {
  width: 10px; height: 10px; flex: none;
  border-radius: 50%;
  background: var(--uc-orange);
  border: 2px solid #1B1B1B;
  margin-left: -5px;
}
.uc-label.is-left .uc-pin { margin-left: 0; margin-right: -5px; }
.uc-line { width: 14px; height: 1px; flex: none; background: rgba(245, 244, 240, 0.7); }
.uc-label span {
  font: 600 12px / 1 var(--uc-sans);
  letter-spacing: -0.005em;
  color: #1B1B1B;
  background: #F5F4F0;
  border: 1px solid rgba(27, 27, 27, 0.22); /* keeps the pill readable over light panels */
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* loading */
.uc-loading {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  font: 500 14px var(--uc-sans); color: var(--uc-muted);
  pointer-events: none;
  opacity: 0; transition: opacity 0.25s ease;
}
.uc-loading.is-on { opacity: 1; }
.uc-progress { display: block; width: 140px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.uc-progress b { display: block; height: 100%; background: var(--uc-orange); transform-origin: left center; transform: scaleX(0); transition: transform 0.2s ease; }

/* controls, bottom center */
.uc-controls {
  position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3;
  display: flex; justify-content: center; align-items: center; gap: 8px;
}
.uc-btn {
  width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.uc-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.24); }
.uc-btn:active { background: rgba(255, 255, 255, 0.2); }
.uc-play { margin-left: 6px; }
.uc-dots { display: flex; align-items: center; padding: 0 2px; }
.uc-dot {
  width: 22px; height: 32px; padding: 0;
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer;
  transition: width 0.35s var(--uc-ease);
}
.uc-dot i {
  position: relative; display: block; overflow: hidden;
  width: 7px; height: 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: width 0.35s var(--uc-ease), background-color 0.2s ease;
}
.uc-dot:hover i { background: rgba(255, 255, 255, 0.6); }
.uc-dot[aria-current="true"] { width: 42px; }
.uc-dot[aria-current="true"] i { width: 30px; background: rgba(255, 255, 255, 0.22); }
.uc-dot b { position: absolute; inset: 0; background: var(--uc-orange); transform-origin: left center; transform: scaleX(0); }
.uc-dot[aria-current="false"] b { transform: scaleX(0) !important; }
.uc-btn:focus-visible, .uc-dot:focus-visible { outline: 2px solid var(--uc-orange); outline-offset: 2px; }

.uc-hint {
  position: absolute; right: 22px; bottom: 26px; z-index: 2; margin: 0;
  font: 500 12px var(--uc-sans); color: var(--uc-muted);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.uc.is-dragged .uc-hint { opacity: 0; }

@media (max-width: 640px) {
  .uc-stage { aspect-ratio: 4 / 5; min-height: 0; border-radius: 18px; }
  .uc-caption { left: 18px; top: 16px; max-width: calc(100% - 36px); }
  .uc-hint { display: none; }
  .uc-controls { bottom: 12px; gap: 4px; }
  .uc-dot { width: 18px; }
  .uc-dot[aria-current="true"] { width: 38px; }
  .uc-label span { font-size: 11px; padding: 4px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .uc-dot, .uc-dot i { transition: none; }
}
