.sponsors {
  --rail: clamp(150px, 14vw, 200px);
  --tile-gap: 16px;
  --tile-line: rgba(52, 65, 88, 0.13);
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(72px, 8vw, 120px);
}

/* Anchored to the panel's top-right corner; z-index -1 slips it behind the panel */
.sponsors__arc {
  position: absolute;
  z-index: -1;
  top: -250px;
  right: -20px;
  width: 340px;
  height: 300px;
  fill: none;
  color: var(--gold-deep);
  stroke-width: 1.2;
  opacity: 0.8;
  pointer-events: none;
}

.sponsors__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px clamp(32px, 4vw, 64px);
  margin-bottom: clamp(32px, 3.2vw, 44px);
  padding-right: clamp(0px, 5vw, 72px);
}

.sponsors__title {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--h2-size);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
}

.sponsors__intro {
  padding-bottom: 4px;
}

.sponsors__lede {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.sponsors__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 4px 3px;
  border-bottom: 1px solid rgba(133, 102, 42, 0.55);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--gold-text);
  transition: border-color 0.25s var(--ease);
}

.sponsors__cta:hover {
  border-bottom-color: var(--gold-text);
}

.sponsors__cta-icon {
  transition: transform 0.25s var(--ease);
}

.sponsors__cta:hover .sponsors__cta-icon {
  transform: translateX(3px);
}

.sponsors__panel {
  position: relative;
  margin-inline: calc(var(--gutter) * -0.3);
  padding: clamp(24px, 2.4vw, 34px) clamp(16px, 4vw - 18px, 40px) clamp(28px, 2.8vw, 40px);
  background: var(--cream-light);
  border-radius: var(--radius);
  box-shadow:
    0 30px 60px -36px rgba(7, 11, 18, 0.28),
    0 2px 8px -2px rgba(7, 11, 18, 0.06);
}

/* Each tier is a row: its name in a rail on the left, logos on a fixed grid on the right.
   Column counts and tile sizes step down with the tier, so rank reads at a glance. */
.sponsors__tier {
  --cols: 4;
  --tile-h: 104px;
  --logo-box: 190px;
  --accent: var(--gold-deep);
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.sponsors__tier:not(:has(.sponsors__item)) {
  display: none;
}

.sponsors__tier:has(.sponsors__item) ~ .sponsors__tier {
  margin-top: clamp(24px, 2.4vw, 32px);
  padding-top: clamp(24px, 2.4vw, 32px);
  border-top: 1px solid var(--line-light);
}

.sponsors__tier--cohost {
  --cols: 3;
  --tile-h: 132px;
  --logo-box: 230px;
  --accent: var(--navy);
}

.sponsors__tier--platinum {
  --cols: 3;
  --tile-h: 124px;
  --logo-box: 220px;
  --accent: linear-gradient(90deg, #5F6B80, #B9C1CE 55%, #5F6B80);
}

.sponsors__tier--gold {
  --cols: 4;
  --tile-h: 108px;
  --logo-box: 190px;
  --accent: linear-gradient(90deg, var(--gold-deep), var(--gold-bright) 55%, var(--gold-deep));
}

.sponsors__tier--associate {
  --cols: 5;
  --tile-h: 94px;
  --logo-box: 165px;
  --accent: rgba(168, 132, 58, 0.55);
}

.sponsors__tier--exhibitor {
  --cols: 6;
  --tile-h: 80px;
  --logo-box: 140px;
  --accent: var(--slate-light);
}

.sponsors__label {
  grid-column: 1;
  margin: 0;
  padding-top: 2px;
  font-family: var(--serif);
  font-size: clamp(19px, 0.7vw + 12px, 23px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--navy);
  text-wrap: balance;
}

.sponsors__label::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--accent);
}

.sponsors__list {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--tile-gap);
}

.sponsors__item[hidden] {
  display: none;
}

.sponsors__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--tile-h);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tile-line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(7, 11, 18, 0.04);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.sponsors__tile:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 132, 58, 0.45);
  box-shadow: 0 14px 28px -18px rgba(7, 11, 18, 0.35);
}

/* --w per logo balances optical weight; it scales against the tier's logo box, not the tile. */
.sponsors__logo {
  flex: none;
  width: calc(var(--logo-box) * var(--w, 0.6));
  max-width: 84%;
  max-height: calc(var(--tile-h) - 28px);
  height: auto;
  object-fit: contain;
}

/* 200px sources: stay at or under 100 CSS px so 2x screens stay sharp */
.sponsors__logo--lowres {
  max-width: min(84%, 100px);
}

/* Lifts an off-white file background to pure white so its box edge vanishes */
.sponsors__logo--flatten {
  filter: brightness(1.03);
}

/* Temporary: the supplied XDLINX file is white-only */
.sponsors__logo--invert {
  filter: brightness(0);
}

.sponsors__caption {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.35;
  text-align: center;
  color: var(--slate);
}

.sponsors__more {
  grid-column: 2;
  justify-self: start;
  margin-top: 20px;
  padding-block: 4px 2px;
  border-bottom: 1px solid rgba(133, 102, 42, 0.55);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--gold-text);
  transition: border-color 0.25s var(--ease);
}

.sponsors__more:hover {
  border-bottom-color: var(--gold-text);
}

.sponsors__more[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .sponsors__arc {
    display: none;
  }

  /* The rail folds above the logos. */
  .sponsors__tier {
    grid-template-columns: minmax(0, 1fr);
  }

  .sponsors__label,
  .sponsors__list,
  .sponsors__more {
    grid-column: 1;
  }

  .sponsors__label {
    margin-bottom: 16px;
  }

  .sponsors__label::before {
    margin-bottom: 10px;
  }

  .sponsors__tier--gold,
  .sponsors__tier--associate {
    --cols: 3;
  }

  .sponsors__tier--exhibitor {
    --cols: 4;
  }
}

@media (max-width: 760px) {
  .sponsors__head {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 0;
    padding-right: 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line-light);
  }

  .sponsors__intro {
    padding-bottom: 0;
  }

  .sponsors__lede {
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--ink-soft);
    text-wrap: pretty;
  }

  .sponsors__panel {
    margin-inline: 0;
    padding: 24px 0 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
  }

  /* Two per row; the logo box tracks the tile width so --w keeps its balance. */
  .sponsors__tier,
  .sponsors__tier--cohost,
  .sponsors__tier--platinum,
  .sponsors__tier--gold,
  .sponsors__tier--associate,
  .sponsors__tier--exhibitor {
    --cols: 2;
    --logo-box: calc((100vw - var(--gutter) * 2 - var(--tile-gap)) / 2);
  }

  .sponsors__tile {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .sponsors__logo {
    max-height: 64%;
  }

  .sponsors__tier--exhibitor .sponsors__tile {
    aspect-ratio: 2 / 1;
  }
}
