/* ═══════════════════════════════════════════════════════════════════
   fanatics-banners.css
   ──────────────────────────────────────────────────────────────────
   Horizontal scroll-snap rail for Fanatics promotional banners.

   Design philosophy:
     • The banner IMAGE holds all the marketing content (headline,
       team logo, product photo, CTA button — all baked into the image
       by Fanatics). This CSS gives the images an elegant container
       that flips with the theme, adds hover motion, and keeps the
       whole banner clickable.
     • Never overlay text on top of the banner — you don't know what
       the artwork underneath looks like.
     • Never re-color the banner — Fanatics-supplied artwork is
       licensed at face value.

   Wraps the existing motion patterns from motion.css (scroll-snap,
   cubic-bezier easing on hover). Uses tokens so both modes work.
   ═══════════════════════════════════════════════════════════════════ */

.fan-banners {
  padding: clamp(24px, 4vh, 40px) 0;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.fan-banners-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

/* ── Head — eyebrow + title ─────────────────────────────────────── */
.fan-banners-head {
  display: flex;
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.fan-banners-head-text { display: flex; flex-direction: column; gap: 8px; }
.fan-banners-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 700;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.fan-banners-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ember);
}
.fan-banners-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
  max-width: 28ch;
}
.fan-banners-title em { font-style: italic; color: var(--ember); }
.fan-banners-count {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ── The rail ───────────────────────────────────────────────────── */
.fan-banners-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 14px;
  /* Slightly bleed past container so the first/last card can align
     without cutting off. */
  margin: 0 calc(-1 * clamp(20px, 4vw, 32px));
  padding-left: clamp(20px, 4vw, 32px);
  padding-right: clamp(20px, 4vw, 32px);
}
.fan-banners-track::-webkit-scrollbar { display: none; }

/* ── The banner card ────────────────────────────────────────────── */
.fan-banner {
  flex: 0 0 min(600px, 88vw);
  scroll-snap-align: start;
  aspect-ratio: 12 / 5;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  display: block;
  background: var(--paper);
  border: 1px solid rgba(20, 24, 43, 0.10);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.fan-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(20, 24, 43, 0.14);
  border-color: rgba(20, 24, 43, 0.20);
}
.fan-banner:active { transform: translateY(-1px); }

.fan-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fan-banner:hover img { transform: scale(1.02); }

/* Subtle overlay for hover to hint interactivity */
.fan-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(20, 24, 43, 0.06) 100%);
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.fan-banner:hover::after { opacity: 1; }

/* ── Missing-image placeholder ──────────────────────────────────── */
/* If the image fails to load (file not yet dropped), swap in a note
   telling the operator exactly where to drop the file — better than
   a broken image icon. Rendered by fanatics-banners.js on the img
   onerror event. */
.fan-banner.is-placeholder {
  background: linear-gradient(135deg, #ECE5D2 0%, #D5CBB2 100%);
  display: grid;
  place-items: center;
}
.fan-banner.is-placeholder img { display: none; }
.fan-banner-note {
  text-align: center;
  padding: 24px 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(20, 24, 43, 0.65);
  line-height: 1.55;
}
.fan-banner-note strong {
  display: block;
  margin-top: 8px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ember);
  text-transform: none;
  font-weight: 600;
}

/* ── DARK MODE ──────────────────────────────────────────────────── */
:root[data-theme="dark"] .fan-banners {
  background: var(--paper);
  border-color: rgba(245, 241, 232, 0.10);
}
:root[data-theme="dark"] .fan-banner {
  border-color: rgba(245, 241, 232, 0.12);
  background: rgba(245, 241, 232, 0.02);
}
:root[data-theme="dark"] .fan-banner:hover {
  border-color: rgba(245, 241, 232, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.50);
}
:root[data-theme="dark"] .fan-banner.is-placeholder {
  background: linear-gradient(135deg, #1A1F33 0%, #14182B 100%);
}
:root[data-theme="dark"] .fan-banner-note {
  color: rgba(245, 241, 232, 0.65);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .fan-banner { flex-basis: min(560px, 92vw); }
  .fan-banners-head { gap: 12px; }
  .fan-banners-count { margin-left: 0; }
}
@media (max-width: 560px) {
  .fan-banner { flex-basis: 92vw; }
  .fan-banners-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .fan-banner,
  .fan-banner img,
  .fan-banner::after { transition: none !important; }
  .fan-banner:hover { transform: none; }
  .fan-banner:hover img { transform: none; }
}
