// Sections module — exports all 6 page sections to window.
// Originals only — no copyrighted UI patterns recreated.

const { useState, useEffect, useRef } = React;

const CA_HERO = "00000000";
const CA_SOCIAL = "0000000";

/* ---------- Reusable building blocks ---------- */

function useReveal() {
  const ref = useRef(null);
  useEffect(() => {
    const el = ref.current;if (!el) return;
    const io = new IntersectionObserver(([e]) => {
      if (e.isIntersecting) {el.classList.add('in');io.disconnect();}
    }, { threshold: 0.12 });
    io.observe(el);
    return () => io.disconnect();
  }, []);
  return ref;
}

function CopyButton({ value, label = "COPY", className = "" }) {
  const [copied, setCopied] = useState(false);
  const onClick = async () => {
    try {
      await navigator.clipboard.writeText(value);
    } catch {
      const ta = document.createElement('textarea');
      ta.value = value;document.body.appendChild(ta);ta.select();
      try {document.execCommand('copy');} catch {}
      ta.remove();
    }
    setCopied(true);setTimeout(() => setCopied(false), 1600);
  };
  return (
    <button onClick={onClick}
    className={`group inline-flex items-center gap-2 px-4 py-2 rounded-full bg-hope-ink2/80 border border-hope-slime/40 text-hope-slime2 hover:bg-hope-slime/10 hover:border-hope-slime hover:text-white transition-all hover:shadow-[0_0_24px_-4px_rgba(74,222,90,.7)] font-mono text-xs tracking-wider ${className}`}>
      {copied ?
      <><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3"><path d="M5 12l5 5L20 7" /></svg> COPIED</> :

      <><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><rect x="9" y="9" width="13" height="13" rx="2" /><path d="M5 15V5a2 2 0 0 1 2-2h10" /></svg> {label}</>
      }
    </button>);

}

/* ---------- NAVBAR ---------- */

function Navbar() {
  const [scrolled, setScrolled] = useState(false);
  const [open, setOpen] = useState(false);
  useEffect(() => {
    const onScroll = () => setScrolled(window.scrollY > 30);
    window.addEventListener('scroll', onScroll);onScroll();
    return () => window.removeEventListener('scroll', onScroll);
  }, []);

  const items = [
  ["WHO IS $HERO", "#hero"],
  ["ABOUT", "#about"],
  ["MISSION", "#mission"],
  ["MEMES", "#memes"],
  ["SHORTAGE", "#shortage"],
  ["SOCIAL MEDIA", "#social"]];


  return (
    <header className={`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${scrolled ? 'backdrop-blur-xl bg-hope-ink/70 border-b border-hope-slime/15' : 'bg-transparent'}`}>
      <div className="max-w-[1320px] mx-auto px-5 md:px-8 h-[70px] flex items-center justify-between">
        <a href="#hero" className="flex items-center gap-3 group">
          <div className="leading-none">
            <div className="font-display font-extrabold text-2xl tracking-tight">$HOPE</div>
            <div className="font-mono text-[9px] tracking-[0.25em] text-hope-slime2/70 mt-0.5">TRENCHES.NEVER.DIE</div>
          </div>
        </a>

        <nav className="hidden lg:flex items-center gap-1">
          {items.map(([label, href]) =>
          <a key={label} href={href}
          className="nav-link px-3 py-2 font-display font-semibold text-[13px] tracking-wide uppercase text-hope-cream/85">
              {label}
            </a>
          )}
          <a href="#hero"
          className="ml-4 btn-primary inline-flex items-center gap-2 px-5 py-2.5 rounded-full text-sm font-display">
            BUY $HOPE
            <span className="text-xs">↗</span>
          </a>
        </nav>

        <button onClick={() => setOpen((o) => !o)} className="lg:hidden p-2 text-hope-slime2" aria-label="menu">
          <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4">
            {open ? <path d="M6 6l12 12M18 6L6 18" /> : <><path d="M3 6h18" /><path d="M3 12h18" /><path d="M3 18h18" /></>}
          </svg>
        </button>
      </div>
      {/* mobile menu */}
      <div className={`lg:hidden transition-all duration-300 ${open ? 'menu-open' : 'menu-closed'} bg-hope-ink/95 border-b border-hope-slime/20 backdrop-blur-xl`}>
        <div className="px-5 py-4 flex flex-col gap-1">
          {items.map(([label, href]) =>
          <a key={label} href={href} onClick={() => setOpen(false)}
          className="nav-link py-3 font-display font-semibold text-base tracking-wide text-hope-cream/90 border-b border-white/5">
              {label}
            </a>
          )}
          <a href="#hero" onClick={() => setOpen(false)} className="btn-primary mt-3 px-5 py-3 rounded-full text-center font-display">BUY $HOPE</a>
        </div>
      </div>
    </header>);

}

