/* Iconz Club motion layer. Base rules here are safe without JS; anything animated is gated behind
   html.motion (set by motion.js once GSAP has loaded) or html.motion-pending (set by the inline boot script). */

/* ---------- structure (always) ---------- */
.wm-in { display: flex; align-items: flex-start; transform-origin: 50% 40%; }
.success { position: relative; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

/* ---------- marquee bands (CSS loop works with no JS) ---------- */
.marquee-wrap { overflow: hidden; padding: clamp(56px, 8vw, 120px) 0 clamp(8px, 2vw, 24px); position: relative; z-index: 1; }
.marquee-wrap-2 { padding: clamp(80px, 10vw, 150px) 0 0; }
.marquee {
  margin: 0 -6vw; padding: .26em 0 .2em; transform: rotate(-2.2deg);
  background: var(--accent); color: #0a0a0a;
  font: 900 clamp(30px, 5.2vw, 78px)/1 var(--display); font-stretch: 125%; letter-spacing: -.03em; text-transform: uppercase;
}
.marquee-outline {
  transform: rotate(1.6deg); background: transparent; color: transparent;
  -webkit-text-stroke: 1px rgba(239, 233, 220, .55); border-block: 1px solid var(--line);
}
.marquee-track { display: flex; width: max-content; white-space: nowrap; animation: iconz-marquee 40s linear infinite; }
.marquee-outline .marquee-track { animation-direction: reverse; }
.marquee-track > * { padding-right: .42em; }
.marquee-track b { font-weight: 400; }
@keyframes iconz-marquee { to { transform: translateX(-33.3333%); } }

/* ---------- strip + counter panels: only shown in pinned mode ---------- */
.ep-lead, .ep-end, .counter { display: none; }
.ep-lead-big {
  margin: 0; font: 900 clamp(34px, 3.5vw, 60px)/.9 var(--display); font-stretch: 125%;
  letter-spacing: -.03em; text-transform: uppercase;
}

/* ---------- hide the hero only while the intro is about to run ---------- */
.motion-pending .wm-in, .motion-pending .blob, .motion-pending .hero-top,
.motion-pending .hero-side, .motion-pending .hero-bottom { opacity: 0; }

/* ---------- motion on ---------- */
.motion .reveal { opacity: 1; transform: none; transition: none; }   /* GSAP takes over from the CSS reveals */
.motion .blob { animation: none; }                                  /* GSAP drift replaces the CSS keyframes */
.motion .marquee-track { animation: none; }                         /* JS drives speed + skew from scroll velocity */
.motion .marquee-skew { will-change: transform; }
.motion .cart-dot { transition: none; }                            /* GSAP pops it in; a CSS transform transition would fight the tween */

/* split-text masks: pad the clip box so tall caps and side bearings are never cut */
.sl-mask, .fl-mask, .cl-mask { padding: .18em .1em .06em; margin: -.18em -.1em -.06em; }

/* magnetic buttons: let GSAP own transforms */
.magnetic .pill { transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.magnetic .pill i { transition: background .3s var(--ease), color .3s var(--ease); }

/* pinned modes (desktop) */
.pin-on .ep-viewport {
  width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden;
  padding: 0 max(var(--pad), calc((100vw - 1440px) / 2 + var(--pad)));
}
.pin-on .episodes { display: flex; width: max-content; gap: clamp(16px, 2vw, 28px); align-items: stretch; }
.pin-on .ep-card { flex: 0 0 auto; width: min(30vw, 50vh); }
.pin-on .ep-lead, .pin-on .ep-end { display: flex; flex-direction: column; flex: 0 0 min(30vw, 440px); }
.pin-on .ep-lead { justify-content: space-between; padding: 6px 2vw 40px 0; }
.pin-on .ep-end { justify-content: center; align-items: flex-start; gap: 28px; padding: 0 6vw 40px 4vw; }

.pin-on .music-stage {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 80px); align-items: center;
}
.pin-on .counter { display: block; }
.counter-num {
  height: 1em; overflow: hidden;
  font: 900 clamp(140px, 17vw, 280px)/1 var(--display); font-stretch: 125%; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 2px var(--accent);
}
.counter-roll span { display: block; height: 1em; }
.counter-cap { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.counter-bar { position: relative; display: inline-block; width: 140px; height: 2px; overflow: hidden; background: var(--line); }
.counter-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(.1667); }

/* custom cursor (fine pointers only; added by JS) */
.cursor { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; mix-blend-mode: difference; opacity: 0; }
.cursor i {
  display: block; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff;
  transition: transform .35s var(--ease);
}
.cursor.is-hover i { transform: scale(4.4); }
.cursor.is-down i { transform: scale(.6); }

/* join celebration */
.confetti {
  position: absolute; left: 0; top: 0; width: 8px; height: 8px; background: var(--accent);
  pointer-events: none; z-index: 5;
}
.confetti.c2 { background: var(--ink); width: 6px; height: 6px; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
