/* Self-contained hero carousel; product crops come from product-media.css. */
.puri-hero-image:has(.hero-product-carousel) {
  min-width: 0;
  overflow: hidden;
  background: #d2ebf6;
}

.hero-product-carousel {
  position: relative;
  container-type: inline-size;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  color: #141448;
  background: var(--carousel-bg, #d2ebf6);
  transition: background-color 520ms ease;
  touch-action: pan-y pinch-zoom;
}

.hero-carousel-slides,
.hero-product-slide {
  position: absolute;
  inset: 0;
}

.hero-product-slide {
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 520ms;
}

.hero-product-slide.is-active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}

.hero-product-topline {
  position: absolute;
  top: 28px;
  right: 30px;
  left: 30px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .13em;
}

.hero-product-topline > span:first-child::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.hero-product-visual {
  position: absolute;
  inset: 62px 8% 153px;
  min-width: 0;
  min-height: 0;
}

.hero-product-visual .product-media-stage {
  --media-space-width: 94cqw;
  --media-space-height: 96cqh;
  background: transparent;
}

.hero-product-visual .product-media-frame {
  background: transparent;
}

.hero-product-caption {
  position: absolute;
  right: 30px;
  bottom: 84px;
  left: 30px;
  text-align: center;
}

.hero-product-caption > p {
  margin: 0 0 10px;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .035em;
}

.hero-product-caption > a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 44px;
  padding: 2px;
  color: inherit;
  text-decoration: none;
}

.hero-product-caption h2 {
  margin: 0;
  font-size: clamp(23px, 2.25vw, 37px);
  font-weight: 550;
  line-height: 1.1;
  letter-spacing: -.05em;
}

.hero-product-caption > a > span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #14144840;
  border-radius: 50%;
  font-size: 20px;
  transition: background-color 180ms ease, color 180ms ease;
}

.hero-product-caption > a:hover > span {
  color: #fff;
  background: #141448;
}

.hero-carousel-bubbles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-carousel-bubbles i {
  position: absolute;
  display: block;
  border: 1px solid #ffffffb3;
  border-radius: 50%;
  box-shadow: inset 8px 9px 28px #ffffff16;
  background: linear-gradient(135deg, #ffffff28, #ffffff00 55%);
}

.hero-carousel-bubbles i:nth-child(1) {
  width: 58%;
  aspect-ratio: 1;
  top: 16%;
  left: -19%;
}

.hero-carousel-bubbles i:nth-child(2) {
  width: 31%;
  aspect-ratio: 1;
  top: 10%;
  right: -8%;
}

.hero-carousel-bubbles i:nth-child(3) {
  width: 15%;
  aspect-ratio: 1;
  right: 12%;
  bottom: 26%;
}

.hero-carousel-controls {
  position: absolute;
  z-index: 3;
  right: 26px;
  bottom: 18px;
  left: 26px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.hero-carousel-controls[hidden],
.hero-carousel-controls button[hidden] {
  display: none !important;
}

.hero-carousel-navigation,
.hero-carousel-dots {
  display: flex;
  align-items: center;
}

.hero-carousel-navigation {
  gap: 4px;
}

.hero-carousel-controls button {
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0;
  border: 0;
  color: inherit;
  cursor: pointer;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.hero-carousel-navigation button {
  width: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  font-size: 22px;
  transition: background-color 180ms ease;
}

.hero-carousel-navigation [data-carousel-pause] {
  font-size: 14px;
}

.hero-carousel-navigation button:hover {
  background: #ffffff73;
}

.hero-carousel-dot {
  width: 44px;
  flex: 0 0 44px;
}

.hero-carousel-dot > span {
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .5;
  transition: transform 180ms ease, background-color 180ms ease;
}

.hero-carousel-dot[aria-pressed="true"] > span {
  background: currentColor;
  opacity: 1;
  transform: scale(1.35);
}

.hero-product-carousel :is(a, button):focus-visible {
  outline: 2px solid #141448;
  outline-offset: 3px;
}

.hero-carousel-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The split hero can be narrow even on a wide landscape viewport. */
@container (max-width: 490px) {
  .hero-product-visual {
    bottom: 234px;
  }

  .hero-product-caption {
    bottom: 141px;
  }

  .hero-carousel-controls {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 16px;
  }

  .hero-carousel-dots {
    justify-content: center;
  }

  .hero-carousel-navigation {
    align-self: flex-start;
  }
}

@media (max-width: 780px) {
  .puri-hero-image:has(.hero-product-carousel) {
    height: 510px;
    aspect-ratio: auto;
  }

  .hero-product-topline {
    top: 22px;
    right: 24px;
    left: 24px;
    font-size: 9px;
  }

  .hero-product-visual {
    inset: 48px 12% 218px;
  }

  .hero-product-caption {
    right: 22px;
    bottom: 125px;
    left: 22px;
  }

  .hero-product-caption h2 {
    font-size: clamp(25px, 6.4vw, 34px);
  }

  .hero-carousel-controls {
    right: 18px;
    bottom: 15px;
    left: 18px;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
  }

  .hero-carousel-dots {
    justify-content: center;
  }

  .hero-carousel-navigation {
    align-self: flex-start;
  }
}

@media (max-width: 390px) {
  .puri-hero-image:has(.hero-product-carousel) {
    height: 510px;
  }

  .hero-product-visual {
    inset: 46px 10% 218px;
  }

  .hero-product-caption h2 {
    font-size: 25px;
  }

  .hero-product-caption > a {
    gap: 9px;
  }

  .hero-product-caption > a > span {
    flex-basis: 29px;
    width: 29px;
    height: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-product-carousel,
  .hero-product-slide,
  .hero-product-carousel * {
    transition: none !important;
    animation: none !important;
  }
}
