html {
  margin: 0;
  padding: 0;
}
body {
  margin: 0;
  padding-top: 108px; /* clears the fixed .site-nav above it */
  background: #fff;
}

.morph-gallery {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  background: #000;
  outline: none;
}

.morph-gallery__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 400ms ease;
}

.morph-gallery__fallback-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease;
}

.morph-gallery__scrim {
  pointer-events: none;
  position: absolute;
  inset: auto 0 0 0;
  z-index: 5;
  height: 14rem;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.65));
}

.morph-gallery__arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background-color 150ms ease;
}
.morph-gallery__arrow:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.25);
}
.morph-gallery__arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.morph-gallery__arrow:disabled {
  pointer-events: none;
  opacity: 0.25;
}
.morph-gallery__arrow--prev { left: 1rem; }
.morph-gallery__arrow--next { right: 1rem; }
@media (min-width: 640px) {
  .morph-gallery__arrow--prev { left: 2rem; }
  .morph-gallery__arrow--next { right: 2rem; }
}

.morph-gallery__thumbs {
  position: absolute;
  inset: auto 0 2rem 0;
  z-index: 10;
  margin: 0 auto;
  display: flex;
  width: max-content;
  max-width: calc(100% - 2rem);
  gap: 0.5rem;
  list-style: none;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 0 0.625rem 0;
}
.morph-gallery__thumbs::-webkit-scrollbar { height: 6px; }
.morph-gallery__thumbs::-webkit-scrollbar-track { border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.morph-gallery__thumbs::-webkit-scrollbar-thumb { border-radius: 4px; background: rgba(255, 255, 255, 0.3); }
@media (max-width: 639px) {
  .morph-gallery__thumbs { display: none; }
}

.morph-gallery__thumb-item {
  flex-shrink: 0;
  list-style: none;
}

.morph-gallery__thumb-btn {
  display: block;
  cursor: pointer;
  overflow: hidden;
  border-radius: 6px;
  border: 2px solid transparent;
  background: transparent;
  padding: 0;
  opacity: 0.55;
  transition: opacity 150ms ease, border-color 150ms ease;
}
.morph-gallery__thumb-btn:hover { opacity: 0.85; }
.morph-gallery__thumb-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.morph-gallery__thumb-btn[aria-current="true"] {
  border-color: #fff;
  opacity: 1;
}
.morph-gallery__thumb-btn img {
  display: block;
  object-fit: cover;
  max-width: none;
  width: 80px;
  height: 50px;
}

.morph-gallery__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
