/* ==========================================================================
   WINNR — HOME CAROUSEL
   The auto-advancing slideshow at the top of the homepage, right below the
   announce bar and above the hero. Same component worked out over several
   demo rounds (promo / pitch / live-rankings-preview / Discord slides) --
   this is that same markup/CSS/JS, just wired into the real site instead
   of a standalone demo file. Kept as its own stylesheet + script (like
   every other page-specific file in this project) rather than folded into
   home.css/home.js, since it's a fairly self-contained component.
   ========================================================================== */

.home-carousel-section {
  padding: var(--space-10) 0 var(--space-8);
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 390px;
  max-width: 100%;
  background: var(--ink-950);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(245, 247, 245, 0.08);
  position: relative;
}

/* Small persistent WINNR mark, same brand SVG as the site nav, sitting
   over every slide in the same spot instead of being redrawn per slide. */
.carousel-brand {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: rgba(13, 15, 14, 0.55);
  backdrop-filter: blur(4px);
}
.carousel-brand span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-100);
}

.carousel { position: relative; height: 240px; overflow: hidden; }

.slide {
  position: absolute;
  inset: 0;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.slide.active { opacity: 1; transform: translateX(0); pointer-events: auto; }

.slide-eyebrow {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime-500);
}
.slide h2 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.05;
  margin: 4px 0 0;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--text-100);
}
.slide p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-400);
  max-width: 30ch;
  font-family: var(--font-body);
}

.slide-1 { background: linear-gradient(135deg, #1c2410, var(--ink-950) 70%); }
.slide-2 { background: linear-gradient(135deg, #101820, var(--ink-950) 70%); }
.slide-3 {
  background: linear-gradient(135deg, #1a1020, var(--ink-950) 70%);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.slide-3:hover { background: linear-gradient(135deg, #241530, var(--ink-950) 70%); }
.slide-3 h2 { font-size: 22px; }

.rankings-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 6px 10px;
}
.rp-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.rp-row + .rp-row { border-top: 1px solid rgba(245, 247, 245, 0.06); }
.rp-rank { font-family: var(--font-data); font-size: 11px; color: var(--text-400); width: 12px; }
.rp-name { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text-100); flex: 1; }
.rp-team { font-family: var(--font-data); font-size: 11px; color: var(--text-400); width: 30px; }
.rp-pos {
  font-family: var(--font-data);
  font-size: 10px;
  color: var(--text-400);
  background: rgba(245, 247, 245, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
}
.rp-cta { font-family: var(--font-display); font-size: 12px; font-weight: 600; color: var(--lime-500); }

/* Discord slide -- kept dark like every other slide, with brand blurple
   (#5865F2) used only as an accent on the logo + button, so it reads as
   "Discord" without a full blue block breaking the carousel's look. */
.slide-4 {
  background: linear-gradient(135deg, #161a2c, var(--ink-950) 70%);
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
}
.discord-brand-row { display: flex; align-items: center; gap: 14px; }
.discord-icon { width: 44px; height: 44px; border-radius: 11px; display: block; flex-shrink: 0; }
.slide-4 h2 { margin: 0; }
.discord-join-btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 28px;
  border-radius: 999px;
  background: #5865F2;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  width: fit-content;
}
.discord-join-btn:hover { background: #4a55d6; }

.dots { display: flex; justify-content: center; gap: 8px; padding: 14px 0; background: var(--ink-950); }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 247, 245, 0.2);
  transition: background 0.3s, width 0.3s;
  cursor: pointer;
  border: none;
  padding: 0;
}
.dot.active { background: var(--lime-500); width: 18px; border-radius: 3px; }

/* Bottom corners rather than vertical-center -- every slide's copy is
   vertically centered too, so a mid-height arrow ends up sitting on top
   of whichever line of text happens to land there. */
.arrow {
  position: absolute;
  bottom: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: var(--text-100);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  font-size: 15px;
}
.arrow.prev { left: 10px; }
.arrow.next { right: 10px; }

.progress-track { height: 2px; background: rgba(245, 247, 245, 0.1); position: relative; overflow: hidden; }
.progress-fill { position: absolute; inset: 0; width: 0%; background: var(--lime-500); }

@media (prefers-reduced-motion: reduce) {
  .slide { transition: opacity 0.5s ease; transform: none; }
  .progress-fill { transition: none !important; }
}
