// Scroll suave para uma âncora de secção (compensado pelo header fixo via scroll-mt).
export function scrollToSection(id: string) {
  const el = document.getElementById(id)
  if (!el) return
  const prefersReduced = window.matchMedia(
    "(prefers-reduced-motion: reduce)"
  ).matches
  el.scrollIntoView({
    behavior: prefersReduced ? "auto" : "smooth",
    block: "start",
  })
  // Atualiza o hash sem dar o salto nativo do browser.
  history.replaceState(null, "", `#${id}`)
}

export const navItems = [
  { id: "home", label: "Home" },
  { id: "work-plan", label: "Work plan" },
  { id: "indicators", label: "Indicators" },
] as const