/* ---------- HERO ---------- */

function Hero() {
  const ref = useReveal();
  return (
    <section id="hero" data-screen-label="01 Hero" className="relative pt-28 md:pt-36 pb-20 md:pb-28 overflow-hidden">
      {/* cosmic backdrop */}
      <div aria-hidden className="absolute inset-0 -z-10">
        <div className="absolute inset-0" style={{ background: 'radial-gradient(circle at 50% 12%, rgba(124,240,138,.18), transparent 55%), radial-gradient(circle at 18% 78%, rgba(255,122,58,.15), transparent 50%), radial-gradient(circle at 82% 60%, rgba(124,77,255,.18), transparent 55%)' }} />
        <div className="stars absolute inset-0 opacity-70"></div>
        <div className="absolute -left-24 top-40 w-[420px] h-[420px] rounded-full" style={{ background: 'radial-gradient(circle, rgba(74,222,90,.25), transparent 60%)', filter: 'blur(40px)' }} />
        <div className="absolute -right-32 top-10 w-[480px] h-[480px] rounded-full" style={{ background: 'radial-gradient(circle, rgba(124,77,255,.22), transparent 60%)', filter: 'blur(50px)' }} />
      </div>

      {/* small floating tickers */}
      <div className="absolute top-24 left-6 hidden md:block font-mono text-[10px] tracking-widest text-hope-slime2/60 rotate-[-4deg]">
        <div className="px-3 py-1 border border-hope-slime/30 rounded-full bg-hope-ink2/70 backdrop-blur">
</div>
      </div>
      <div className="absolute top-32 right-6 hidden md:block font-mono text-[10px] tracking-widest text-hope-sun/70 rotate-[3deg]">
        <div className="px-3 py-1 border border-hope-sun/30 rounded-full bg-hope-ink2/70 backdrop-blur">⛏️ STILL DIGGING SINCE 2024</div>
      </div>

      <div ref={ref} className="reveal max-w-[1280px] mx-auto px-5 md:px-8 text-center relative">
        <div className="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-hope-slime/10 border border-hope-slime/30 font-mono text-[10px] tracking-[0.3em] text-hope-slime2 mb-8">
          <span className="w-1.5 h-1.5 rounded-full bg-hope-slime animate-pulse"></span>
          A SOLANA MEMECOIN FOR THE LAST BELIEVERS
        </div>

        <h1 className="hero-h text-[14vw] md:text-[8.5rem] leading-[.85] tracking-tight">
          <span className="gradient-text">$HOPE</span>
          <br />
          <span className="text-hope-cream">Trenches</span>{' '}
          <em>never</em>{' '}
          <span className="text-hope-sun neon-text" style={{ textShadow: '0 0 20px rgba(255,122,58,.55)' }}>die.</span>
        </h1>

        {/* horizontal block: logo left, text right */}
        <div className="mt-14 md:mt-20 grid md:grid-cols-[minmax(0,1fr)_minmax(0,1.1fr)] gap-8 md:gap-14 items-center text-left">
          {/* logo card */}
          <div className="relative mx-auto md:mx-0 w-full max-w-[460px]">
            <div className="relative aspect-square rounded-[36px] overflow-hidden glow-ring floaty">
              <img src="assets/hero-logo.jpg" alt="$HOPE — looking up at the trenches sky" className="w-full h-full object-cover" />
              <div className="absolute inset-0" style={{ background: 'linear-gradient(180deg, transparent 50%, rgba(7,10,20,.5) 100%)' }} />
              {/* tape */}
              <div className="tape" style={{ top: '-10px', left: '40px' }}></div>
              <div className="tape" style={{ bottom: '-10px', right: '40px', transform: 'rotate(8deg)' }}></div>
              {/* corner badge */}
              <div className="absolute bottom-4 right-4 px-3 py-1.5 rounded-full bg-hope-ink/80 backdrop-blur border border-hope-slime/40 font-mono text-[10px] tracking-widest text-hope-slime2">
                $HOPE • SOL
              </div>
            </div>
            {/* scribbles */}
            <span className="absolute -top-6 -right-2 font-scribble text-3xl text-hope-glow rotate-[8deg] hidden md:block">u still here?</span>
          </div>

          {/* manifesto right */}
          <div>
            <div className="font-scribble text-3xl text-hope-slime2 mb-4 rotate-[-2deg]">a confession from the trenches —</div>
            <p className="font-display font-semibold text-2xl md:text-[2.1rem] leading-[1.15] text-hope-cream">
              Memecoin market is <span className="line-through text-hope-cream/40">alive</span> <span className="text-hope-sun">quiet</span>, timeline is <span className="highlight">slow</span>, volume is <span className="text-hope-sun">dead</span>.
              <br /><br />
              But <em className="text-hope-glow not-italic font-extrabold">you're still here</em> — and that means <span className="squiggle text-hope-slime2">something</span>.
            </p>

            {/* CA + buy block */}
            <div className="mt-8 space-y-4">
              <div className="flex flex-wrap items-center gap-3 p-3 pl-5 rounded-2xl bg-hope-ink2/80 border border-hope-slime/25 backdrop-blur">
                <span className="font-mono text-[10px] tracking-[0.25em] text-hope-slime2/80">CA</span>
                <code className="font-mono text-base md:text-lg text-hope-cream truncate flex-1 min-w-0">{CA_HERO}</code>
                <CopyButton value={CA_HERO} />
              </div>

              <div className="flex flex-wrap items-center gap-4">
                <a href="#" className="btn-primary inline-flex items-center gap-3 px-7 py-4 rounded-full text-lg font-display">
                  BUY $HOPE
                  <span className="text-xl">→</span>
                </a>
                <a href="#mission" className="px-5 py-4 rounded-full font-display font-semibold text-hope-cream/85 hover:text-hope-slime2 transition border border-hope-cream/15 hover:border-hope-slime/40">
                  read the manifesto
                </a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>);
}

