.musi-blobparallax {
  /* Tokens: cambia estos valores para adaptar el parallax */
  --musi-bg: #f4f1ea; /* fondo de la ventana */
  --musi-fg: #0d0d0d; /* texto */
  --musi-accent: #2b4bff; /* las manchas */
  --musi-wobble: 9%; /* deformación: 0% = círculo perfecto */
  --musi-spin: 6s; /* una vuelta de cada mancha; menos = más agitadas */
  --musi-range: 9em;
  --musi-pointer: 1.4em;
  --musi-size: 1rem; /* todo el componente escala con este tamaño */
  --musi-width: 36em;
  --musi-height: 22em; /* alto de la ventana y de cada sección */
  --musi-radius: 1.2em; /* redondeo de la ventana */

  position: relative;
  display: block;
  width: var(--musi-width);
  max-width: 100%;
  color: inherit;
  /* Inter es opcional: si tu sitio no la carga, se usa la fuente del sistema */
  font: 300 var(--musi-size) / 1.35 "Inter", system-ui, sans-serif;
}

/* La ventana con su propio scroll (sin barra a la vista) */
.musi-blobparallax__viewport {
  position: relative;
  height: var(--musi-height);
  overflow: hidden auto;
  border-radius: var(--musi-radius);
  background: var(--musi-bg);
  color: var(--musi-fg);
  scrollbar-width: none;
}

.musi-blobparallax__viewport::-webkit-scrollbar {
  display: none;
}

.musi-blobparallax__viewport:focus-visible {
  outline: 2px solid var(--musi-accent);
  outline-offset: 3px;
}

/* Con data-musi-scroll="page" la ventana crece y manda el scroll de la página */
.musi-blobparallax[data-musi-scroll="page"] .musi-blobparallax__viewport {
  height: auto;
  overflow: visible;
}

.musi-blobparallax__section {
  position: relative;
  display: grid;
  align-content: end;
  box-sizing: border-box;
  height: var(--musi-height);
  padding: 1.6em 1.8em;
  overflow: clip;
}

/* Cada capa se desplaza según su profundidad: con el scroll (--musi-p, de
   la sección) y con el cursor (--musi-px, --musi-py) */
.musi-blobparallax__layer {
  position: absolute;
  pointer-events: none;
  translate:
    calc(var(--musi-px, 0) * var(--musi-depth, 0) * var(--musi-pointer))
    calc(var(--musi-p, 0) * var(--musi-depth, 0) * var(--musi-range) + var(--musi-py, 0) * var(--musi-depth, 0) * var(--musi-pointer));
  will-change: translate;
}

.musi-blobparallax__copy {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 0.45em;
  max-width: 20em;
  translate: 0 calc(var(--musi-p, 0) * var(--musi-range) * 0.12);
}

.musi-blobparallax__eyebrow {
  margin: 0;
  font-size: 0.72em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}

.musi-blobparallax__title {
  margin: 0;
  font-size: clamp(1.7em, 6vw, 2.6em);
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* Aviso de la primera sección: una línea que baja */
.musi-blobparallax__hint {
  position: absolute;
  top: 1.5em;
  left: 1.8em;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin: 0;
  font-size: 0.7em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}

.musi-blobparallax__hint::after {
  content: "";
  width: 1px;
  height: 1.8em;
  background: currentColor;
  animation: musi-blobparallax-hint 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes musi-blobparallax-hint {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

.musi-blobparallax__filter {
  position: absolute;
}

/* Las manchas van en dos capas con su filtro: las claras detrás */
.musi-blobparallax__ink {
  position: absolute;
  inset: 0;
  filter: url(#musi-blobparallax-goo);
  pointer-events: none;
}

.musi-blobparallax__ink--back {
  opacity: 0.4;
}

.musi-blobparallax__layer--blob {
  width: var(--musi-s, 4em);
  aspect-ratio: 1;
  background: var(--musi-accent);
  border-radius:
    calc(50% - var(--musi-wobble)) calc(50% + var(--musi-wobble))
    calc(50% - var(--musi-wobble) * 0.6) calc(50% + var(--musi-wobble) * 0.6) /
    calc(50% + var(--musi-wobble) * 0.8) calc(50% - var(--musi-wobble))
    calc(50% + var(--musi-wobble)) calc(50% - var(--musi-wobble) * 0.8);
  animation: musi-blobparallax-spin var(--musi-spin) linear infinite;
}

.musi-blobparallax__layer--reverse {
  animation-direction: reverse;
  animation-duration: calc(var(--musi-spin) * 1.4);
}

@keyframes musi-blobparallax-spin {
  to {
    rotate: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .musi-blobparallax *,
  .musi-blobparallax *::before,
  .musi-blobparallax *::after {
    animation: none !important;
    transition: none !important;
  }

  .musi-blobparallax__layer,
  .musi-blobparallax__copy {
    translate: none !important;
  }
}
