"use client";

import { motion } from "framer-motion";
import DNAHeroBackground from "./components/canvas/DNAHeroBackground";
import Navbar from "./components/layout/Navbar";
import AIVoiceSoap from "./components/sections/AIVoiceSoap";
import AIDiagnosis from "./components/sections/AIDiagnosis";
// import AIPrescription from "./components/sections/AIPrescription";
import DeviceShowcase from "./components/sections/DeviceShowcase";
// import TelehealthSolutions from "./components/sections/TelehealthSolutions";
import AppEcosystem from "./components/sections/AppEcosystem";
import Footer from "./components/layout/Footer";
import { ArrowRight, Sparkles } from "lucide-react";

export default function Home() {
  return (
    <div className="relative min-h-screen bg-black overflow-hidden isolate">
      {/* DNA Background – placed first with negative z-index so it's behind everything */}
      <div className="absolute inset-0 z-[-1]">
        <DNAHeroBackground />
      </div>

      {/* Navbar – should be above background */}
      <div className="relative z-50">
        <Navbar />
      </div>

      <main className="relative z-10">
        {/* Hero Section */}
        <section className="min-h-screen flex flex-col items-center justify-center text-center px-5 sm:px-8 md:px-12 lg:px-16 pt-16 sm:pt-20 md:pt-24">
          <motion.div
            initial={{ opacity: 0, y: 40 }}
            animate={{ opacity: 1, y: 0 }}
            transition={{ duration: 1.1, ease: [0.22, 1, 0.36, 1] }}
            className="w-full max-w-screen-2xl mx-auto px-4 sm:px-6 lg:px-8 space-y-10 md:space-y-14 lg:space-y-16 xl:space-y-20 2xl:space-y-24"
          >
            <h1
              className={`
                text-5xl sm:text-6xl md:text-7xl lg:text-[6.5rem] xl:text-[8rem] 2xl:text-[9.5rem]
                font-extrabold tracking-tighter leading-[0.85] sm:leading-[0.82] md:leading-[0.8]
                text-white
              `}
            >
              Institutional <br className="sm:hidden" />
              Healthcare{" "}
              <span className="text-zinc-500 italic uppercase">AI</span>
            </h1>

            <p
              className={`
                text-lg sm:text-xl md:text-2xl lg:text-2.5xl xl:text-3xl
                text-zinc-400 max-w-3xl lg:max-w-4xl xl:max-w-5xl 2xl:max-w-6xl
                mx-auto leading-tight sm:leading-snug md:leading-relaxed
                font-medium tracking-tight
              `}
            >
              A zero-compromise clinical infrastructure.
              <br className="hidden sm:inline" />
              Precision diagnostic models, automated clinical notes, and hyper-secure data layers.
            </p>

            <div className="flex flex-col sm:flex-row items-center justify-center gap-5 sm:gap-6 md:gap-8 pt-6 sm:pt-8 md:pt-10">
              <button
                className={`
                  group bg-white text-black 
                  px-8 sm:px-10 md:px-12 lg:px-14 
                  py-4 sm:py-5 md:py-6 
                  rounded-2xl 
                  text-base sm:text-lg md:text-xl lg:text-2xl 
                  font-black transition-all duration-300
                  hover:scale-105 active:scale-95 shadow-2xl
                  flex items-center gap-3 sm:gap-4
                  border border-white/10
                `}
              >
                Book a Demo
                <ArrowRight className="w-5 h-5 sm:w-6 sm:h-6 group-hover:translate-x-2 transition-transform duration-300" />
              </button>

              <button
                className={`
                  px-8 sm:px-10 md:px-12 lg:px-14 
                  py-4 sm:py-5 md:py-6 
                  rounded-2xl 
                  text-base sm:text-lg md:text-xl lg:text-2xl 
                  font-black 
                  bg-white/5 backdrop-blur-md border border-white/10
                  hover:bg-white/10 transition-all duration-300 shadow-xl
                `}
              >
                Technical Deck
              </button>
            </div>
          </motion.div>

          {/* Subtle bottom fade to blend into sections */}
          <div className="absolute bottom-0 left-0 right-0 h-48 sm:h-64 md:h-80 bg-gradient-to-t from-black to-transparent pointer-events-none z-20" />
        </section>

        {/* Content sections with progressive spacing */}
        <div className="relative space-y-24 sm:space-y-32 md:space-y-40 lg:space-y-48 xl:space-y-56 2xl:space-y-64 pb-24 sm:pb-32 md:pb-40 lg:pb-48 xl:pb-56">
          <AIVoiceSoap />
          <DeviceShowcase />
          <AIDiagnosis />
          {/* <TelehealthSolutions /> */}
          {/* <AIPrescription /> */}
          <AppEcosystem />
        </div>

        <Footer />
      </main>
    </div>
  );
}