/* Transparent PNG showcase: the frame keeps the existing hero proportions. */
.hero-png-visual { padding-inline: 0; transform: rotate(.6deg); }
.hero-video-frame.png-showcase {
  display: flex;
  flex-direction: column;
  aspect-ratio: .9;
  padding: 15px;
  border: 1px solid var(--paper, #f6f5f0);
  background: #1c2219;
  color: var(--paper, #f6f5f0);
  isolation: isolate;
}

.png-showcase-topline,
.png-showcase-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  font-family: var(--display-font, sans-serif);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.png-showcase-topline { padding-bottom: 9px; }
.png-surface-label { color: var(--lime, #b9f65b); }

.png-showcase-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background-color: #f8f8f5;
  background-image: conic-gradient(#d5d6d2 25%, #fafaf8 0 50%, #d5d6d2 0 75%, #fafaf8 0);
  background-size: 40px 40px;
  transition: background-color 350ms ease, background-image 350ms ease;
  isolation: isolate;
}

.png-black-surface {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: #080908;
  opacity: 0;
  transition: opacity 350ms ease;
}
.png-showcase[data-background='black'] .png-black-surface { opacity: 1; }

.png-showcase-slides {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
}
.png-showcase-slide {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 15px;
  opacity: 0;
  transform: translateX(110%);
  pointer-events: none;
  transition: none;
}
.png-showcase-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0;
  opacity: 1;
}
.png-showcase-slide.is-entering {
  z-index: 3;
  opacity: 1;
  transform: translateX(110%);
  transition: none;
}
.png-showcase[data-direction='prev'] .png-showcase-slide.is-entering {
  transform: translateX(-110%);
}
.png-showcase-slide.is-active {
  z-index: 2;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition: transform 650ms ease, opacity 650ms ease;
}
.png-showcase-slide.is-leaving {
  z-index: 1;
  opacity: 0;
  transform: translateX(-110%);
  transition: transform 650ms ease, opacity 650ms ease;
}
.png-showcase[data-direction='prev'] .png-showcase-slide.is-leaving {
  transform: translateX(110%);
}

/* Before enhancement, the first image is still a useful no-script fallback. */
.png-showcase:not(.is-enhanced) .png-showcase-slide:first-child {
  z-index: 2;
  opacity: 1;
  transform: translateX(0);
}
.png-showcase:not(.is-enhanced) .png-showcase-slide:not(:first-child) { opacity: 0; }
.png-showcase:not(.is-enhanced) .png-showcase-controls { display: none; }

.png-showcase-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding-top: 9px;
}
.png-showcase-controls button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #718265;
  border-radius: 3px;
  background: #111610;
  color: var(--paper, #f6f5f0);
  font-family: var(--display-font, sans-serif);
  font-size: 20px;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.png-showcase-controls button:hover,
.png-showcase-controls button:focus-visible {
  border-color: var(--lime, #b9f65b);
  background: var(--lime, #b9f65b);
  color: #111411;
}
.png-showcase-count {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-family: var(--display-font, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  white-space: nowrap;
}
.png-showcase-toggle {
  flex-basis: auto !important;
  width: auto;
  padding-inline: 12px !important;
  font-size: 10px !important;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.png-showcase-detail {
  padding-top: 8px;
  color: #c2cbbd;
  font-size: 8px;
  letter-spacing: .07em;
}
.png-source-size { color: var(--lime, #b9f65b); }

.png-showcase.is-reduced-motion .png-showcase-slide,
.png-showcase.is-reduced-motion .png-black-surface,
.png-showcase.is-reduced-motion .png-showcase-viewport,
.png-showcase.is-reduced-motion .png-showcase-controls button { transition: none; }

@media (max-width: 800px) {
  .hero-png-visual { width: 100%; max-width: 540px; }
}
@media (max-width: 520px) {
  .hero-png-visual { width: 100%; padding-inline: 0; }
  .hero-video-frame.png-showcase { padding: 9px; aspect-ratio: .82; }
  .png-showcase-topline { padding-bottom: 7px; font-size: 8px; }
  .png-showcase-slide { padding: 10px; }
  .png-showcase-controls { gap: 5px; padding-top: 7px; }
  .png-showcase-controls button { flex-basis: 44px; min-width: 44px; }
  .png-showcase-toggle { padding-inline: 8px !important; font-size: 9px !important; }
  .png-showcase-detail { padding-top: 7px; font-size: 8px; flex-wrap: wrap; row-gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .png-showcase-slide,
  .png-black-surface,
  .png-showcase-viewport,
  .png-showcase-controls button { transition: none; }
}
