/* Plan B — Shell: brand, header, footer, helpers, floating WhatsApp CTA */
const B_TOKENS = {
ink: "#0B1F1A", // near-black warm green
deep: "#0B3D33",
primary: "#0F6E56",
accent: "#1D9E75",
mint: "#5DCAA5",
surface: "#FAF6EE", // warm cream
surfaceAlt: "#FFFFFF",
rule: "#E4E0D6",
ruleDark: "rgba(255,255,255,0.12)",
muted: "#6B7F77",
mutedDark: "rgba(255,255,255,.62)",
};
const BMark = ({ size = 28, stroke = "#FAF6EE", strokeWidth = 3.4 }) => (
);
const goHome = (e) => {
if (e) e.preventDefault();
if (typeof window !== "undefined") window.scrollTo({ top: 0, behavior: "smooth" });
if (typeof history !== "undefined" && history.replaceState) {
history.replaceState(null, "", window.location.pathname + window.location.search);
}
};
const BLockup = ({ stroke = "#FAF6EE", topColor = "#FAF6EE", botColor = "#5DCAA5", size = 28, asLink = false }) => {
const inner = (
Potencial
Imóvel
);
if (asLink) {
return (
{inner}
);
}
return
{inner}
;
};
const BEyebrow = ({ children, dark, color }) => (
{children}
);
const BBtn = ({ children, variant = "primary", size = "md", icon = "arrow", as = "button", href, ...rest }) => {
const sizes = {
sm: { padding: "10px 16px", font: "700 12.5px/1 'Plus Jakarta Sans'" },
md: { padding: "14px 22px", font: "700 14px/1 'Plus Jakarta Sans'" },
lg: { padding: "18px 28px", font: "700 16px/1 'Plus Jakarta Sans'" },
};
const variants = {
primary: { background: B_TOKENS.accent, color: "#fff", border: "1px solid transparent" },
dark: { background: B_TOKENS.ink, color: "#fff", border: "1px solid transparent" },
light: { background: "#fff", color: B_TOKENS.ink, border: "1px solid " + B_TOKENS.rule },
ghostDark: { background: "transparent", color: "#fff", border: "1px solid rgba(255,255,255,.32)" },
whatsapp: { background: "#25D366", color: "#0B3D33", border: "1px solid transparent" },
};
const Tag = as === "a" || href ? "a" : "button";
return (
{ e.currentTarget.style.transform = "translateY(1px)"; }}
onMouseUp={(e) => { e.currentTarget.style.transform = "none"; }}
onMouseLeave={(e) => { e.currentTarget.style.transform = "none"; }}
>
{children}
{icon === "arrow" && (
)}
{icon === "whatsapp" && (
)}
{icon === "none" && null}
);
};
const BHeader = () => {
const [scrolled, setScrolled] = React.useState(false);
const [menuOpen, setMenuOpen] = React.useState(false);
const [isMobile, setIsMobile] = React.useState(
typeof window !== "undefined" ? window.innerWidth <= 900 : false
);
React.useEffect(() => {
const onScroll = () => setScrolled(window.scrollY > 12);
const onResize = () => {
const m = window.innerWidth <= 900;
setIsMobile(m);
if (!m) setMenuOpen(false);
};
window.addEventListener("scroll", onScroll);
window.addEventListener("resize", onResize);
return () => {
window.removeEventListener("scroll", onScroll);
window.removeEventListener("resize", onResize);
};
}, []);
React.useEffect(() => {
document.body.style.overflow = menuOpen ? "hidden" : "";
return () => { document.body.style.overflow = ""; };
}, [menuOpen]);
const links = ["Antes & depois", "Serviços", "Pacotes", "Como funciona", "Resultados"];
const linkHref = (it) => `#${it.toLowerCase().replace(/[^a-z]/g, "-")}`;
const headerSolid = scrolled || menuOpen;
return (
(21) 99714-7447
Diagnóstico grátis
{/* Botão hamburger — só aparece em ≤ 900px via CSS dedicado abaixo */}
{/* Painel do menu mobile */}
{isMobile && menuOpen && (
)}
);
};
const BFloatingCTA = () => (
{ e.currentTarget.style.transform = "translateY(-2px)"; }}
onMouseLeave={(e) => { e.currentTarget.style.transform = "none"; }}
>
Fale conosco no WhatsApp
);
const BFooter = () => (
);
// Reveal — plain wrapper. Animation removed to ensure SSR/headless renderers
// (html-to-image, screenshot tools, some webviews) always see fully visible content.
const BReveal = ({ children, style }) => (
{children}
);
Object.assign(window, { B_TOKENS, BMark, BLockup, BEyebrow, BBtn, BHeader, BFloatingCTA, BFooter, BReveal });