/* ---------- ABOUT ---------- */

function About() {
  const ref = useReveal();
  return (
    <section id="about" data-screen-label="02 About" className="relative py-20 md:py-32 overflow-hidden">
      <div className="absolute inset-0 -z-10" style={{ background: 'radial-gradient(circle at 80% 30%, rgba(255,122,58,.12), transparent 50%)' }} />
      <div ref={ref} className="reveal max-w-[1280px] mx-auto px-5 md:px-8 grid md:grid-cols-[1.15fr_1fr] gap-12 md:gap-20 items-center">
        <div>
          <div className="font-mono text-[10px] tracking-[0.3em] text-hope-sun mb-4">
</div>
          <h2 className="hero-h text-6xl md:text-7xl text-hope-cream mb-2">
            Why <em className="text-hope-slime2">now</em>
            <span className="text-hope-sun">.</span>
          </h2>
          <div className="font-scribble text-3xl text-hope-glow mb-8 rotate-[-2deg]">(the quiet before everything)</div>

          <div className="space-y-5 text-[17px] md:text-[18px] leading-[1.65] text-hope-cream/85 font-body">
            <p>
              The meta dried up, volume disappeared. The degens who were screaming <span className="font-display font-extrabold text-hope-slime2">"to the moon"</span> six months ago ghosting their accounts. CT is posting AI agents tutorials and gym selfies like they never touched a memecoin chart.
            </p>
            <p>
              But you're still opening DEXScreener, still checking Telegram chats, still refreshing that portfolio you should've closed months ago.
            </p>
            <p className="font-display font-semibold text-2xl md:text-3xl text-hope-cream leading-[1.25]">
              You know this feeling and you've felt it before.
              <br />
              <span className="highlight text-hope-glow">The quiet before everything changes.</span>
            </p>
            <p>
              <span className="text-hope-slime2 font-semibold">$HOPE</span> is the coin for the ones who didn't leave — not because they're smart or because they know something. Because they can't stop believing that the trenches will come back.
            </p>
          </div>
        </div>

        {/* image card */}
        <div className="relative">
          <div className="relative rounded-[32px] overflow-hidden glow-ring border-4 border-hope-slime/30">
            <img src="assets/about.png" alt="quiet pepe in the storm" className="w-full h-auto block" />
            {/* meme caption bar */}
            <div className="absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-hope-ink to-transparent">
              <div className="font-display font-extrabold text-sm md:text-base uppercase tracking-wider text-center text-hope-cream" style={{ textShadow: '0 2px 0 #000, 0 0 12px rgba(255,209,102,.5)' }}>
                "peace comes after the storm — always."
              </div>
            </div>
          </div>
          <div className="tape" style={{ top: '-10px', left: '30%' }}></div>
          <div className="tape" style={{ bottom: '-12px', right: '10%', transform: 'rotate(-9deg)' }}></div>
          {/* sticker */}
          <div className="absolute -top-6 -right-6 w-24 h-24 rounded-full bg-hope-glow text-hope-ink font-display font-extrabold flex items-center justify-center rotate-[12deg] shadow-[0_10px_30px_-6px_rgba(255,209,102,.7)]">
            <div className="text-center text-xs leading-tight">STILL<br />HERE</div>
          </div>
        </div>
      </div>
    </section>);
}

