/* =====================================================================
   CAPTAINS' CUP × ELITE COMMUNITY EFOOTBALL — collaboration hero.
   Bolt-on module (same pattern as captainscup.css). Uses the site tokens
   (--gold, --panel, --line, --text…) so it follows the Gold and Neon
   themes automatically. Class prefix "ccx-" (collab, never "cc-").
   ===================================================================== */

#captainscup{ --ccx-a: var(--gold); --ccx-b: #8f7bff; --ccx-b-rgb: 143,123,255; }
html[data-theme="neon"] #captainscup{ --ccx-b: #ff6fb0; --ccx-b-rgb: 255,111,176; }

.ccx-collab{
  --ccx-tiltx:0deg; --ccx-tilty:0deg;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  margin:0 0 26px;
  padding:52px 24px 40px;
  border-radius:24px;
  text-align:center;
  transform:perspective(1000px) rotateX(var(--ccx-tiltx)) rotateY(var(--ccx-tilty));
  transition:transform .3s ease;
  will-change:transform;
  background:
    radial-gradient(120% 140% at 15% -10%, rgba(var(--gold-rgb),.16), transparent 55%),
    radial-gradient(120% 140% at 85% 110%, rgba(var(--ccx-b-rgb),.14), transparent 55%),
    linear-gradient(180deg, #0b0d10 0%, #0d0f12 100%);
  border:1px solid rgba(var(--gold-rgb),.22);
  box-shadow:var(--shadow-panel);
}
.ccx-collab::before{
  /* fine grain / pitch texture so the panel isn't a flat gradient */
  content:"";
  position:absolute; inset:0;
  background-image:radial-gradient(rgba(var(--text-rgb),.05) 1px, transparent 1px);
  background-size:18px 18px;
  opacity:.5;
  pointer-events:none;
  z-index:0;
}
/* directional floodlight beams, layered above the grain/floor, below the vignette */
.ccx-collab::after{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(108deg, transparent 0%, rgba(var(--gold-rgb),.16) 16%, transparent 46%),
    linear-gradient(255deg, transparent 0%, rgba(var(--ccx-b-rgb),.14) 18%, transparent 48%);
  mix-blend-mode:screen;
  pointer-events:none;
  z-index:0;
}
.ccx-vignette{
  position:absolute; inset:0;
  background:radial-gradient(70% 60% at 50% 30%, transparent 40%, rgba(0,0,0,.55) 100%);
  pointer-events:none;
  z-index:1;
}
.ccx-fx{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block;
  pointer-events:none;
  opacity:.75;
  z-index:0;
}

/* perspective "pitch floor" grid fading up from the base of the panel */
.ccx-floor{
  position:absolute; left:0; right:0; bottom:0; height:48%;
  overflow:hidden;
  pointer-events:none;
  z-index:0;
  -webkit-mask-image:linear-gradient(to top, #000 0%, #000 30%, transparent 92%);
  mask-image:linear-gradient(to top, #000 0%, #000 30%, transparent 92%);
}
.ccx-floor::before{
  content:"";
  position:absolute; left:-30%; right:-30%; bottom:-15%; height:230%;
  background-image:
    repeating-linear-gradient(90deg, rgba(var(--gold-rgb),.22) 0 1.5px, transparent 1.5px 58px),
    repeating-linear-gradient(0deg, rgba(var(--gold-rgb),.16) 0 1px, transparent 1px 42px);
  transform:perspective(320px) rotateX(58deg);
  transform-origin:bottom center;
}

/* one-shot cinematic light sweep across the panel on reveal */
.ccx-sweep{ position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:1; }
.ccx-sweep::before{
  content:"";
  position:absolute; top:-25%; bottom:-25%; left:-34%; width:30%;
  background:linear-gradient(100deg, transparent 0%, rgba(255,255,255,.1) 45%, rgba(var(--gold-rgb),.4) 50%, rgba(255,255,255,.1) 55%, transparent 100%);
  transform:translateX(-130%) skewX(-16deg);
  filter:blur(2px);
}
.ccx-collab.is-in .ccx-sweep::before{ animation:ccxSweep 1.3s cubic-bezier(.2,.7,.3,1) .1s 1 forwards; }
@keyframes ccxSweep{ to{ transform:translateX(430%) skewX(-16deg); } }

/* ---------- sound toggle ---------- */
.ccx-sound{
  all:unset; box-sizing:border-box; cursor:pointer;
  position:absolute; top:16px; right:16px; z-index:4;
  width:38px; height:38px; border-radius:50%;
  display:grid; place-items:center;
  color:var(--muted);
  background:rgba(0,0,0,.35);
  border:1px solid var(--line);
  backdrop-filter:blur(6px);
  transition:color .15s, border-color .15s, background .15s;
}
.ccx-sound:hover{ color:var(--gold); border-color:rgba(var(--gold-rgb),.5); background:rgba(var(--gold-rgb),.1); }
.ccx-sound:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }
.ccx-sound svg{ width:18px; height:18px; }
.ccx-sound .ccx-ic-on{ display:none; }
.ccx-sound[aria-pressed="true"] .ccx-ic-off{ display:none; }
.ccx-sound[aria-pressed="true"] .ccx-ic-on{ display:block; color:var(--gold); }

/* ---------- eyebrow ---------- */
.ccx-eyebrow{ position:relative; z-index:2; margin-bottom:22px; }
.ccx-eyebrow span{
  display:inline-flex; align-items:center; gap:8px;
  font-family:'Manrope',sans-serif; font-size:11.5px; font-weight:800;
  letter-spacing:.22em; text-transform:uppercase; color:var(--gold-soft);
  padding:7px 16px; border-radius:999px;
  background:rgba(var(--gold-rgb),.1); border:1px solid rgba(var(--gold-rgb),.35);
}
.ccx-eyebrow span::before, .ccx-eyebrow span::after{
  content:""; width:5px; height:5px; border-radius:50%; background:var(--gold);
  box-shadow:0 0 8px rgba(var(--gold-rgb),.8);
}

/* ---------- brands row ---------- */
.ccx-brands{
  position:relative; z-index:2;
  display:flex; align-items:center; justify-content:center;
  gap:clamp(20px, 5vw, 56px);
  margin:0 auto;
}
.ccx-brand{
  flex:none;
  display:grid; place-items:center;
  width:clamp(92px, 16vw, 160px);
  height:clamp(92px, 16vw, 160px);
  opacity:0; filter:drop-shadow(0 0 0 transparent);
  transition:filter .3s ease;
}
.ccx-brand img{ width:100%; height:100%; object-fit:contain; }
.ccx-brand-a{ transform:translateX(-64px) rotate(-6deg) scale(.85); }
.ccx-brand-b{ transform:translateX(64px) rotate(6deg) scale(.85); }
.ccx-collab.is-in .ccx-brand-a{ animation:ccxSlideA .8s cubic-bezier(.2,.8,.25,1) .05s forwards; }
.ccx-collab.is-in .ccx-brand-b{ animation:ccxSlideB .8s cubic-bezier(.2,.8,.25,1) .05s forwards; }
.ccx-brand:hover{ filter:drop-shadow(0 0 18px rgba(var(--gold-rgb),.45)); }

@keyframes ccxSlideA{
  0%{ opacity:0; transform:translateX(-64px) rotate(-6deg) scale(.85); }
  60%{ opacity:1; }
  100%{ opacity:1; transform:translateX(0) rotate(0) scale(1); }
}
@keyframes ccxSlideB{
  0%{ opacity:0; transform:translateX(64px) rotate(6deg) scale(.85); }
  60%{ opacity:1; }
  100%{ opacity:1; transform:translateX(0) rotate(0) scale(1); }
}

/* ---------- × mark ---------- */
.ccx-x{
  position:relative; flex:none;
  width:clamp(40px, 7vw, 60px); height:clamp(40px, 7vw, 60px);
  display:grid; place-items:center;
  opacity:0; transform:scale(.3) rotate(-25deg);
}
.ccx-collab.is-in .ccx-x{ animation:ccxXIn .55s cubic-bezier(.34,1.56,.64,1) .62s forwards; }
/* duotone emblem ring: fades in on impact, then turns slowly like a live badge */
.ccx-x::before{
  content:"";
  position:absolute; inset:-55%;
  border-radius:50%;
  background:conic-gradient(from 0deg, transparent 0%, rgba(var(--gold-rgb),.75) 22%, transparent 42%, rgba(var(--ccx-b-rgb),.65) 64%, transparent 84%, rgba(var(--gold-rgb),.75) 100%);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask:radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  opacity:0;
}
.ccx-collab.is-in .ccx-x::before{ animation:ccxRingIn .6s ease .95s forwards, ccxRingSpin 9s linear 1.55s infinite; }
@keyframes ccxRingIn{ to{ opacity:1; } }
@keyframes ccxRingSpin{ to{ transform:rotate(360deg); } }
.ccx-x svg{ position:relative; z-index:1; width:100%; height:100%; }
.ccx-x svg path{
  fill:none; stroke:var(--text); stroke-width:3.4; stroke-linecap:round;
  filter:drop-shadow(0 0 6px rgba(var(--gold-rgb),.6));
}
.ccx-x-glow{
  position:absolute; inset:-40%;
  border-radius:50%;
  background:radial-gradient(circle, rgba(var(--gold-rgb),.55), transparent 70%);
  opacity:0; transform:scale(.4);
}
.ccx-collab.is-in .ccx-x-glow{ animation:ccxFlash .7s ease-out .62s forwards; }
@keyframes ccxXIn{
  0%{ opacity:0; transform:scale(.3) rotate(-25deg); }
  70%{ opacity:1; transform:scale(1.15) rotate(4deg); }
  100%{ opacity:1; transform:scale(1) rotate(0); }
}
@keyframes ccxFlash{
  0%{ opacity:0; transform:scale(.3); }
  35%{ opacity:1; transform:scale(1.6); }
  100%{ opacity:0; transform:scale(2.3); }
}

/* ---------- title ---------- */
.ccx-title{
  position:relative; z-index:2;
  margin:26px 0 0;
  font-family:'Teko',sans-serif; font-weight:600;
  font-size:clamp(44px, 9vw, 92px);
  line-height:.98; letter-spacing:.02em;
  color:var(--text);
}
/* Static fallback: always rendered, so the title is fully visible with no
   animation if JS is disabled or hasn't run yet. Once collab-captainscup.js
   builds the animated letters it adds .ccx-js and this is visually hidden
   (still present for assistive tech via the h3's own text content). */
.ccx-title-sr{
  background:linear-gradient(100deg, var(--text) 25%, var(--gold-soft) 60%, var(--gold) 100%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
}
.ccx-title.ccx-js .ccx-title-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; background:none; -webkit-text-fill-color:currentColor; }
.ccx-word{ display:inline-block; color:var(--text); }
.ccx-word + .ccx-word{ margin-left:.22em; color:var(--gold); }
.ccx-letter{
  display:inline-block;
  opacity:0; transform:translateY(.4em) rotate(4deg);
}
.ccx-collab.is-in .ccx-letter{ animation:ccxLetterIn .55s cubic-bezier(.2,.9,.2,1) forwards; }
@keyframes ccxLetterIn{
  0%{ opacity:0; transform:translateY(.4em) rotate(4deg); }
  100%{ opacity:1; transform:translateY(0) rotate(0); }
}

.ccx-tagline{
  position:relative; z-index:2;
  max-width:560px; margin:16px auto 0;
  font-family:'Manrope',sans-serif; font-size:14.5px; line-height:1.65; color:var(--muted);
  opacity:0; transform:translateY(14px);
}
.ccx-collab.is-in .ccx-tagline{ animation:ccxFadeUp .6s ease 1.25s forwards; }

/* ---------- format-at-a-glance strip ---------- */
.ccx-meta{
  position:relative; z-index:2;
  list-style:none;
  display:flex; flex-wrap:wrap; align-items:stretch; justify-content:center;
  gap:10px;
  max-width:640px;
  margin:20px auto 0;
  padding:0;
}
.ccx-stat{
  display:flex; align-items:center; gap:10px;
  padding:9px 16px 9px 10px;
  border-radius:14px;
  border:1px solid rgba(var(--gold-rgb),.18);
  background:rgba(0,0,0,.24);
  backdrop-filter:blur(6px);
  opacity:0; transform:translateY(12px);
}
.ccx-collab.is-in .ccx-stat{ animation:ccxFadeUp .55s ease forwards; }
.ccx-collab.is-in .ccx-stat:nth-child(1){ animation-delay:1.32s; }
.ccx-collab.is-in .ccx-stat:nth-child(2){ animation-delay:1.42s; }
.ccx-collab.is-in .ccx-stat:nth-child(3){ animation-delay:1.52s; }
.ccx-stat-ico{
  flex:none; width:30px; height:30px; display:grid; place-items:center;
  border-radius:9px; color:var(--gold);
  background:rgba(var(--gold-rgb),.12);
  border:1px solid rgba(var(--gold-rgb),.25);
}
.ccx-stat-ico svg{ width:16px; height:16px; }
.ccx-stat-txt{ display:flex; flex-direction:column; text-align:left; line-height:1.3; }
.ccx-stat-txt b{ font-size:12.5px; font-weight:800; color:var(--text); }
.ccx-stat-txt i{ font-style:normal; font-size:11px; color:var(--muted); }

/* ---------- CTA row ---------- */
.ccx-cta{
  position:relative; z-index:2;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  margin-top:24px;
  opacity:0; transform:translateY(14px);
}
.ccx-collab.is-in .ccx-cta{ animation:ccxFadeUp .6s ease 1.7s forwards; }
@keyframes ccxFadeUp{ to{ opacity:1; transform:translateY(0); } }

.ccx-enter{ padding:0 28px; height:44px; font-size:14px; letter-spacing:.01em; }
.ccx-presented{ font-family:'Manrope',sans-serif; font-size:11.5px; color:var(--muted); }
.ccx-presented b{ color:var(--gold-soft); font-weight:700; }

/* ---------- reduced motion / no-JS fallback ---------- */
.ccx-collab.ccx-reduced .ccx-brand,
.ccx-collab.ccx-reduced .ccx-x,
.ccx-collab.ccx-reduced .ccx-x::before,
.ccx-collab.ccx-reduced .ccx-letter,
.ccx-collab.ccx-reduced .ccx-tagline,
.ccx-collab.ccx-reduced .ccx-stat,
.ccx-collab.ccx-reduced .ccx-cta{
  animation:none !important; opacity:1 !important; transform:none !important; filter:none !important;
}
.ccx-collab.ccx-reduced .ccx-x-glow{ display:none; }
.ccx-collab.ccx-reduced .ccx-sweep::before{ display:none; }
@media (prefers-reduced-motion:reduce){
  .ccx-brand, .ccx-x, .ccx-x::before, .ccx-letter, .ccx-tagline, .ccx-stat, .ccx-cta{ animation:none !important; opacity:1 !important; transform:none !important; }
  .ccx-x-glow{ display:none; }
  .ccx-sweep::before{ display:none; }
  .ccx-fx{ display:none; }
  .ccx-collab{ transform:none !important; transition:none; }
}

/* ---------- responsive ---------- */
@media (max-width:640px){
  .ccx-collab{ padding:40px 16px 32px; border-radius:18px; }
  .ccx-brands{ gap:14px; }
  .ccx-x{ width:34px; height:34px; }
  .ccx-sound{ top:10px; right:10px; width:34px; height:34px; }
  .ccx-floor{ height:38%; }
  .ccx-meta{ gap:8px; }
  .ccx-stat{ padding:8px 12px 8px 8px; }
  .ccx-stat-txt b{ font-size:11.5px; }
  .ccx-stat-txt i{ font-size:10px; }
}
@media (max-width:420px){
  .ccx-stat{ flex:1 1 100%; justify-content:center; }
}
