import type { Metadata } from "next";
import Link from "next/link";
import HelpDirectory from "./components/HelpDirectory";
import SiteHeader from "./components/SiteHeader";
import {
  AMAZON_AUTHOR_URL,
  OVERCOMERS_STORE_URL,
  PERSON_ID,
  SITE_URL,
  WEBSITE_ID,
  overcomersEntity,
  personEntity,
  websiteEntity,
} from "./lib/site";

export const metadata: Metadata = {
  title: {
    absolute: "Find Help & Crisis Resources | Toshin Samuels",
  },
  description:
    "Find trusted crisis and recovery resources, practical fraud-prevention education, and free how-to guides through the public-service website of Toshin Samuels.",
  alternates: { canonical: "/" },
  openGraph: {
    title: "Find Help & Crisis Resources | Toshin Samuels",
    description:
      "Trusted crisis resources, fraud education, practical how-to guides, and the public-service work of Toshin Samuels.",
    url: `${SITE_URL}/`,
    siteName: "Toshin Samuels",
    type: "website",
  },
  twitter: {
    card: "summary",
    title: "Find Help & Crisis Resources | Toshin Samuels",
    description:
      "Trusted crisis resources, fraud education, practical how-to guides, and the public-service work of Toshin Samuels.",
  },
};

const structuredData = {
  "@context": "https://schema.org",
  "@graph": [
    websiteEntity,
    personEntity,
    overcomersEntity,
    {
      "@type": "WebPage",
      "@id": `${SITE_URL}/#webpage`,
      url: `${SITE_URL}/`,
      name: "Find Help & Crisis Resources",
      description:
        "A public-service homepage providing immediate crisis and recovery resources, fraud-prevention education, and practical how-to guides.",
      isPartOf: { "@id": WEBSITE_ID },
      about: [{ "@id": PERSON_ID }, { "@id": "https://overcomerssociety.org/#organization" }],
      creator: { "@id": PERSON_ID },
    },
  ],
};

