/**
 * Public `/water` route — entrypoint for the mobile-first Tuxedo
 * Water Log PIN-gated experience.
 *
 * As of 2026-07, the route renders `WaterFieldClient`, which now
 * delegates to the Apple-HIG styled `MobileWaterApp` state machine
 * (PIN → Headgates → Log → Success). All screens are designed
 * for phones and tablets in the field — there is no desktop
 * consideration.
 *
 * `display: "standalone"` + `viewportFit: "cover"` in the root
 * layout, combined with the mobile-specific `<meta>` tags below,
 * give this route a near-native feel when added to an iOS home
 * screen as a PWA.
 */
import type { Metadata, Viewport } from "next";
import WaterFieldClient from "@/components/water/WaterFieldClient";

export const metadata: Metadata = {
  title: "Water Log · Tuxedo Ditch Co.",
  description:
    "Field log of headgate water readings — PIN-protected, mobile-only.",
  robots: {
    index: false, // PIN-gated field tool — no public indexing
    follow: false,
  },
  appleWebApp: {
    capable: true,
    statusBarStyle: "default",
    title: "Water Log",
  },
};

// The water route is mobile-only — never scale above 1.0 (we don't
// want desktop users pinching-and-zooming a tool that's tuned for
// thumb-reach). The viewport-fit: cover setting in the root layout
// enables safe-area insets on iOS.
export const viewport: Viewport = {
  width: "device-width",
  initialScale: 1,
  maximumScale: 1,
  userScalable: false,
  themeColor: "#14532d",
  viewportFit: "cover",
};

export default async function WaterPage() {
  return <WaterFieldClient />;
}