/* Product carousels: a stack of photos or short videos that cross-fade.
   Used on the top-page product cards and the product sections of
   projects/. Markup: .vp-carousel[data-carousel] > .vp-carousel-slide;
   product-carousel.js adds the arrows and dots. */
.vp-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
}
.vp-carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.vp-carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .6s ease;
}
.vp-carousel .vp-carousel-slide img,
.vp-carousel .vp-carousel-slide video {
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  transform: none;
}
.vp-carousel[data-fit="contain"] .vp-carousel-slide img,
.vp-carousel[data-fit="contain"] .vp-carousel-slide video {
  object-fit: contain;
}
.vp-carousel-btn {
  width: 40px;
  height: 40px;
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  margin: -20px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #141414;
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, background-color .15s ease, color .15s ease;
}
.vp-carousel-btn::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.vp-carousel-prev { left: 12px; }
.vp-carousel-next { right: 12px; }
.vp-carousel-prev::before { margin-left: 4px; transform: rotate(-135deg); }
.vp-carousel-next::before { margin-right: 4px; transform: rotate(45deg); }
.vp-carousel:hover .vp-carousel-btn,
.vp-carousel:focus-within .vp-carousel-btn,
.has-carousel:hover .vp-carousel-btn,
.has-carousel:focus-within .vp-carousel-btn { opacity: 1; }
.vp-carousel-btn:hover { background: #141414; color: #fff; }
.vp-carousel-btn:focus-visible,
.vp-carousel-dot:focus-visible {
  outline: 3px solid #141414;
  outline-offset: 2px;
}
.vp-carousel-dots {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 8px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}
.vp-carousel-dot {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
}
.vp-carousel-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 0 0 1px rgba(0,0,0,.1);
  transition: width .25s ease, background-color .25s ease;
}
.vp-carousel-dot[aria-current="true"]::before {
  width: 18px;
  background: #fff;
}
.vp-carousel[data-dots="dark"] .vp-carousel-dot::before {
  background: rgba(20,20,20,.22);
  box-shadow: none;
}
.vp-carousel[data-dots="dark"] .vp-carousel-dot[aria-current="true"]::before { background: #141414; }
/* Smaller controls inside the top-page cards. */
.vp-carousel--card .vp-carousel-btn {
  width: 32px;
  height: 32px;
  margin-top: -16px;
}
.vp-carousel--card .vp-carousel-btn::before { width: 7px; height: 7px; }
.vp-carousel--card .vp-carousel-prev { left: 8px; }
.vp-carousel--card .vp-carousel-next { right: 8px; }
.vp-carousel--card .vp-carousel-dots { bottom: 4px; }
@media (hover: none) {
  .vp-carousel-btn { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .vp-carousel-slide,
  .vp-carousel-slide.is-active { transition: none; }
}
