"use client";

import { useInView } from "@/hooks/use-in-view";
import { AccordionItem } from "@/components/ui/accordion";

const faqs = [
  {
    question: "Is this real? You actually generate electricity from human waste?",
    answer:
      "Absolutely. The process is called anaerobic digestion — a well-established technology used in wastewater treatment plants worldwide. Microorganisms break down organic waste in oxygen-free environments, producing biogas (primarily methane). We capture this biogas and run it through micro-generators to produce clean electricity. The science has been proven for decades; we just engineered it to be portable, scalable, and festival-ready.",
  },
  {
    question: "How safe is this technology?",
    answer:
      "Extremely safe. Our bioreactors are fully sealed, automated systems that meet all EPA, OSHA, and local health department requirements. Waste is contained in closed tanks, biogas is processed through industrial-grade safety filters, and the electricity output is clean, regulated power. The entire system produces fewer emissions and less noise than the diesel generators it replaces.",
  },
  {
    question: "How much power can you actually generate?",
    answer:
      "It depends on the festival size, but a typical 5,000-person weekend festival generates enough waste to power roughly 200-300 kWh — that's enough for main stage lighting, sound for smaller stages, food vendor equipment, and phone charging stations. Larger festivals (10K+) can generate megawatt-scale power.",
  },
  {
    question: "What happens to the waste after the festival?",
    answer:
      "After biogas extraction, the remaining digestate is a nutrient-rich, pathogen-reduced material that's processed into agricultural fertilizer. Nothing goes to landfill. It's a true circular economy — festival-goers eat, drink, use the facilities, and the output powers the party and feeds next season's crops.",
  },
  {
    question: "Do your porta potties actually look and smell better?",
    answer:
      "Way better. Because waste is continuously processed (not just sitting in a tank), odor is dramatically reduced. Our units feature active ventilation, hands-free flushing, LED lighting, phone charging ports, and are cleaned on regular rotation by our on-site team. Festival-goers consistently rate them 4.8/5 stars. Yes, we survey people about toilets.",
  },
  {
    question: "How far in advance do we need to book?",
    answer:
      "We recommend booking at least 3-6 months ahead for large festivals (5K+ attendees) to ensure equipment availability and proper planning. Smaller events can sometimes be accommodated with 4-6 weeks notice. Contact us early — festival season fills up fast, and our poop-powered units are in high demand.",
  },
];

export function FAQSection() {
  const { ref, isInView } = useInView(0.1);

  return (
    <section id="faq" className="py-24 px-4" ref={ref}>
      <div className="mx-auto max-w-3xl">
        <div className="text-center mb-16">
          <h2
            className={`text-3xl sm:text-4xl md:text-5xl font-bold mb-4 ${
              isInView ? "animate-fade-in-up" : "opacity-0"
            }`}
          >
            Frequently <span className="text-neon">Asked</span> Questions
          </h2>
          <p
            className={`text-cream-dim text-lg max-w-2xl mx-auto ${
              isInView ? "animate-fade-in-up" : "opacity-0"
            }`}
            style={{ animationDelay: "0.1s" }}
          >
            The questions everyone asks (and a few they&apos;re too polite to).
          </p>
        </div>

        <div
          className={`${isInView ? "animate-fade-in-up" : "opacity-0"}`}
          style={{ animationDelay: "0.2s" }}
        >
          {faqs.map((faq, index) => (
            <AccordionItem
              key={index}
              title={faq.question}
              defaultOpen={index === 0}
            >
              {faq.answer}
            </AccordionItem>
          ))}
        </div>
      </div>
    </section>
  );
}
