import Link from "next/link";
import { ScrollReveal } from "@/animations/Reveal";
import IndustryWorldMap from "./IndustryWorldMap";

const PROGRAMS = [
  {
    title: "Venture Launchpad",
    desc: "Business model validation, market entry strategy, entity formation, and go-to-market execution for women-led logistics enterprises.",
    type: "Start building",
  },
  {
    title: "Strategic Partnerships",
    desc: "Direct access to supply chain networks, B2B relationships, industry alliances, and commercial agreements that accelerate growth.",
    type: "Connect and grow",
  },
  {
    title: "Founder Mentorship",
    desc: "One-on-one guidance from established entrepreneurs, operators, and investors who understand what it takes to scale.",
    type: "Learn from builders",
  },
  {
    title: "Growth & Scale",
    desc: "Operational expansion frameworks, team building, funding readiness, and sustainable unit economics for ventures ready to grow.",
    type: "Scale with confidence",
  },
  {
    title: "Industry Immersion",
    desc: "Real exposure to logistics operations, supply chain infrastructure, and distribution networks before founders commit to a vertical.",
    type: "See the opportunity",
  },
];

export default function EmpowermentPrograms() {
  return (
    <>
      <style
        dangerouslySetInnerHTML={{
          __html: `
        .epr-section {
          background: #ffffff;
          padding: clamp(78px, 9vw, 132px) 0;
          overflow: visible;
        }

        .epr-inner {
          max-width: 1380px;
          min-width: 0;
          margin: 0 auto;
        }

        .epr-head {
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          margin-bottom: clamp(54px, 7vw, 86px);
        }

        .epr-head-reveal {
          width: 100%;
        }

        .epr-divider {
          width: 100%;
          height: 1px;
          margin: 18px 0 clamp(24px, 3.5vw, 40px) 0;
          border: none;
          background-color: rgba(17, 17, 17, 0.14);
        }

        .epr-eyebrow {
          font-size: 13px;
          font-weight: 800;
          letter-spacing: 2.4px;
          text-transform: uppercase;
          color: rgba(17, 17, 17, 0.42);
        }

        .epr-title {
          max-width: 950px;
          font-size: clamp(42px, 6.2vw, 88px) !important;
          font-weight: 800 !important;
          letter-spacing: -0.055em !important;
          line-height: 0.98 !important;
          text-transform: uppercase !important;
          color: #111111 !important;
          margin: 0;
        }

        .epr-stage {
          display: grid;
          grid-template-columns: minmax(300px, 0.38fr) minmax(0, 0.62fr);
          gap: clamp(32px, 5vw, 78px);
          align-items: start;
          min-width: 0;
        }

        .epr-stage > * {
          min-width: 0;
        }

        .epr-aside {
          position: sticky;
          top: 110px;
          min-width: 0;
          min-height: clamp(480px, 44vw, 660px);
          padding: clamp(18px, 3vw, 34px) 0 clamp(24px, 3.5vw, 42px);
          display: flex;
          flex-direction: column;
          justify-content: center;
          overflow: hidden;
          color: #111111;
        }

        .epr-aside-map {
          position: absolute;
          inset: 8% -22% 8% -28%;
          z-index: 0;
          opacity: 0.22;
          pointer-events: none;
        }

        .epr-aside-map canvas {
          display: block;
        }

        .epr-aside-content {
          position: relative;
          z-index: 1;
          display: grid;
          gap: clamp(18px, 2.2vw, 28px);
        }

        .epr-aside-num {
          position: relative;
          font-size: clamp(164px, 17vw, 300px);
          font-weight: 900;
          line-height: 0.78;
          letter-spacing: -0.06em;
          color: transparent;
          -webkit-text-stroke: 2px rgba(200, 16, 46, 0.2);
        }

        .epr-aside-copy {
          position: relative;
          max-width: 12ch;
          font-size: clamp(30px, 3.6vw, 56px);
          font-weight: 800;
          line-height: 0.98;
          letter-spacing: -0.055em;
          text-transform: uppercase;
          color: #111111;
          margin: 0;
        }

        .epr-aside-copy em {
          font-style: normal;
          color: #c8102e;
        }

        .epr-aside-desc {
          position: relative;
          max-width: 34ch;
          font-size: 15.5px;
          line-height: 1.65;
          color: rgba(17, 17, 17, 0.58);
          margin: 0;
        }

        .epr-list {
          display: grid;
          gap: clamp(28px, 4vw, 52px);
        }

        .epr-row {
          display: grid;
          grid-template-columns: 110px minmax(0, 1fr);
          gap: clamp(22px, 4vw, 58px);
          padding-bottom: clamp(28px, 4vw, 52px);
          border-bottom: 1px solid rgba(17, 17, 17, 0.14);
        }

        .epr-row:nth-child(even) {
          margin-left: clamp(0px, 7vw, 96px);
        }

        .epr-row-index {
          font-size: clamp(38px, 4.2vw, 62px);
          font-weight: 900;
          line-height: 1;
          letter-spacing: -0.05em;
          color: #c8102e;
        }

        .epr-row-featured {
          padding: clamp(28px, 4vw, 44px) clamp(24px, 3vw, 40px);
          background: #09090b;
          border-radius: 22px;
          border-bottom: none;
          margin-bottom: clamp(28px, 4vw, 52px);
        }

        .epr-row-featured .epr-row-index {
          color: rgba(255, 255, 255, 0.22);
          -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.5);
        }

        .epr-row-featured .epr-row-title {
          font-size: clamp(32px, 4vw, 64px) !important;
          color: #ffffff !important;
        }

        .epr-row-featured .epr-row-desc {
          color: rgba(255, 255, 255, 0.62);
        }

        .epr-row-flag {
          display: inline-block;
          font-size: 12px;
          font-weight: 800;
          letter-spacing: 1.3px;
          text-transform: uppercase;
          color: #ffffff;
          background: #c8102e;
          padding: 6px 14px;
          border-radius: 100px;
          margin-bottom: 16px;
        }

        .epr-row-type {
          display: block;
          font-size: 12px;
          font-weight: 800;
          letter-spacing: 1.7px;
          text-transform: uppercase;
          color: rgba(17, 17, 17, 0.42);
          margin-bottom: 14px;
        }

        .epr-row-featured .epr-row-type {
          color: rgba(255, 255, 255, 0.42);
        }

        .epr-row-title {
          font-size: clamp(28px, 3.4vw, 52px) !important;
          font-weight: 800 !important;
          letter-spacing: -0.045em !important;
          line-height: 1.02 !important;
          text-transform: uppercase !important;
          color: #111111 !important;
          margin: 0 0 14px 0;
        }

        .epr-row-desc {
          max-width: 660px;
          font-size: 15.5px;
          line-height: 1.65;
          color: rgba(17, 17, 17, 0.58);
          margin: 0;
        }

        .epr-cta {
          margin-top: clamp(48px, 6vw, 72px);
        }

        .epr-cta-link {
          display: inline-flex;
          align-items: center;
          gap: 10px;
          font-size: 15px;
          font-weight: 800;
          color: #111111 !important;
          text-decoration: none !important;
          border-bottom: 1.5px solid rgba(17, 17, 17, 0.2);
          padding-bottom: 5px;
          transition: border-color 0.3s ease, color 0.3s ease;
        }

        .epr-cta-link:hover {
          color: #c8102e !important;
          border-color: #c8102e;
        }

        /* Laptop: sticky stays enabled, just a narrower gutter. */
        @media (max-width: 1180px) {
          .epr-stage { grid-template-columns: minmax(220px, 0.34fr) minmax(0, 0.66fr); gap: clamp(28px, 4vw, 46px); }
          .epr-aside { min-height: 420px; }
          .epr-row:nth-child(even) { margin-left: 0; }
        }

        /* Tablet: sticky disabled — the aside scrolls in normal flow instead
           of pinning, since there's no longer enough vertical runway next to
           the (now narrower, shorter) program list for pinning to read well. */
        @media (max-width: 1023px) {
          .epr-aside {
            position: relative;
            top: auto;
          }
        }

        @media (max-width: 767px) {
          .epr-stage { grid-template-columns: 1fr; }
          .epr-aside {
            position: relative;
            top: auto;
            min-height: 300px;
            padding-top: 4px;
            padding-bottom: clamp(24px, 7vw, 38px);
          }
          .epr-aside-map {
            inset: -8% -18% 0 -20%;
            opacity: 0.18;
          }
          .epr-aside-content {
            gap: 20px;
          }
          .epr-aside-num {
            font-size: clamp(128px, 34vw, 180px);
          }
          .epr-aside-copy {
            max-width: 11ch;
            font-size: clamp(34px, 10vw, 48px);
          }
          .epr-aside-desc {
            max-width: 32ch;
            font-size: 14.5px;
          }
        }

        @media (max-width: 640px) {
          .epr-section { padding-top: 54px; padding-bottom: 54px; }
          .epr-title {
            font-size: clamp(34px, 10vw, 40px) !important;
            letter-spacing: -0.045em !important;
            overflow-wrap: anywhere;
          }
          .epr-row-title {
            font-size: clamp(27px, 8.5vw, 36px) !important;
            overflow-wrap: anywhere;
          }
          .epr-row { grid-template-columns: 1fr; gap: 12px; }
        }
      `,
        }}
      />

      <section className="epr-section" id="wings-empowerment-programs">
        <div className="dm-section-container">
          <div className="epr-inner">
            <div className="epr-head">
              <ScrollReveal delay={0.05} duration={0.75} yOffset={20} className="epr-head-reveal">
                <div className="epr-eyebrow">/ Entrepreneurship Pillars /</div>
                <hr className="epr-divider" />
              </ScrollReveal>
              <ScrollReveal delay={0.1} duration={0.85} yOffset={24}>
                <h2 className="epr-title">Every pillar is built around ownership.</h2>
              </ScrollReveal>
            </div>

            <div className="epr-stage">
              <aside className="epr-aside">
                <div className="epr-aside-map" aria-hidden="true">
                  <IndustryWorldMap />
                </div>
                <ScrollReveal delay={0.05} duration={0.8} yOffset={24} className="epr-aside-content">
                  <div className="epr-aside-num">05</div>
                  <p className="epr-aside-copy">Building tomorrow&rsquo;s <em>women entrepreneurs.</em></p>
                  <p className="epr-aside-desc">
                    Every enterprise starts with one decision. Our pillars move women from idea to ownership through mentorship, real industry partnerships, and hands-on venture building across the logistics ecosystem.
                  </p>
                </ScrollReveal>
              </aside>

              <div>
                <ScrollReveal delay={0.1} duration={0.8} yOffset={24}>
                  <div className="epr-list">
                    {PROGRAMS.map((p, i) => (
                      <article className={`epr-row${i === 0 ? " epr-row-featured" : ""}`} key={p.title}>
                        <div className="epr-row-index">{String(i + 1).padStart(2, "0")}</div>
                        <div>
                          {i === 0 && <span className="epr-row-flag">Where most founders begin</span>}
                          <span className="epr-row-type">{p.type}</span>
                          <h3 className="epr-row-title">{p.title}</h3>
                          <p className="epr-row-desc">{p.desc}</p>
                        </div>
                      </article>
                    ))}
                  </div>
                </ScrollReveal>

                <div className="epr-cta">
                  <Link href="/contact" className="epr-cta-link">
                    Start your venture
                    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.25" strokeLinecap="round" strokeLinejoin="round">
                      <path d="M5 12h14M13 6l6 6-6 6" />
                    </svg>
                  </Link>
                </div>
              </div>
            </div>
          </div>
        </div>
      </section>
    </>
  );
}
