import Link from "next/link"
import { Button } from "@/components/ui/button"
import { Card, CardContent } from "@/components/ui/card"
import { Separator } from "@/components/ui/separator"
import { ArrowLeft, Shield, Lock } from "lucide-react"

export const metadata = {
  title: "HIPAA Notice - Factor Sciences",
  description: "HIPAA Notice of Privacy Practices for Factor Sciences digital telehealth services"
}

export default function HIPAANotice() {
  return (
    <div className="min-h-screen bg-background">
      {/* Header */}
      <header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
        <div className="container flex h-16 items-center max-w-6xl mx-auto px-4">
          <Button asChild variant="ghost" size="sm">
            <Link href="/" className="gap-2">
              <ArrowLeft className="size-4" />
              Back to Home
            </Link>
          </Button>
        </div>
      </header>

      {/* Content */}
      <main className="py-12 md:py-20">
        <div className="container max-w-4xl mx-auto px-4">
          {/* Hero */}
          <div className="text-center mb-12">
            <div className="inline-flex items-center gap-2 text-primary mb-4">
              <Shield className="size-6 icon-glow-primary" />
            </div>
            <h1 className="text-4xl md:text-5xl font-bold tracking-tight text-foreground mb-4 font-[family-name:var(--font-display)]">
              HIPAA Notice of Privacy Practices
            </h1>
            <p className="text-muted-foreground">
              Last Updated: December 30, 2024
            </p>
          </div>

          {/* Content Card */}
          <Card className="shadow-elevated border-gradient">
            <CardContent className="pt-8 pb-8">
              <div className="prose prose-sm max-w-none text-foreground space-y-8">

                {/* Notice Header */}
                <div className="p-5 bg-primary/5 border-l-4 border-l-primary rounded-r-lg">
                  <p className="text-sm font-semibold text-foreground mb-2">THIS NOTICE DESCRIBES:</p>
                  <p className="text-sm text-muted-foreground">
                    How medical information about you may be used and disclosed and how you can get access to this information.
                    <strong className="text-foreground block mt-2">PLEASE REVIEW IT CAREFULLY.</strong>
                  </p>
                </div>

                {/* Introduction */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">Introduction</h2>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    Factor Sciences ("we," "us," "our," or "Company") is committed to protecting the privacy and security of your
                    health information. This Notice of Privacy Practices describes how we may use and disclose your Protected Health
                    Information (PHI) to carry out treatment, payment, or healthcare operations, and for other purposes permitted or
                    required by law.
                  </p>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    This notice also describes your rights regarding your health information and our legal duties concerning that
                    information. We are required by the Health Insurance Portability and Accountability Act of 1996 (HIPAA) and other
                    applicable laws to maintain the privacy of your PHI and to provide you with this notice.
                  </p>
                  <p className="text-muted-foreground leading-relaxed">
                    <strong className="text-foreground">Effective Date:</strong> This notice is effective as of December 30, 2024,
                    and applies to all Protected Health Information created or received by Factor Sciences.
                  </p>
                </section>

                <Separator />

                {/* Section 1 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">1. What is Protected Health Information (PHI)?</h2>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    Protected Health Information means individually identifiable health information that we create, receive, maintain,
                    or transmit in connection with providing healthcare services. This includes:
                  </p>
                  <ul className="space-y-2 text-muted-foreground ml-6">
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Information about your past, present, or future physical or mental health conditions</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Information about healthcare services provided to you</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Information about payment for healthcare services</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Information that identifies you or could reasonably be used to identify you (name, address, date of birth, etc.)</span>
                    </li>
                  </ul>
                </section>

                <Separator />

                {/* Section 2 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">2. How We May Use and Disclose Your PHI</h2>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">2.1 Treatment</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    We may use and disclose your PHI to provide, coordinate, or manage healthcare services. This includes consultations
                    with healthcare providers through our platform, sharing information with specialists for referrals, and coordinating
                    care with other healthcare professionals involved in your treatment.
                  </p>
                  <p className="text-muted-foreground leading-relaxed mb-3">
                    <strong className="text-foreground">Examples:</strong>
                  </p>
                  <ul className="space-y-2 text-muted-foreground ml-6 mb-4">
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Sharing your medical history with a healthcare provider during a telehealth consultation</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Sending consultation notes to your primary care physician with your authorization</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Coordinating care recommendations with other members of your healthcare team</span>
                    </li>
                  </ul>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">2.2 Payment</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    We may use and disclose your PHI to bill and collect payment for services provided. This includes submitting claims
                    to insurance companies, verifying coverage, and processing payments.
                  </p>
                  <p className="text-muted-foreground leading-relaxed mb-3">
                    <strong className="text-foreground">Examples:</strong>
                  </p>
                  <ul className="space-y-2 text-muted-foreground ml-6 mb-4">
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Processing credit card payments for consultation services</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Providing billing statements and transaction records</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Sharing information with payment processors for transaction verification</span>
                    </li>
                  </ul>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">2.3 Healthcare Operations</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    We may use and disclose your PHI for our healthcare operations, which include quality improvement, provider
                    credentialing, business planning, and other administrative activities necessary to run our platform and ensure
                    high-quality care.
                  </p>
                  <p className="text-muted-foreground leading-relaxed mb-3">
                    <strong className="text-foreground">Examples:</strong>
                  </p>
                  <ul className="space-y-2 text-muted-foreground ml-6">
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Quality assessment and improvement activities</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Training healthcare professionals and administrative staff</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Reviewing provider performance and patient satisfaction</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Business planning and development activities</span>
                    </li>
                  </ul>
                </section>

                <Separator />

                {/* Section 3 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">3. Other Permitted and Required Uses and Disclosures</h2>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    We may also use or disclose your PHI without your written authorization in the following circumstances:
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">3.1 As Required by Law</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    We will disclose PHI when required by federal, state, or local law, including in response to court orders,
                    subpoenas, or administrative requests from government agencies.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">3.2 Public Health and Safety</h3>
                  <ul className="space-y-2 text-muted-foreground ml-6 mb-4">
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Reporting to public health authorities for disease prevention and control</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Reporting suspected abuse, neglect, or domestic violence as required by law</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Preventing or lessening a serious threat to health or safety</span>
                    </li>
                  </ul>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">3.3 Health Oversight Activities</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    Disclosures to health oversight agencies for activities authorized by law, such as audits, investigations,
                    inspections, and licensure activities.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">3.4 Legal Proceedings</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    Disclosures in response to court orders, subpoenas, discovery requests, or other lawful processes in connection
                    with legal proceedings.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">3.5 Law Enforcement</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    Limited disclosures to law enforcement officials as required by law or in response to valid legal requests,
                    such as identifying suspects, locating missing persons, or reporting crimes.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">3.6 Coroners and Medical Examiners</h3>
                  <p className="text-muted-foreground leading-relaxed">
                    Disclosures to coroners, medical examiners, or funeral directors as necessary to carry out their duties.
                  </p>
                </section>

                <Separator />

                {/* Section 4 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">4. Uses and Disclosures Requiring Your Authorization</h2>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    Other uses and disclosures of your PHI not covered by this notice or permitted by law will be made only with your
                    written authorization. You have the right to revoke any authorization at any time by submitting a written notice,
                    except to the extent we have already acted in reliance on your authorization.
                  </p>
                  <p className="text-muted-foreground leading-relaxed mb-3">
                    <strong className="text-foreground">Examples requiring authorization:</strong>
                  </p>
                  <ul className="space-y-2 text-muted-foreground ml-6">
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Marketing communications (other than treatment communications)</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Sale of PHI</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Most uses and disclosures of psychotherapy notes</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Sharing information with family members or friends (unless you have verbally agreed or in emergency situations)</span>
                    </li>
                  </ul>
                </section>

                <Separator />

                {/* Section 5 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">5. Your Rights Regarding Your PHI</h2>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    You have the following rights regarding your Protected Health Information:
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">5.1 Right to Access</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    You have the right to inspect and obtain a copy of your PHI maintained in our records. To request access, submit
                    a written request to our Privacy Officer. We may charge a reasonable fee for copying and mailing costs. We will
                    respond to your request within 30 days.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">5.2 Right to Amend</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    If you believe information in your record is incorrect or incomplete, you may request an amendment. We may deny
                    your request in certain circumstances, such as if the information was not created by us or if it is already
                    accurate and complete. If denied, you have the right to submit a statement of disagreement.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">5.3 Right to an Accounting of Disclosures</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    You have the right to request an accounting of certain disclosures of your PHI made by us during the six years
                    prior to your request. This does not include disclosures for treatment, payment, healthcare operations, or
                    disclosures you authorized.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">5.4 Right to Request Restrictions</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    You have the right to request restrictions on certain uses and disclosures of your PHI. We are not required to
                    agree to your request except in limited circumstances (e.g., you paid out-of-pocket in full and request we not
                    disclose to your health plan). If we agree, we will comply with your request unless the information is needed
                    for emergency treatment.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">5.5 Right to Request Confidential Communications</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    You have the right to request that we communicate with you about your health information by alternative means or
                    at alternative locations (e.g., by mail instead of phone, at a work address instead of home). We will accommodate
                    reasonable requests.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">5.6 Right to a Paper Copy of This Notice</h3>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    You have the right to obtain a paper copy of this Notice at any time, even if you have agreed to receive it
                    electronically. You may request a copy from our Privacy Officer or download it from our website.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">5.7 Right to Breach Notification</h3>
                  <p className="text-muted-foreground leading-relaxed">
                    You have the right to be notified in the event of a breach of your unsecured PHI. We will notify you without
                    unreasonable delay and no later than 60 days after discovering a breach.
                  </p>
                </section>

                <Separator />

                {/* Section 6 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">6. Our Responsibilities</h2>
                  <p className="text-muted-foreground leading-relaxed mb-3">
                    We are required by law to:
                  </p>
                  <ul className="space-y-2 text-muted-foreground ml-6">
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Maintain the privacy and security of your Protected Health Information</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Provide you with this Notice of our legal duties and privacy practices</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Follow the terms of the Notice currently in effect</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Notify you if we are unable to agree to a requested restriction</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Accommodate reasonable requests for confidential communications</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Notify you of breaches of unsecured PHI</span>
                    </li>
                  </ul>
                </section>

                <Separator />

                {/* Section 7 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">7. Changes to This Notice</h2>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    We reserve the right to change the terms of this Notice at any time. Any changes will apply to all PHI we maintain,
                    including information created or received before the change. When we make a material change to our privacy practices,
                    we will:
                  </p>
                  <ul className="space-y-2 text-muted-foreground ml-6 mb-4">
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Post the updated Notice on our website with a new effective date</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Make copies available at our offices and upon request</span>
                    </li>
                    <li className="flex items-start gap-2">
                      <span className="text-primary mt-1">•</span>
                      <span>Notify you of material changes via email or platform notification</span>
                    </li>
                  </ul>
                  <p className="text-muted-foreground leading-relaxed">
                    The current Notice will always be available on our website at www.factorysciences.com/hipaa or by contacting
                    our Privacy Officer.
                  </p>
                </section>

                <Separator />

                {/* Section 8 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">8. Complaints</h2>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    If you believe your privacy rights have been violated, you may file a complaint with Factor Sciences or with
                    the U.S. Department of Health and Human Services (HHS). You will not be retaliated against for filing a complaint.
                  </p>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">File a Complaint with Factor Sciences:</h3>
                  <div className="p-4 bg-muted/30 rounded-lg mb-4">
                    <p className="text-sm text-muted-foreground mb-1"><strong className="text-foreground">Privacy Officer:</strong> Factor Sciences HIPAA Compliance Team</p>
                    <p className="text-sm text-muted-foreground mb-1"><strong className="text-foreground">Email:</strong> privacy@factorysciences.com</p>
                    <p className="text-sm text-muted-foreground mb-1"><strong className="text-foreground">Phone:</strong> +1 (800) 555-1234</p>
                    <p className="text-sm text-muted-foreground"><strong className="text-foreground">Address:</strong> Factor Sciences, 100 Healthcare Plaza, Suite 200, Wilmington, DE 19801</p>
                  </div>

                  <h3 className="text-xl font-semibold mb-3 text-foreground">File a Complaint with HHS:</h3>
                  <div className="p-4 bg-muted/30 rounded-lg">
                    <p className="text-sm text-muted-foreground mb-1"><strong className="text-foreground">U.S. Department of Health and Human Services</strong></p>
                    <p className="text-sm text-muted-foreground mb-1">Office for Civil Rights</p>
                    <p className="text-sm text-muted-foreground mb-1">200 Independence Avenue, S.W.</p>
                    <p className="text-sm text-muted-foreground mb-1">Washington, D.C. 20201</p>
                    <p className="text-sm text-muted-foreground mb-1">Phone: 1-877-696-6775</p>
                    <p className="text-sm text-muted-foreground">Website: www.hhs.gov/ocr/privacy/hipaa/complaints</p>
                  </div>
                </section>

                <Separator />

                {/* Section 9 */}
                <section>
                  <h2 className="text-2xl font-bold mb-4 text-foreground font-[family-name:var(--font-display)]">9. Contact Information</h2>
                  <p className="text-muted-foreground leading-relaxed mb-4">
                    For questions about this Notice, to exercise your privacy rights, or for more information about our privacy
                    practices, please contact:
                  </p>
                  <div className="p-4 bg-muted/30 rounded-lg">
                    <p className="text-foreground font-medium mb-2">Factor Sciences Privacy Officer</p>
                    <p className="text-sm text-muted-foreground">Email: privacy@factorysciences.com</p>
                    <p className="text-sm text-muted-foreground">Phone: +1 (800) 555-1234</p>
                    <p className="text-sm text-muted-foreground">Address: Factor Sciences, 100 Healthcare Plaza, Suite 200, Wilmington, DE 19801</p>
                    <p className="text-sm text-muted-foreground">Business Hours: Monday - Friday, 9:00 AM - 6:00 PM EST</p>
                  </div>
                </section>

                <Separator />

                {/* Acknowledgment */}
                <div className="p-5 bg-gradient-to-r from-primary/10 to-accent/10 border-2 border-primary/20 rounded-lg">
                  <h3 className="font-bold text-foreground mb-3 text-lg flex items-center gap-2 font-[family-name:var(--font-display)]">
                    <Lock className="size-6 text-primary icon-glow-primary" />
                    Acknowledgment of Receipt
                  </h3>
                  <p className="text-sm text-muted-foreground">
                    By using Factor Sciences' platform and services, you acknowledge that you have received and reviewed this
                    Notice of Privacy Practices. This Notice describes how your medical information may be used and disclosed,
                    and how you can access this information. If you have questions or would like a paper copy of this Notice,
                    please contact our Privacy Officer using the contact information above.
                  </p>
                </div>

              </div>
            </CardContent>
          </Card>

          {/* Footer Navigation */}
          <div className="mt-8 flex flex-col sm:flex-row gap-4 justify-between items-center">
            <Button asChild variant="outline">
              <Link href="/">Return to Home</Link>
            </Button>
            <div className="flex gap-4">
              <Button asChild variant="ghost" size="sm">
                <Link href="/terms">Terms of Service</Link>
              </Button>
              <Button asChild variant="ghost" size="sm">
                <Link href="/privacy">Privacy Policy</Link>
              </Button>
              <Button asChild variant="ghost" size="sm">
                <Link href="/refund">Refund Policy</Link>
              </Button>
            </div>
          </div>
        </div>
      </main>
    </div>
  )
}
