.events-wall {
  --event-card-width: clamp(14rem, 14vw, 24rem);
  display: block;
  position: relative;
  isolation: isolate;
  color: rgb(var(--color-foreground));
}

.events-wall__stage {
  position: relative;
  overflow: hidden;
}

.events-wall__tagline {
  margin: 1.4rem 1rem;
  color: #1f3f73;
  font: 700 1.1rem/1.3 Helvetica, Arial, sans-serif;
  text-align: center;
}

.events-wall__ring {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  padding: 0 2rem;
}

.events-wall__card {
  display: grid;
  place-items: center;
  position: relative;
  aspect-ratio: 7 / 10;
  overflow: hidden;
  border-radius: 0.35rem;
  color: rgb(var(--color-foreground));
  background: rgba(var(--color-foreground), 0.11);
  text-decoration: none;
  touch-action: pan-y;
}

.events-wall__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.events-wall__card--pending span {
  max-width: 15ch;
  padding: 1rem;
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.events-wall__links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem clamp(1.2rem, 3.5vw, 3.6rem);
  padding: 0.9rem 1.4rem;
  color: rgb(var(--color-foreground));
}

.events-wall__links a {
  padding: 0.4rem 0;
  font-size: clamp(1.1rem, 2.75vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  text-underline-offset: 0.24em;
}

.events-wall__empty {
  margin: 0;
  padding: 4rem 2rem;
  text-align: center;
}

.events-wall[data-animated] .events-wall__stage {
  min-height: max(43rem, calc(100svh - var(--header-height, 9rem)));
  perspective: 1000px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.events-wall[data-animated] .events-wall__tagline {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.events-wall[data-dragging] .events-wall__stage,
.events-wall[data-dragging] .events-wall__card {
  cursor: grabbing;
}

.events-wall[data-animated] .events-wall__ring {
  display: block;
  position: absolute;
  inset: 0;
  padding: 0;
  transform-style: preserve-3d;
}

.events-wall[data-animated] .events-wall__card {
  position: absolute;
  top: calc(46% - clamp(0rem, 45svh - 23rem, 19%));
  left: 50%;
  width: var(--event-card-width);
  box-shadow: 0 0.8rem 1.8rem rgb(19 40 72 / 16%);
  will-change: transform;
}

.events-wall[data-animated] .events-wall__links {
  position: absolute;
  right: 0;
  bottom: clamp(4rem, 7svh, 6.4rem);
  left: 0;
  padding-inline: 4.2rem;
  pointer-events: none;
}

.events-wall[data-animated] .events-wall__links a {
  padding: 0.45rem 0.6rem;
  background: rgba(var(--color-background), 0.94);
  pointer-events: auto;
}

.events-wall__pause {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  z-index: 3;
  width: 3.6rem;
  min-height: 3.6rem;
  padding: 0;
  border: 1px solid rgba(var(--color-foreground), 0.22);
  border-radius: 50%;
  background: rgb(var(--color-background));
  color: rgb(var(--color-foreground));
  cursor: pointer;
  line-height: 1;
}

.event-recap__inner {
  max-width: 108rem;
  padding-block: clamp(3rem, 7vw, 7rem) clamp(5rem, 9vw, 9rem);
}

.event-recap__back {
  display: inline-block;
  margin-bottom: 2rem;
  color: rgb(var(--color-foreground));
}

.event-recap h1 {
  margin: 0 0 1rem;
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  line-height: 1;
}

.event-recap__meta {
  margin: 0;
  font-size: 1.3rem;
}

.event-recap__description {
  max-width: 58ch;
  margin: 2rem 0 3rem;
}

.event-recap__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.8rem, 2.5vw, 1.8rem);
  margin: 0;
}

.event-recap__photos img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.event-recap__photos li:first-child {
  grid-column: 1 / -1;
}

.event-recap__photos li:first-child img {
  aspect-ratio: 3 / 2;
}

@media screen and (max-width: 749px) {
  .events-wall {
    --event-card-width: clamp(6.4rem, 21vw, 10.5rem);
  }

  .events-wall[data-animated] {
    display: flex;
    flex-direction: column;
    min-height: max(38rem, calc(var(--events-wall-viewport, 100dvh) - var(--events-wall-page-top, 12rem) - 0.6rem));
  }

  .events-wall[data-animated]::after {
    content: '';
    align-self: center;
    width: 80%;
    border-top: 1px solid #b3b3b3;
  }

  .events-wall[data-animated] .events-wall__stage {
    flex: 1 0 auto;
    min-height: 30rem;
  }

  .events-wall__tagline {
    max-width: none;
    font-size: clamp(0.68rem, 2.05vw, 0.9rem);
    letter-spacing: normal;
    white-space: nowrap;
  }

  .events-wall[data-animated] .events-wall__card {
    top: 50%;
  }

  .events-wall[data-animated] .events-wall__links {
    position: relative;
    inset: auto;
    flex-wrap: nowrap;
    gap: clamp(0.5rem, 2.5vw, 1.4rem);
    padding: 0.9rem 0.8rem 1.2rem;
  }

  .events-wall[data-animated] .events-wall__links a {
    padding-inline: 0.3rem;
    font-size: clamp(1rem, 2.65vw, 1.2rem);
    white-space: nowrap;
  }

  .events-wall[data-animated] .events-wall__pause {
    bottom: 4rem;
  }

  body:has(.events-wall[data-animated]) .footer-groups {
    border-top: 0;
  }
}

@media screen and (min-width: 750px) {
  .event-recap__photos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
