/* Hero sponsors: desktop ticker and mobile grouped logos. */
.gp-top-page .hero-sponsors {
  position: relative;
  z-index: 20;
  margin: 0;
  padding: 0;
}

.hero-sponsors .sponsor-ticker,
.hero-sponsors__inner { display: none; }

/* The desktop strip follows the full-height hero. */
@media (min-width: 768px) {
  .gp-top-page .hero-sponsors {
    height: 112px;
    background: rgba(255, 255, 255, .84);
    border-top: 1px solid rgba(255, 255, 255, .62);
    border-bottom: 1px solid rgba(217, 221, 227, .78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .hero-sponsors .sponsor-ticker {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .hero-sponsors .sponsor-ticker::before {
    content: "PARTNERS";
    position: relative;
    z-index: 3;
    flex: 0 0 clamp(116px, 11vw, 170px);
    align-self: stretch;
    display: flex;
    align-items: center;
    padding-left: clamp(18px, 3vw, 48px);
    padding-right: 18px;
    color: #111;
    background: rgba(255, 255, 255, .9);
    border-right: 1px solid rgba(217, 221, 227, .78);
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    font-weight: 800;
    letter-spacing: .18em;
  }

  .hero-sponsors .sponsor-ticker::after {
    content: "";
    position: absolute;
    left: clamp(116px, 11vw, 170px);
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 72px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
  }

  .hero-sponsors .ticker {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .hero-sponsors .ticker__track {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: clamp(34px, 5vw, 86px);
    margin: 0;
    /* Leave space between the final logo and the next loop's label. */
    padding: 0 clamp(120px, 12vw, 200px) 0 0;
    list-style: none;
    white-space: nowrap;
    transform: translateX(0);
    animation: ticker-scroll 110s linear 3s infinite;
    will-change: transform;
  }

  .hero-sponsors .ticker__logo,
  .hero-sponsors .ticker__label {
    display: inline-flex;
    align-items: center;
    line-height: 1;
  }

  .hero-sponsors .ticker__label {
    margin-left: clamp(80px, 8vw, 160px);
    margin-right: clamp(16px, 2.5vw, 32px);
    padding: 7px 10px;
    border: 1px solid #111;
    color: #111;
    font: 700 1rem/1 'Open Sans', system-ui, sans-serif;
    letter-spacing: .1em;
  }

  .hero-sponsors .ticker__track > .ticker__label:first-child {
    margin-left: clamp(16px, 3vw, 32px);
  }

  .hero-sponsors .ticker__logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 112px;
    aspect-ratio: 11 / 5;
  }

  .hero-sponsors .ticker__logo:has(img[alt="Cygames"]) a { height: 146px; }

  .hero-sponsors .ticker__logo img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: contain;
  }

  .hero-sponsors .ticker:hover .ticker__track,
  .hero-sponsors .ticker:focus-within .ticker__track { animation-play-state: paused; }
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sponsors .ticker__track { animation: none; }
}

/* Mobile: Signature, two-column Prime, and compact Advanced / Standard logos. */
@media (max-width: 767.98px) {
  .gp-top-page .hero-sponsors {
    padding: 20px 0;
    background: #fff;
    border-bottom: 1px solid #e3e5eb;
  }

  .hero-sponsors__inner {
    display: grid;
    grid-template-columns: 1fr;
    width: min(520px, calc(100% - 32px));
    margin: 0 auto;
    gap: 14px;
  }

  .hero-sponsors__group {
    min-width: 0;
    padding-top: 14px;
    border-top: 1px solid #dfe2e8;
  }

  .hero-sponsors__group--signature { border-top: 0; padding-top: 0; }

  .hero-sponsors__label {
    margin: 0 0 6px;
    color: #545b69;
    font: 800 10px/1.5 'Open Sans', sans-serif;
    letter-spacing: .14em;
    text-align: center;
  }

  .hero-sponsors__logos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 2px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .hero-sponsors__logos li { min-width: 0; }

  .hero-sponsors__logos a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
  }

  .hero-sponsors__logos img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .hero-sponsors__group--signature .hero-sponsors__logos { grid-template-columns: 1fr; }

  .hero-sponsors__group--signature .hero-sponsors__logos a {
    width: min(290px, 90%);
    height: 90px;
    margin: 0 auto;
  }

  .hero-sponsors__group--advanced .hero-sponsors__logos {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .hero-sponsors__group--advanced .hero-sponsors__logos li {
    width: calc((100% - 16px) / 3);
  }

  .hero-sponsors__group--standard .hero-sponsors__logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-sponsors__logos a:focus-visible {
    outline: 2px solid #5543bb;
    outline-offset: 3px;
  }
}
