sync: auto-sync from Mikes-MacBook-Air.local at 2026-06-17 06:18:23

Author: Mike Swanson
Machine: Mikes-MacBook-Air.local
Timestamp: 2026-06-17 06:18:23
This commit is contained in:
2026-06-17 06:18:24 -07:00
parent 83efd4d909
commit 7d84857cc5
9 changed files with 836 additions and 5 deletions

View File

@@ -280,4 +280,83 @@
} else {
reveals.forEach(function (el) { el.classList.add("in"); });
}
/* ---- Custom Cursor - REMOVED (restored to normal system cursor) ------- */
/* ---- Magnetic Buttons ------------------------------------------------- */
$$(".btn, .tier, button").forEach(function (btn) {
btn.addEventListener("mousemove", function (e) {
var rect = btn.getBoundingClientRect();
var x = (e.clientX - rect.left - rect.width / 2) * 0.15;
var y = (e.clientY - rect.top - rect.height / 2) * 0.15;
btn.style.transform = "translate(" + x + "px, " + y + "px)";
});
btn.addEventListener("mouseleave", function () {
btn.style.transform = "";
});
});
/* ---- Calculator to Contact Handoff ------------------------------------ */
window.lockEstimate = function () {
var endpoints = $("#endpoints");
var tier = $("#tier");
var support = $("#support");
var monthlyTotal = $(".calc__out .tnum");
if (endpoints && tier && monthlyTotal) {
var estimate = {
endpoints: endpoints.value,
tier: tier.options[tier.selectedIndex].text,
support: support ? support.options[support.selectedIndex].text : "Standard",
monthly: monthlyTotal.textContent.trim(),
timestamp: Date.now()
};
try {
sessionStorage.setItem("acg_estimate", JSON.stringify(estimate));
} catch (e) {}
window.location.href = "contact.html?from=calculator";
}
};
// Pre-fill contact form with estimate if coming from calculator
if (window.location.search.indexOf("from=calculator") > -1) {
try {
var storedEstimate = sessionStorage.getItem("acg_estimate");
if (storedEstimate) {
var est = JSON.parse(storedEstimate);
var msgField = $("#cf-message");
if (msgField) {
msgField.value = "I'd like a quote for:\n" +
est.endpoints + " endpoints\n" +
est.tier + " tier\n" +
est.support + " support\n" +
"Estimated monthly: " + est.monthly;
}
}
} catch (e) {}
}
/* ---- Exit Intent Banner (Subtle, 3-second delay) ---------------------- */
var exitShown = false;
document.addEventListener("mouseout", function (e) {
if (!exitShown && e.clientY <= 0 && e.relatedTarget == null) {
exitShown = true;
// Show exit banner after 3 second delay (less aggressive)
setTimeout(function () {
var offer = $("#exitOffer");
if (offer) offer.classList.add("show");
}, 3000);
}
});
var closeExit = $("#closeExit");
if (closeExit) {
closeExit.addEventListener("click", function () {
var offer = $("#exitOffer");
if (offer) offer.classList.remove("show");
});
}
})();