/* Greater than the Sum of Its Parts uses the final 4:3 Future of Web Apps deck. */

.gts-image-hero,
.gts-slide .aas-slide__visual,
.gts-slide.aas-slide__visual,
.gts-frame-build {
  aspect-ratio: 4 / 3;
}

.gts-image-hero {
  height: auto;
  min-height: 0;
}

.gts-image-hero img,
.gts-section-slide img,
.gts-closing-slide img {
  border: 0;
  border-radius: 0;
}

.aas-media.gts-section-slide,
.aas-media.gts-closing-slide {
  width: 100vw;
  max-width: 100vw;
}

.gts-section-slide .aas-slide__visual,
.gts-section-slide.aas-slide__visual,
.gts-closing-slide .aas-slide__visual,
.gts-closing-slide.aas-slide__visual {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
  aspect-ratio: 4 / 3;
}

.gts-frame-build {
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  background: #000;
  contain: layout paint;
}

.gts-frame-build .aas-slide__visual {
  position: relative;
  height: 100%;
}

.aas-media .gts-frame-build__frame,
.gts-frame-build__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #000;
  object-fit: cover;
  opacity: 0;
  animation: none;
  will-change: opacity;
}

.gts-frame-build__frame:first-child {
  opacity: 1;
}

.gts-frame-build.is-running .gts-frame-build__frame:not(:first-child) {
  animation: gts-frame-reveal 430ms ease-out var(--gts-delay, 0ms) both;
}

.gts-frame-build.is-paused .gts-frame-build__frame {
  animation-play-state: paused;
}

.gts-frame-build.is-reduced .gts-frame-build__frame {
  opacity: 0;
  animation: none;
  will-change: auto;
}

.gts-frame-build.is-reduced .gts-frame-build__frame:last-child {
  opacity: 1;
}

@keyframes gts-frame-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gts-frame-build:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -4px;
}

.gts-closing-slide {
  margin-bottom: 0;
}

.gts-article {
  padding-bottom: 0;
}

/* Variant B retains the article rail while chapter cards cross the viewport. */
.aas-reading-layout--sidebar .aas-media.gts-section-slide,
.aas-reading-layout--sidebar .aas-media.gts-closing-slide {
  width: 100vw;
  max-width: 100vw;
  margin-right: 0;
  margin-left: 0;
  transform: translateX(var(--gts-sidebar-bleed-offset, 0));
}

.aas-reading-layout--sidebar .aas-media.gts-section-slide img,
.aas-reading-layout--sidebar .aas-media.gts-closing-slide img {
  border: 0;
  border-radius: 0;
}

@media (max-width: 900px) {
  .gts-frame-build__frame {
    will-change: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gts-frame-build__frame {
    transition: none;
    animation: none;
    will-change: auto;
  }
}
