import { Link } from 'react-router-dom';
import { Container } from '@/components/Container'
import { Button } from '@/components/Button'
import { H3, P } from '@/components/Texts'

export function CallToAction() {
  return (
    <section className="relative overflow-hidden bg-[#121212]">
      {/* ✅ Top horizontal line with spacing */}
      <div className="max-w-7xl bg-[#121212] mx-auto py-6 border border-t-0 border-b-0 border-gray-800"></div>

      {/* === Content === */}
      <div className="w-full border-t border-l border-r border-gray-800" />

      <div
        id="get-started"
        className="py-18 max-w-7xl mx-auto border-t-0 border-b-0 border bg-[#111111] border-gray-800 relative overflow-hidden"
      >
        {/* ✅ Cyan Radial Glow */}
        <svg
          viewBox="0 0 1024 1024"
          aria-hidden="true"
          className="absolute top-full left-1/2 w-7xl h-320 -translate-x-1/2 -translate-y-1/2 mask-image mask-[radial-gradient(circle,white,transparent)]"
        >
          <circle
            r={512}
            cx={512}
            cy={512}
            fill="url(#mycelium-cyan-glow)"
            fillOpacity="0.2"
          />
          <defs>
            <radialGradient id="mycelium-cyan-glow">
              <stop stopColor="#00e5ff" />
              <stop offset="1" stopColor="transparent" />
            </radialGradient>
          </defs>
        </svg>

        <Container className="relative">
          <div className="mx-auto max-w-3xl text-center">
            <H3 className=" text-white ">
              Use the Mycelium Stack Your Way
            </H3>

            <P className="mt-6 leading-normal text-gray-300">
              Deploy infrastructure, run workloads, connect environments, and build distributed AI systems, all on one network designed for autonomy and control.
            </P>

            <P className="mt-4 leading-normal text-gray-300">
              Start wherever you are. Scale on your own terms.
            </P>

            <div className="mt-10 flex flex-wrap justify-center items-center gap-x-6 gap-y-4">
              <Button to="/network#download" variant="solid" color="cyan">
                Join the Network
              </Button>

              <Button
                as="a"
                to="https://myceliumcloud.tf"
                variant="outline"
                color="white"
                target="_blank"
                rel="noopener noreferrer"
              >
                Deploy in Cloud
              </Button>

              <Link to="/nodes" className="text-cyan-400 hover:text-cyan-300 transition-colors">
                Host a Node &rarr;
              </Link>
            </div>
          </div>
        </Container>
      </div>

      {/* ✅ Bottom horizontal line */}
      <div className="w-full border-b border-gray-800" />
      <div className="max-w-7xl bg-transparent mx-auto py-6 border border-t-0 border-b-0 border-gray-800"></div>
    </section>
  )
}
