* {
  box-sizing: border-box;
}

:root {
  --rd-exhibition-text: #303030;
  --rd-exhibition-panel: rgba(255, 255, 255, 0.88);
  --rd-exhibition-gap: 32px;
  --rd-exhibition-stack-gap: 26px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--rd-exhibition-text);
  font-family: "Trebuchet MS", "Century Gothic", Arial, sans-serif;
}

.rd-exhibition {
  overflow: hidden;
  padding: 70px 0 104px;
  background: #ffffff;
}

.rd-exhibition__shell {
  width: min(1880px, calc(100% - 128px));
  margin: 0 auto;
}

.rd-exhibition__heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 58px;
  color: var(--rd-exhibition-text);
  font-size: clamp(34px, 2.45vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.1px;
  text-transform: uppercase;
}

.rd-exhibition__star {
  display: inline-block;
  font-family: Georgia, serif;
  font-size: 45px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

.rd-exhibition__masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rd-exhibition-gap);
  align-items: stretch;
}

.rd-exhibition__column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--rd-exhibition-stack-gap);
}

.rd-exhibition-card {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #eee5df;
  color: var(--rd-exhibition-text);
  text-decoration: none;
  isolation: isolate;
}

.rd-exhibition-card--tall {
  aspect-ratio: 4 / 3;
}

.rd-exhibition-card--short {
  aspect-ratio: 4 / 3;
}

.rd-exhibition-card__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  visibility: visible;
  filter: none;
  transform: scale(1);
  transition: transform 520ms cubic-bezier(.2, .7, .25, 1);
}

.rd-exhibition-card:hover .rd-exhibition-card__image,
.rd-exhibition-card:focus-visible .rd-exhibition-card__image,
.rd-exhibition-card.is-expanded .rd-exhibition-card__image {
  transform: scale(1.025);
}

.rd-exhibition-card__panel {
  position: absolute;
  right: 6.5%;
  bottom: 4.7%;
  left: 6.5%;
  z-index: 2;
  display: flex;
  min-height: 13.5%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 17px 22px;
  overflow: hidden;
  background: var(--rd-exhibition-panel);
  text-align: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition:
    min-height 330ms cubic-bezier(.2, .7, .25, 1),
    padding 330ms cubic-bezier(.2, .7, .25, 1),
    background-color 250ms ease;
}

