[data-yb] {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  height: clamp(460px, 72vh, 760px);
  counter-reset: yb;
}
[data-yb-item] {
  --f: 0;
  --o: clamp(0, calc((var(--f) - 0.55) * 4), 1);
  --ink: color-mix(in srgb, #fff calc(var(--o) * 100%), #111);
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #e6e4de;
  counter-increment: yb;
}
[data-yb-item] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--o);
}
[data-yb-card] {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  color: var(--ink);
  text-decoration: none;
  outline: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, calc(var(--o) * 0.42)),
    #0000 50%
  );
}
[data-yb-card]::before {
  content: counter(yb, decimal-leading-zero);
  position: absolute;
  top: 16px;
  left: 18px;
  font:
    400 10px/1 Inter,
    sans-serif;
  letter-spacing: 0.16em;
  opacity: 0.7;
}
[data-yb-card]:focus-visible [data-yb-name] {
  text-decoration: underline;
}
[data-yb-name] {
  font-family: Epilogue, sans-serif;
  font-weight: 400;
  font-size: calc(16px + var(--f) * 16px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
[data-yb-tag] {
  flex: none;
  max-width: 45%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font:
    400 10px/1.4 Inter,
    sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: var(--o);
}
[data-yb-tag]::after {
  content: " \2192";
}
@media (max-width: 767px) {
  [data-yb] {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: none !important;
    grid-auto-rows: 112px;
    height: auto;
  }
  [data-yb-item] {
    --f: 0 !important;
  }
  [data-yb-item]:first-child {
    --f: 1 !important;
    grid-column: span 2;
    grid-row: span 2;
  }
  [data-yb-item]:last-child:nth-child(even) {
    grid-column: span 2;
  }
  [data-yb-name] {
    font-size: 16px;
  }
  [data-yb-item]:first-child [data-yb-name] {
    font-size: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-yb-item] {
    --f: 0 !important;
  }
  [data-yb-item]:first-child {
    --f: 1 !important;
  }
}
