.brand-list {
  background-color: rgb(var(--brand-list-background-color, var(--color-background)));
}

.brand-list__heading-shell {
  position: sticky;
  top: var(--brand-list-sticky-top, 0px);
  align-self: flex-start;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 40px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  background-color: transparent;
  transform: translateY(var(--brand-list-heading-shift, 0px));
  will-change: transform;
}

.brand-list__heading-shell > .block-heading,
.brand-list__heading-shell > .subheading {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
}

.brand-list__heading-shell::after {
  position: absolute;
  z-index: 0;
  inset-block: -8px;
  left: 50%;
  width: var(--brand-list-viewport-width, 100vw);
  transform: translateX(-50%);
  content: "";
  background-color: rgb(var(--brand-list-background-color, var(--color-background)));
  pointer-events: none;
}

.brand-list__heading-shell::before {
  position: absolute;
  z-index: 2;
  bottom: -8px;
  left: -18px;
  width: calc(100% + 36px);
  height: 3px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, transparent 0 36%, #55bde0 43%, #4389e4 50%, #a77de0 58%, transparent 71% 100%);
  background-size: 200% 100%;
  background-position: 120% 0;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgb(67 137 228 / 32%)) drop-shadow(0 0 7px rgb(167 125 224 / 14%));
}

@property --brand-card-glow-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

@keyframes brand-card-border-glow-sweep {
  0% { --brand-card-glow-angle: 207deg; opacity: .68; }
  88% { --brand-card-glow-angle: 567deg; opacity: .68; }
  100% { --brand-card-glow-angle: 567deg; opacity: 0; }
}

@keyframes brand-heading-glow {
  0% { background-position: 120% 0; opacity: 0; }
  14% { background-position: 86% 0; opacity: .48; }
  84% { background-position: -86% 0; opacity: .48; }
  100% { background-position: -120% 0; opacity: 0; }
}

.brand-list__heading-shell.is-glowing::before {
  animation: brand-heading-glow 1.9s ease-in-out both;
}

.block-brand-card {
  --brand-card-line: #082f73;
  --brand-card-glow-angle: 0deg;
  position: relative;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 0.8 / 1;
  height: auto;
  min-height: 0;
  overflow: hidden;
  container-type: inline-size;
  background-color: rgb(255 255 255);
  border-bottom: 5px solid var(--brand-card-line);
  transition: top 180ms ease, box-shadow 180ms ease;
}

.block-brand-card::before {
  position: absolute;
  z-index: 2;
  inset: var(--brand-card-glow-inset-top, 0px) var(--brand-card-glow-inset-right, 0px) var(--brand-card-glow-inset-bottom, 0px) var(--brand-card-glow-inset-left, 0px);
  padding: var(--brand-card-glow-width, max(4px, 1.1%));
  border-radius: inherit;
  content: "";
  background:
    conic-gradient(from var(--brand-card-glow-angle), transparent 0 5deg, #48e4ff 16deg, #348bff 34deg, #a64cff 52deg, #ff58b5 70deg, #ffe1a0 86deg, transparent 101deg 360deg),
    linear-gradient(135deg, #48e4ff, #348bff);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 6px rgb(52 139 255 / 55%)) drop-shadow(0 0 14px rgb(166 76 255 / 24%));
}

.block-brand-card.is-glowing::before {
  opacity: var(--brand-card-glow-opacity, .8);
}

@media (hover: none) and (pointer: coarse) {
  .block-brand-card.is-card-glow-sweeping::before {
    background: conic-gradient(
      from var(--brand-card-glow-angle),
      transparent 0 250deg,
      #58cce2 264deg,
      #4389e4 284deg,
      #a77de0 306deg,
      transparent 326deg 360deg
    );
    animation: brand-card-border-glow-sweep 1.7s linear both;
    filter: drop-shadow(0 0 3px rgb(67 137 228 / 44%)) drop-shadow(0 0 8px rgb(167 125 224 / 20%));
  }
}

.block-brand-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: var(--aspect-ratio);
  padding: var(--padding);
  overflow: hidden;
  font-size: 0;
  background-color: rgb(var(--color-media-background));
}

.block-brand-list__link img {
  display: block;
  width: 100%;
  height: auto;
  background-color: transparent;
  animation: fadeIn 1s cubic-bezier(0.26, 0.54, 0.32, 1) 0s forwards;
}

.block-brand-list__link svg {
  width: 100%;
  height: 100%;
}

.brand-list .block-brand-card__image-wrapper {
  aspect-ratio: 4 / 3 !important;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 6px;
  background-color: rgb(255 255 255);
}

.brand-list .block-brand-list__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  transform: scale(1.03);
}