/* ---------- MISSION ---------- */

function Mission() {
  const ref = useReveal();
  const lines = [
  ["The market is dead.", "We're still here."],
  ["The volume is gone.", "We're still here."],
  ["The influencers left.", "We're still here."],
  ["CT says it's over.", "We're still here."]];

  return (
    <section id="mission" data-screen-label="03 Mission" className="relative py-24 md:py-36 overflow-hidden">
      {/* cosmic bg */}
      <div aria-hidden className="absolute inset-0 -z-10">
        <div className="absolute inset-0" style={{ background: 'radial-gradient(ellipse at 50% 30%, #0a1430 0%, #060916 60%, #030610 100%)' }} />
        <div className="stars absolute inset-0 opacity-90"></div>
        {/* milky way */}
        <div className="absolute inset-0 opacity-60" style={{ background: 'radial-gradient(ellipse 70% 30% at 30% 30%, rgba(124,77,255,.25), transparent 70%), radial-gradient(ellipse 60% 25% at 70% 65%, rgba(255,122,58,.18), transparent 70%)' }} />
        {/* moon */}
        <div className="absolute right-[8%] top-[14%] w-32 h-32 md:w-44 md:h-44 rounded-full moon">
          <div className="absolute inset-0 rounded-full moon-craters opacity-70"></div>
        </div>
        {/* twinkle dots */}
        {Array.from({ length: 14 }).map((_, i) =>
        <span key={i} className="twinkle absolute rounded-full" style={{
          width: 3 + Math.random() * 4 + 'px', height: 3 + Math.random() * 4 + 'px',
          background: ['#fff', '#ffd166', '#7cf08a', '#ff7a3a'][i % 4],
          left: Math.random() * 100 + '%', top: Math.random() * 100 + '%',
          animationDelay: i * 0.4 + 's',
          boxShadow: '0 0 10px currentColor'
        }} />
        )}
        {/* rocket */}
        <div className="absolute left-[6%] bottom-[12%] rocket">
          <svg width="120" height="160" viewBox="0 0 120 160">
            <defs>
              <linearGradient id="trail" x1="0" x2="0" y1="0" y2="1">
                <stop offset="0%" stopColor="#ff7a3a" stopOpacity="0" />
                <stop offset="50%" stopColor="#ffd166" stopOpacity=".9" />
                <stop offset="100%" stopColor="#ff7a3a" stopOpacity="0" />
              </linearGradient>
            </defs>
            {/* trail */}
            <path d="M55 160 Q60 130 58 100" stroke="url(#trail)" strokeWidth="14" fill="none" strokeLinecap="round" opacity=".8" />
            {/* body */}
            <path d="M60 20 Q78 40 78 78 L78 110 L42 110 L42 78 Q42 40 60 20 Z" fill="#fff5dc" stroke="#062013" strokeWidth="3" />
            {/* window */}
            <circle cx="60" cy="62" r="11" fill="#4ade5a" stroke="#062013" strokeWidth="3" />
            <circle cx="56" cy="58" r="3" fill="#fff" opacity=".8" />
            {/* fins */}
            <path d="M42 92 L24 116 L42 110 Z" fill="#ff7a3a" stroke="#062013" strokeWidth="3" />
            <path d="M78 92 L96 116 L78 110 Z" fill="#ff7a3a" stroke="#062013" strokeWidth="3" />
            {/* HOPE band */}
            <rect x="42" y="80" width="36" height="10" fill="#0a3d24" />
            <text x="60" y="88" textAnchor="middle" fontFamily="'Bricolage Grotesque',sans-serif" fontSize="8" fontWeight="800" fill="#ffd166">$HOPE</text>
            {/* flames */}
            <path d="M48 110 Q52 132 48 140 Q56 130 60 144 Q64 130 72 140 Q68 132 72 110 Z" fill="#ff7a3a" />
            <path d="M52 110 Q54 124 52 130 Q58 122 60 134 Q62 122 68 130 Q66 124 68 110 Z" fill="#ffd166" />
          </svg>
        </div>
      </div>

      <div ref={ref} className="reveal max-w-[1080px] mx-auto px-5 md:px-8 text-center">
        <div className="font-mono text-[10px] tracking-[0.3em] text-hope-slime2 mb-4">
</div>
        <h2 className="hero-h text-5xl md:text-7xl text-hope-cream">
          For the ones <em className="text-hope-glow">still here</em>
        </h2>
        <div className="mt-3 font-scribble text-3xl text-hope-sun rotate-[-1deg]">manifesto · v1</div>

        <div className="mt-12 md:mt-16 max-w-3xl mx-auto space-y-3 md:space-y-4">
          {lines.map(([a, b], i) => <div key={i} className="grid grid-cols-1 md:grid-cols-2 gap-2 md:gap-6 items-center text-left md:text-right">
              <div className="font-display text-2xl md:text-3xl text-hope-cream/65 line-through decoration-hope-sun/60 decoration-2">{a}</div>
              <div className="font-display font-extrabold text-2xl md:text-3xl text-hope-slime2 neon-text md:text-left">{b}</div>
            </div>
          )}
        </div>

        <div className="mt-14 max-w-3xl mx-auto p-8 md:p-10 rounded-3xl border border-hope-slime/30 bg-hope-ink/40 backdrop-blur-sm glow-ring">
          <p className="font-display text-3xl md:text-4xl leading-tight text-hope-cream">
            We don't have <span className="line-through text-hope-cream/45">alpha</span>.
            <br />
            We have <span className="gradient-text font-extrabold">hope</span>.
          </p>
          <p className="mt-6 font-display font-extrabold text-4xl md:text-6xl text-hope-glow neon-text" style={{ textShadow: '0 0 20px rgba(255,209,102,.6), 0 0 50px rgba(255,122,58,.4)' }}>
            And that's enough.
          </p>
        </div>
      </div>
    </section>);

}

