You gave me this response: "To create a scroll effect where the viewport scrolls exactly 100vh in one movement and the screen shakes at the end of the scroll, you can use the “scroll-behavior” CSS property to create a smooth scroll effect, and then use JavaScript or a CSS animation to create the shake effect.

Here’s an example of how you might implement this technique:

HTML
<section class=“scroll-section”>
<!-- Section content goes here -->
</section>

CSS
.scroll-section {
height: 100vh;
scroll-snap-align: start; /* Optional: snaps the section to the top of the viewport /
scroll-behavior: smooth; / Enables smooth scrolling */
}

JavaScript
// Find the first scrollable element that matches the “.scroll-section” selector
const section = document.querySelector(‘.scroll-section’);

// Listen for the “wheel” event and prevent the default behavior
section.addEventListener(‘wheel’, event => {
event.preventDefault();

// Determine the direction of the scroll
const direction = event.deltaY > 0 ? 1 : -1;

// Calculate the distance to the next scroll position (100vh)
const scrollTop = section.scrollTop;
const scrollHeight = section.scrollHeight;
const clientHeight = section.clientHeight;
const scrollPosition = Math.round((scrollTop + direction * clientHeight) / clientHeight) * clientHeight;
const distance = scrollPosition - scrollTop;

// Animate the scrolling with a delay
section.style.scrollBehavior = ‘unset’; // Disable smooth scrolling
section.style.transform = translateY(${distance}px);
section.style.transition = transform 1.5s ease-in-out;
setTimeout(() => {
section.style.transform = ‘translateY(0)’;
section.style.transition = ‘transform 1s cubic-bezier(.25,.84,.44,1.01)’;
}, 1500);
});

This code sets up a “wheel” event listener on the scrollable element, which allows the user to scroll with their mouse or trackpad. When the user scrolls, the event handler calculates the distance to the next “snap” position (which is exactly 100vh), then animates the scrolling" However this function does not do what I want. It resets scrolling and for some reason it doesn't move to the next section.