Copy. Paste. Make it yours.

Follow the tutorial – or paste the finished design into Elementor.

Requires membership to download. Join here 

Or build it yourself for free.

Following the tutorial? Start here.

Download the images and copy the code below.

6-image pack

Includes 4 background images and 2 cutouts (plane and boat) from the design.

CSS classes & IDs:

				
					snap-1
gsap1

main-japan
				
			

Code:

Copy the code below and follow the placement shown in the tutorial.

				
					<script data-minify="1" src="https://nicolaipalmkvist.com/wp-content/cache/min/1/ajax/libs/gsap/3.12.5/gsap.min.js?ver=1787218438"></script>

<style>

/* Native document flow with eased transitions between hero sections. */
html.bkn-snap-on {
  scroll-snap-type: y mandatory;
}
@media (prefers-reduced-motion: reduce) {
  html.bkn-snap-on { scroll-snap-type: y proximity; }
}

.main-japan {
  position: relative;
}

.main-japan > :is(.gsap1, .gsap2) {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: 100vh !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
  flex-shrink: 0;
}

@supports (height: 100dvh) {
  .main-japan > :is(.gsap1, .gsap2) {
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
  }
}

/* Compact glass sidebar with the original full-height red rail. */
.bkn-nav {
  --track-x: 24px;
  --dot-size: 11px;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: auto;
  right: 0;
  bottom: 0;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-left: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 0 !important;
  box-shadow: -8px 0 24px rgba(0,0,0,.10) !important;
  -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
  backdrop-filter: blur(14px) saturate(120%) !important;
  height: 100vh;
  width: 64px;
  z-index: 9990;
  display: flex;
  align-items: center;
  pointer-events: none;
  background: rgba(10,10,10,.42) !important;
  font-family: inherit;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility .5s ease;
}

@supports (height: 100dvh) {
  .bkn-nav {
    height: 100dvh;
  }
}

.bkn-nav.is-visible {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .bkn-nav {
    transition: none;
  }
}

.bkn-nav__list {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 0;
  margin: 0;
  list-style: none;
  pointer-events: auto;
}

/* Reset list */
.bkn-nav__list > li {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  list-style: none !important;
}

/* Reset buttons */
.bkn-nav__dot {
  appearance: none;
  -webkit-appearance: none;

  display: flex;
  align-items: center;
  gap: 16px;

  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;

  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;

  overflow: visible;
  cursor: pointer;
  line-height: 1;
  font-family: inherit;
  text-decoration: none !important;
  color: rgba(255,255,255,0.78) !important;

  transition: color .3s ease;
}

/* Reset button states */
.bkn-nav__dot:hover,
.bkn-nav__dot:focus,
.bkn-nav__dot:active {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  text-decoration: none !important;
}

/* Dot */
.bkn-nav__dot::before {
  content: '';
  flex: 0 0 auto;
  margin-left: calc(var(--track-x) - var(--dot-size) / 2);

  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  box-sizing: border-box;

  border: 1px solid rgba(255,255,255,0.72);
  background: rgba(0,0,0,0.5);

  box-shadow: none;
  transform: none;

  transition:
    border-color .3s ease,
    background .3s ease,
    box-shadow .35s ease;
}

/* Numbers */
.bkn-nav__num {
  font-size: 13px;
  font-weight: 400 !important;
  letter-spacing: .14em;
  color: inherit;
  transition: color .3s ease;
}

/* Active state */
.bkn-nav__dot:hover,
.bkn-nav__dot.is-active {
  color: #ffffff !important;
}

.bkn-nav__dot:hover .bkn-nav__num,
.bkn-nav__dot.is-active .bkn-nav__num {
  color: #ffffff !important;
}

/* Red glow */
.bkn-nav__dot:hover::before,
.bkn-nav__dot.is-active::before {
  border-color: transparent !important;
  background: radial-gradient(
    circle at center,
    #fff0eb 0%,
    #ff8175 20%,
    #f04438 48%,
    #bd1713 76%,
    #790508 100%
  ) !important;

  box-shadow:
    0 0 5px 1px rgba(255, 105, 91, 0.96),
    0 0 11px 3px rgba(235, 52, 42, 0.72),
    0 0 23px 7px rgba(145, 5, 8, 0.44),
    0 0 38px 12px rgba(75, 0, 3, 0.22) !important;

  transform: none !important;
}