/* ---------- MEMES ---------- */

function Memes() {
  const ref = useReveal();
  // 13 memes (excluding hero + about already used)
  const memes = [
  { src: "assets/meme-01.png", tilt: -2, span: "row-span-2" },
  { src: "assets/meme-02.png", tilt: 1.5 },
  { src: "assets/meme-03.png", tilt: -1 },
  { src: "assets/meme-12.png", tilt: 2, span: "row-span-2" },
  { src: "assets/meme-04.png", tilt: -2 },
  { src: "assets/meme-05.jpg", tilt: 1 },
  { src: "assets/meme-06.png", tilt: -1.5, span: "row-span-2" },
  { src: "assets/meme-07.png", tilt: 2 },
  { src: "assets/meme-08.jpg", tilt: -1 },
  { src: "assets/meme-09.jpg", tilt: 1.5 },
  { src: "assets/meme-10.jpg", tilt: -2 },
  { src: "assets/meme-11.png", tilt: 1, span: "row-span-2" },
  { src: "assets/meme-13.png", tilt: -1 }];

  return (
    <section id="memes" data-screen-label="04 Memes" className="relative py-20 md:py-28 overflow-hidden">
      <div className="absolute inset-0 -z-10" style={{ background: 'radial-gradient(circle at 20% 20%, rgba(124,77,255,.15), transparent 50%), radial-gradient(circle at 80% 80%, rgba(74,222,90,.12), transparent 50%)' }} />
      <div ref={ref} className="reveal max-w-[1320px] mx-auto px-5 md:px-8">
        <div className="text-center mb-10 md:mb-14">
          <div className="font-mono text-[10px] tracking-[0.3em] text-hope-violet mb-3">
</div>
          <h2 className="hero-h text-5xl md:text-7xl text-hope-cream">
            <span className="gradient-text">meme</span> wall<span className="text-hope-sun">.</span>
          </h2>
        </div>

        {/* manifesto quote */}
        <div className="relative max-w-4xl mx-auto mb-12 md:mb-16">
          <div className="relative p-6 md:p-10 rounded-3xl bg-gradient-to-br from-hope-ink2/90 to-hope-ink/90 border border-hope-glow/30 glow-ring text-center">
            <div className="absolute -top-5 left-6 font-display font-extrabold text-7xl text-hope-glow leading-none select-none" style={{ textShadow: '0 4px 0 #000' }}>"</div>
            <p className="font-display font-semibold text-xl md:text-3xl leading-tight text-hope-cream">
              It's not about being <em className="text-hope-sun">early</em>.
              It's about being the <span className="highlight text-hope-glow">last one to leave</span>
              — and still <span className="neon-text text-hope-slime2">not leaving</span>.
            </p>
          </div>
          <div className="tape" style={{ top: '-12px', left: '40%', transform: 'rotate(-4deg)' }}></div>
        </div>

        {/* dynamic masonry-ish grid */}
        <div className="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-3 md:gap-4 auto-rows-[140px] md:auto-rows-[180px]">
          {memes.map((m, i) => <div key={i}
          className={`meme-card relative rounded-2xl overflow-hidden border-2 border-hope-slime/30 ${m.span || ''} bg-hope-ink2`}
          style={{ '--tilt': m.tilt + 'deg', transform: 'rotate(' + m.tilt * 0.4 + 'deg)' }}>
              <img src={m.src} alt={"meme " + (i + 1)} className="w-full h-full object-cover" loading="lazy" />
              {/* number sticker */}
              <div className="absolute top-2 left-2 px-2 py-0.5 rounded-md bg-hope-ink/80 backdrop-blur font-mono text-[10px] text-hope-slime2 border border-hope-slime/30">
                #{String(i + 1).padStart(2, '0')}
              </div>
              {/* hover overlay */}
              <div className="absolute inset-0 opacity-0 hover:opacity-100 transition flex items-end p-3 bg-gradient-to-t from-hope-ink/90 via-transparent to-transparent">
                <div className="font-scribble text-2xl text-hope-glow">$HOPE</div>
              </div>
            </div>
          )}
        </div>
      </div>
    </section>);

}

