/* ============================================================
 * product-carousel-2026-05-26.css
 * Premium product-screenshot carousel: real app.crowagent.ai captures
 * framed in a browser-chrome device, cinematic crossfade, dot controls.
 * Tokens only; GPU-friendly (opacity/transform); reduced-motion safe.
 * ============================================================ */

.pcar {
  --pcar-radius: 16px;
  max-width: min(100% - 2 * clamp(20px, 4vw, 48px), 1080px);
  margin-inline: auto;
}

/* Device frame: browser chrome + screenshot viewport */
.pcar__frame {
  border-radius: var(--pcar-radius);
  overflow: hidden;
  background: var(--surf, var(--surface-1));
  border: 1px solid var(--border, var(--white-08));
  box-shadow:
    0 1px 0 var(--white-04) inset,
    0 24px 60px -24px rgba(0, 0, 0, 0.6),
    0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

.pcar__chrome {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 16px;
  background: var(--surf2, var(--ca-c-0e2747));
  border-bottom: 1px solid var(--border, var(--white-06));
}
.pcar__dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); flex-shrink: 0; }
.pcar__dot:nth-child(1) { background: var(--dot-close); }
.pcar__dot:nth-child(2) { background: var(--dot-minimize); }
.pcar__dot:nth-child(3) { background: var(--dot-maximize); }
.pcar__url {
  margin-left: var(--space-2);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.75rem;
  color: var(--mist, rgba(255, 255, 255, 0.5));
  letter-spacing: 0.01em;
}

/* Viewport: slides stacked, crossfade */
.pcar__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 822;
  background: var(--bg, var(--bg));
}
.pcar__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(0.99);
  transition: opacity 900ms var(--ease-canonical), transform 900ms var(--ease-canonical);
  pointer-events: none;
  will-change: opacity, transform;
}
.pcar__slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.pcar__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Caption + dots row */
.pcar__caption {
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--steel, rgba(255, 255, 255, 0.7));
  min-height: 1.4em;
}
.pcar__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: clamp(16px, 2vw, 24px);
}
.pcar__caption-wrap { flex: 1; max-width: 520px; }

.pcar__nav { display: inline-flex; gap: var(--space-2); }
/* Class is `pcar__arrow` (NOT `pcar__nav-btn`) on purpose: the global tactile
   rule `button[class*="btn"]:not([class*="lottie"])` in styles.css uses
   `!important` for min-height + border-radius, and the substring "btn" inside
   "nav-btn" made it hijack these controls into 8px-radius pills. Avoiding the
   substring sidesteps the collision cleanly. Own min-width/min-height keeps the
   circle immune to the (pointer:coarse) 44px touch-min; explicit svg size stops
   the reset's `svg{height:auto}` collapsing the chevron to 0-width in flex. */
.pcar__arrow {
  width: 44px; height: 44px;
  min-width: 44px; min-height: 44px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surf2, var(--ca-c-0e2747));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  color: var(--cloud, var(--cloud));
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}
.pcar__arrow svg { width: 16px; height: 16px; flex-shrink: 0; }
.pcar__arrow:hover { border-color: var(--teal, var(--teal)); transform: translateY(-1px); }
.pcar__arrow:focus-visible { outline: 2px solid var(--teal, var(--teal)); outline-offset: 2px; }

.pcar__dots-row { display: inline-flex; gap: var(--space-1); align-items: center; }
/* Decouple the painted indicator (::before) from the tap target. The global
   "(pointer:coarse) button → min 44px" rule then enlarges only the invisible
   28px button into a 44px hit area, never the 8px painted dot — WCAG 2.5.5
   without giant blobs on mobile (mirrors .home-demo-cycle__dot in styles.css). */
.pcar__tab {
  position: relative;
  width: 28px; height: 28px; padding: 0;
  border: 0; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-appearance: none; appearance: none;
}
.pcar__tab::before {
  content: ""; display: block;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 220ms ease, transform 220ms ease;
}
.pcar__tab[aria-selected="true"]::before {
  background: var(--teal, var(--teal));
  transform: scale(1.2);
}
.pcar__tab:focus-visible { outline: 2px solid var(--teal, var(--teal)); outline-offset: 2px; border-radius: 8px; }

.pcar__ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}
.pcar__tab[aria-selected="true"] .pcar__ring {
  opacity: 1;
}
.pcar__ring-bg {
  stroke: rgba(255, 255, 255, 0.1);
}
.pcar__ring-progress {
  stroke: var(--teal, var(--teal));
  stroke-linecap: round;
}

/* Reduced motion: no scale/crossfade animation; instant slide swap, controls remain */
@media (prefers-reduced-motion: reduce) {
  .pcar__slide { transition: opacity 1ms linear; transform: none; }
  .pcar__slide.is-active { transform: none; }
}
