.gallery-section { padding-bottom: clamp(55px, 9vw, 105px); }

.gallery-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.gallery-section-heading h2 {
  font: 600 clamp(1.13rem, 2.3vw, 1.55rem)/1.2 var(--font-display);
  letter-spacing: -.035em;
}

.gallery-section-heading p {
  color: var(--muted);
  font: 500 .74rem/1.4 var(--font-mono);
}

.gallery-grid {
  display: grid;
  gap: clamp(14px, 2vw, 25px);
  padding: 0;
  list-style: none;
}

.web-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.world-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-card {
  min-width: 0;
  overflow: clip;
  border: 1px solid #3e3a31;
  border-radius: 4px;
  background: #1c1c1a;
}

.gallery-card-caption {
  display: grid;
  gap: 5px 8px;
  padding: 13px 14px 15px;
}

.gallery-card-caption h3 {
  font: 650 1.13rem/1.15 var(--font-display);
  letter-spacing: -.024em;
}

.gallery-card-caption p {
  color: #b8afa0;
  font: 500 .71rem/1.3 var(--font-mono);
}

.web-card-art {
  display: grid;
  aspect-ratio: 1.56;
  place-items: center;
  border-bottom: 1px solid #39362e;
  background: #1f1f1b;
}

.web-card-browser {
  width: 75%;
  aspect-ratio: 1.75;
  padding: 0 5% 5%;
  border: 1px solid #60563f;
  border-radius: 4px;
  background: #28261e;
  box-shadow: 0 10px 22px #10100d80;
}

.web-card-toolbar {
  display: block;
  width: calc(100% + 14.6%);
  height: 21%;
  margin-left: -7.3%;
  border-bottom: 1px solid #4e4634;
}

.web-card-toolbar::before {
  display: block;
  width: 3px;
  height: 3px;
  margin: 0 0 0 7%;
  transform: translateY(6px);
  border-radius: 50%;
  background: #ae8f52;
  box-shadow: 6px 0 #796c50, 12px 0 #675d49;
  content: "";
}

.web-card-layout {
  display: grid;
  grid-template-columns: 1fr .86fr;
  align-items: center;
  gap: 12%;
  height: 79%;
  padding-top: 6%;
}

.web-card-copy {
  display: grid;
  gap: clamp(2px, .3vw, 5px);
  align-content: center;
}

.web-card-copy i, .web-card-copy b {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #6c644f;
}

.web-card-copy i:first-child { height: 4px; background: #a09477; }
.web-card-copy i:nth-child(3) { width: 66%; }
.web-card-copy b { width: 35%; height: 4px; margin-top: 2px; background: #c0994d; }
.web-card-image {
  display: block;
  aspect-ratio: 1.2;
  border: 1px solid #635539;
  border-radius: 2px;
  background: repeating-linear-gradient(145deg, #a78c5220 0 1px, transparent 1px 8px), #383125;
}

.web-card--grid .web-card-art { background: #22211d; }
.web-card--grid .web-card-layout { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: 9%; }
.web-card--grid .web-card-copy { grid-template-columns: repeat(3, 1fr); align-items: center; }
.web-card--grid .web-card-copy b { display: none; }
.web-card--grid .web-card-image { height: 100%; aspect-ratio: auto; }
.web-card--split .web-card-art { background: #201e1a; }
.web-card--split .web-card-image { grid-row: 1; grid-column: 1; }
.web-card--split .web-card-copy { grid-row: 1; grid-column: 2; }
.web-card--featured .web-card-art { background: #24211b; }
.web-card--featured .web-card-layout { position: relative; grid-template-columns: 1fr; }
.web-card--featured .web-card-copy { z-index: 1; max-width: 60%; padding-left: 8%; }
.web-card--featured .web-card-image { position: absolute; inset: 10% 0 0; aspect-ratio: auto; opacity: .8; }

.world-card-art {
  position: relative;
  display: grid;
  aspect-ratio: 1.62;
  place-items: center;
  overflow: clip;
  border-bottom: 1px solid #3c3529;
  background: radial-gradient(ellipse at center, #403024, #1f1a15 68%);
}

.world-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world-card-landscape {
  position: absolute;
  inset: 0;
  object-position: var(--scene-anchor, 50%) 57%;
  transform: scale(var(--scene-scale, 1));
  transform-origin: var(--scene-anchor, 50%) center;
  filter: saturate(.86);
}

.world-card-building {
  position: relative;
  display: grid;
  width: 94%;
  transform: scale(var(--scene-scale, 1));
  transform-origin: var(--scene-anchor, 50%) center;
}

.world-card-building img { grid-area: 1 / 1; object-fit: contain; }
.world-card--view-2 { --scene-anchor: 34%; --scene-scale: 1.07; }
.world-card--view-3 { --scene-anchor: 75%; --scene-scale: 1.2; }
.world-card--view-4 { --scene-anchor: 20%; --scene-scale: 1.14; }
.world-card--view-5 { --scene-anchor: 61%; --scene-scale: 1.09; }

.world-card .gallery-card-caption {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.world-card .gallery-card-caption h3, .world-card .gallery-card-caption p { grid-column: 1; }
.world-card .gallery-card-caption { min-height: 76px; }
.world-card-action {
  display: inline-flex;
  grid-row: 1 / 3;
  grid-column: 2;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #62543b;
  border-radius: 3px;
  background: #242118;
  color: var(--gold);
  font-size: .77rem;
  font-weight: 650;
}

.world-card-action:hover, .world-card-action[aria-pressed="true"] {
  border-color: var(--gold);
  background: #322a1b;
}

.world-card-action [data-preview-icon] {
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
  border-inline-start: 7px solid currentColor;
}

.world-card-action[aria-pressed="true"] [data-preview-icon] {
  width: 7px;
  height: 7px;
  border: 0;
  background: currentColor;
}

.world-card.is-previewing { border-color: #8d7143; }
.world-card.is-previewing .world-card-landscape {
  animation: world-preview-landscape 2.8s cubic-bezier(.25, .57, .43, 1) both;
}

.world-card.is-previewing .world-card-building {
  animation: world-preview-building 2.8s cubic-bezier(.25, .57, .43, 1) both;
}

.world-card.is-previewing .world-card-roof {
  animation: world-preview-roof 2.8s cubic-bezier(.25, .57, .43, 1) both;
}

@keyframes world-preview-landscape {
  0% { transform: scale(var(--scene-scale, 1)); }
  100% { transform: scale(calc(var(--scene-scale, 1) * 1.19)) translate3d(-4%, 1%, 0); }
}

@keyframes world-preview-building {
  0% { transform: scale(var(--scene-scale, 1)); }
  100% { transform: scale(calc(var(--scene-scale, 1) * 1.1)) translate3d(2%, 2%, 0); }
}

@keyframes world-preview-roof {
  0%, 100% { transform: translateY(0); }
  38% { transform: translateY(-13%); }
}

@media (max-width: 940px) {
  .web-gallery, .world-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .world-gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery-card-caption { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .world-card.is-previewing .world-card-landscape,
  .world-card.is-previewing .world-card-building,
  .world-card.is-previewing .world-card-roof { animation: none; }
  .world-card.is-previewing .world-card-landscape { transform: scale(calc(var(--scene-scale, 1) * 1.19)) translate(-4%, 1%); }
  .world-card.is-previewing .world-card-roof { transform: translateY(-11%); }
}