/* ---------- SHORTAGE ---------- */

function Shortage() {
  const ref = useReveal();
  return (
    <section id="shortage" data-screen-label="05 Shortage" className="relative py-24 md:py-36 overflow-hidden">
      <div className="absolute inset-0 -z-10" style={{ background: 'linear-gradient(180deg, transparent 0%, rgba(74,222,90,.05) 50%, transparent 100%)' }} />
      <div ref={ref} className="reveal max-w-[1100px] mx-auto px-5 md:px-8">
        <div className="text-center mb-10">
          <div className="font-mono text-[10px] tracking-[0.3em] text-hope-sun mb-3">
</div>
          <h2 className="hero-h text-6xl md:text-[9rem] gradient-text">
            SHORTAGE
          </h2>
          <div className="font-scribble text-3xl text-hope-glow rotate-[-2deg] mt-2">read this twice.</div>
        </div>

        <div className="relative p-8 md:p-14 rounded-[36px] bg-hope-ink2/80 border-2 border-hope-slime/30 glow-ring backdrop-blur">
          {/* corner crops */}
          <div className="absolute top-3 left-3 w-6 h-6 border-l-2 border-t-2 border-hope-glow"></div>
          <div className="absolute top-3 right-3 w-6 h-6 border-r-2 border-t-2 border-hope-glow"></div>
          <div className="absolute bottom-3 left-3 w-6 h-6 border-l-2 border-b-2 border-hope-glow"></div>
          <div className="absolute bottom-3 right-3 w-6 h-6 border-r-2 border-b-2 border-hope-glow"></div>

          <p className="font-display text-2xl md:text-[2.4rem] leading-[1.3] text-hope-cream text-center">
            <span className="text-hope-cream/80">$HOPE is a memecoin on Solana.</span>{' '}
            <span className="block mt-3"></span>
            <span className="inline-block px-2 highlight text-hope-sun font-extrabold">No utility.</span>{' '}
            <span className="inline-block px-2 highlight text-hope-sun font-extrabold">No promises.</span>{' '}
            <span className="text-hope-cream/85">No pretending the market is fine.</span>
            <span className="block mt-4"></span>
            <span className="text-hope-cream/85">Just a coin for people who still believe memecoins will come back.</span>
            <span className="block mt-6"></span>
            <span className="text-hope-cream/55 text-lg md:text-xl block">This is not financial advice.</span>
            <span className="block mt-2"></span>
            <span className="font-display font-extrabold text-4xl md:text-6xl block mt-4">
              This is <span className="text-hope-sun line-through decoration-2">cope</span>.
            </span>
            <span className="font-display font-extrabold text-4xl md:text-6xl block mt-2 gradient-text">
              This is hope.
            </span>
          </p>
        </div>
      </div>
    </section>);
}

