/* =========================================================
   MOTION — capa de animación de danicorbero.com
   Todo el contenido es visible sin JS; esto solo lo anima.
   ========================================================= */

/* 1. Barra de progreso de scroll (dorada) */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, #D9C27E, #f3e3a8);
  transform-origin: 0 50%; transform: scaleX(0);
  z-index: 60; pointer-events: none;
  box-shadow: 0 0 10px rgba(217,194,126,0.6);
}

/* 2. Nav: se oculta al bajar, reaparece al subir */
nav.m-nav { transition: transform .45s cubic-bezier(.22,1,.36,1), background-color .4s ease, padding .4s ease; }
nav.m-nav.is-hidden { transform: translateY(-110%); }
nav.m-nav.is-solid { background-color: rgba(0,0,0,.78); }

/* 3. Hero: entrada en cascada al quitar el loader */
.m-hero-in { opacity: 0; transform: translateY(28px); filter: blur(10px); }
.m-hero-in.m-in {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity 1.1s cubic-bezier(.22,1,.36,1), transform 1.1s cubic-bezier(.22,1,.36,1), filter 1.1s ease;
}
.m-hero-logo { will-change: transform, opacity; }
.bg-fixed-main video {
  transform-origin: 50% 40%; will-change: transform;
  /* --hs: progreso de scroll del hero (motion.js) · --mx/--my: posición del ratón (experience.js) */
  transform: translate3d(calc(var(--mx, 0) * -16px), calc(var(--my, 0) * -10px), 0) scale(calc(1.05 + var(--hs, 0) * 0.12));
}

/* Ecualizador junto a "Live Sets" */
.m-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.m-eq i { display: block; width: 2px; background: #E8C547; border-radius: 1px; animation: mEq 1s ease-in-out infinite; }
.m-eq i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.m-eq i:nth-child(2) { height: 90%; animation-delay: -.6s; }
.m-eq i:nth-child(3) { height: 60%; animation-delay: -.4s; }
.m-eq i:nth-child(4) { height: 80%; animation-delay: -.8s; }
@keyframes mEq { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.m-eq i { transform-origin: bottom; }

/* 4. Marquee doble: artistas que pinchan tu música + clubs */
.m-marquee { position: relative; overflow: hidden; padding: 12px 0 10px; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.m-marquee::before, .m-marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12vw; z-index: 2; pointer-events: none; }
.m-marquee::before { left: 0; background: linear-gradient(90deg, #000, transparent); }
.m-marquee::after { right: 0; background: linear-gradient(-90deg, #000, transparent); }
.m-marquee-row { display: flex; width: max-content; animation: mMarquee 48s linear infinite; }
.m-marquee-row.reverse { animation-direction: reverse; animation-duration: 56s; margin-top: 4px; }
.m-marquee:hover .m-marquee-row { animation-play-state: paused; }
.m-marquee-row span { font-family: 'Archivo Black', sans-serif; text-transform: uppercase; font-style: italic; white-space: nowrap; padding: 0 .55em; line-height: 1.1; }
.m-marquee-row.big span { font-size: clamp(15px, 1.9vw, 24px); color: transparent; -webkit-text-stroke: .8px rgba(255,255,255,.6); transition: color .3s, -webkit-text-stroke-color .3s; }
.m-marquee-row.big span:hover { color: #fff; -webkit-text-stroke-color: #fff; }
.m-marquee-row.big span.dot, .m-marquee-row.small span.dot { color: #D9C27E; -webkit-text-stroke: 0; }
.m-marquee-row.small span { font-size: clamp(10px, 1vw, 12px); letter-spacing: .25em; color: #D9C27E; font-style: normal; font-family: 'Inter', sans-serif; font-weight: 700; }
.m-marquee-label { white-space: nowrap; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); z-index: 3; font: 700 8px/1 'Inter', sans-serif; letter-spacing: .4em; text-transform: uppercase; color: rgba(255,255,255,.55); }
@keyframes mMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 5. Entrada escalonada de tarjetas e imágenes (solo si JS la activa) */
.m-ready .m-item { opacity: 0; transform: translateY(40px) scale(.97); }
.m-ready .m-item.m-in {
  opacity: 1; transform: none;
  transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--m-delay, 0s);
}
/* Revelado de imagen tipo cortina */
.m-ready .m-clip img { clip-path: inset(100% 0 0 0); transform: scale(1.18); }
.m-ready .m-clip.m-in img {
  clip-path: inset(0 0 0 0); transform: scale(1);
  transition: clip-path 1.2s cubic-bezier(.77,0,.18,1), transform 1.6s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--m-delay, 0s);
}
.m-ready .m-clip.m-in:hover img { transform: scale(1.05); transition: transform .5s ease; }

/* Línea dorada que se dibuja bajo los títulos de sección */
.split-title::after { content: ""; display: block; height: 2px; width: 64px; margin-top: .25em; background: #D9C27E; transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s cubic-bezier(.77,0,.18,1) .45s; }
.split-title.text-center::after, .text-center > .split-title::after, .text-center .split-title::after { margin-left: auto; margin-right: auto; transform-origin: 50% 50%; }
.split-title.active::after { transform: scaleX(1); }

/* 6. Tilt 3D + brillo en flyers destacados */
.m-tilt { transform-style: preserve-3d; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.m-tilt .m-glare { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.22), transparent 55%); }
.m-tilt:hover .m-glare { opacity: 1; }

/* 7. Botones magnéticos */
.m-magnetic { transition: transform .35s cubic-bezier(.22,1,.36,1); will-change: transform; }

/* Seguridad: nunca dejar texto partido invisible si se cruzan clases */
.reveal[data-split] { opacity: 1; transform: none; }

/* Solo reducimos lo intrusivo (parallax y marquee rápido) */
@media (prefers-reduced-motion: reduce) {
  .m-marquee-row { animation-duration: 120s; }
  .m-marquee-row.reverse { animation-duration: 140s; }
}
