/* Sponsors page – standalone styles. Works with site.css tokens if present. */
:root {
  --s-bg: var(--bg, #0d0f12);
  --s-fg: var(--fg, #e9edf1);
  --s-muted: var(--muted, #9aa7b1);
  --s-line: var(--line, #222831);
  --s-accent: var(--accent, #4ade80);
}

.sponsors-page {
  padding-block: 16px 40px;
}

/* Intro */
.intro-card h2 { margin-bottom: 0.25rem; }
.intro-card p  { color: var(--s-muted); }

/* --- CAROUSEL WRAPPER --- */
.sponsor-carousel { margin-top: 16px; }

.carousel {
  position: relative;
  width: 100%;
  border: 1px solid var(--s-line);
  border-radius: 16px;
  background: #000;
  overflow: hidden;
}

/* --- TRACK + SLIDES --- */
.track {
  display: flex;                 /* KEY: horizontal strip */
  align-items: stretch;
  gap: 0;
  padding: 0;
  transition: transform 400ms ease;
  will-change: transform;
  outline: none;
}

.slide {
  margin: 0;                     /* kill default <figure> margin */
  box-sizing: border-box;
  min-width: 100%;               /* KEY: each slide fills viewport width */
  min-height: 0;
  display: grid;                 /* image + caption stack */
  grid-template-rows: 1fr auto;
  background: #000;
  color: var(--s-fg);
}

/* --- LOGO WRAP: perfectly centered logo in a 16:9 box --- */
.logo-wrap {
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;                /* anchor acts like a block */
  position: relative;
  overflow: hidden;
  padding: clamp(12px, 4vw, 24px);
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* --- CAPTIONS --- */
figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--s-line);
  background: linear-gradient(0deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}
figcaption strong { font-family: "Baloo 2", system-ui, sans-serif; font-size: 1.05rem; }
figcaption span   { color: var(--s-muted); font-size: 0.95rem; }
figcaption a      { color: var(--s-accent); text-decoration: none; }
figcaption a:hover{ text-decoration: underline; }

/* --- NAV CONTROLS --- */
.nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid var(--s-line);
  background: rgba(20,24,28,.6);
  color: var(--s-fg);
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.nav:hover { background: rgba(20,24,28,.9); border-color: #3a4048; }
.nav:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }
.prev { left: 10px; }
.next { right: 10px; }

/* --- DOTS --- */
.dots {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  display: flex; gap: 8px; justify-content: center;
}
.dot {
  width: 9px; height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.2);
  padding: 0; cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.dot.is-active { background: var(--s-accent); transform: scale(1.15); }
.dot:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }

/* --- LOGO GRID BELOW --- */
.sponsor-grid { margin-top: 20px; text-align: center; }
.sponsor-grid .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  border: 1px dashed var(--s-line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
}
.sponsor-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center center;
  background: #000;
  border-radius: 10px;
  padding: 10px;
}
.grid-cta { margin-top: 10px; color: var(--s-muted); }
.grid-cta a { color: var(--s-accent); text-decoration: none; }
.grid-cta a:hover { text-decoration: underline; }

/* --- A11Y HELPERS --- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* --- RESPONSIVE --- */
@media (min-width: 700px) {
  .nav { width: 46px; height: 46px; font-size: 26px; }
  figcaption { padding: 12px 18px 16px; }
  .sponsor-grid .grid { grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 14px; }
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  .track, .dot, .nav { transition: none; }
}
