/* A single photographic album. These styles are scoped to the collection page. */
.album-intro {
  padding-bottom: 52px;
}
.album-section {
  padding-top: 30px;
}
.album-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.album-toolbar > div {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.17em;
}
.album-total {
  font: 38px/1 var(--serif);
  letter-spacing: -0.04em;
  color: var(--gold-dark);
}
.album-toolbar > p {
  font-size: 11px;
}
.album-toolbar > p span {
  margin-left: 20px;
  font-size: 19px;
  color: var(--gold-dark);
}
.album-context {
  font-size: 11px;
  max-width: 660px;
  margin: 19px 0 34px;
  line-height: 1.8;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 35px 24px;
  align-items: start;
}
.album-entry {
  min-width: 0;
}
.album-open {
  display: block;
}
.album-photo {
  position: relative;
  background: #fff;
  aspect-ratio: 1/1.06;
  overflow: hidden;
  border: 1px solid #e7e7e0;
}
.album-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.album-entry:nth-child(6n + 2) .album-photo {
  background: #efeee9;
}
.album-open:hover .album-photo img {
  transform: scale(1.025);
}
.album-expand {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  background: var(--ivory);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 20px;
  transition:
    background 0.2s,
    color 0.2s;
}
.album-open:hover .album-expand {
  background: var(--navy);
  color: white;
}
.album-caption {
  display: flex;
  gap: 13px;
  align-items: baseline;
  padding-top: 15px;
}
.album-number {
  font-size: 10px;
  color: var(--gold-dark);
  font-variant-numeric: tabular-nums;
}
.album-name {
  font: 23px/1.3 var(--serif);
  color: var(--navy);
  letter-spacing: -0.025em;
}
.album-view-label {
  font-size: 9px;
  margin-left: auto;
  white-space: nowrap;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s;
}
.album-open:hover .album-view-label,
.album-open:focus-visible .album-view-label {
  opacity: 1;
}
.album-end {
  text-align: center;
  margin-top: 70px;
  padding-top: 52px;
  border-top: 1px solid var(--line);
}
.album-end h2 {
  font-size: 42px;
  margin: 16px 0;
}
.album-end p {
  font-size: 13px;
  margin-bottom: 20px;
}
.album-dialog {
  border: 1px solid #ffffff25;
  padding: 0;
  background: var(--navy-deep);
  color: var(--ivory);
  width: min(1280px, calc(100vw - 60px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-shadow: 0 30px 100px #0006;
}
.album-dialog::backdrop {
  background: #07131cdd;
  backdrop-filter: blur(10px);
}
.viewer-shell {
  padding: 20px 28px 13px;
}
.viewer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.viewer-label {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.18em;
}
.viewer-tools {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
}
.viewer-tools > span {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  color: #bbc9d2;
}
.viewer-tools button {
  min-height: 44px;
  background: transparent;
  color: var(--ivory);
  padding: 8px 12px;
  border: 1px solid #ffffff30;
  font-size: 11px;
}
.viewer-tools button:hover {
  border-color: var(--gold);
  color: var(--gold);
}
#viewer-close span {
  font-size: 23px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 12px;
}
.viewer-main {
  position: relative;
  padding: 0 58px;
}
.viewer-stage {
  background: #f1f0eb;
  height: min(58dvh, 680px);
  overflow: auto;
  position: relative;
  overscroll-behavior: contain;
}
.viewer-stage > img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}
.viewer-stage.is-zoomed > img {
  width: 200%;
  height: 200%;
  cursor: zoom-out;
}
.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 54px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--ivory);
  border: 1px solid #ffffff35;
  font-size: 24px;
}
.viewer-arrow:hover {
  background: var(--gold);
  color: var(--navy);
}
.viewer-prev {
  left: 0;
}
.viewer-next {
  right: 0;
}
.viewer-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin: 19px 58px 16px;
}
.viewer-caption h2 {
  font-size: 28px;
  letter-spacing: -0.025em;
}
.viewer-caption p {
  font-size: 10px;
  line-height: 1.6;
  color: #b9c6cf;
  margin-top: 7px;
}
.viewer-caption p a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.viewer-caption > .text-link {
  font-size: 10px;
  color: var(--gold);
  border-color: #ffffff40;
  padding-block: 10px;
  white-space: nowrap;
}
.viewer-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 7px 4px 10px;
  margin: 0 54px;
  scrollbar-width: thin;
  scrollbar-color: #b99b62 #ffffff15;
  overscroll-behavior: contain;
}
.viewer-thumb {
  width: 64px;
  height: 54px;
  flex: 0 0 64px;
  padding: 3px;
  background: transparent;
  border: 1px solid #ffffff30;
  opacity: 0.6;
}
.viewer-thumb[aria-pressed="true"] {
  border-color: var(--gold);
  opacity: 1;
}
.viewer-thumb:hover {
  opacity: 1;
}
.viewer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--ivory);
}
.viewer-help {
  font-size: 9px;
  letter-spacing: 0.03em;
  text-align: center;
  color: #aabac5;
  margin-top: 7px;
}
#viewer-image-status {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  padding: 8px 15px;
  background: var(--navy);
  color: white;
  white-space: nowrap;
}
@media (min-width: 1200px) {
  .album-entry:nth-child(10n + 1) {
    grid-column: span 2;
  }
  .album-entry:nth-child(10n + 1) .album-photo {
    aspect-ratio: 1.93/1;
  }
  .album-entry:nth-child(10n + 2) .album-photo {
    aspect-ratio: 0.91/1;
  }
  .album-grid {
    row-gap: 39px;
  }
}
@media (max-width: 1000px) {
  .album-grid {
    gap: 28px 18px;
  }
  .album-name {
    font-size: 21px;
  }
  .album-view-label {
    display: none;
  }
  .viewer-shell {
    padding: 16px;
  }
  .viewer-main {
    padding: 0 49px;
  }
  .viewer-caption {
    margin-inline: 49px;
  }
  .viewer-thumbnails {
    margin-inline: 45px;
  }
  .viewer-caption h2 {
    font-size: 25px;
  }
  .viewer-caption > .text-link {
    white-space: normal;
    max-width: 150px;
  }
}
@media (max-width: 640px) {
  .album-intro {
    padding-bottom: 35px;
  }
  .album-intro h1 {
    font-size: 45px;
  }
  .album-section {
    padding-top: 24px;
  }
  .album-toolbar {
    align-items: center;
    gap: 15px;
    padding-bottom: 17px;
  }
  .album-toolbar > div {
    gap: 9px;
    font-size: 8px;
  }
  .album-total {
    font-size: 32px;
  }
  .album-toolbar > p {
    font-size: 9px;
    max-width: 115px;
    text-align: right;
  }
  .album-toolbar > p span {
    display: none;
  }
  .album-context {
    font-size: 10px;
    margin: 17px 0 25px;
  }
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 14px;
  }
  .album-entry:first-child {
    grid-column: 1/-1;
  }
  .album-entry:first-child .album-photo {
    aspect-ratio: 1.4/1;
  }
  .album-photo {
    aspect-ratio: 1/1.15;
  }
  .album-caption {
    gap: 7px;
    padding-top: 11px;
  }
  .album-number {
    font-size: 8px;
  }
  .album-name {
    font-size: 19px;
  }
  .album-expand {
    width: 31px;
    height: 31px;
    bottom: 9px;
    right: 9px;
    font-size: 17px;
  }
  .album-end {
    margin-top: 42px;
    padding-top: 36px;
  }
  .album-end h2 {
    font-size: 35px;
  }
  .album-end p {
    font-size: 12px;
  }
  .album-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    margin: 0;
  }
  .viewer-shell {
    padding: 12px 15px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  .viewer-top {
    gap: 10px;
    margin-bottom: 15px;
  }
  .viewer-label {
    font-size: 8px;
    max-width: 88px;
    line-height: 1.7;
  }
  .viewer-tools {
    gap: 8px;
    font-size: 10px;
  }
  .viewer-tools button {
    font-size: 10px;
    padding: 8px;
    min-height: 42px;
  }
  .viewer-tools > span {
    font-size: 9px;
    letter-spacing: 0;
  }
  #viewer-close span {
    margin-left: 6px;
    font-size: 20px;
  }
  .viewer-main {
    padding: 0;
  }
  .viewer-stage {
    height: 52dvh;
    min-height: 240px;
  }
  .viewer-arrow {
    top: auto;
    bottom: 14px;
    transform: none;
    width: 43px;
    height: 43px;
    background: var(--navy);
    border: 1px solid #ffffff80;
    z-index: 2;
  }
  .viewer-prev {
    left: 12px;
  }
  .viewer-next {
    right: 12px;
  }
  .viewer-caption {
    margin: 18px 0 14px;
    gap: 15px;
    align-items: start;
  }
  .viewer-caption h2 {
    font-size: 26px;
  }
  .viewer-caption > div {
    min-width: 0;
  }
  .viewer-caption p {
    font-size: 9px;
  }
  .viewer-caption > .text-link {
    font-size: 9px;
    max-width: 98px;
    line-height: 1.6;
    flex-shrink: 0;
  }
  .viewer-thumbnails {
    margin: 0;
    padding-inline: 3px;
    min-height: 75px;
  }
  .viewer-thumb {
    width: 57px;
    flex-basis: 57px;
    height: 53px;
  }
  .viewer-help {
    font-size: 9px;
    margin-block: 10px;
  }
  .album-dialog:focus-visible {
    outline-offset: -4px;
  }
}
@media (max-height: 600px) and (min-width: 641px) {
  .viewer-stage {
    height: 45dvh;
  }
  .viewer-shell {
    padding-top: 10px;
  }
  .viewer-top {
    margin-bottom: 8px;
  }
  .viewer-caption {
    margin-block: 10px;
  }
  .viewer-thumbnails {
    max-height: 60px;
  }
  .viewer-help {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .album-photo img,
  .album-expand,
  .album-view-label {
    transition: none;
  }
  .album-open:hover .album-photo img {
    transform: none;
  }
}
