/* The first viewport is the live model; its loading poster is removed visually once WebGL is ready. */
[hidden] {
  display: none !important;
}

.hero-art.model-stage {
  min-height: calc(100svh - 88px);
  border-radius: 0;
  border-left: 1px solid rgba(21, 24, 25, .12);
  background: #deddd7;
  box-shadow: inset 18px 0 38px rgba(21, 24, 25, .035);
}

.hero-art.model-stage::after {
  display: none;
}

.hero-art .model-poster {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity .48s ease;
}

.hero-art .model-poster.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-art.model-stage canvas {
  z-index: 1;
  display: block;
  opacity: 1;
  transition: opacity 260ms ease-out, filter 260ms ease-out;
}

.hero-art .model-status,
.hero-art .model-toolbar {
  z-index: 4;
}

.hero-art .hero-caption {
  z-index: 4;
  color: rgba(21, 24, 25, .58);
  text-shadow: none;
}

.hero-art .model-status {
  top: auto;
  right: auto;
  bottom: 28px;
  left: 28px;
  color: #151819;
  border: 1px solid rgba(21, 24, 25, .14);
  background: rgba(247, 246, 240, .92);
  box-shadow: 0 14px 34px rgba(21, 24, 25, .1);
}

.hero-art .model-toolbar button {
  color: #151819;
  border-color: rgba(21, 24, 25, .16);
  background: rgba(247, 246, 240, .92);
}

.hero-art .model-toolbar button:hover,
.hero-art .model-toolbar button:focus-visible {
  color: #f1f0eb;
  background: #151819;
}

.hero-art .model-toolbar button:disabled {
  opacity: .42;
  cursor: wait;
}

.model-stage-control {
  position: absolute;
  z-index: 4;
  top: 92px;
  left: 28px;
  width: 158px;
  color: #151819;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 260ms ease-out, transform 360ms cubic-bezier(.22, .7, .2, 1);
}

.hero-art.is-model-ready .model-stage-control {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.model-stage-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2px 10px;
  color: rgba(21, 24, 25, .55);
  font: 8px/1.3 "DM Mono", monospace;
  letter-spacing: .07em;
}

.model-stage-heading strong {
  color: #151819;
  font-size: 9px;
  font-weight: 500;
}

.model-stage-list {
  overflow: hidden;
  border-top: 1px solid rgba(21, 24, 25, .14);
  border-bottom: 1px solid rgba(21, 24, 25, .14);
  background: rgba(247, 246, 240, .88);
  box-shadow: 0 14px 34px rgba(21, 24, 25, .09);
}

.model-stage-list button {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-bottom: 1px solid rgba(21, 24, 25, .11);
  color: rgba(21, 24, 25, .58);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease-out, background-color 180ms ease-out;
}

.model-stage-list button:last-child {
  border-bottom: 0;
}

.model-stage-list button span {
  font: 8px/1 "DM Mono", monospace;
  letter-spacing: .06em;
}

.model-stage-list button strong {
  font-size: 10px;
  font-weight: 500;
}

.model-stage-list button:hover,
.model-stage-list button:focus-visible {
  color: #151819;
  background: rgba(21, 24, 25, .07);
}

.model-stage-list button.is-active {
  color: #f1f0eb;
  background: #151819;
}

.model-stage-list button.is-loading:not(.is-active) {
  color: #151819;
  background: rgba(165, 139, 99, .24);
}

.model-stage-list button:disabled {
  cursor: wait;
}

.hero-art.is-stage-loading canvas {
  opacity: .58;
  filter: saturate(.72);
}

.archive-layout {
  grid-template-columns: .5fr 1.5fr;
  align-items: start;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.archive-image {
  display: block;
}

.archive-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, .72));
}

.archive-image span {
  position: absolute;
  z-index: 1;
  left: 18px;
  bottom: 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.archive-image img {
  min-height: 480px;
}

@media (max-width: 900px) {
  .hero-art.model-stage {
    min-height: 74vw;
  }

  .archive-layout,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .archive-image img {
    min-height: 58vw;
  }

  .model-stage-control {
    top: 18px;
    left: 18px;
    width: calc(100% - 36px);
  }

  .model-stage-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .model-stage-list button {
    border-right: 1px solid rgba(21, 24, 25, .11);
    border-bottom: 0;
  }

  .model-stage-list button:last-child {
    border-right: 0;
  }
}

@media (max-width: 620px) {
  .hero-art.model-stage {
    min-height: 92vw;
  }

  .hero-art .model-toolbar {
    right: 16px;
    bottom: 16px;
  }

  .model-stage-control {
    top: 76px;
    overflow: hidden;
    border: 1px solid rgba(21, 24, 25, .18);
    border-radius: 14px;
    background: rgba(241, 240, 235, .96);
    box-shadow: 0 10px 24px rgba(21, 24, 25, .14);
  }

  .model-stage-heading {
    display: none;
  }

  .model-stage-list {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .model-stage-list button {
    min-height: 42px;
    grid-template-columns: 24px 1fr;
    padding: 0 12px;
    background: #f1f0eb;
  }

  .model-stage-list button strong {
    font-size: 11px;
  }

  .hero-art .model-status {
    right: 16px;
    bottom: 68px;
    left: 16px;
  }

  .archive-image img {
    min-height: 70vw;
  }
}
