/* pc-diagnostic.js Single source of truth for the Find Your Next Move diagnostic. Used by the homepage (modal) and /start-here (inline). Edit questions, result copy, routing, and tags in ONE place here. Host page provides CSS variables (--gold, --black, --ivory, etc.). This file injects its own styles and modal markup. Capture behavior: - PROTOTYPE mode simulates the submission state clearly and sends NO personal data anywhere. Email is always optional and never blocks routing. - For live GoHighLevel, set PROTOTYPE to false and provide window.PCDiagLive = { submit: function(payload, onSuccess, onError){ ... } } wired to a native GHL form, survey, or verified integration that confirms the contact was created or updated before onSuccess routes the visitor. */ (function(){ if (window.PCDiag) { return; } var PROTOTYPE = false; var DIAG_HOOK = "https://hooks.zapier.com/hooks/catch/25251658/4hghneu/"; var DATA = { question: "What are you most focused on strengthening right now?", intro: "Pick the one that fits where you are today. You can always come back for the others.", options: [ { key: "self", num: "01", label: "Myself and my leadership", sub: "Identity, self-mastery, performance, and leadership formation.", title: "Evolved Mastery Global", url: "/evolved-mastery", tag: "identity-leadership", experiencing: "You have grown, and something has quietly stopped moving. The results still come, but the person producing them feels stretched, and part of you already senses the next season will ask for more than the current version of you can carry.", why: "Your vision can only go as far as the person carrying it. What looks like a business problem is often an identity and leadership one, and no outside strategy fixes that.", step: "Begin inside Evolved Mastery Global, the flagship institution for identity, self-mastery, and leadership formation.", find: "The R.E.A.L. Method, developmental programs, and a community of leaders who are building something real instead of collecting more information." }, { key: "business", num: "02", label: "My business foundation and growth", sub: "Foundations, funding readiness, and business credit education.", title: "EMG Legacy Group", url: "/legacy", tag: "business-development", experiencing: "The vision is clear, but the structure underneath it has not kept up. You are moving fast on a foundation that was never fully built, and you can feel where it is thin.", why: "A strong vision on a weak foundation eventually stalls. Readiness and structure decide whether growth holds or cracks under its own weight.", step: "Start with EMG Legacy Group, focused on business foundations, funding readiness, and business credit education.", find: "Education and preparation for building correctly, strengthening the foundation, and getting ready for responsible growth. Preparation, not promises." }, { key: "brand", num: "03", label: "My brand, message, and visibility", sub: "Positioning, message, story, and creative execution.", title: "Imprint Branding Agency", url: "/imprint", tag: "branding-creative", experiencing: "You have outgrown how you show up. The brand still sounds like an earlier version of you, the message does not land the way the work deserves, and the right people are not recognizing what you actually do.", why: "When the brand does not match the person and the work, the right people pass by without knowing what they missed. Positioning has to catch up to who you have become.", step: "Start with Imprint Branding Agency, beginning with positioning and message before any creative is produced.", find: "Brand strategy, story, photography, video, and websites that reflect who you are now and the impact you are ready to make." }, { key: "integrated", num: "04", label: "The person, business, and brand together", sub: "Direct, high-touch work across all three at once.", title: "Work With Princeton", url: "/work-with-princeton", tag: "integrated-advisory", experiencing: "You do not have one problem. You have three that keep affecting each other. Progress in one area gets undone by the other two, and you are tired of piecing together advice that does not agree.", why: "When the person, the business, and the brand finally move as one, the same goals get lighter and faster. That alignment is the whole point of working directly with Princeton.", step: "Work directly with Princeton in an integrated engagement that develops all three together.", find: "How direct and integrated advisory works, who it is for, and how to apply. Personal, strategic, and limited." } ] }; var state = { container: null, mode: "inline", current: null, lastFocus: null }; function byId(id){ return document.getElementById(id); } function optByKey(k){ for (var i=0;i" + esc(DATA.question) + "" + "

" + esc(DATA.intro) + "

" + "
"; for (var i=0;i" + "" + o.num + "" + "" + esc(o.label) + "" + esc(o.sub) + "" + ""; } html += "
"; return html; } function step2HTML(o){ var proto = ""; return proto + "
" + "
Your recommended next step
" + "" + esc(o.title) + "" + "
What you may be experiencing

" + esc(o.experiencing) + "

" + "
Why this matters

" + esc(o.why) + "

" + "
Your recommended next step

" + esc(o.step) + "

" + "
What you will find there

" + esc(o.find) + "

" + "
" + "
" + "
" + "
" + "
" + "Continue to " + esc(o.title) + "" + "Skip for now, take me there" + "
" + ""; } function renderStep1(){ if (!state.container) { return; } state.container.innerHTML = step1HTML(); var first = state.container.getElementsByClassName("pcd-opt")[0]; if (first && state.mode === "modal") { first.focus(); } } function renderStep2(o){ if (!state.container) { return; } state.container.innerHTML = step2HTML(o); } /* ---------- public API ---------- */ window.PCDiag = { open: function(){ injectStyles(); ensureModal(); state.mode = "modal"; state.container = byId("pcd-modal-body"); state.lastFocus = document.activeElement; renderStep1(); byId("pcd-ov").className = "pcd-ov pcd-open"; document.body.style.overflow = "hidden"; }, close: function(){ var ov = byId("pcd-ov"); if (ov) { ov.className = "pcd-ov"; } document.body.style.overflow = ""; if (state.lastFocus && state.lastFocus.focus) { state.lastFocus.focus(); } }, mount: function(selector){ injectStyles(); var el = document.querySelector(selector); if (!el) { return; } el.className = el.className + " pcd-inline"; state.mode = "inline"; state.container = el; renderStep1(); }, select: function(key){ var o = optByKey(key); if (!o) { return; } state.current = o; renderStep2(o); if (state.mode === "modal") { var body = byId("pcd-modal-body"); if (body) { body.scrollTop = 0; } } }, back: function(){ renderStep1(); }, capture: function(e){ var o = state.current; if (!o) { return true; } var emailEl = byId("pcd-email"); var nameEl = byId("pcd-name"); var email = emailEl ? emailEl.value.trim() : ""; var name = nameEl ? nameEl.value.trim() : ""; /* No email means do not block routing. Let the link route through. */ if (!email) { return true; } var payload = { name: name, email: email, interest: o.tag, result: o.title, source: "find-your-next-move" }; if (PROTOTYPE) { if (e && e.preventDefault) { e.preventDefault(); } var st = byId("pcd-state"); if (st) { st.innerHTML = "
Saved in prototype

Nothing was sent. On the live site this creates or updates your contact and tags it " + o.tag + ". Use the button below to continue.

" + "
Continue to " + o.title + "
"; } return false; } /* Live: post to Zapier via image pixel (matches Princeton's existing capture pattern), then route. */ try { var params = new URLSearchParams(); params.append("firstName", name); params.append("email", email); params.append("interest", o.tag); params.append("result", o.title); params.append("source", "find-your-next-move"); var pixel = new Image(); pixel.src = DIAG_HOOK + "?" + params.toString(); } catch(err) {} return true; } }; /* Escape closes the modal (external file, standard listener) */ document.addEventListener("keydown", function(e){ if (e.key === "Escape" || e.keyCode === 27) { PCDiag.close(); } }); })();