/* ---------- SOCIAL ---------- */

function Social() {
  const ref = useReveal();
  const cards = [
  { label: 'PumpFun', tag: 'launchpad', href: '#', accent: '#ff7a3a',
    icon: <svg viewBox="0 0 48 48" width="48" height="48" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"><path d="M24 6c-7 8-9 14-9 20a9 9 0 0 0 18 0c0-6-2-12-9-20Z" /><path d="M19 30c0 3 2 5 5 5s5-2 5-5" /></svg> },
  { label: 'X / Twitter', tag: '@hope_sol', href: '#', accent: '#7cf08a',
    icon: <svg viewBox="0 0 48 48" width="48" height="48" fill="currentColor"><path d="M30.5 7h6.6L25.6 19.4 39 41h-9.4l-7.6-10.4L13 41H6.4l12.4-13.4L6 7h9.6l6.9 9.6L30.5 7zm-2.3 30h3.6L17 11h-3.7l14.9 26z" /></svg> },
  { label: 'DexScreener', tag: 'live chart', href: '#', accent: '#ffd166',
    icon: <svg viewBox="0 0 48 48" width="48" height="48" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"><path d="M5 38l9-12 7 6 12-16 10 8" /><path d="M5 42h38" /></svg> }];


  return (
    <section id="social" data-screen-label="06 Social" className="relative py-24 md:py-32 overflow-hidden">
      <div aria-hidden className="absolute inset-0 -z-10">
        <div className="absolute inset-0" style={{ background: 'radial-gradient(circle at 50% 50%, rgba(124,240,138,.12), transparent 60%)' }} />
        <div className="stars absolute inset-0 opacity-50"></div>
      </div>

      <div ref={ref} className="reveal max-w-[1280px] mx-auto px-5 md:px-8">
        <div className="text-center mb-12">
          <div className="font-mono text-[10px] tracking-[0.3em] text-hope-slime2 mb-3">
</div>
          <h2 className="hero-h text-5xl md:text-7xl text-hope-cream">
            Join the <em className="gradient-text">last believers</em>
          </h2>
          <div className="font-scribble text-3xl text-hope-sun rotate-[-2deg] mt-2">don't be early. just don't leave.</div>
        </div>

        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-5 md:gap-6">
          {cards.map((c, i) => <a key={i} href={c.href}
            className="social-card aspect-square rounded-3xl flex flex-col justify-between p-6 md:p-7 bg-hope-ink2/80 border border-hope-slime/25"
            style={{ color: c.accent }}>
              <div className="flex items-start justify-between">
                <span className="font-mono text-[10px] tracking-[0.25em] text-hope-cream/60">/ 0{i + 1}</span>
                <span className="text-hope-cream/60 group-hover:text-white text-xl">↗</span>
              </div>
              <div>
                <div className="mb-4 opacity-95">{c.icon}</div>
                <div className="font-display font-extrabold text-3xl md:text-4xl text-hope-cream leading-none">{c.label}</div>
                <div className="mt-2 font-mono text-[10px] tracking-widest uppercase text-hope-cream/55">{c.tag}</div>
              </div>
            </a>
          )}
          {/* CA copy card */}
          <CACard />
        </div>

        {/* contract row */}
        <div className="mt-10 md:mt-14 flex flex-wrap items-center justify-center gap-3 p-4 px-6 rounded-2xl bg-hope-ink2/60 border border-hope-slime/20 backdrop-blur max-w-3xl mx-auto">
          <span className="font-mono text-[10px] tracking-[0.3em] text-hope-slime2/70">CONTRACT</span>
          <code className="font-mono text-base md:text-lg text-hope-cream">{CA_SOCIAL}</code>
          <CopyButton value={CA_SOCIAL} />
        </div>

        {/* closing line */}
        <div className="mt-20 md:mt-28 text-center">
          <p className="font-display font-extrabold text-3xl md:text-5xl leading-tight text-hope-cream">
            <span className="gradient-text">Trenches never die.</span>
            <br />
            <span className="text-hope-cream/85">They just go quiet</span>{' '}
            <em className="text-hope-glow neon-text" style={{ textShadow: '0 0 20px rgba(255,209,102,.6)' }}>before the next send.</em>
          </p>
          <div className="mt-10 inline-flex items-center gap-3 font-mono text-[10px] tracking-[0.3em] text-hope-cream/50">
            $HOPE • SOLANA • {new Date().getFullYear()}
          </div>
        </div>
      </div>
    </section>);

}

function CACard() {
  const [copied, setCopied] = useState(false);
  const onClick = async () => {
    try {await navigator.clipboard.writeText(CA_SOCIAL);}
    catch {
      const ta = document.createElement('textarea');ta.value = CA_SOCIAL;
      document.body.appendChild(ta);ta.select();
      try {document.execCommand('copy');} catch {}ta.remove();
    }
    setCopied(true);setTimeout(() => setCopied(false), 1800);
  };
  return (
    <button onClick={onClick}
    className="social-card aspect-square rounded-3xl flex flex-col justify-between p-6 md:p-7 bg-hope-ink2/80 border border-hope-slime/25 text-left"
    style={{ color: '#7cf08a' }}>
      <div className="flex items-start justify-between">
        <span className="font-mono text-[10px] tracking-[0.25em] text-hope-cream/60">/ 04</span>
        <span className={"text-xl " + (copied ? 'text-hope-glow' : 'text-hope-cream/60')}>{copied ? '✓' : '⧉'}</span>
      </div>
      <div>
        <div className="mb-4 opacity-95">
          <svg viewBox="0 0 48 48" width="48" height="48" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round">
            <rect x="14" y="14" width="28" height="28" rx="4" />
            <path d="M6 30V10a4 4 0 0 1 4-4h20" />
          </svg>
        </div>
        <div className="font-display font-extrabold text-3xl md:text-4xl text-hope-cream leading-none">
          {copied ? 'COPIED!' : 'COPY CA'}
        </div>
        <div className="mt-2 font-mono text-[10px] tracking-widest uppercase text-hope-cream/55 break-all">
          {CA_SOCIAL}
        </div>
      </div>
    </button>);

}

/* ---------- DIVIDER ---------- */

function Divider({ label }) {
  return (
    <div className="relative h-20 md:h-24 flex items-center justify-center">
      <div className="absolute left-0 right-0 top-1/2 h-px" style={{ background: 'linear-gradient(90deg, transparent, rgba(124,240,138,.4), transparent)' }} />
      <div className="relative px-5 py-1.5 rounded-full bg-hope-ink border border-hope-slime/30 font-mono text-[10px] tracking-[0.3em] text-hope-slime2 flex items-center gap-3">
        <span className="w-1.5 h-1.5 rounded-full bg-hope-slime animate-pulse"></span>
        {label}
        <span className="w-1.5 h-1.5 rounded-full bg-hope-sun animate-pulse"></span>
      </div>
    </div>);

}

Object.assign(window, { Navbar, Hero, About, Mission, Memes, Shortage, Social, Divider });