/* Sponsors on the front page: the landing badge and the sponsor showcase (sponsors.js). */

/* ---------- Landing badge ---------- */
.sponsor-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 7px 14px 7px 7px;
  max-width: 330px;
  background: #0f2118c4;
  border: 1px solid #e7bf6d66;
  border-radius: 40px;
  color: #f2ead2;
  box-shadow: 0 0 0 0 #e7bf6d55;
  animation: sb-breathe 3.6s ease-in-out infinite;
  transition:
    border-color 0.2s,
    transform 0.2s,
    background 0.2s;
  backdrop-filter: blur(6px);
}
.sponsor-badge[hidden] {
  display: none;
}
.sponsor-badge:hover,
.sponsor-badge:focus-visible {
  border-color: #e7bf6d;
  background: #16301fe0;
  transform: translateY(-1px);
}
.sb-window {
  flex: 0 0 auto;
  width: 92px;
  height: 40px;
  border-radius: 30px;
  background: #f5f3e9;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 300px;
}
.sb-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 6px 12px;
  overflow: hidden;
  animation: sb-flip 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
/* Fill the window's inner box exactly: the img's width/height attributes (300×140) must not size it. */
.sb-logo img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.sb-logo .sp-wordmark {
  color: #17291d;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
}
.sb-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  flex: 1;
}
.sb-label small {
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #edd095;
}
.sb-label b {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 17px;
  letter-spacing: 1px;
  font-weight: 700;
}
.sb-count {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: var(--lime, #e7bf6d);
  color: #17291d;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.sb-arrow {
  color: #edd095;
  font-size: 16px;
}
@keyframes sb-flip {
  from {
    transform: rotateX(-90deg) scale(0.7);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes sb-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 #e7bf6d00;
  }
  50% {
    box-shadow: 0 0 22px 2px #e7bf6d40;
  }
}
@media (max-width: 700px) {
  .sponsor-badge {
    max-width: 290px;
    padding: 5px 12px 5px 5px;
    gap: 10px;
  }
  .sb-window {
    width: 78px;
    height: 34px;
  }
  .sb-label b {
    font-size: 15px;
  }
}
@media (max-height: 800px) and (min-width: 901px) {
  .sponsor-badge {
    margin: 0 0 8px;
  }
}

/* ---------- Showcase ---------- */
body.sponsor-open {
  overflow: hidden;
}
.sponsor-show {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow-y: auto;
  background: radial-gradient(ellipse at 50% 0%, #2a4a2ef2, #0b1910f7 60%, #070f0afa);
  color: #f2ead2;
  opacity: 0;
  transition: opacity 0.25s;
  padding: 48px 20px 40px;
}
.sponsor-show.ss-in {
  opacity: 1;
}
.ss-beams {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.ss-beams i {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 34vw;
  height: 140%;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, #f6dc9a33, transparent 70%);
  filter: blur(18px);
  pointer-events: none;
  animation: ss-sweep 9s ease-in-out infinite alternate;
}
.ss-beams i:nth-child(1) {
  --r: -28deg;
  animation-delay: -2s;
}
.ss-beams i:nth-child(2) {
  --r: 0deg;
  opacity: 0.6;
}
.ss-beams i:nth-child(3) {
  --r: 28deg;
  animation-delay: -5s;
}
@keyframes ss-sweep {
  from {
    transform: translateX(-50%) rotate(calc(var(--r) - 9deg));
  }
  to {
    transform: translateX(-50%) rotate(calc(var(--r) + 9deg));
  }
}
.ss-panel {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
}
.ss-close {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #ffffff40;
  background: #0f2118cc;
  color: #f2ead2;
  font-size: 24px;
  line-height: 1;
}
.ss-close:hover,
.ss-close:focus-visible {
  border-color: #e7bf6d;
  color: #e7bf6d;
}
.ss-head {
  text-align: center;
  margin-bottom: 30px;
}
.ss-head .eyebrow {
  color: #edd095;
}
.ss-head h2 {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  margin: 12px 0;
  font-weight: 700;
  text-transform: uppercase;
}
.ss-head h2 em {
  font-style: normal;
  color: var(--lime, #e7bf6d);
}
.ss-head p {
  max-width: 560px;
  margin: 0 auto;
  color: #cfd8cb;
  line-height: 1.7;
  font-size: 14px;
}

.ss-feature,
.ss-grid {
  display: grid;
  gap: 16px;
}
.ss-feature {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 820px;
  margin: 0 auto 18px;
}
.ss-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.ss-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 14px 14px;
  border-radius: 12px;
  border: 1px solid #ffffff22;
  background: linear-gradient(180deg, #1d3826, #132619);
  color: inherit;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  outline: none;
  animation: ss-pop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) both;
  animation-delay: calc(var(--i) * 70ms + 150ms);
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}
.ss-tile:hover,
.ss-tile:focus-visible,
.ss-tile.lit {
  transform: translateY(-4px) scale(1.03);
  border-color: #e7bf6d;
  box-shadow:
    0 0 0 1px #e7bf6d,
    0 14px 40px #e7bf6d33;
}
.ss-tile.lit {
  z-index: 1;
}
.ss-ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 0 0 8px 8px;
  background: #ffffff14;
  color: #c9d4c3;
  font-size: 8px;
  letter-spacing: 1.6px;
  font-weight: 800;
  white-space: nowrap;
}
.ss-lead .ss-ribbon,
.ss-assoc .ss-ribbon {
  background: var(--lime, #e7bf6d);
  color: #17291d;
}
.ss-logo {
  width: 100%;
  height: 96px;
  margin-top: 8px;
  border-radius: 8px;
  background: #f5f3e9;
  display: grid;
  place-items: center;
  padding: 14px;
}
.ss-lead .ss-logo,
.ss-assoc .ss-logo {
  height: 150px;
  padding: 20px 28px;
}
.ss-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sp-wordmark {
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: #17291d;
  letter-spacing: 0.5px;
}
.ss-name {
  font-weight: 700;
  font-size: 16px;
  margin-top: 6px;
}
.ss-lead .ss-name,
.ss-assoc .ss-name {
  font-size: 20px;
}
.ss-credit {
  color: #adbea0;
  font-size: 10px;
  line-height: 1.5;
}
.ss-visit {
  margin-top: auto;
  padding-top: 6px;
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #e7bf6d;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.ss-tile:hover .ss-visit,
.ss-tile:focus-visible .ss-visit,
.ss-tile.lit .ss-visit {
  opacity: 1;
}
.ss-glint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, #fff6 50%, transparent 65%);
  transform: translateX(-120%);
}
.ss-tile.lit .ss-glint {
  animation: ss-glint 1.1s ease;
}
@keyframes ss-pop {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.5) rotate(-4deg);
  }
  70% {
    opacity: 1;
    transform: translateY(-4px) scale(1.06) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes ss-glint {
  to {
    transform: translateX(120%);
  }
}

.ss-spot {
  min-height: 22px;
  margin: 26px 0 8px;
  text-align: center;
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
}
.ss-spot span {
  color: #e7bf6d;
  font-size: 12px;
  letter-spacing: 2px;
  margin-right: 6px;
}
.ss-empty {
  text-align: center;
  color: #cfd8cb;
}
.ss-foot {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.ss-outline {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border: 1px solid #e7bf6d88;
  border-radius: 3px;
  color: #edd095;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-decoration: none;
}
.ss-outline:hover,
.ss-outline:focus-visible {
  border-color: #e7bf6d;
  color: #fff;
}

@media (max-width: 700px) {
  .sponsor-show {
    padding: 64px 14px 32px;
  }
  .ss-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .ss-logo {
    height: 74px;
    padding: 10px;
  }
  .ss-lead .ss-logo,
  .ss-assoc .ss-logo {
    height: 120px;
  }
  .ss-name {
    font-size: 14px;
  }
}

/* Calm motion and reduced motion: everything appears at once and holds still. */
.ss-calm .ss-tile,
.ss-calm .ss-beams i,
:root[data-motion='calm'] .sponsor-badge,
:root[data-motion='calm'] .sb-logo {
  animation: none;
}
.ss-calm .ss-tile:hover,
.ss-calm .ss-tile.lit {
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .sponsor-badge,
  .sb-logo,
  .ss-tile,
  .ss-beams i,
  .ss-glint {
    animation: none !important;
  }
}

/* Short phones: make room for the badge in the landing intro. */
@media (max-width: 700px) and (max-height: 740px) {
  .intro-facts {
    display: none;
  }
}

/* Showcase tiles: pin each logo to the padded area of its white box so it stays
   centred inside it on phones instead of dropping over the sponsor's name. */
.ss-logo {
  --logo-pad: 14px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.ss-lead .ss-logo,
.ss-assoc .ss-logo {
  --logo-pad-y: 20px;
  --logo-pad-x: 28px;
}
.ss-logo img {
  position: absolute;
  top: var(--logo-pad-y, var(--logo-pad));
  left: var(--logo-pad-x, var(--logo-pad));
  width: calc(100% - 2 * var(--logo-pad-x, var(--logo-pad)));
  height: calc(100% - 2 * var(--logo-pad-y, var(--logo-pad)));
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 700px) {
  .ss-logo {
    --logo-pad: 10px;
  }
}
