window.onload = function () {
  let hamBtn = document.querySelector('#ham-btn');
  let hamClose = document.querySelector('.ham-close');
  let hamMenu = document.querySelector('.mobile-ham');
  hamBtn.onclick = (e) => (hamMenu.style.bottom = '0');
  hamClose.onclick = (e) => (hamMenu.style.bottom = '100%');
};

window.onscroll = function () {
  scrollFunction();
};

console.log(screen.width)

function scrollFunction() {
  if (document.body.scrollTop > 80 || document.documentElement.scrollTop > 80) {
    document.getElementById('head').style.height = '80px';
    if (document.querySelector('.active')) {
      document.querySelector('.active').style.bottom = '-28px';
    }
  } else {
    document.getElementById('head').style.height = '100px';
    if (document.querySelector('.active')) {
      document.querySelector('.active').style.bottom = '-38px';
    }
  }
}
