/* Gallery: the private gallery (showcase mode) and Make it personal. */

.showcase-mode {
  background: var(--midnight);
}
.showcase-mode main {
  padding: 0 4.5% 35px;
  max-width: 1800px;
  color: #f2f0e5;
}
.showcase-head {
  text-align: center;
  padding: 42px 20px 39px;
  position: relative;
}
.showcase-back {
  display: block;
  text-align: left;
  font-size: 10px;
  color: #d0b795;
  margin-bottom: 33px;
}
.showcase-head h1 {
  font-size: 68px;
  letter-spacing: -1.5px;
  margin: 18px 0;
}
.showcase-head > p {
  font-size: 12px;
  color: #c4c1c5;
}
.showcase-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.showcase-controls > span {
  font: 22px var(--serif);
  margin-right: 8px;
}
.showcase-controls small {
  font: 9px var(--sans);
  color: #b4c0a6;
  display: block;
  margin-top: 5px;
}
.showcase-controls .button {
  border-color: #6b5c4d;
  color: #e3caaa;
  background: #252d3b66;
  font-size: 10px;
  padding: 10px 14px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  gap: 17px;
}
.showcase-piece {
  grid-column: span 4;
  height: 390px;
  position: relative;
  text-align: left;
  overflow: hidden;
  padding: 0;
  background: #1f2736;
  border: 1px solid #71604a55;
  border-radius: 0;
}
.showcase-piece.piece-0 {
  grid-column: span 8;
  height: 460px;
}
.showcase-piece.piece-1 {
  grid-column: span 4;
  height: 460px;
}
.showcase-piece.piece-5 {
  grid-column: span 4;
}
.showcase-piece img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.3s, filter 1.3s;
  filter: saturate(0.82);
}
.showcase-piece:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #101724ed, transparent 78%);
}
.showcase-piece:hover img {
  transform: scale(1.04);
  filter: saturate(1);
}
.showcase-caption {
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: 25px;
  z-index: 2;
}
.showcase-caption small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #dfdfc9;
}
.showcase-caption small i {
  float: right;
  font-style: normal;
}
.showcase-caption strong {
  font: 35px var(--serif);
  display: block;
  margin: 12px 0 8px;
  line-height: 1.1;
}
.showcase-caption > span {
  font-size: 9px;
  color: #d0d7c3;
}
.showcase-open {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 1px solid #ffffff8a;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  color: #f1d6ae;
  border-color: #d4ba9470;
}
.showcase-end {
  text-align: center;
  padding: 65px 20px 20px;
}
.showcase-end > span {
  font-size: 9px;
  letter-spacing: 3px;
  color: #bac6a9;
}
.showcase-end h2 {
  font-size: 48px;
  margin: 19px 0 25px;
  color: #f0e3d0;
}
.showcase-end a {
  font-size: 11px;
  color: #d0b795;
}
.showcase-mode footer {
  color: #c0c9b3;
  border-top-color: #485740;
}
.showcase-mode footer span {
  color: #a6b198;
}
.showcase-mode footer button {
  color: #b8c3a9;
}
.showcase-mode dialog {
  color: var(--ink);
}
@media (max-width: 1100px) {
  .showcase-piece {
    height: 340px;
  }
  .showcase-caption strong {
    font-size: 29px;
  }
  .showcase-piece.piece-0,
  .showcase-piece.piece-1 {
    height: 390px;
  }
}
@media (max-width: 760px) {
  .showcase-mode main {
    padding: 0 20px;
  }
  .showcase-head {
    padding-left: 0;
    padding-right: 0;
  }
  .showcase-head h1 {
    font-size: 53px;
  }
  .showcase-grid {
    gap: 14px;
    grid-template-columns: 1fr 1fr;
  }
  .showcase-piece,
  .showcase-piece.piece-0,
  .showcase-piece.piece-1,
  .showcase-piece.piece-5 {
    grid-column: span 1;
    height: 310px;
  }
  .showcase-piece.piece-0 {
    grid-column: span 2;
    height: 360px;
  }
  .showcase-caption {
    left: 17px;
    bottom: 20px;
    right: 15px;
  }
  .showcase-caption strong {
    font-size: 27px;
  }
  .showcase-caption small {
    font-size: 7px;
    letter-spacing: 0.8px;
  }
  .showcase-caption > span {
    font-size: 8px;
    line-height: 1.7;
    display: block;
  }
  .showcase-open {
    top: 13px;
    right: 13px;
  }
  .showcase-controls > span {
    width: 100%;
    margin: 0 0 8px;
  }
}
@media (max-width: 400px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .showcase-piece,
  .showcase-piece.piece-0,
  .showcase-piece.piece-1,
  .showcase-piece.piece-5 {
    grid-column: span 1;
    height: 340px;
  }
  .showcase-caption strong {
    font-size: 32px;
  }
}
.button:not(.primary):not(.light) {
  border-color: #cfc6b9;
}
/* The first impression is photographic and immersive. */
.landing {
  background: var(--midnight);
  color: var(--paper);
}
.landing footer {
  background: var(--midnight);
  border-color: #343b47;
  color: #d6bd98;
}
.landing footer span,
.landing footer button {
  color: #bdbec9;
}
/* A gallery room, rather than another dashboard. */
.showcase-head {
  padding-top: 50px;
}
.showcase-head h1 {
  color: #f4eadd;
  font-size: 84px;
  letter-spacing: -2px;
}
.showcase-controls > span {
  color: #e1c9a7;
}
.showcase-controls small {
  color: #b9bdc8;
}
/* "Hide values" while the values are hidden: its name stays the same, so
   the pressed state shows as a soft fill. */
.showcase-controls .button[aria-pressed="true"] {
  border-color: #e3caaa;
  background: #e3caaa26;
}
.showcase-grid {
  gap: 22px;
}
.showcase-caption small {
  color: #dec39d;
  letter-spacing: 2px;
}
.showcase-caption strong {
  color: #f5ebdc;
  font-size: 39px;
}
.showcase-caption > span {
  color: #ddd0bf;
}
.showcase-end > span {
  color: #cda77c;
}
.showcase-mode footer {
  border-color: var(--line-dark);
  color: #c9a77c;
}
.showcase-mode footer span,
.showcase-mode footer button {
  color: #babdca;
}
@media (max-width: 1100px) {
  .showcase-head h1 {
    font-size: 74px;
  }
  .showcase-caption strong {
    font-size: 33px;
  }
}
@media (max-width: 760px) {
  .showcase-head h1 {
    font-size: 58px;
  }
  .showcase-caption strong {
    font-size: 30px;
  }
  .showcase-end h2 {
    font-size: 38px;
  }
  .showcase-grid {
    gap: 15px;
  }
}
@media (max-width: 400px) {
  .showcase-head h1 {
    font-size: 51px;
  }
}
.showcase-head .eyebrow {
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: anywhere;
}
.showcase-head h1 {
  font-size: clamp(56px, 6.8vw, 96px);
}
.showcase-piece.piece-0 {
  height: 520px;
}
.showcase-piece.piece-1 {
  height: 520px;
}
.showcase-caption {
  bottom: 32px;
  left: 30px;
  right: 30px;
}
.showcase-caption strong {
  font-size: 43px;
}
.showcase-piece.piece-0 .showcase-caption strong {
  font-size: 56px;
}
.showcase-caption small {
  letter-spacing: 2.5px;
}
.showcase-piece.piece-0 .showcase-caption > span {
  font-size: 11px;
}
@media (max-width: 1100px) {
  .showcase-piece.piece-0,
  .showcase-piece.piece-1 {
    height: 420px;
  }
  .showcase-caption strong {
    font-size: 34px;
  }
  .showcase-piece.piece-0 .showcase-caption strong {
    font-size: 43px;
  }
}
@media (max-width: 760px) {
  .showcase-head h1 {
    font-size: 54px;
  }
  .showcase-piece.piece-0 {
    height: 380px;
  }
  .showcase-piece.piece-1 {
    height: 310px;
  }
  .showcase-caption {
    bottom: 23px;
    left: 20px;
    right: 20px;
  }
  .showcase-caption strong {
    font-size: 29px;
  }
  .showcase-piece.piece-0 .showcase-caption strong {
    font-size: 39px;
  }
  .showcase-caption small {
    letter-spacing: 1.5px;
  }
}
@media (max-width: 400px) {
  .showcase-piece.piece-0,
  .showcase-piece.piece-1 {
    height: 350px;
  }
}
/* Full photographic rows, in reading and keyboard order. */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(340px, 34vw, 480px);
  grid-auto-flow: row;
  gap: 22px;
}
.showcase-grid > .showcase-piece {
  grid-column: span 2;
  height: 100%;
  min-width: 0;
}
.showcase-grid > .showcase-piece:where(:first-child) {
  grid-column: span 4;
}
/* After the opening pair, distribute a final pair evenly or give a lone
   final piece a complete row. No repeated oversized cards or empty cells. */
.showcase-grid
  > .showcase-piece:where(:nth-child(3n):nth-last-child(2), :nth-child(3n):nth-last-child(2) + .showcase-piece) {
  grid-column: span 3;
}
.showcase-grid > .showcase-piece:where(:nth-child(3n):last-child, :only-child) {
  grid-column: span 6;
}
.showcase-grid .showcase-caption {
  overflow-wrap: anywhere;
}
.showcase-grid .showcase-caption strong {
  font-size: clamp(30px, 3vw, 43px);
}
.showcase-grid > .showcase-piece:first-child .showcase-caption strong {
  font-size: clamp(38px, 4vw, 56px);
}
@media (max-width: 1000px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 360px;
    gap: 16px;
  }
  .showcase-grid > .showcase-piece:nth-child(n) {
    grid-column: span 1;
  }
  .showcase-grid > .showcase-piece:first-child,
  .showcase-grid > .showcase-piece:nth-child(even):last-child {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .showcase-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 350px;
    gap: 18px;
  }
  .showcase-grid > .showcase-piece:nth-child(n) {
    grid-column: span 1;
  }
  /* Fixes a prototype bug on phones: the tablet rule above spans an even
     last piece over two columns, which in this one-column grid adds an
     implicit column and squeezes the cover piece to nothing. It has the
     tablet rule's specificity, so it has to come after it. */
  .showcase-grid > .showcase-piece:nth-child(even):last-child {
    grid-column: span 1;
  }
  .showcase-grid .showcase-caption {
    left: 22px;
    right: 22px;
    bottom: 25px;
  }
  .showcase-grid .showcase-caption strong {
    font-size: 34px;
  }
  .showcase-grid > .showcase-piece:first-child .showcase-caption strong {
    font-size: 40px;
  }
}
.showcase-disclosure {
  color: #bfb6b4;
  font: 10px var(--sans);
  line-height: 1.8;
  max-width: 590px;
  margin: 0 auto 22px;
}

/* Private gallery: pieces are links rather than the prototype's buttons. */
a.showcase-piece {
  display: block;
}
