/* The pixels at the perimeter fade into the actual section behind each image. */
#main {
  --photo-edge: clamp(3px, .55vw, 8px);
  --photo-horizontal: linear-gradient(to right, transparent, black var(--photo-edge),
    black calc(100% - var(--photo-edge)), transparent);
  --photo-vertical: linear-gradient(to bottom, transparent, black var(--photo-edge),
    black calc(100% - var(--photo-edge)), transparent);
}

#main :is(.project-screenshot, .catalog-image, .catalog-entry-visual, .desktop-feature-media,
    .model-lane-visual, .estuary-client-viewport, .estuary-client-panel),
#main :is(.project-screenshot, .catalog-entry-visual) .screenshot-link {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

#main :is(.project-screenshot, .catalog-image, .catalog-entry-visual, .desktop-feature-media,
    .model-lane-visual, .estuary-client-panel) img {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-mask-image: var(--photo-horizontal), var(--photo-vertical);
  -webkit-mask-composite: source-in;
  mask-image: var(--photo-horizontal), var(--photo-vertical);
  mask-composite: intersect;
}

/* Keep the feather at the photo's perimeter instead of on its letterbox. */
#main .estuary-client-viewport::after { content: none; }
#main .estuary-client-panel a { grid-template: 100% / 100%; }
#main .estuary-client-panel img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  place-self: center;
}
#main :is(.catalog-image, .moss-device) img {
  width: auto;
  height: auto;
  margin-inline: auto;
  max-width: 100%;
}
#main .moss-device img { max-height: 380px; }
#main .catalog-entry-visual .screenshot-link { display: block; height: 100%; }
#main .catalog-entry-visual.moss-device img { max-height: 100%; }
#main :is(.project-screenshot, .catalog-entry-visual, .catalog-image) img { clip-path: none; }
#main :is(.project-screenshot, .catalog-entry-visual) .screenshot-link:focus-visible {
  outline: 2px solid #bbaaff;
  outline-offset: -2px;
}
