---
import "@/globals.css";
import "aos/dist/aos.css";

import MaxWidthWrapper from "@/components/other/max.width.wrapper";
import Navbar from "@/components/molecules/navbar";
import Footer from "@/components/molecules/footer.astro";
import Title from "@/components/atoms/title";
import GridPattern from "@/components/atoms/grid.pattern";
import { Button } from "@/components/ui/button";
import Stats from "@/components/Stats.astro";
import Testimonials from "@/components/Testimonials.astro";
import { cn } from "@/lib/utils";
import { CONTACT_LINK } from "@/lib/constants";
import {
    Wifi,
    Tv,
    PhoneCall,
    Shield,
    Zap,
    Globe,
    HeartHandshake,
    Headphones,
} from "lucide-react";
import CallNowDialog from "@/components/CallNowDialog";
import CallButton from "@/components/molecules/CallButton";

const page = "default";
---

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
        />

        <meta
            name="description"
            content="NetFundable - Your trusted source for the best telecom deals. We connect you with top providers including Spectrum, Optimum, and DirectTV to bring you unbeatable offers on Internet, TV, and Phone services."
        />
        <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
        <title>NetFundable - Connecting You to the Best Telecom Deals</title>
    </head>
    <body>
        <Navbar client:load variant="lime" page={page} />
        <CallNowDialog client:load page={page} />

        <!-- Hero Section with Animation -->
        <div class="flex flex-col gap-8 w-screen">
            <div
                class="min-h-screen h-full w-full bg-lime-900 pt-32 grid place-items-center pb-32 md:pb-0 relative overflow-hidden"
            >
                <GridPattern
                    width={30}
                    height={30}
                    x={-1}
                    y={-1}
                    strokeDasharray={"4 2"}
                    className={cn(
                        "[mask-image:radial-gradient(80vw_circle_at_center,white,transparent)] absolute inset-0",
                    )}
                />
                <MaxWidthWrapper
                    className="grid h-full w-full grid-cols-1 place-items-center md:grid-cols-2 gap-20 lg:gap-8 pb-24 md:pb-0 z-10"
                >
                    <div
                        class="flex flex-col gap-8 w-full"
                        data-aos="zoom-in"
                        data-aos-duration="400"
                    >
                        <div
                            class="flex flex-col gap-2 self-center max-w-md md:max-w-none"
                        >
                            <h6 class="font-semibold text-lime-400 text-lg">
                                YOUR TRUSTED TELECOM CONNECTION PARTNER
                            </h6>
                            <Title
                                title="Get the Best Deals on Internet, TV & Phone Services"
                                color="white"
                                size="h1"
                            />
                            <p class="text-lime-100 mt-2">
                                We connect you with top providers at exclusive
                                rates. No contracts, no hidden fees, and
                                personalized service.
                            </p>
                        </div>
                        <div class="flex flex-col sm:flex-row gap-4">
                            <a href={CONTACT_LINK}>
                                <Button
                                    size={"lg"}
                                    className="w-full sm:w-max"
                                    variant="lime"
                                >
                                    Call Now
                                </Button>
                            </a>
                            <a href={"#our-partners"}>
                                <Button
                                    size={"lg"}
                                    className="w-full sm:w-max"
                                    variant={"muted"}
                                >
                                    View Providers
                                </Button>
                            </a>
                        </div>
                    </div>
                    <img
                        src="/assets/hero-image.png"
                        alt="NetFundable services illustration"
                        class="w-full h-full object-contain max-w-lg lg:max-w-none"
                        width={300}
                        height={500}
                        data-aos="fade-up"
                        data-aos-duration="500"
                    />
                </MaxWidthWrapper>

                <!-- Wave divider -->
                <div class="absolute bottom-0 left-0 w-full">
                    <svg
                        xmlns="http://www.w3.org/2000/svg"
                        viewBox="0 0 1440 320"
                        class="w-full h-auto"
                    >
                        <path
                            fill="#ffffff"
                            fill-opacity="1"
                            d="M0,128L48,144C96,160,192,192,288,197.3C384,203,480,181,576,170.7C672,160,768,160,864,170.7C960,181,1056,203,1152,197.3C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"
                        ></path>
                    </svg>
                </div>
            </div>
        </div>

        <!-- About Section -->
        <MaxWidthWrapper id="about" className="py-24">
            <div class="grid grid-cols-1 md:grid-cols-2 gap-16 items-center">
                <div data-aos="fade-right" data-aos-duration="500">
                    <img
                        src="/assets/about-image.png"
                        alt="About NetFundable"
                        class="rounded-lg w-full h-auto"
                    />
                </div>
                <div
                    class="flex flex-col gap-6"
                    data-aos="fade-left"
                    data-aos-duration="500"
                >
                    <span class="text-lime-600 font-semibold">ABOUT US</span>
                    <Title
                        title="Your Connection to Better Telecom Deals"
                        size="h2"
                        color="primary"
                    />
                    <p class="text-gray-700 text-lg">
                        At NetFundable, we simplify the complex world of
                        telecommunications by connecting consumers with the
                        perfect services at the best possible rates.
                    </p>
                    <p class="text-gray-700">
                        As authorized retailers for leading providers like
                        Spectrum, Optimum, and DirectTV, we leverage our
                        industry relationships to secure exclusive deals you
                        won't find elsewhere. Our mission is to ensure you get
                        the most value for your money while enjoying top-quality
                        service.
                    </p>
                    <div class="grid grid-cols-2 gap-4 mt-4">
                        <div class="flex items-center gap-2">
                            <div class="bg-lime-100 p-2 rounded-full">
                                <HeartHandshake
                                    size={20}
                                    className="text-lime-600"
                                />
                            </div>
                            <span class="font-medium">8+ Years Experience</span>
                        </div>
                        <div class="flex items-center gap-2">
                            <div class="bg-lime-100 p-2 rounded-full">
                                <Headphones
                                    size={20}
                                    className="text-lime-600"
                                />
                            </div>
                            <span class="font-medium">Expert Support</span>
                        </div>
                        <div class="flex items-center gap-2">
                            <div class="bg-lime-100 p-2 rounded-full">
                                <Zap size={20} className="text-lime-600" />
                            </div>
                            <span class="font-medium">Fast Connection</span>
                        </div>
                        <div class="flex items-center gap-2">
                            <div class="bg-lime-100 p-2 rounded-full">
                                <Globe size={20} className="text-lime-600" />
                            </div>
                            <span class="font-medium">Nationwide Coverage</span>
                        </div>
                    </div>
                </div>
            </div>
        </MaxWidthWrapper>

        <!-- Services Section -->
        <div class="bg-lime-50 py-24">
            <MaxWidthWrapper id="services">
                <div class="text-center mb-16">
                    <span class="text-lime-600 font-semibold">OUR SERVICES</span
                    >
                    <Title
                        title="Comprehensive Telecom Solutions"
                        size="h2"
                        color="primary"
                    />
                    <p class="max-w-2xl mx-auto mt-4 text-gray-700">
                        We offer a complete range of telecommunication services
                        to meet all your connectivity and entertainment needs.
                    </p>
                </div>

                <div
                    class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8"
                >
                    <div
                        class="bg-white p-8 rounded-xl shadow-sm border border-gray-100 flex flex-col items-center text-center"
                        data-aos="fade-up"
                        data-aos-duration="400"
                    >
                        <div class="bg-lime-100 p-4 rounded-full mb-4">
                            <Wifi className="h-8 w-8 text-lime-600" />
                        </div>
                        <h3 class="text-xl font-bold mb-2">
                            High-Speed Internet
                        </h3>
                        <p class="text-gray-600">
                            Blazing-fast fiber and cable internet options with
                            speeds up to 1 Gbps for seamless streaming, gaming,
                            and browsing.
                        </p>
                    </div>

                    <div
                        class="bg-white p-8 rounded-xl shadow-sm border border-gray-100 flex flex-col items-center text-center"
                        data-aos="fade-up"
                        data-aos-duration="500"
                    >
                        <div class="bg-lime-100 p-4 rounded-full mb-4">
                            <Tv className="h-8 w-8 text-lime-600" />
                        </div>
                        <h3 class="text-xl font-bold mb-2">
                            Premium TV Packages
                        </h3>
                        <p class="text-gray-600">
                            Access to hundreds of HD channels, exclusive sports
                            content, and on-demand entertainment from top
                            providers.
                        </p>
                    </div>

                    <div
                        class="bg-white p-8 rounded-xl shadow-sm border border-gray-100 flex flex-col items-center text-center"
                        data-aos="fade-up"
                        data-aos-duration="600"
                    >
                        <div class="bg-lime-100 p-4 rounded-full mb-4">
                            <PhoneCall className="h-8 w-8 text-lime-600" />
                        </div>
                        <h3 class="text-xl font-bold mb-2">Voice Services</h3>
                        <p class="text-gray-600">
                            Reliable home phone service with crystal-clear
                            calling, voicemail, and dozens of features at
                            competitive rates.
                        </p>
                    </div>

                    <div
                        class="bg-white p-8 rounded-xl shadow-sm border border-gray-100 flex flex-col items-center text-center"
                        data-aos="fade-up"
                        data-aos-duration="700"
                    >
                        <div class="bg-lime-100 p-4 rounded-full mb-4">
                            <Shield className="h-8 w-8 text-lime-600" />
                        </div>
                        <h3 class="text-xl font-bold mb-2">
                            Security Solutions
                        </h3>
                        <p class="text-gray-600">
                            Protect your digital life with advanced network
                            security, parental controls, and identity protection
                            services.
                        </p>
                    </div>
                </div>

                <div class="text-center mt-12">
                    <a href={CONTACT_LINK}>
                        <Button variant="lime" size="lg">
                            Explore All Services
                        </Button>
                    </a>
                </div>
            </MaxWidthWrapper>
        </div>

        <!-- Stats Section -->
        <div class="py-24">
            <Stats />
        </div>

        <!-- Provider Highlights -->
        <MaxWidthWrapper className="py-24" id="packages">
            <div class="text-center mb-16">
                <span class="text-lime-600 font-semibold">
                    FEATURED PROVIDERS
                </span>
                <Title
                    title="Exclusive Offers from Top Providers"
                    size="h2"
                    color="primary"
                />
                <p class="max-w-2xl mx-auto mt-4 text-gray-700">
                    Discover our hand-picked selection of the best telecom deals
                    currently available.
                </p>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
                <!-- Spectrum Card -->
                <div
                    class="bg-white rounded-xl overflow-hidden shadow-md border border-gray-200"
                    data-aos="fade-up"
                    data-aos-duration="400"
                >
                    <div
                        class="h-48 bg-white flex items-center justify-center p-8"
                    >
                        <img
                            src="/assets/spectrum.png"
                            alt="Spectrum"
                            class="h-20 w-auto object-contain"
                        />
                    </div>
                    <div class="p-6">
                        <p class="text-gray-600 mb-4">
                            High-speed internet with no data caps, HD TV with
                            free DVR service, and reliable home phone.
                        </p>
                        <ul class="space-y-2 mb-6">
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-lime-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-lime-600"
                                    >
                                    </div>
                                </div>
                                <span>Internet speeds up to 1 Gbps</span>
                            </li>
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-lime-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-lime-600"
                                    >
                                    </div>
                                </div>
                                <span>125+ HD channels</span>
                            </li>
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-lime-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-lime-600"
                                    >
                                    </div>
                                </div>
                                <span>No contracts required</span>
                            </li>
                        </ul>
                        <a href="/spectrum">
                            <Button variant="lime">View Spectrum Deals</Button>
                        </a>
                    </div>
                </div>

                <!-- Optimum Card -->
                <div
                    class="bg-white rounded-xl overflow-hidden shadow-md border border-gray-200"
                    data-aos="fade-up"
                    data-aos-duration="500"
                >
                    <div
                        class="h-48 bg-white flex items-center justify-center p-8"
                    >
                        <img
                            src="/assets/optimum.png"
                            alt="Optimum"
                            class="h-20 w-auto object-contain"
                        />
                    </div>
                    <div class="p-6">
                        <p class="text-gray-600 mb-4">
                            Fiber internet, crystal-clear TV service, and mobile
                            plans with nationwide coverage.
                        </p>
                        <ul class="space-y-2 mb-6">
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-amber-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-amber-600"
                                    >
                                    </div>
                                </div>
                                <span>Fiber internet up to 1 Gig</span>
                            </li>
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-amber-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-amber-600"
                                    >
                                    </div>
                                </div>
                                <span>Free WiFi 6 equipment</span>
                            </li>
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-amber-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-amber-600"
                                    >
                                    </div>
                                </div>
                                <span>12-month price guarantee</span>
                            </li>
                        </ul>
                        <a href="/optimum">
                            <Button variant="lime" class="w-full"
                                >View Optimum Deals</Button
                            >
                        </a>
                    </div>
                </div>

                <!-- Verizon Card -->
                <div
                    class="bg-white rounded-xl overflow-hidden shadow-md border border-gray-200"
                    data-aos="fade-up"
                    data-aos-duration="600"
                >
                    <div
                        class="h-48 bg-white flex items-center justify-center p-8"
                    >
                        <img
                            src="/assets/verizon.png"
                            alt="Verizon"
                            class="h-20 w-auto object-contain"
                        />
                    </div>
                    <div class="p-6">
                        <p class="text-gray-600 mb-4">
                            Fiber internet, TV, and phone service with
                            nationwide coverage.
                        </p>
                        <ul class="space-y-2 mb-6">
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-amber-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-amber-600"
                                    >
                                    </div>
                                </div>
                                <span>Fiber internet up to 1 Gig</span>
                            </li>
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-amber-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-amber-600"
                                    >
                                    </div>
                                </div>
                                <span>Free WiFi 6 equipment</span>
                            </li>
                            <li class="flex items-center gap-2">
                                <div
                                    class="h-5 w-5 rounded-full bg-amber-100 flex items-center justify-center"
                                >
                                    <div
                                        class="h-2.5 w-2.5 rounded-full bg-amber-600"
                                    >
                                    </div>
                                </div>
                                <span>12-month price guarantee</span>
                            </li>
                        </ul>
                        <a href="/verizon">
                            <Button variant="lime">View Verizon Deals</Button>
                        </a>
                    </div>
                </div>
            </div>
        </MaxWidthWrapper>

        <!-- Testimonials Section -->
        <div class="py-24 bg-gray-50">
            <Testimonials
                variant="lime"
                testimonials={[
                    {
                        name: "Michael T.",
                        image: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?q=80&w=2787&auto=format&fit=crop",
                        stars: 5,
                        review: "NetFundable made switching providers so easy. They found me a Spectrum package that saved me over $40 a month compared to my previous provider, and the installation was completely hassle-free.",
                    },
                    {
                        name: "Jessica L.",
                        image: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?q=80&w=2787&auto=format&fit=crop",
                        stars: 5,
                        review: "I was overwhelmed by all the options until I called NetFundable. Their representative took the time to understand my needs and recommended the perfect Optimum package for my family. Couldn't be happier!",
                    },
                    {
                        name: "Robert K.",
                        image: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?q=80&w=3387&auto=format&fit=crop",
                        stars: 5,
                        review: "After my frustrating experience dealing directly with providers, working with NetFundable was a breath of fresh air. They handled everything from finding the best deal to coordinating installation. Truly excellent service.",
                    },
                ]}
            />
        </div>

        <!-- CTA Section -->
        <div class="bg-lime-900 py-20">
            <MaxWidthWrapper>
                <div class="text-center">
                    <Title
                        title="Ready to get connected?"
                        size="h2"
                        color="white"
                    />
                    <p class="text-lime-100 mt-4 mb-8 max-w-2xl mx-auto">
                        Speak with our telecom experts today and discover the
                        perfect package for your home at the best possible
                        price. No obligation, just honest advice.
                    </p>

                    <div class="flex flex-col sm:flex-row gap-4 justify-center">
                        <CallButton
                            client:load
                            variant="lime"
                            fullWidth={false}
                            text="Call Now For Exclusive Deals"
                            page={page}
                        />
                        <a href="#our-partners">
                            <Button
                                variant="muted"
                                size="lg"
                                className="w-full sm:w-auto"
                            >
                                Browse Providers
                            </Button>
                        </a>
                    </div>

                    <p class="text-lime-200 mt-6">
                        No contracts • 30-day money-back guarantee • Local
                        support
                    </p>
                </div>
            </MaxWidthWrapper>
        </div>

        <!-- FAQ Section -->
        <MaxWidthWrapper className="py-24">
            <div class="text-center mb-16">
                <span class="text-lime-600 font-semibold"
                    >FREQUENTLY ASKED QUESTIONS</span
                >
                <Title
                    title="Common Questions About Our Services"
                    size="h2"
                    color="primary"
                />
            </div>

            <div class="max-w-3xl mx-auto divide-y divide-gray-200">
                <div class="py-6" data-aos="fade-up" data-aos-duration="300">
                    <h3 class="text-lg font-medium text-gray-900">
                        How does NetFundable work?
                    </h3>
                    <p class="mt-2 text-gray-600">
                        We're authorized retailers for major telecom providers,
                        allowing us to offer their services at special rates. We
                        handle everything from recommending the best package to
                        coordinating installation, acting as your personal
                        telecom concierge.
                    </p>
                </div>
                <div class="py-6" data-aos="fade-up" data-aos-duration="400">
                    <h3 class="text-lg font-medium text-gray-900">
                        Are there any fees for using NetFundable's services?
                    </h3>
                    <p class="mt-2 text-gray-600">
                        No! Our service is completely free for customers. We're
                        compensated by the providers we partner with, so there's
                        never any additional cost to you for working with us.
                    </p>
                </div>
                <div class="py-6" data-aos="fade-up" data-aos-duration="500">
                    <h3 class="text-lg font-medium text-gray-900">
                        What areas do you service?
                    </h3>
                    <p class="mt-2 text-gray-600">
                        We currently offer services in most states across the
                        U.S. through our partnerships with national and regional
                        providers. Contact us with your address, and we'll
                        confirm availability in your specific location.
                    </p>
                </div>
                <div class="py-6" data-aos="fade-up" data-aos-duration="600">
                    <h3 class="text-lg font-medium text-gray-900">
                        Can I bundle multiple services?
                    </h3>
                    <p class="mt-2 text-gray-600">
                        Absolutely! Bundling internet, TV, phone, or mobile
                        services often provides the best value. Our experts can
                        recommend the ideal bundle based on your usage patterns
                        and preferences.
                    </p>
                </div>
                <div class="py-6" data-aos="fade-up" data-aos-duration="700">
                    <h3 class="text-lg font-medium text-gray-900">
                        What happens after I place an order?
                    </h3>
                    <p class="mt-2 text-gray-600">
                        Once you select a package, we'll coordinate with the
                        provider to schedule installation or activation. We'll
                        keep you updated throughout the process and remain
                        available for any questions even after your service is
                        active.
                    </p>
                </div>
            </div>
        </MaxWidthWrapper>

        <Footer variant="lime" page={page} />
    </body>
</html>

<script>
    import AOS from "aos";

    AOS.init({
        duration: 800,
        easing: "ease-in-out",
        once: true,
        startEvent: "DOMContentLoaded",
        disableMutationObserver: false,
        // Fix for width issue
        disable: false,
        mirror: false,
        // These are the critical parameters for the width issue
        useClassNames: true,
        initClassName: "aos-init",
        animatedClassName: "aos-animate",
    });

    // Force viewport refresh
    document.addEventListener("DOMContentLoaded", () => {
        // Force a layout recalculation
        document.body.style.width = "100vw";
        document.body.offsetHeight;
        document.body.style.width = "";

        // Refresh AOS
        AOS.refresh();
    });
</script>