.brand-list .block-brand-list {
  direction: ltr;
  /* Keep hover lift and shadow inside the list's overflow:auto paint area. */
  padding-block-start: 24px;
  margin-block-start: -24px;
}

.brand-list .brand-item__wrapper {
  border-radius: 16px;
  background: #fff;
}

.brand-list .block-brand-list__theme-carousel,
.brand-list .block-brand-list {
  background-color: rgb(var(--brand-list-background-color, var(--color-background)));
}

.brand-list__release-runway {
  flex: 0 0 auto;
  width: 100%;
  pointer-events: none;
}

.brand-list .block-brand-card:hover,
.brand-list .block-brand-card:active {
  top: var(--brand-card-hover-lift, -2px);
  transform: none;
  box-shadow: 0 8px 18px rgb(7 49 111 / 10%);
}

.block-brand-card__details {
  --brand-card-title-size: clamp(14px, 7cqw, 30px);
  --brand-card-title-box: 48%;
  --brand-card-copy-gap: 8%;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.block-brand-card__title {
  position: absolute;
  inset-block-start: 8%;
  inset-inline: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: var(--brand-card-title-box);
  min-height: 0;
  padding: 0 2.2cqw;
  color: #17243a;
  font-family: "Noto Sans", sans-serif;
  font-size: var(--brand-card-title-size);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  white-space: normal;
}

html[lang="ar"] .block-brand-card__title {
  direction: rtl;
}

.block-brand-card__cta {
  position: absolute;
  inset-block-start: calc(8% + var(--brand-card-title-box) + var(--brand-card-copy-gap));
  right: 2.7cqw;
  left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  color: #126dcb;
  font-family: "Noto Sans", sans-serif;
  font-size: clamp(12px, 5.8cqw, 25px);
  font-weight: 500;
  line-height: 1.3;
  text-align: end;
  direction: ltr;
  white-space: nowrap;
}

.block-brand-card__cta-arrow {
  display: inline-block;
}

html[lang="ar"] .block-brand-card__cta {
  left: 2.7cqw;
  right: auto;
  direction: rtl;
  text-align: start;
}

html[lang="ar"] .block-brand-card__cta-arrow {
  transform: scaleX(-1);
}

.brand-list__heading-shell > .subheading {
  margin-top: -28px;
  color: #64748b;
}

@media (max-width: 959px) {
  .brand-list__heading-shell {
    row-gap: 14px;
  }

  .brand-list__heading-shell > .subheading {
    margin-top: 0;
  }

  .block-brand-card {
    display: flex;
    flex-direction: column;
    aspect-ratio: 0.8 / 1;
    height: auto;
    min-height: 0;
    border-bottom: 5px solid var(--brand-card-line);
  }

  .brand-list .block-brand-card__image-wrapper {
    flex: 0 0 auto;
    padding: 0;
  }

}

@media (max-width: 599px) {
  .brand-list .block-brand-card__image-wrapper {
    aspect-ratio: 4 / 3 !important;
  }

}

@media (prefers-reduced-motion: reduce) {
.brand-list__heading-shell {
    will-change: auto;
  }

  .brand-list__heading-shell.is-glowing::before {
    animation: none;
    opacity: 0;
  }

  .block-brand-card,
  .block-brand-card::before {
    transition: none;
  }

  .block-brand-card.is-card-glow-sweeping::before {
    animation: none;
    opacity: 0;
  }

  .brand-list .block-brand-card:hover,
  .brand-list .block-brand-card:active {
    top: 0;
    transform: none;
  }
}