.bkn-nav__dot:focus-visible { outline: none; }
.bkn-nav__dot:focus-visible .bkn-nav__num {
  outline: 1px solid rgba(255,255,255,.6);
  outline-offset: 5px;
}
.bkn-nav svg { display: block; }
.bkn-nav__dot:focus-visible { outline: none; }
.bkn-nav__dot:focus-visible .bkn-nav__num {
  outline: 1px solid rgba(255,255,255,.6); outline-offset: 5px;
}
@media (max-width: 1024px) {
  .bkn-nav { width: 60px; --track-x: 22px; --dot-size: 9px; }
  .bkn-nav__list { gap: 26px; }
  .bkn-nav__dot { gap: 12px; }
  .bkn-nav__num { font-size: 12px; }
}
@media (max-width: 767px) {
  .bkn-nav { width: 56px; --track-x: 18px; --dot-size: 8px; }
  .bkn-nav__list { gap: 22px; }
  .bkn-nav__dot { gap: 10px; }
  .bkn-nav__num { font-size: 11px; }
}

/* Navigation variant: centered track, original glow and scrolling retained. */
.bkn-nav { --track-x: 50%; width: 64px; justify-content: center; }
.bkn-nav__controls { position: relative; width: 100%; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 25px; pointer-events: auto; }
.bkn-nav__list { width: 100%; align-items: center; gap: 34px; }
.bkn-nav__list > li { width: 100%; }
.bkn-nav .bkn-nav__dot, .bkn-nav .bkn-nav__dot:hover, .bkn-nav .bkn-nav__dot:focus, .bkn-nav .bkn-nav__dot:active { width: 100% !important; flex-direction: column; gap: 13px; }
.bkn-nav__dot::before { margin-left: 0; width: var(--dot-size); height: var(--dot-size); }
.bkn-nav__num { position: relative; display: block; padding: 5px 7px; font-size: 12px; letter-spacing: .08em; line-height: 1; background: #1b2721; border-radius: 2px; }
.bkn-nav__arrow { appearance: none; display: grid; place-items: center; width: 36px; height: 30px; min-height: 30px; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #1b2721 !important; color: rgba(255,255,255,.75); box-shadow: none !important; cursor: pointer; transition: color .25s, opacity .25s; }
.bkn-nav__arrow svg { width: 16px; height: 10px; }
.bkn-nav__arrow:hover { color: #fff; }
.bkn-nav__arrow:disabled { opacity: .25; cursor: default; }
.bkn-nav__arrow:focus-visible { outline: 1px solid white; outline-offset: 4px; }
@media(max-width:1024px){ .bkn-nav { width: 60px; --track-x:50%; } }
@media(max-width:767px){ .bkn-nav { width: 56px; --track-x:50%; } .bkn-nav__list { gap: 27px; } .bkn-nav__num { font-size: 11px; } .bkn-nav__controls { gap:18px; } }
@media(prefers-reduced-motion:reduce){ .bkn-nav *, .bkn-nav *::before, .bkn-nav *::after { transition:none !important; } }

.bkn-nav__num::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 1px; background: #fa3029; transform: translateX(-50%) scaleX(0); opacity: 0; transition: transform .3s ease,opacity .3s ease; }
.bkn-nav__dot.is-active .bkn-nav__num::after { transform: translateX(-50%) scaleX(1); opacity: 1; }
.bkn-nav--arrows .bkn-nav__dot::before { display:none; }
.bkn-nav--arrows .bkn-nav__num,.bkn-nav--arrows .bkn-nav__arrow { background:transparent !important; }
.bkn-nav--arrows .bkn-nav__list { gap: 14px; }
.bkn-nav--arrows .bkn-nav__controls { gap: 14px; }
.bkn-nav--arrows .bkn-nav__num { padding: 4px 8px; }

/* Transparent labels; the rail is cut out behind text instead of painting boxes. */
.bkn-nav__num { background: transparent !important; border-radius:0; }
.bkn-nav--arrows .bkn-nav__num { font-size:13px; line-height:1.2; letter-spacing:.04em; transition:color .35s ease; }
/* Number spacing: desktop/tablet. This overrides the earlier base rules. */
.bkn-nav--arrows .bkn-nav__list { gap:22px; }
.bkn-nav--arrows .bkn-nav__num::after { display:none; }
.bkn-nav--arrows .bkn-nav__dot.is-active .bkn-nav__num { color:#f33228 !important; }
@media(max-width:767px){ .bkn-nav--arrows .bkn-nav__num { font-size:13px; } .bkn-nav--arrows .bkn-nav__list { gap:20px; } }

html.bkn-snap-on { scroll-behavior: auto !important; }

/* Change color of navigation here */
.bkn-nav {
  background: #red !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
.bkn-nav__indicator, .bkn-nav__num::after { display: none !important; }

</style>

<nav class="bkn-nav bkn-nav--arrows is-visible" aria-label="Hero slider navigation">

  <div class="bkn-nav__controls"><button type="button" class="bkn-nav__arrow bkn-nav__prev" aria-label="Previous slide"><svg viewBox="0 0 16 10" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><polyline points="2 8 8 2 14 8"/></svg></button><ul class="bkn-nav__list">
    <!-- Add more slide buttons here: duplicate a <li> and update its number and aria-label. -->
    <li>
      <button type="button" class="bkn-nav__dot is-active" aria-label="Go to slide 1">
        <span class="bkn-nav__num">01</span>
      </button>
    </li>

    <li>
      <button type="button" class="bkn-nav__dot" aria-label="Go to slide 2">
        <span class="bkn-nav__num">02</span>
      </button>
    </li>

    
</ul><button type="button" class="bkn-nav__arrow bkn-nav__next" aria-label="Next slide"><svg viewBox="0 0 16 10" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><polyline points="2 2 8 8 14 2"/></svg></button></div></nav>

<script>
(function () {
  if (window.__bknHeroSliderInit) {
    return;
  }

  window.__bknHeroSliderInit = true;

  var start = function () {
    var slider = document.querySelector('.main-japan');
    var nav = document.querySelector('.bkn-nav');

    if (!slider || !nav) {
      return;
    }

    /* Prevent duplicate listeners */
    if (slider.getAttribute('data-bkn-slider-ready') === 'true') {
      return;
    }

    var isElementorEditor =
      document.body.classList.contains('elementor-editor-active') ||
      document.body.classList.contains('elementor-editor-preview') ||
      (
        window.elementorFrontend &&
        window.elementorFrontend.isEditMode &&
        window.elementorFrontend.isEditMode()
      );

    /* Free scroll in Elementor */
    if (isElementorEditor) {
      document.documentElement.classList.remove('bkn-snap-on');
      nav.classList.remove('is-visible');
      return;
    }

    slider.setAttribute('data-bkn-slider-ready', 'true');

    /* Hero slides */
    var slides = Array.prototype.slice.call(
      slider.children
    ).filter(function (element) {
      return element.matches('.gsap1, .gsap2');
    });

    /* Optional normal content follows the slides */
    var normalStart = slider.querySelector('.bkn-content-start');
    var destinations = normalStart
      ? slides.concat([normalStart])
      : slides.slice();
    var normalIndex = normalStart ? slides.length : -1;

    if (!slides.length || !destinations.length) {
      return;
    }

    var dots = Array.prototype.slice.call(
      nav.querySelectorAll('.bkn-nav__dot')
    );

    var hasGsap = !!window.gsap;
    var arrivalFrame = 0;
    var scrollTween = null;
    var navigationIndex = 0;

    var reduce = window.matchMedia(
      '(prefers-reduced-motion: reduce)'
    );

    var current = 0;
    var locked = false;
    var lockTimer = null;
    /* Ignore momentum events */
    var wheelGestureUsed = false;
    var lastWheelTime = -Infinity;
    var wheelQuietMs = 220;

    function setSnapMode(i) {
      var shouldSnap = normalIndex === -1 || i < normalIndex;
      document.documentElement.classList.toggle(
        'bkn-snap-on',
        shouldSnap
      );
    }

    function slideTop(i) {
      return Math.round(
        destinations[i].getBoundingClientRect().top +
        window.pageYOffset
      );
    }

    function inSlider() {
      var r = slider.getBoundingClientRect();

      return (
        r.top <= window.innerHeight * 0.25 &&
        r.bottom >= window.innerHeight * 0.75
      );
    }

    function nearestIndex() {
      var y = window.pageYOffset;
      var best = 0;
      var bd = Infinity;

      destinations.forEach(function (s, i) {
        var d = Math.abs(slideTop(i) - y);

        if (d < bd) {
          bd = d;
          best = i;
        }
      });

      return best;
    }

    function setActive(i) {

      current = i;
      setSnapMode(i);
      showDot(i);
      sync();
    }

    function showDot(i) {
      i = Math.min(i, dots.length - 1);
      navigationIndex = i;
      dots.forEach(function (d, n) {
        d.classList.toggle('is-active', n === i);
      });
    }

    function prepareTarget(i) {
      showDot(i);
      current = i;
      setSnapMode(i);

      sync();
    }

    function sync() {
      var prev = nav.querySelector('.bkn-nav__prev');
      var next = nav.querySelector('.bkn-nav__next');
      if (prev) prev.disabled = current <= 0;
      if (next) next.disabled = current >= Math.min(destinations.length, dots.length) - 1;

      dots.forEach(function (d, n) {
        d.setAttribute(
          'aria-current',
          n === Math.min(current, dots.length - 1) ? 'true' : 'false'
        );
      });
    }

    function goTo(i, immediate) {
      if (i < 0 || i > destinations.length - 1 || (locked && !immediate)) {
        return;
      }

      var maxY = Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
      var destination = Math.min(maxY, Math.max(0, slideTop(i)));
      cancelAnimationFrame(arrivalFrame);
      if (scrollTween) { scrollTween.kill(); scrollTween = null; }
      clearTimeout(lockTimer);
      clearTimeout(settle);

      if (immediate || reduce.matches || Math.abs(window.pageYOffset - destination) < 2) {
        locked = false;
        setActive(i);

        window.scrollTo({
          top: destination,
          behavior: 'auto'
        });

        return;
      }

      locked = true;
      prepareTarget(i);

      document.documentElement.classList.remove('bkn-snap-on');
      if (scrollTween) scrollTween.kill();
      var position = { y: window.pageYOffset };

      function finishScroll() {
        scrollTween = null;
        locked = false;
        setActive(i);

      }

      if (hasGsap) {
        scrollTween = gsap.to(position, {
          y: destination,
          duration: 1,
          ease: 'power2.inOut',
          onUpdate: function () {
            window.scrollTo({ top: position.y, behavior: 'instant' });
          },
          onComplete: finishScroll
        });
      } else {
        window.scrollTo({ top: destination, behavior: 'instant' });
        finishScroll();
      }
    }

    dots.forEach(function (d, n) {
      d.addEventListener('click', function () {
        goTo(n);
      });
    });

    var prevButton = nav.querySelector('.bkn-nav__prev');
    var nextButton = nav.querySelector('.bkn-nav__next');
    if (prevButton) prevButton.addEventListener('click', function () { goTo(current - 1); });
    if (nextButton) nextButton.addEventListener('click', function () { goTo(Math.min(current + 1, dots.length - 1)); });

    /* One gesture per slide */
    function step(dir) {
      var target = current + dir;

      if (target < 0 || target > destinations.length - 1) {
        return false;
      }

      goTo(target);
      return true;
    }

    function canHandle(dir) {
      if (!inSlider()) {
        return false;
      }

      /* Native scroll below the hero slides */
      if (normalIndex !== -1 && current === normalIndex) {
        if (dir > 0) {
          return false;
        }

        /* Return to the final hero at content top */
        return window.pageYOffset <= slideTop(normalIndex) + 4;
      }

      if (dir > 0 && current >= destinations.length - 1) {
        return false;
      }

      if (dir < 0 && current <= 0) {
        return false;
      }

      return true;
    }

    window.addEventListener('wheel', function (ev) {
      if (ev.ctrlKey) {
        return;
      }

      var dir = ev.deltaY > 0
        ? 1
        : (ev.deltaY < 0 ? -1 : 0);

      if (!dir || Math.abs(ev.deltaX) > Math.abs(ev.deltaY)) {
        return;
      }

      var now = performance.now();
      if (now - lastWheelTime > wheelQuietMs) {
        wheelGestureUsed = false;
      }
      lastWheelTime = now;

      /* Wait for the gesture to end */
      if (wheelGestureUsed) {
        ev.preventDefault();
        return;
      }

      /* Block momentum during transition */
      if (locked) {
        wheelGestureUsed = true;
        ev.preventDefault();
        return;
      }
      if (!canHandle(dir)) {
        return;
      }

      ev.preventDefault();

      if (Math.abs(ev.deltaY) < 4) {
        return;
      }

      wheelGestureUsed = true;
      step(dir);
    }, { passive: false });

    var touchY = null;

    window.addEventListener('touchstart', function (ev) {
      touchY = ev.touches.length === 1
        ? ev.touches[0].clientY
        : null;
    }, { passive: true });

    window.addEventListener('touchmove', function (ev) {
      if (locked && ev.touches.length === 1) {
        ev.preventDefault();
        return;
      }
      if (touchY === null) {
        return;
      }

      var dy = touchY - ev.touches[0].clientY;

      if (Math.abs(dy) < 24) {
        return;
      }

      var dir = dy > 0 ? 1 : -1;

      if (!canHandle(dir)) {
        return;
      }

      ev.preventDefault();

      if (locked) {
        return;
      }

      touchY = null;
      step(dir);
    }, { passive: false });

    window.addEventListener('touchend', function () {
      touchY = null;
    }, { passive: true });

    document.addEventListener('keydown', function (ev) {
      var t = ev.target;

      if (
        t &&
        (
          t.tagName === 'INPUT' ||
          t.tagName === 'TEXTAREA' ||
          t.isContentEditable
        )
      ) {
        return;
      }

      var dir = 0;

      if (
        ev.key === 'ArrowDown' ||
        ev.key === 'PageDown' ||
        ev.key === ' '
      ) {
        dir = 1;
      }

      if (
        ev.key === 'ArrowUp' ||
        ev.key === 'PageUp'
      ) {
        dir = -1;
      }

      if (!dir) {
        return;
      }
      if (locked) {
        ev.preventDefault();
        return;
      }
      if (!canHandle(dir)) {
        return;
      }

      ev.preventDefault();

      if (locked) {
        return;
      }

      step(dir);
    });

    /* Sync active number */
    var settle = null;

    function onScroll() {
      // Keep navigation visible immediately, including while the page is loading.
      var first = slides[0].getBoundingClientRect();
      var last = slides[slides.length - 1].getBoundingClientRect();
      nav.classList.toggle('is-visible', first.top < window.innerHeight && last.bottom > 0);

      if (locked) {
        return;
      }

      clearTimeout(settle);

      settle = setTimeout(function () {
        if (locked) {
          return;
        }

        var i = nearestIndex();

        if (inSlider() && i !== current) {
          setActive(i);
        }
      }, 90);
    }

    window.addEventListener(
      'scroll',
      onScroll,
      { passive: true }
    );

    window.addEventListener('resize', function () {
      cancelAnimationFrame(arrivalFrame);
      if (scrollTween) { scrollTween.kill(); scrollTween = null; }
      locked = false;
      setActive(current);
      onScroll();

      /* Preserve normal-content position */
      if (
        inSlider() &&
        (normalIndex === -1 || current < normalIndex)
      ) {
        window.scrollTo({
          top: slideTop(current),
          behavior: 'auto'
        });
      }
    });

    if (document.fonts && document.fonts.ready) document.fonts.ready.then(layoutNavigation);
    window.addEventListener('load', onScroll, { once: true });
    requestAnimationFrame(onScroll);
    setActive(nearestIndex());
    onScroll();
    sync();
  };

  if (document.readyState === 'loading') {
    document.addEventListener(
      'DOMContentLoaded',
      start
    );
  } else {
    start();
  }

  if (
    window.elementorFrontend &&
    window.elementorFrontend.isEditMode &&
    window.elementorFrontend.isEditMode()
  ) {
    setTimeout(start, 400);
  }
})();
</script>