.proof-gallery {
  --proof-ink: #09263f;
  --proof-paper: #ffffff;
  --proof-accent: #f0b708;
  --proof-muted: #d5e5f0;
  --proof-ease: cubic-bezier(.22, .68, .18, 1);
  background: var(--proof-ink);
  color: var(--proof-paper);
  padding-block: clamp(4.5rem, 9vw, 8.25rem);
}

.proof-gallery__inner {
  width: min(100% - clamp(2.5rem, 8vw, 8rem), var(--proof-max, 76rem));
  margin-inline: auto;
}

.proof-gallery__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: 1rem 3rem;
  align-items: end;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.proof-gallery__eyebrow {
  margin: 0 0 .9rem;
  color: var(--proof-accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.proof-gallery h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(2.75rem, 6.1vw, 5.75rem);
  font-weight: 500;
  letter-spacing: -.045em;
  word-spacing: .05em;
  line-height: .97;
}

.proof-gallery__intro {
  margin: 0;
  max-width: 32ch;
  color: var(--proof-muted);
  font-size: clamp(.95rem, 1.45vw, 1.05rem);
  line-height: 1.65;
}

.proof-gallery__track {
  display: flex;
  gap: clamp(.45rem, 1.1vw, 1rem);
  block-size: clamp(19rem, 36vw, 30rem);
  touch-action: pan-y pinch-zoom;
}

.proof-gallery__frame {
  display: block;
  position: relative;
  isolation: isolate;
  flex: 1 1 0;
  min-inline-size: 2.75rem;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: clamp(.65rem, 1.6vw, 1.25rem);
  background: #173a55;
  color: var(--proof-paper);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: flex-grow 650ms var(--proof-ease), border-radius 650ms var(--proof-ease);
  -webkit-tap-highlight-color: transparent;
}

.proof-gallery__frame[aria-pressed="true"] {
  flex-grow: 11;
}

.proof-gallery__comparison {
  position: absolute;
  inset: 0;
  display: grid;
}

.proof-gallery__phase {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.proof-gallery__phase--before,
.proof-gallery__phase-label {
  display: none;
}

.proof-gallery__frame[aria-pressed="true"] .proof-gallery__comparison {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

.proof-gallery__frame[aria-pressed="true"] .proof-gallery__phase--before,
.proof-gallery__frame[aria-pressed="true"] .proof-gallery__phase-label {
  display: block;
}

.proof-gallery__phase img {
  position: absolute;
  inset: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(.76) saturate(.85);
  transition: filter 400ms ease;
}

.proof-gallery__frame:hover img,
.proof-gallery__frame[aria-pressed="true"] img {
  filter: none;
}

/* The source hallway photo has framing bands outside the photographed space. */
.proof-gallery__frame[aria-describedby="proof-hall-description"] .proof-gallery__phase--after img {
  transform: scale(1.75);
}

.proof-gallery__frame[aria-pressed="true"][aria-describedby="proof-hall-description"] .proof-gallery__phase--after img {
  transform: scale(1.22);
}

.proof-gallery__phase-label {
  position: absolute;
  z-index: 2;
  inset-block-start: clamp(.6rem, 1.5vw, 1.1rem);
  inset-inline-start: clamp(.6rem, 1.5vw, 1.1rem);
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--proof-paper);
  color: var(--proof-ink);
  font-size: .77rem;
  font-weight: 700;
}

.proof-gallery__phase--after .proof-gallery__phase-label {
  background: var(--proof-accent);
}

.proof-gallery__frame::after {
  content: "";
  position: absolute;
  inset: 20% 0 0;
  z-index: 1;
  background: linear-gradient(transparent 18%, rgb(6 22 36 / .84));
  opacity: 0;
  pointer-events: none;
  transition: opacity 330ms ease;
}

.proof-gallery__frame[aria-pressed="true"]::after {
  opacity: 1;
}

.proof-gallery__frame-caption {
  position: absolute;
  inset: auto auto clamp(.9rem, 3.2vw, 2.15rem) clamp(.85rem, 3.2vw, 2.15rem);
  z-index: 2;
  display: grid;
  gap: .45rem;
  max-inline-size: calc(100% - 1.7rem);
  opacity: 0;
  transform: translateY(.65rem);
  pointer-events: none;
  transition: opacity 130ms ease, transform 260ms var(--proof-ease);
}

.proof-gallery__frame[aria-pressed="true"] .proof-gallery__frame-caption {
  opacity: 1;
  transform: none;
  transition: opacity 300ms 200ms ease, transform 450ms 170ms var(--proof-ease);
}

.proof-gallery__type {
  color: var(--proof-accent);
  font-size: clamp(.57rem, 1.2vw, .71rem);
  font-weight: 700;
  letter-spacing: .105em;
  line-height: 1.15;
  text-transform: uppercase;
}

.proof-gallery__title {
  font-size: clamp(1.2rem, 3.3vw, 2.65rem);
  font-weight: 550;
  letter-spacing: -.05em;
  line-height: 1.02;
}

.proof-gallery__footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  margin-top: 1rem;
}

.proof-gallery__hint {
  margin: 0;
  color: var(--proof-muted);
  font-size: .84rem;
  line-height: 1.45;
}

.proof-gallery__sr {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.proof-gallery__actions,
.proof-gallery__controls,
.proof-gallery__phases {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.proof-gallery__phases {
  display: none;
}

.proof-gallery__controls button,
.proof-gallery__phases button {
  min-block-size: 2.75rem;
  padding: .65rem 1.15rem;
  border: 1px solid rgb(255 255 255 / .48);
  border-radius: 100vw;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.proof-gallery__controls button:hover,
.proof-gallery__phases button[aria-pressed="true"] {
  border-color: var(--proof-accent);
  background: var(--proof-accent);
  color: var(--proof-ink);
}

.proof-gallery button:focus-visible {
  outline: 2px solid var(--proof-accent);
  outline-offset: 3px;
}

@media (max-width: 55rem) {
  .proof-gallery__header {
    grid-template-columns: 1fr;
  }

  .proof-gallery__track {
    block-size: clamp(17rem, 86vw, 27rem);
  }

  .proof-gallery__frame {
    display: none;
    flex: 0 0 clamp(2.75rem, 11vw, 4.5rem);
  }

  .proof-gallery__frame[aria-pressed="true"],
  .proof-gallery__frame[data-preview] {
    display: block;
  }

  .proof-gallery__frame[aria-pressed="true"] {
    flex: 1 1 0;
    order: -1;
  }

  .proof-gallery[data-enhanced] .proof-gallery__comparison {
    grid-template-columns: minmax(0, 1fr);
  }

  .proof-gallery[data-enhanced][data-phase="after"] .proof-gallery__phase--before,
  .proof-gallery[data-enhanced][data-phase="before"] .proof-gallery__frame[aria-pressed="true"] .proof-gallery__phase--after {
    display: none;
  }

  .proof-gallery[data-enhanced] .proof-gallery__phases {
    display: flex;
  }

  .proof-gallery__actions {
    width: 100%;
    justify-content: space-between;
  }
}
@media (max-width: 28rem) {
  .proof-gallery__controls button,
  .proof-gallery__phases button {
    padding-inline: .72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .proof-gallery *,
  .proof-gallery *::after {
    transition: none !important;
  }
}
