Rotate element on scroll - horizontal website

I'm trying to rotate an img on scroll, but the thing is that i constructed my website to be horizontal by rotating a master wrapper -90 deg, so the "scrolling" of the website is actually contained within this div. This means that the command "document.addEventListener("scroll"..." will not work - i will need to target the scroll of the div (with class="elementor") in which all content of my website is contained and make the logo rotate according to the scrolling of this. So something like "document.getElementsByClassName("elementor")[0].addEventListener("scroll"...".

I tried my best but it does not work (see bottom of JS). Any help is appreciated.

My website is jakobnatorp.com

My HTML

/*My img*/
<img class="logojakob" id="jakoblogo" src="http://jakobnatorp.com/wp-content/uploads/2021/10/cropped-JAKOB-LERCHE-DAA-NATORP.png"/>

/*There's a (scrollable) main wrapper containing all my website content with class="elementor"*/

CSS

.logojakob {
  position: fixed;
  width:150px;
  height:150px;
  margin-top:50px;
  margin-bottom:-300px;
  margin-left:50px;
}

/* Horizontal website */
  .elementor {
  width: 100vh;
  height: 100vw;
  overflow-x: scroll;
  overflow-y: scroll;
  transform: rotate(-90deg) translateX(-100vh);
  transform-origin: top left;
  -ms-overflow-style: none;
}
  
/* This is just "de-rotating" the undersection */
.elementor-section-wrap {
  transform: rotate(90deg) translateY(-100vh);
  transform-origin: top left; 
  display:flex;
  flex-direction: row; 
  width: 200vw;
}

JS (I included my JS of diverting my vertical scroll to horizontal scroll within the div container of "elementor" for reference - which works.)

/*Divert Horizontal scroll to vertical (WORKING)*/

<script type="text/javascript">
function transformScroll(event) {
  if (!event.deltaX) {
    return;
  }

  event.currentTarget.scrollTop += event.deltaY + event.deltaX;
  event.preventDefault();
}

    var element = document.getElementsByClassName("elementor")[0] || document.getElementsByClassName("elementor")[0];
element.addEventListener('wheel', transformScroll);
    </script>

/* Rotate img on scroll (NOT WORKING) */

<script type="text/javascript"> 
var leftgear = document.getElementById("jakoblogo");
        
    element.addEventListener("scroll", function() {
        leftgear.style.transform = "rotate("+element.pageYOffset+"deg)";
  });
</script>
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum