.legends {
  box-sizing: border-box;
  width: min(100% - 2rem, 74rem);
  margin: clamp(3.75rem, 7vw, 7rem) auto;
  padding: clamp(1rem, 4.4vw, 3.75rem);
  border: 1px solid transparent;
  border-radius: clamp(1rem, 2vw, 1.65rem);
  background:
    radial-gradient(ellipse at 32% 0%, #12212d 0%, transparent 48%) padding-box,
    radial-gradient(ellipse at 100% 40%, #20142f 0%, #090c17 65%) padding-box,
    linear-gradient(130deg, #51ddeb, #9a74ed 49%, #ed70da) border-box;
  box-shadow:
    -.35rem 0 1.25rem #51ddeb30,
    .35rem 0 1.25rem #ed70da30,
    0 1.5rem 4rem #02030a80;
  color: #f6f5fb;
}
.legends .legends-heading {
  display: block;
  position: static;
  padding: 0;
  margin: 0 auto clamp(1.6rem, 3.5vw, 3rem);
  max-width: 50rem;
  background: none;
  border: 0;
  text-align: center;
}
.legends h2 {
  margin: 0;
  font-size: clamp(2rem, 5.6vw, 4.25rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.055em;
  text-wrap: balance;
  color: #b7dcff;
  background: linear-gradient(105deg, #65f0ff 8%, #a9a5ff 48%, #f48df7 90%);
  filter: drop-shadow(0 0 .25em #a371ff60);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.legends .legends-title-end {
  color: #f48df7;
  -webkit-text-fill-color: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .legends h2 {
    background-image: linear-gradient(105deg, #65f0ff 4%, #a9a5ff 24%, #f48df7 46%, #d5f9ff 53%, #a9a5ff 67%, #f48df7 92%);
    background-size: 190% 100%;
    animation: legends-headline-shimmer 4.5s ease-in-out;
  }
}
@keyframes legends-headline-shimmer {
  0%, 100% { background-position: 0% 50%; }
  55% { background-position: 100% 50%; }
}
.legends .legends-heading p {
  max-width: 41rem;
  margin: 1rem auto 0;
  color: #c6c9da;
  font-size: clamp(1rem, 1.55vw, 1.13rem);
  line-height: 1.65;
  text-wrap: pretty;
}
.legends-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.7rem, 2vw, 1.4rem);
}
.legend-card {
  --legend-accent: #b39bff;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: .9rem;
  background:
    linear-gradient(#0c0e1a, #0c0e1a) padding-box,
    linear-gradient(145deg, var(--legend-accent), #7653b8 54%, var(--legend-accent)) border-box;
  box-shadow: 0 0 .85rem color-mix(in srgb, var(--legend-accent) 32%, transparent);
}
.legend-card:nth-child(2) { --legend-accent: #7ee3e9; }
.legend-card:nth-child(3) { --legend-accent: #e39bef; }
.legend-media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 36 / 37;
  background: #111523;
}
.legend-media > img,
.legend-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.legend-portrait {
  opacity: 0;
  pointer-events: none;
}
.legend-portrait.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .legend-portrait.is-playing { opacity: 0; }
}
.legend-card figcaption {
  padding: .9rem clamp(.75rem, 1.8vw, 1.2rem) 1.05rem;
  border-top: 1px solid color-mix(in srgb, var(--legend-accent) 21%, #121326);
  background: linear-gradient(125deg, color-mix(in srgb, var(--legend-accent) 9%, #0c0e1a), #0c0e1a 85%);
}
.legend-card h3 {
  margin: 0;
  color: var(--legend-accent);
  font-size: clamp(1.1rem, 2vw, 1.58rem);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.12;
}
.legend-card p {
  margin: .45rem 0 0;
  color: #c6c9da;
  font-size: .875rem;
  line-height: 1.5;
}
@media (max-width: 660px) {
  .legends-grid {
    grid-template-columns: minmax(0, 25rem);
    justify-content: center;
    gap: 1rem;
  }
  .legend-card h3 { font-size: 1.35rem; }
}
