.block-cards__card {
  --notch: 92px;
  --curve: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.block-cards__frame {
  position: relative;
  border-radius: var(--curve);
  border-bottom-right-radius: 0;
  overflow: hidden;
  background: var(--ib-bg-soft);
}

.block-cards__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--curve);
}

.block-cards__picture {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 1.1s var(--ib-ease);
}

.block-cards__card:hover .block-cards__picture {
  transform: scale(1.04);
}

.block-cards__blank {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ib-line);
}

.block-cards__blank-glyph {
  width: 42px;
  height: 42px;
}

.block-cards__notch {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: var(--notch);
  height: var(--notch);
  background: var(--ib-bg);
  border-top-left-radius: 50%;
}

.ib-section--soft .block-cards__notch {
  background: var(--ib-bg-soft);
}

.block-cards__notch::before,
.block-cards__notch::after {
  position: absolute;
  content: "";
  width: var(--curve);
  height: var(--curve);
  background: transparent;
  border-bottom-right-radius: var(--curve);
  box-shadow: 5px 5px 0 5px var(--ib-bg);
}

.ib-section--soft .block-cards__notch::before,
.ib-section--soft .block-cards__notch::after {
  box-shadow: 5px 5px 0 5px var(--ib-bg-soft);
}

.block-cards__notch::before {
  bottom: 6px;
  left: calc(var(--curve) * -1);
}

.block-cards__notch::after {
  top: calc(var(--curve) * -1);
  right: 6px;
}

.block-cards__action {
  position: absolute;
  inset: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ib-accent);
  color: var(--ib-accent-contrast);
  transition: transform var(--ib-motion) var(--ib-ease), box-shadow var(--ib-motion) var(--ib-ease);
}

.block-cards__card:hover .block-cards__action {
  transform: scale(1.06);
  box-shadow: var(--ib-shadow);
}

.block-cards__arrow {
  width: 22px;
  height: 22px;
  display: block;
  transform: rotate(-45deg);
  transition: transform var(--ib-motion) var(--ib-ease);
}

.block-cards__card:hover .block-cards__arrow,
.block-cards__action:focus-visible .block-cards__arrow {
  transform: rotate(0deg);
}

.block-cards__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 8px;
}

.block-cards__title {
  margin: 0;
  font-family: var(--ib-font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
}

.block-cards__title a {
  color: inherit;
  text-decoration: none;
}

.block-cards__text {
  margin: 0;
  color: var(--ib-muted);
  line-height: 1.6;
}

.block-cards__tags {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.block-cards__tags li {
  padding: 6px 10px;
  border-radius: 3px;
  background: var(--ib-bg-soft);
  font-family: var(--ib-font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ib-fg);
  transition: background var(--ib-motion) var(--ib-ease), color var(--ib-motion) var(--ib-ease);
}

@supports (background: color-mix(in srgb, red 20%, transparent)) {
  .block-cards__tags li {
    background: color-mix(in srgb, var(--ib-accent) 12%, transparent);
    color: color-mix(in srgb, var(--ib-accent) 82%, #000);
  }
}

.block-cards__card:hover .block-cards__tags li {
  color: var(--ib-accent);
}

.block-cards {
  overflow-x: clip;
}

@media (max-width: 640px) {
  .block-cards__notch {
    right: 0;
    bottom: 0;
  }
}
