<div class="bg-transparent py-24 mb-10 mt-10">
    <div class="mx-auto ring-1 shadow-2xl ring-black/5 py-12 rounded-2xl bg-white/5 max-w-7xl px-6 lg:flex lg:items-center lg:justify-between lg:px-20">
      <h2 id="blinking4" class="lg:text-balance text-left items-start lg:text-[6rem] text-[2.5rem] font-normal tracking-tight text-black fade-in">
        Own Your AI.  <br>Pre-Order<br>Now.
      </h2>
      <div  class="mt-10 flex items-center 0 gap-x-6 lg:mt-0 lg:shrink-0 flex-wrap justify-center lg:justify-start">
        <a  href="/" target="_blank" class="fade-in rounded-2xl bg-black px-4 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-gray-200 hover:text-gray-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 mb-4 lg:mb-0">
          Pre-order Now
        </a>
        <a href="/" class="text-sm/6 font-semibold text-gray-900">Learn more <span aria-hidden="true">→</span></a>
      </div>
      </div>
    </div>
</div>



<style>
  /* Initial state: elements are invisible */
.fade-in {
opacity: 0;
transition: opacity 1s ease-out;
}

/* State when element is in view */
.fade-in.visible {
opacity: 1;
}

</style>

<script>
  // Get all the elements that need to be faded in
  document.addEventListener('DOMContentLoaded', function() {
      const h2 = document.getElementById("blinking4");

      setInterval(() => {
          h2.style.opacity = (h2.style.opacity == "1") ? "0.3" : "1";
      }, 1000); // Blinks every 2 seconds
// Target all elements with the 'fade-in' class
const fadeInElements = document.querySelectorAll('.fade-in');

const observer = new IntersectionObserver((entries, observer) => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      // Add 'visible' class to the element when it's in view
      entry.target.classList.add('visible');
      observer.unobserve(entry.target); // Stop observing after it fades in
    }
  });
}, {
  threshold: 0.1 // Trigger when 10% of the element is in view
});

fadeInElements.forEach(element => {
  observer.observe(element);
});
});

</script>
