import React, { useState, useEffect, useMemo } from "react"; /* ═══════════════════════════════════════════════════════════════════ CONVERGENCE · THE IMAGINAL WORLD enter → the spiral of the thirteen Cs → locate → tribes (the Alliance) → the Imaginal → membership → the great work night → dawn. built like the book: layer by layer. ═══════════════════════════════════════════════════════════════════ */ const CS = [ { id:"creation", n:1, name:"Creation", movement:"The Descent", color:"#e8c87a", essence:"The divine spark. Born of consciousness before the world taught separation.", fragment:"I was created in that face — before I learned that I was 'me' and you were 'other.'", touch:"", q:"What is the spark you came from — the gift in you before the world named you?", bridge:"And from the spark, the world began to teach you its names…" }, { id:"childhood", n:2, name:"Childhood", movement:"The Descent", color:"#ecd9a8", essence:"When every tree was burning, every face was holy, the Earth herself was prayer.", fragment:"In Childhood, I knew better.", touch:"", q:"What did you know as a child that the world later asked you to forget?", bridge:"Then the mirror cracked…" }, { id:"confusion", n:3, name:"Confusion", movement:"The Descent", color:"#9aa0b4", essence:"The mirror cracks. The Garden closes. We learn 'me' from 'other' — and the dark wood begins.", fragment:"Building elaborate theories about the face I could not see.", touch:"Dante: midway through life, lost in a forest dark.", q:"When did the separation begin for you — the first time you felt apart from the whole?", bridge:"And to survive the confusion, we began to bargain…" }, { id:"compromise", n:4, name:"Compromise", movement:"The Descent", color:"#737a8c", essence:"The expensive middle. The bargains that extract more than they preserve.", fragment:"Empires of distraction, built to avoid the wound.", touch:"", q:"What have you traded away to belong, to be safe, to succeed?", bridge:"The bargains could not hold. The war began…" }, { id:"conflict", n:5, name:"Conflict", movement:"The Descent", color:"#565d70", essence:"The war within, projected outward. The battles that wound — and the ones that clarify.", fragment:"Different prisons. Different gates. The same twenty-seven years.", touch:"Mandela: the cell that could not hold the man.", q:"What conflict — outer or inner — has shaped you most? What did it clarify?", bridge:"And the war led you down, to the bottom…" }, { id:"crisis", n:6, name:"Crisis · Chaos",movement:"The Descent",color:"#39405a", essence:"The frozen lake. The breakdown. The bottom, where everything you thought you were falls away.", fragment:"Mine came with a bottle in one hand and the other reaching for an end.", touch:"The lowest circle is ice, not fire. The duality at the centre.", q:"Have you met your bottom — the chaos that took all you thought you were? Where are you with it now?", bridge:"And at the bottom, the road forks. A choice…" }, { id:"choice", n:7, name:"Choice", movement:"The Turn", color:"#cfd4e4", essence:"The middle of the road, where the true way was lost — and found. Not survival, but the Second Choice: not what to do, but who to be.", fragment:"The first choice was survival. Now a deeper choosing calls.", touch:"nel mezzo del cammin — the middle of the road of our life.", q:"What is the choice in front of you now — the turning you can feel but may not yet have made?", bridge:"And the choice asks its first truth of you…" }, { id:"confession", n:8, name:"Confession", movement:"The Conscious Path", color:"#d8aa78", essence:"Naming the untruths lived. Confession creates space; space creates freedom.", fragment:"Confession creates space. Compassion fills it.", touch:"", q:"What truth are you ready to name — to yourself, or aloud?", bridge:"And once named, the heart begins to open…" }, { id:"compassion", n:9, name:"Compassion", movement:"The Conscious Path", color:"#e0a890", essence:"Opening to the pain being caused. Not a feeling — a practice. The crack that lets the light in.", fragment:"Compassion is the act of giving gracefully.", touch:"Mozambique: the mothers who taught that compassion is a practice, not a mood.", q:"Where is compassion asking to move through you — toward another, or toward yourself?", bridge:"And compassion clears the eyes to see…" }, { id:"clarity", n:10, name:"Clarity", movement:"The Conscious Path", color:"#ecc888", essence:"Clarity in the rubble of certainties. The science of seeing. Forgiveness of old judgments.", fragment:"Faith is found on the uncommon edges of this uncertain understanding.", touch:"", q:"What are you finally seeing clearly — what certainty has fallen away?", bridge:"And clear sight opens onto something vast…" }, { id:"consciousness",n:11,name:"Consciousness",movement:"The Conscious Path", color:"#bfe4cc", essence:"Re-awakening to a consciousness so vast it holds the refugee and the billionaire, the forest and the fire.", fragment:"The vast I that includes you — the I that is the soil and the seed.", touch:"Beatrice: the one who turns your gaze upward.", q:"When have you touched the consciousness larger than 'you' — the witness, the field?", bridge:"And the vast self turns toward others…" }, { id:"cooperation",n:12, name:"Cooperation", movement:"Service & Circulation", color:"#aad98c", essence:"Beyond competition. The Last Alliance. Separated, we fail; united, we become what none could alone.", fragment:"The beacons are lit. What unique gift do you bring to the Alliance?", touch:"Even the smallest person can change the course of the future.", q:"Who are your unlikely allies — and what could you build together that none could alone?", bridge:"And cooperation becomes a flow…" }, { id:"circulation",n:13, name:"Circulation", movement:"Service & Circulation", color:"#ffd98a", essence:"The flow of giving and receiving. Value held at source. You are not the source — you are a channel.", fragment:"You are not the source. Let yourself be used by life to serve life.", touch:"Yunus: turn the world's logic on its head; bank the unbankable.", q:"What wants to circulate through you into the world — what gift is ready to flow?", bridge:"You have walked all thirteen. The spiral returns you, changed, to where you began. The heart is lit." }, ]; const TRIBES = [ { id:"young", name:"Young Visionaries", gift:"the future, unconditioned", med:"Hope with teeth. You are creating the future now." }, { id:"misfits", name:"Beautiful Misfits", gift:"the shape of what's coming", med:"Made for systems that do not exist yet. Your 'too much' is exactly enough." }, { id:"wisdom", name:"Ancient Wisdom Keepers", gift:"the original technologies", med:"You never forgot what others spent centuries trying to remember." }, { id:"tech", name:"Technology Visionaries", gift:"the nervous system", med:"Where platforms extract, your protocols circulate." }, { id:"finance", name:"Financial Revolutionaries", gift:"rivers where there were dams", med:"Money is energy that must flow." }, { id:"farmers", name:"Farmers & Food Revolutionaries",gift:"the foundation, the food", med:"You hold humanity's future in your hands." }, { id:"survival",name:"Survival Alchemists", gift:"abundance from scarcity", med:"You do not theorise resilience. You embody it." }, { id:"healers", name:"Healthcare Healers", gift:"root causes, not symptoms", med:"Individual and planetary health are inseparable." }, { id:"warriors",name:"Spiritual Warriors", gift:"heaven anchored on Earth", med:"Inner work and outer action, wedded." }, { id:"learning",name:"Learning Facilitators", gift:"seeds, not products", med:"You nurture consciousness, you do not manufacture it." }, { id:"creators",name:"Conscious Creators", gift:"the story that opens hearts", med:"Consciousness changes through beauty, not argument." }, { id:"women", name:"Women's Wisdom Keepers", gift:"the first circular economy", med:"Your kitchens and gardens were the first regenerative systems." }, { id:"athletes",name:"Athletic Inspirers", gift:"excellence that lifts all", med:"True victory lifts every boat." }, ]; const SEED = [ { id:"s1",name:"Itzel", place:"Yucatán, México", sector:"Food & Farming", primaryC:"circulation", tribes:["farmers","wisdom"], gifts:"coconut, melipona honey, regenerative growing", gives:"coconut, honey, regenerative growing", seeks:"fair offtake, seed exchange", migrant:false }, { id:"s2",name:"Amara", place:"crossed Sudan → Uganda", sector:"Textiles & Clothing", primaryC:"crisis", tribes:["women","survival"], gifts:"weaving, natural dye, indigo", gives:"weaving, natural dye", seeks:"looms, market, belonging", migrant:true }, { id:"s3",name:"Tendai",place:"Zimbabwe", sector:"Food & Farming", primaryC:"cooperation", tribes:["farmers","wisdom"], gifts:"permaculture, soil restoration", gives:"permaculture, soil restoration", seeks:"water tech, knowledge exchange", migrant:false }, { id:"s4",name:"Khalil",place:"crossed Syria → Jordan", sector:"Construction & Shelter", primaryC:"choice", tribes:["survival","creators"],gifts:"stonework, hemp-block building", gives:"stonework, building", seeks:"materials, community, dignity", migrant:true }, { id:"s5",name:"Priya", place:"Bengaluru, India", sector:"Technology", primaryC:"clarity", tribes:["tech","young"], gifts:"blockchain traceability, transparency code", gives:"traceability, transparency code", seeks:"farmers to serve, partners", migrant:false }, { id:"s6",name:"Joana", place:"Salvador, Brazil", sector:"Bioplastics & Materials",primaryC:"circulation", tribes:["creators","survival"],gifts:"coconut-coir panels, bioplastic", gives:"coir panels, bioplastic", seeks:"offtake partners", migrant:false }, { id:"s7",name:"Mara", place:"Kenya", sector:"Energy", primaryC:"cooperation", tribes:["tech","survival"], gifts:"solar microgrid, biogas from farm waste", gives:"solar, biogas", seeks:"investment, training", migrant:false }, { id:"s8",name:"Soraya",place:"crossed Afghanistan → Greece",sector:"Displaced · carrying skill",primaryC:"confession",tribes:["women","survival"],gifts:"cooking, food traditions, three languages", gives:"cooking, languages", seeks:"a kitchen, work, dignity", migrant:true }, ]; const SECTORS=["Food & Farming","Textiles & Clothing","Bioplastics & Materials","Construction & Shelter","Energy","Technology","Finance & Capital","Healing & Health","Learning & Education","Arts & Story","Spirit & Ceremony","Displaced · carrying skill across borders","Partner · Brand · Buyer","Other"]; const ECONOMY={"Food & Farming":"Food","Textiles & Clothing":"Clothing","Bioplastics & Materials":"Materials","Construction & Shelter":"Shelter","Energy":"Energy"}; const ECONOMIES=["Food","Clothing","Materials","Shelter","Energy"]; const FIELD_STORE="convergence-field-v2"; const MEMBER_STORE="convergence-member-v2"; // R.O.S.E. Cities is built from these components — and the whole rises from them const COMPONENTS=[ { id:"FOOD", name:"Food", line:"nourishment from regenerated land" }, { id:"CLOTHING", name:"Clothing", line:"fibre and dignity, worn" }, { id:"MATERIALS",name:"Materials", line:"coir, hemp, bioplastic — the stuff of making" }, { id:"SHELTER", name:"Shelter", line:"homes from the land, for the displaced" }, { id:"ENERGY", name:"Energy", line:"light and power, clean and local" }, { id:"WEAVE", name:"The Weave", line:"the commons that binds — capital, traceability, healing, story; value held at source" }, ]; const SECTOR_COMP={"Food & Farming":["FOOD"],"Textiles & Clothing":["CLOTHING"],"Bioplastics & Materials":["MATERIALS"],"Construction & Shelter":["SHELTER"],"Energy":["ENERGY"],"Technology":["WEAVE"],"Finance & Capital":["WEAVE"],"Healing & Health":["WEAVE"],"Learning & Education":["WEAVE"],"Arts & Story":["WEAVE"],"Spirit & Ceremony":["WEAVE"],"Partner · Brand · Buyer":["WEAVE"]}; const TRIBE_COMP={farmers:["FOOD"],women:["FOOD","CLOTHING"],wisdom:["FOOD","WEAVE"],survival:["SHELTER","FOOD"],creators:["CLOTHING","WEAVE"],tech:["WEAVE","ENERGY"],finance:["WEAVE"],healers:["WEAVE"],learning:["WEAVE"],warriors:["SHELTER","WEAVE"],young:["WEAVE"],misfits:["WEAVE"],athletes:["WEAVE"]}; const GIFT_COMP=[[/coconut|honey|grow|soil|permacultur|regenerat|seed|food|cook|farm/,"FOOD"],[/weav|dye|textile|cloth|indigo|garment/,"CLOTHING"],[/coir|bioplastic|hemp|panel|fibre|fiber|material/,"MATERIALS"],[/stone|build|construct|shelter|home|hous/,"SHELTER"],[/solar|biogas|energy|grid|power|electric/,"ENERGY"],[/code|traceab|transparen|blockchain|capital|invest|financ|heal|learn|teach|educat|story|design|govern|languag/,"WEAVE"]]; function mapComponents(soul){ const set=new Set(); (SECTOR_COMP[soul.sector]||[]).forEach(c=>set.add(c)); (soul.tribes||[]).forEach(t=>(TRIBE_COMP[t]||[]).forEach(c=>set.add(c))); GIFT_COMP.forEach(([re,c])=>{ if(re.test(soul.gifts||"")||re.test(soul.gives||"")) set.add(c); }); if(!set.size) set.add("WEAVE"); return [...set]; } // The community of Imaginals is the pulse. Within it, creation is free — // some build R.O.S.E. Cities, others make their own. The one constant is the consciousness of the 13 Cs. const CREATIONS=[ { id:"rose", name:"R.O.S.E. Cities", what:"the living commons we build and dwell within — five economies, value held at source", founders:["Itzel","Khalil","Mara"], type:"rose" }, { id:"seedbank", name:"Seedbank of the Rift", what:"seed sovereignty — open, regenerative, farmer-held", founders:["Itzel","Tendai"], type:"emergent" }, { id:"threads", name:"Threads Across Borders", what:"a weaving collective — a loom and a market for those who crossed", founders:["Amara"], type:"emergent" }, { id:"opentrace", name:"Open Trace", what:"traceability so every buyer meets the maker", founders:["Priya","Khalil"], type:"emergent" }, { id:"manytongues", name:"The Kitchen of Many Tongues",what:"food, language and belonging for those who crossed", founders:["Soraya"], type:"emergent" }, ]; const SPIRAL = CS.map((c,i)=>{ const t=i/(CS.length-1); const a=-Math.PI/2+t*Math.PI*3.0; const r=44-t*34; return {...c,x:50+r*Math.cos(a),y:50+r*Math.sin(a)}; }); const wlist=(s)=>(s||"").toLowerCase().split(/[^a-z0-9]+/).filter(w=>w.length>3); const olap=(a,b)=>{const B=new Set(wlist(b));return wlist(a).some(w=>B.has(w));}; const lerp=(a,b,t)=>Math.round(a+(b-a)*t); const mix=(h1,h2,t)=>{const p=h=>[1,3,5].map(i=>parseInt(h.slice(i,i+2),16));const[a,b,c]=p(h1),[d,e,f]=p(h2);return`rgb(${lerp(a,d,t)},${lerp(b,e,t)},${lerp(c,f,t)})`;}; export default function ConvergenceWorld(){ const [phase,setPhase]=useState("enter"); // enter spiral locate tribes imaginal member greatwork const [station,setStation]=useState(null); const [mode,setMode]=useState("engage"); const [responses,setResponses]=useState({}); const [tribes,setTribes]=useState([]); const [lastTribe,setLastTribe]=useState(null); const [form,setForm]=useState({gifts:"",gives:"",seeks:"",sector:"",calling:"",recreate:""}); const [member,setMember]=useState({name:"",place:"",contact:"",contactType:"email",consent:false}); const [primaryC,setPrimaryC]=useState(null); const [creations,setCreations]=useState(CREATIONS); const [joined,setJoined]=useState([]); const [newCreation,setNewCreation]=useState({name:"",what:""}); const [souls,setSouls]=useState(SEED); const [you,setYou]=useState(null); const [received,setReceived]=useState([]); const [carried,setCarried]=useState(false); const [tmp,setTmp]=useState({reflect:"",presence:0}); useEffect(()=>{(async()=>{try{const r=await window.storage.get(FIELD_STORE,true);if(r&&r.value)setSouls([...SEED,...JSON.parse(r.value)]);}catch(e){}})()},[]); const engaged=Object.keys(responses); const allEngaged=engaged.length>=CS.length; const progress=engaged.length/CS.length; const bg=useMemo(()=>{ if(phase==="greatwork") return "linear-gradient(180deg,#3a3550 0%,#8a6a5c 42%,#d99a6c 76%,#f0c98a 100%)"; if(phase==="member") return `linear-gradient(180deg,${mix("#0a1024","#3a2f3a",.85)} 0%, ${mix("#0a0c16","#7a5446",.85)} 100%)`; if(phase==="imaginal") return `linear-gradient(180deg,${mix("#0a1024","#2a2640",.8)} 0%, ${mix("#0a0c16","#6b4a4e",.8)} 100%)`; if(phase==="tribes") return `linear-gradient(180deg,${mix("#0a1024","#241f33",.7)} 0%, ${mix("#0a0c16","#4a3530",.7)} 100%)`; if(phase==="locate") return `linear-gradient(180deg,${mix("#0a1024","#241f30",Math.max(progress,.6))} 0%, ${mix("#0a0c16","#3a2a26",Math.max(progress,.7))} 100%)`; return `linear-gradient(180deg,${mix("#070a16","#241f33",progress)} 0%, ${mix("#05070f","#4a3326",progress)} 100%)`; },[phase,progress]); const nextUn=(fromId)=>{ const start=CS.findIndex(c=>c.id===fromId); for(let k=1;k<=CS.length;k++){const c=CS[(start+k)%CS.length]; if(!responses[c.id]&&c.id!==fromId)return c;} return null; }; const openStation=(c)=>{ setStation(c); setMode("engage"); const r=responses[c.id]; setTmp(r?{reflect:r.reflect,presence:r.presence}:{reflect:"",presence:0}); }; const engage=()=>{ setResponses(p=>({...p,[station.id]:{reflect:tmp.reflect,presence:tmp.presence||0}})); setMode("landing"); }; const continueWalk=()=>{ const nx=nextUn(station.id); if(nx) openStation(nx); else setStation(null); }; const derivePrimary=()=>{ let best=CS[6].id,bv=-1; CS.forEach(c=>{const v=responses[c.id]?.presence||0; if(v>bv){bv=v;best=c.id;}}); return best; }; const toggleTribe=(id)=>{ setLastTribe(id); setTribes(t=>t.includes(id)?t.filter(x=>x!==id):[...t,id]); }; const saveMember=async()=>{ const p=primaryC||derivePrimary(); setPrimaryC(p); const soul={ id:"you-"+Date.now(), name:member.name.trim()||"a frequency", place:member.place.trim(), sector:form.sector, primaryC:p, tribes, gifts:form.gifts, gives:form.gives, seeks:form.seeks, calling:form.calling, recreate:form.recreate, migrant:/displaced|migrant|crossed/i.test(form.sector+" "+member.place), you:true }; setYou(soul); setSouls(s=>[...s,soul]); // PRIVATE member record (with contact) — held only for this member try{ await window.storage.set(MEMBER_STORE, JSON.stringify({ ...soul, contact:member.contact, contactType:member.contactType, consent:member.consent, joinedAt:Date.now() }), false); }catch(e){} // SHARED field record — anonymised, NO contact, for clustering only try{ const r=await window.storage.get(FIELD_STORE,true); const prev=r&&r.value?JSON.parse(r.value):[]; await window.storage.set(FIELD_STORE, JSON.stringify([...prev, {...soul, you:false}]), true); }catch(e){} setPhase("greatwork"); }; const cIndex=(id)=>CS.findIndex(c=>c.id===id); const cluster=useMemo(()=>{ if(!you)return[]; return souls.filter(s=>s.id!==you.id).map(s=>{ let n=0; const why=[]; const myI=cIndex(you.primaryC), sI=cIndex(s.primaryC); if(s.primaryC===you.primaryC){n+=3;why.push("walking the same stage");} else if(sI>myI&&olap(you.seeks,s.gives)){n+=4;why.push("further on — gives what you seek");} else if(sI(you.tribes||[]).includes(t)); if(sharedT.length){n+=2*sharedT.length;why.push("kindred tribe");} if(olap(you.gives,s.seeks)&&!why.find(w=>w.includes("you give"))){n+=2;why.push("you give what they seek");} if(olap(you.seeks,s.gives)&&!why.find(w=>w.includes("gives what you"))){n+=2;why.push("gives what you seek");} if(olap(you.gifts,s.gifts)){n+=1;why.push("kindred gifts");} return {s,n,why}; }).filter(x=>x.n>0).sort((a,b)=>b.n-a.n).slice(0,6); },[you,souls]); const cObj=(id)=>CS.find(c=>c.id===id); const tObj=(id)=>TRIBES.find(t=>t.id===id); // R.O.S.E. Cities: each component built from the clustered skills of the Imaginals const compClusters=useMemo(()=>{ const m={}; COMPONENTS.forEach(c=>m[c.id]=[]); souls.forEach(s=>mapComponents(s).forEach(cid=>m[cid]&&m[cid].push(s))); return m; },[souls]); const myComps = you?mapComponents(you):[]; const builtCount = COMPONENTS.filter(c=>compClusters[c.id].length>=3).length; const cityState = builtCount>=6?"alive":builtCount>=4?"rising":builtCount>=1?"forming":"seeded"; const joinCreation=(id)=> setJoined(j=>j.includes(id)?j:[...j,id]); const startCreation=()=>{ const n=newCreation.name.trim(); if(!n)return; const id="cr-"+Date.now(); // other Imaginals whose gifts answer this creation cluster toward it const kin=souls.filter(s=>!s.you&&(olap(s.gifts,newCreation.what)||olap(s.gives,newCreation.what))).slice(0,3).map(s=>s.name); setCreations(c=>[{id,name:n,what:newCreation.what.trim()||"a new creation",founders:[member.name.trim()||"you",...kin],type:"emergent",mine:true},...c]); setJoined(j=>[...j,id]); setNewCreation({name:"",what:""}); }; return (
{/* ENTER */} {phase==="enter" && (
CONVERGENCE · THE IMAGINAL WORLD

Midway through the journey,
the spiral begins.

You are an imaginal cell in the metamorphosis of our time.
Convergence asks all thirteen Cs of you — in order or out of it, none skipped — then your tribe, then the recognition that was always coming.
Not information. Transformation. And then the work.

)} {/* SPIRAL */} {phase==="spiral" && ( <>
THE SPIRAL · {engaged.length} of 13 engaged

{allEngaged?"You have walked all thirteen. The heart is lit. Convergence is open.":"Enter each C. No bypasses — convergence needs all thirteen. Walk in order, or follow what calls."}

{SPIRAL.map((c,i)=> i))}
{allEngaged?"convergence":"the heart"}
{SPIRAL.map((c,i)=>{ const done=!!responses[c.id]; const pres=responses[c.id]?.presence||0; const r=done?9+pres*1.1:8; return(
); })}
{allEngaged? :Tap each light. Sit with its question. The dark lifts as you go.}
)} {/* STATION */} {station && (
{mode==="engage"?(<>
{station.movement} · C{station.n}

{station.name}

{station.essence}

“{station.fragment}”

{station.touch?

{station.touch}

:null}
{station.q}