/* Native to a Web of Data extends the shared talk layout with revised 16:10 artwork. */

.nwd-image-hero,
.nwd-slide .aas-slide__visual,
.nwd-slide.aas-slide__visual,
.nwd-frame-build,
.nwd-video-slide .aas-slide__visual,
.nwd-video-slide.aas-slide__visual {
  aspect-ratio: 8 / 5;
}

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

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

/* Chapter artwork retains the deck's edge-to-edge visual authority. */
.aas-media.nwd-section-slide,
.aas-media.nwd-closing-slide {
  width: 100vw;
  max-width: 100vw;
}

.nwd-section-slide .aas-slide__visual,
.nwd-section-slide.aas-slide__visual,
.nwd-section-slide.nwd-frame-build,
.nwd-closing-slide .aas-slide__visual,
.nwd-closing-slide.aas-slide__visual {
  aspect-ratio: 8 / 5;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

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

.nwd-slide-grid__visual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 14px);
  width: 100%;
}

.nwd-slide-grid__visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}

.aas-slide__visual > .nwd-frame-build {
  height: 100%;
  aspect-ratio: auto;
}

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

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

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

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

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

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

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

.nwd-video-slide .aas-slide__visual,
.nwd-video-slide.aas-slide__visual {
  background: #090909;
}

.nwd-video-slide video {
  display: block;
  width: 100%;
  height: 100%;
  background: #090909;
  object-fit: cover;
}

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

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

.nwd-editorial-note {
  color: var(--soft);
  font-size: 0.88em;
}

/* Variant B keeps ordinary slides contained, but chapter art still spans the viewport. */
.aas-reading-layout--sidebar .aas-media.nwd-section-slide,
.aas-reading-layout--sidebar .aas-media.nwd-closing-slide {
  width: 100vw;
  max-width: 100vw;
  margin-right: 0;
  margin-left: 0;
  transform: translateX(var(--nwd-sidebar-bleed-offset, 0));
}

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

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

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