.quantum-media {
  padding: clamp(4rem, 7vw, 7rem) 0;
  overflow: hidden;
  background: var(--site-warm-panel, #f9f6f0);
  color: var(--site-text, #262420);
}

.quantum-media__inner {
  width: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
}

.quantum-media__header {
  max-width: 48rem;
}

.quantum-media__header h2,
.quantum-gallery__head h2 {
  margin: 0.35rem 0 1rem;
  color: var(--site-text, #262420);
  font-family: var(--font-serif, Georgia, serif);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.04;
}

.quantum-media__header > p:last-child,
.quantum-gallery__head p,
.quantum-gallery__disclosure {
  color: var(--site-muted, #555149);
  font-size: 1rem;
  line-height: 1.7;
}

.quantum-video {
  max-width: 60rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(0.4rem, 1vw, 0.75rem);
  background: var(--site-canvas, #fff);
  border: 1px solid var(--site-line, #dbd8d2);
  box-shadow: 0 1.25rem 3.5rem rgb(34 26 30 / 0.12);
}

.quantum-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #171216;
  object-fit: contain;
}

.quantum-gallery {
  margin-top: clamp(4.5rem, 8vw, 8rem);
}

.quantum-gallery__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.quantum-gallery__head > div:first-child {
  max-width: 48rem;
}

.quantum-gallery__head p {
  margin: 0;
}

.quantum-gallery__controls {
  display: flex;
  gap: 0.6rem;
  flex: 0 0 auto;
}

.quantum-gallery__control,
.quantum-lightbox__nav,
.quantum-lightbox__close {
  min-width: 3rem;
  min-height: 3rem;
  display: inline-grid;
  place-items: center;
  padding: 0.65rem;
  color: var(--site-brand, #1a2740);
  background: var(--site-canvas, #fff);
  border: 1px solid var(--site-line-strong, #c4c0b8);
  border-radius: 50%;
  cursor: pointer;
}

.quantum-gallery__control:hover,
.quantum-gallery__control:focus-visible {
  color: #fefdfb;
  background: var(--ambani-plum, #4f263d);
  border-color: var(--ambani-plum, #4f263d);
}

.quantum-gallery__control:disabled {
  cursor: default;
  opacity: 0.38;
}

.quantum-gallery__track {
  margin-top: 2rem;
  padding: 0.25rem 0 1.25rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(76vw, 42rem);
  gap: 1.25rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-color: var(--site-line-strong, #c4c0b8) transparent;
  scrollbar-width: thin;
}

.quantum-gallery__card {
  min-width: 0;
  scroll-snap-align: start;
}

.quantum-gallery__trigger {
  width: 100%;
  height: 100%;
  padding: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  text-align: left;
  color: var(--site-text, #262420);
  background: var(--site-canvas, #fff);
  border: 1px solid var(--site-line, #dbd8d2);
  border-radius: 0.2rem;
  cursor: zoom-in;
  box-shadow: 0 0.6rem 1.8rem rgb(34 26 30 / 0.07);
}

.quantum-gallery__trigger:hover,
.quantum-gallery__trigger:focus-visible {
  border-color: var(--ambani-brass, #b09872);
  box-shadow: 0 1rem 2.5rem rgb(34 26 30 / 0.13);
}

.quantum-gallery__image-wrap {
  aspect-ratio: 2.05 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #eee9e2;
}

.quantum-gallery__image-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.quantum-gallery__caption {
  padding: 1.1rem 1.25rem 1.2rem;
  display: grid;
  gap: 0.2rem;
}

.quantum-gallery__caption strong {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.2;
}

.quantum-gallery__caption span {
  color: var(--site-muted, #555149);
  font-size: 0.95rem;
  line-height: 1.45;
}

.quantum-gallery__caption small {
  margin-top: 0.45rem;
  color: var(--site-muted-soft, #6e6a61);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.quantum-gallery__disclosure {
  max-width: 64rem;
  margin: 1.5rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid var(--ambani-brass, #b09872);
  font-size: 0.9rem;
}

.quantum-lightbox {
  width: min(96vw, 90rem);
  max-width: none;
  height: min(94vh, 64rem);
  max-height: none;
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #fefdfb;
  background: #171216;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 0.25rem;
}

.quantum-lightbox::backdrop {
  background: rgb(13 9 12 / 0.9);
  backdrop-filter: blur(4px);
}

.quantum-lightbox__panel {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.quantum-lightbox figure {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 4.25rem clamp(1rem, 6vw, 5.5rem) 1.25rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1rem;
}

.quantum-lightbox figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: contain;
}

.quantum-lightbox figcaption {
  min-height: 3.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  color: #fefdfb;
}

.quantum-lightbox figcaption strong {
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.quantum-lightbox figcaption span {
  min-width: 0;
  color: #d8cdd2;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.quantum-lightbox figcaption small {
  width: 100%;
  color: #b6a8b0;
  font-size: 0.75rem;
}

.quantum-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: auto;
  min-width: 4.5rem;
  min-height: 2.75rem;
  color: #fefdfb;
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.35);
  border-radius: 999px;
}

.quantum-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  color: #fefdfb;
  background: rgb(23 18 22 / 0.72);
  border-color: rgb(255 255 255 / 0.35);
  transform: translateY(-50%);
}

.quantum-lightbox__nav--previous {
  left: 0.75rem;
}

.quantum-lightbox__nav--next {
  right: 0.75rem;
}

.quantum-lightbox__close:hover,
.quantum-lightbox__close:focus-visible,
.quantum-lightbox__nav:hover,
.quantum-lightbox__nav:focus-visible {
  background: var(--ambani-plum, #4f263d);
  border-color: #fefdfb;
}

html[data-theme="dark"] .quantum-gallery__image-wrap {
  background: #161115;
}

@media (min-width: 64em) {
  .quantum-gallery__track {
    grid-auto-columns: calc((100% - 1.25rem) / 2);
  }
}

@media (max-width: 47.99em) {
  .quantum-media__inner {
    width: min(100% - 2rem, 76rem);
  }

  .quantum-gallery__head {
    display: block;
  }

  .quantum-gallery__controls {
    margin-top: 1.25rem;
  }

  .quantum-gallery__track {
    grid-auto-columns: 88%;
  }

  .quantum-gallery__image-wrap {
    aspect-ratio: 1.85 / 1;
  }

  .quantum-lightbox {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .quantum-lightbox figure {
    padding: 4.5rem 0.75rem 6rem;
  }

  .quantum-lightbox figcaption {
    min-width: 0;
    min-height: 0;
    display: grid;
    gap: 0.25rem;
  }

  .quantum-lightbox__nav {
    top: auto;
    bottom: 0.9rem;
    transform: none;
  }

  .quantum-lightbox__nav--previous {
    left: auto;
    right: 4.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quantum-gallery__track {
    scroll-behavior: auto;
  }
}