export default function HomePage() {
  return (
    <main>
      <SiteHeader />

      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
      />

      <HelpDirectory />

      <section className="letter-section section">
        <article className="letter-card">
          <p className="section-label">How-To Guides</p>
          <h2>The things life expects you to know—but rarely teaches.</h2>
          <p className="large-copy">
            Clear, practical guidance for publishing, employment, business,
            credit, artificial intelligence, websites, taxes, real estate,
            online reputation, and other systems people are often expected to
            understand without ever having them properly explained.
          </p>
          <p>
            Each guide will focus on the actual process, credible free routes,
            honest costs, common mistakes, scam warnings, and the point at
            which professional help may protect more than it costs.
          </p>
          <Link href="/guides" className="primary-button">
            Explore How-To Guides
          </Link>
        </article>
      </section>

      <section className="letter-section section">
        <article className="letter-card">
          <p className="section-label">Scam Prevention & Fraud Awareness</p>
          <h2>Protect your identity, your money, and yourself.</h2>
          <p className="large-copy">
            Fraud works by creating pressure, confusion, trust, or fear before
            you have time to recognize what is happening. Learning the warning
            signs can prevent enormous harm.
          </p>
          <p>
            I&apos;ve gathered practical scam-prevention education, identity
            protection tools, fraud-reporting resources, recovery guidance,
            and information on common scams so you can slow things down,
            verify what you&apos;re being told, and protect yourself before
            sending money or personal information.
          </p>
          <Link href="/scam-prevention" className="primary-button">
            Scam Prevention & Fraud Awareness
          </Link>
        </article>
      </section>

      <section className="letter-section section">
        <article className="letter-card">
          <p className="section-label">
            Crisis Resources • Fraud Education • How-To Guides
          </p>
          <h2>Prevent harm. Find help. Keep writing the next chapter.</h2>
          <p className="large-copy">
            ToshinSamuels.com is the personal public-service website of Toshin
            Samuels—an author, fraud-prevention educator, second-chance
            activist, and Founder and President of Overcomers Society.
          </p>
          <p>
            I built this site to make trustworthy help easier to find, reduce
            preventable harm, and knock down the barriers between people who
            need help and the help they need.
          </p>
          <Link href="/about" className="primary-button">
            About Toshin and This Work
          </Link>
        </article>
      </section>

      <div className="story-transition">
        <p>
          If you want to know why I built these resources, this is the promise
          behind them.
        </p>
      </div>

      <section id="promise" className="hero">
        <div className="hero-inner">
          <p className="section-label">The Steward’s Promise</p>

          <h1>No one should have to overcome alone.</h1>

          <p className="hero-copy">
            This is not a résumé or a monument to one person. It is a standing
            commitment to help build the institutions, relationships, and
            shared wisdom that make another chapter possible.
          </p>

          <p className="hero-question">
            No story is finished until the author stops writing.
          </p>

          <div
            style={{
              display: "flex",
              flexWrap: "wrap",
              justifyContent: "center",
              gap: "1rem",
              marginTop: "2rem",
            }}
          >
            <a href="#current-work" className="primary-button">
              See the Work
            </a>

            <a href="#begin" className="primary-button">
              Begin
            </a>
          </div>
        </div>
      </section>

      <section className="story-transition">
        <p>
          The mission is larger than any one life. But every mission begins
          with a promise.
        </p>
      </section>

      <section id="current-work" className="letter-section section">
        <article className="letter-card">
          <p className="section-label">Current Work</p>

          <h2>The promise has to become something useful.</h2>

          <p className="large-copy">
            The resources above are one expression of a larger commitment:
            build things that help people find information, support,
            opportunity, perspective, and a way forward.
          </p>

          <p>
            Much of my work today is centered on Overcomers Society and
            Humanity&apos;s Living Autobiography. They are different projects,
            but they grow from the same belief: human experience has value,
            useful knowledge should be shared, and institutions should remain
            accountable to the people they exist to serve.
          </p>

          <div
            style={{
              marginTop: "2rem",
              paddingTop: "1.5rem",
              borderTop: "1px solid rgba(127,127,127,.35)",
            }}
          >
            <p style={{ marginBottom: ".35rem" }}>
              <strong>Toshin Samuels</strong>
            </p>
            <p style={{ margin: 0 }}>
              Founder and President, Overcomers Society
            </p>
          </div>
        </article>
      </section>

      <section id="begin" className="promise-section section">
        <div className="narrow">
          <p className="section-label">What I&apos;m Building</p>

          <h2>Different projects. One underlying purpose.</h2>

          <p className="large-copy">
            The goal is not to build institutions for their own sake. It is to
            build useful things that preserve human experience, expand access
            to knowledge and resources, and make it easier for people to find
            one another and find a way forward.
          </p>

          <div
            style={{
              display: "grid",
              gridTemplateColumns: "repeat(auto-fit, minmax(260px, 1fr))",
              gap: "1.25rem",
              marginTop: "3rem",
            }}
          >
            <article
              style={{
                padding: "1.5rem",
                border: "1px solid rgba(127,127,127,.35)",
                borderRadius: ".5rem",
              }}
            >
              <p className="section-label">Nonprofit</p>

              <h3 style={{ marginTop: 0, fontSize: "1.45rem" }}>
                Overcomers Society
              </h3>

              <p>
                A Florida nonprofit centered on human dignity,
                accountability, shared wisdom, access to useful resources,
                service, and the belief that no one should have to overcome
                alone.
              </p>

            </article>

            <article
              style={{
                padding: "1.5rem",
                border: "1px solid rgba(127,127,127,.35)",
                borderRadius: ".5rem",
              }}
            >
              <p className="section-label">Human Stories</p>

              <h3 style={{ marginTop: 0, fontSize: "1.45rem" }}>
                Humanity&apos;s Living Autobiography
              </h3>

              <p>
                A living record of human chapters — preserving people&apos;s
                experiences in their own voices so perspective, wisdom,
                context, and hope can be carried forward.
              </p>

            </article>
          </div>

          <div className="mission-begin-panel">
            <p className="section-label">Begin</p>

            <h3>Your story is still being written.</h3>

            <p className="large-copy">
              Beginning does not require having every answer. It begins with one
              honest step.
            </p>

            <p>
              Preserve a chapter of your story. Learn from someone whose
              experience can illuminate your own. Share the wisdom life has
              entrusted to you. Encourage the next person. Ask for help when you
              need it.
            </p>

            <p>
              The wider Overcomers Society platform is being built one faithful
              chapter at a time. Its purpose is not to make the organization
              indispensable. Its purpose is to help people become more equipped,
              more connected, and more capable of continuing forward with dignity
              and hope.
            </p>

            <blockquote>
              <p>
                Every story matters. Every experience has something to teach.
                Every person can continue growing. No one has to overcome alone.
              </p>
            </blockquote>

            <div className="mission-project-actions">
              <a
                href="https://humanityslivingautobiography.org"
                target="_blank"
                rel="noopener noreferrer"
                className="primary-button"
              >
                Explore Humanity&apos;s Living Autobiography
              </a>

              <a
                href="https://overcomerssociety.org"
                target="_blank"
                rel="noopener noreferrer"
                className="primary-button"
              >
                Visit Overcomers Society
              </a>
            </div>
          </div>

          <div
            style={{
              marginTop: "4rem",
              paddingTop: "3rem",
              borderTop: "1px solid rgba(127,127,127,.28)",
            }}
          >
            <p className="section-label">
              Published Work — Overcomers Society Press
            </p>

            <h2>Books from Overcomers Society</h2>

            <p style={{ maxWidth: "720px", marginBottom: "2rem" }}>
              These publications document the principles, foundations, and
              perspectives behind the work of Overcomers Society. They are
              listed here as part of the organization&apos;s current work, not as
              a storefront.
            </p>

            <div className="quiet-book-grid">
              <article className="quiet-book-card">
                <p className="book-number">Book One</p>
                <h3>Overcomers Society: Book I — The Founding Documents</h3>
                <p>
                  The founding documents and philosophical foundation of
                  Overcomers Society.
                </p>
              </article>

              <article className="quiet-book-card">
                <p className="book-number">Book Two</p>
                <h3>Overcomers Society: Book II — Philosophies</h3>
                <p>
                  Reflections on dignity, accountability, perspective, growth,
                  hope, and what it means to keep writing the next chapter.
                </p>
              </article>
            </div>

            <div className="quiet-note">
              <p>
                The books above are not linked to outside retailers. They are
                available through the official Overcomers Society Store.
              </p>
              <p>
                <a
                  href={OVERCOMERS_STORE_URL}
                  target="_blank"
                  rel="noopener noreferrer"
                  className="text-link"
                >
                  Visit the Overcomers Society Store ↗
                </a>
              </p>
            </div>
          </div>
        </div>
      </section>

      <section className="letter-section section">
        <article className="letter-card">
          <p className="section-label">Why I Built These Tools</p>

          <h2>I&apos;m building resources I wish I had known how to find.</h2>

          <p className="large-copy">
            Many of the resources on this site are things I wish I had known
            how to find much earlier in my own life. Some are resources I can
            still use today.
          </p>

          <p>
            I built this site because I believe useful knowledge, practical
            help, and real opportunity should be easier to find and freely
            accessible whenever possible. I intend to keep adding more tools,
            information, and resources here as I find or create them.
          </p>

          <Link href="/about" className="primary-button">
            About Toshin and This Work
          </Link>
        </article>
      </section>

      <section id="full-record" className="promise-section section">
        <div className="narrow">
          <p className="section-label">The Full Record</p>

          <h2>Transparency is part of the promise.</h2>

          <p className="large-copy">
            My past is not the purpose of this site, but it is part of why this
            work matters to me.
          </p>

          <p>
            I know that choices I made harmed other people. Accountability,
            to me, means more than acknowledging that fact. It means accepting
            what cannot be changed while choosing to use what I have learned
            to reduce harm, share useful knowledge, and make resources easier
            for the next person to find.
          </p>

          <p>
            I do not ask anyone to forget the past. The Full Record is here for
            anyone who wants the documented history, the chronology, and the
            fuller context behind the work I choose to do today.
          </p>

          <Link
            href="/toshin-charles-samuels"
            className="primary-button"
          >
            Read the Full Record
          </Link>
        </div>
      </section>

      <section id="connect" className="letter-section section">
        <article className="letter-card">
          <p className="section-label">Connect</p>

          <h2>Toshin Samuels</h2>

          <p className="large-copy">
            Founder and President, Overcomers Society
          </p>

          <div
            style={{
              display: "flex",
              flexWrap: "wrap",
              gap: "1rem",
              marginTop: "2rem",
            }}
          >
            <a
              href="https://www.linkedin.com/in/toshin-charles-samuels-80750862/"
              target="_blank"
              rel="noopener noreferrer"
              className="primary-button"
            >
              LinkedIn
            </a>

            <a
              href={AMAZON_AUTHOR_URL}
              target="_blank"
              rel="me noopener noreferrer"
              className="primary-button"
            >
              Amazon Author Central
            </a>

            <a
              href="https://overcomerssociety.org/"
              target="_blank"
              rel="noopener noreferrer"
              className="primary-button"
            >
              Overcomers Society
            </a>

            <a
              href="https://humanityslivingautobiography.org/"
              target="_blank"
              rel="noopener noreferrer"
              className="primary-button"
            >
              Humanity&apos;s Living Autobiography
            </a>

            <Link href="/privacy-and-source" className="primary-button">
              Privacy &amp; Public Source
            </Link>
          </div>
        </article>
      </section>

      <section className="story-transition">
        <p>
          No story is finished until the author stops writing.
        </p>
      </section>
    </main>
  );
}