.rd-exhibition-card__title {
  display: block;
  max-width: 100%;
  font-size: clamp(17px, 1.52vw, 29px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.45px;
}

.rd-exhibition-card__details {
  display: grid;
  max-height: 0;
  grid-template-rows: auto auto;
  gap: 18px;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition:
    max-height 320ms ease,
    margin-top 320ms ease,
    opacity 210ms ease,
    transform 320ms ease;
}

.rd-exhibition-card__description {
  display: block;
  max-width: 430px;
  margin: 0 auto;
  color: #696969;
  font-size: clamp(14px, 1.08vw, 20px);
  font-weight: 400;
  line-height: 1.45;
}

.rd-exhibition-card__link {
  display: inline-block;
  justify-self: center;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  color: #292929;
  font-size: clamp(14px, 1.08vw, 19px);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.rd-exhibition-card:hover .rd-exhibition-card__panel,
.rd-exhibition-card:focus-visible .rd-exhibition-card__panel,
.rd-exhibition-card.is-expanded .rd-exhibition-card__panel {
  min-height: 43%;
  padding: 30px 34px;
  background: rgba(255, 255, 255, 0.91);
}

.rd-exhibition-card:hover .rd-exhibition-card__details,
.rd-exhibition-card:focus-visible .rd-exhibition-card__details,
.rd-exhibition-card.is-expanded .rd-exhibition-card__details {
  max-height: 190px;
  margin-top: 20px;
  opacity: 1;
  transform: translateY(0);
}

.rd-exhibition-card:focus-visible {
  outline: 2px solid #222222;
  outline-offset: 5px;
}

@media (max-width: 1100px) {
  :root {
    --rd-exhibition-gap: 22px;
    --rd-exhibition-stack-gap: 20px;
  }

  .rd-exhibition__shell {
    width: min(100% - 52px, 1040px);
  }

  .rd-exhibition__heading {
    margin-bottom: 42px;
    font-size: clamp(31px, 4vw, 43px);
  }

  .rd-exhibition-card__panel {
    right: 5.8%;
    left: 5.8%;
    padding-inline: 16px;
  }

  .rd-exhibition-card:hover .rd-exhibition-card__panel,
  .rd-exhibition-card:focus-visible .rd-exhibition-card__panel,
  .rd-exhibition-card.is-expanded .rd-exhibition-card__panel {
    min-height: 48%;
    padding: 23px 20px;
  }

  .rd-exhibition-card__details {
    gap: 13px;
  }

  .rd-exhibition-card:hover .rd-exhibition-card__details,
  .rd-exhibition-card:focus-visible .rd-exhibition-card__details,
  .rd-exhibition-card.is-expanded .rd-exhibition-card__details {
    margin-top: 14px;
  }
}

@media (max-width: 760px) {
  :root {
    --rd-exhibition-gap: 14px;
    --rd-exhibition-stack-gap: 14px;
  }

  .rd-exhibition {
    padding: 48px 0 64px;
  }

  .rd-exhibition__shell {
    width: calc(100% - 30px);
  }

  .rd-exhibition__heading {
    gap: 9px;
    margin-bottom: 30px;
    font-size: 27px;
    letter-spacing: -.65px;
  }

  .rd-exhibition__star {
    font-size: 34px;
  }

  .rd-exhibition__masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rd-exhibition__column {
    display: contents;
  }

  .rd-exhibition-card:nth-child(1) {
    order: 1;
  }

  .rd-exhibition-card__panel {
    right: 5%;
    bottom: 4%;
    left: 5%;
    min-height: 16%;
    padding: 11px 10px;
  }

  .rd-exhibition-card__title {
    font-size: 15px;
    letter-spacing: -.25px;
  }

  .rd-exhibition-card__description {
    font-size: 12px;
    line-height: 1.35;
  }

  .rd-exhibition-card__link {
    font-size: 12px;
  }

  .rd-exhibition-card:hover .rd-exhibition-card__panel,
  .rd-exhibition-card:focus-visible .rd-exhibition-card__panel,
  .rd-exhibition-card.is-expanded .rd-exhibition-card__panel {
    min-height: 57%;
    padding: 15px 12px;
  }

  .rd-exhibition-card:hover .rd-exhibition-card__details,
  .rd-exhibition-card:focus-visible .rd-exhibition-card__details,
  .rd-exhibition-card.is-expanded .rd-exhibition-card__details {
    max-height: 155px;
    margin-top: 10px;
  }

  .rd-exhibition-card__details {
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .rd-exhibition__masonry {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .rd-exhibition__column {
    display: contents;
  }

  .rd-exhibition-card--tall,
  .rd-exhibition-card--short {
    aspect-ratio: 4 / 3;
  }

  .rd-exhibition-card__title {
    font-size: 14px;
  }

  .rd-exhibition-card__description {
    font-size: 11px;
  }

  .rd-exhibition-card__link {
    font-size: 11px;
  }

  .rd-exhibition-card:hover .rd-exhibition-card__panel,
  .rd-exhibition-card:focus-visible .rd-exhibition-card__panel,
  .rd-exhibition-card.is-expanded .rd-exhibition-card__panel {
    min-height: 74%;
    padding: 12px 9px;
  }
}

@media (hover: none) {
  .rd-exhibition-card__image {
    transition-duration: 300ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rd-exhibition-card__image,
  .rd-exhibition-card__panel,
  .rd-exhibition-card__details {
    transition: none;
  }
}
