Smooth scroll working AND not working

Smooth scroll working AND not working

I have a page with two identical on-page links... one at the top of the page and one at the bottom of the page. Smooth scrolling works with the top link, but not the bottom link. Any ideas what I'm missing? Here's the fiddle link:  http://jsfiddle.net/Codewalker/6or8pwjx/62/

And the code:
  1. <section class="section" id="head">
  2.   <div class="container">
  3.     <h2>CTA</h2>
  4.     <div>
  5.       Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.
  6.     </div>
  7.     <div class="cta-btn">
  8.       <a href="#ckav">Check your guitar</a>
  9.     </div>
  10.   </div>
  11. </section>

  12. <section class="section" id="ckav">
  13.    <div class="container test">
  14.       <div class="row">
  15.         <div class="col-sm-12">
  16.           <div class="placeholder-above"></div>
  17.           <div class="guitar-service-address">
  18.             <span class="placeholder-location"><span class="placeholder-float">Find guitar repair specialist. </span><span class="font-alt">Enter your guitar make and model...</span></span>
  19.             <input id="input" type="text" />&nbsp;
  20.           </div>
  21.           <p class="help-block">What is this?</p>

  22.         </div>
  23.       </div>
  24.     </div>
  25. </section>

  26. <section class="section" id="cta">
  27.   <div class="container">
  28.     <h2>CTA</h2>
  29.     <div>
  30.       Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.
  31.     </div>
  32.     <div class="cta-btn">
  33.       <a href="#ckav">Check your guitar</a>
  34.     </div>
  35.   </div>
  36. </section>    

  37. $('#input').on("focus", function(){
  38.    $(".guitar-service-address>span.placeholder-location").hide();
  39. });

  40. $(function() {
  41.       $("span.placeholder-location + input").keyup(function() {
  42.         if($(this).val().length) {
  43.             $(this).prev('span.placeholder-location').hide();
  44.         } else {
  45.             $(this).prev('span.placeholder-location').show();
  46.         }
  47.     });
  48.     $("span.placeholder-location").click(function() {
  49.         $(this).next().focus();
  50.     });
  51. });

  52. if ($(window).width() < 768) {
  53.    $(".placeholder-above").append( $(".placeholder-float").text() );
  54. }

  55. const links = document.querySelectorAll(".cta-btn a");

  56. for (const link of links) {
  57.   link.addEventListener("click", clickHandler);
  58. }

  59. function clickHandler(e) {
  60.   e.preventDefault();
  61.   const href = this.getAttribute("href");
  62.   const offsetTop = document.querySelector(href).offsetTop;
  63.   $("input[id$='input']").focus();
  64.   $(".guitar-service-address>span.placeholder-location").hide();
  65.   scroll({
  66.     top: offsetTop,
  67.     behavior: "smooth"
  68.   });
  69. }

  70. .container {
  71.   max-width: 990px;
  72. }

  73. .tab-placeholder {
  74.   display: none;
  75. }

  76. input[id="input"] {
  77.     width: 500px;
  78. }

  79. .guitar-service-address>span.placeholder-location {
  80.   position: absolute;
  81.   margin: 6px 8px;
  82.   color: #686e74;
  83.   cursor: auto;
  84.   font: Helvetica 15px/20px bold;
  85.   font-weight: bold;
  86.   z-index: 1;
  87. }

  88. .guitar-service-address>.placeholder-location>.font-alt {
  89.   color: #686e74;
  90.   font-weight: normal;
  91. }

  92.  input {
  93.   padding: 5px;
  94.   font-size: 11pt;
  95.   color: black;
  96.   border: 1px solid #979797; 
  97.   border-bottom: 4px solid #000;
  98. }

  99. .help-block {
  100.   font-size: 90%;
  101. }

  102. .test {
  103.   padding: 20px;
  104. }

  105. .section {
  106.   padding: 100px 20px;
  107. }

  108. #head {
  109.   background-color: #ddd;
  110.   padding: 10px 20px;
  111. }

  112. #ckav {
  113.   background-color: #d4d4d4;
  114. }

  115. #cta {
  116.   background-color: #fdfd4d;
  117. }

  118. @media (max-width: 768px) { 
  119.   input[id="input"] {
  120.     width: 300px;
  121.   }
  122.   span > .placeholder-float {
  123.    display: none; 
  124.   }
  125.   .tab-placeholder {
  126.    display: block;
  127.   }
  128. }