The focus of this paper is on a volume form defined on a pseudoconvex hypersurface [Formula: see text] in a complex Calabi–Yau manifold (that is, a complex [Formula: see text]-manifold with a nowhere-vanishing holomorphic [Formula: see text]-form). We begin by defining this volume form and observing that it can be viewed as a generalization of the affine-invariant volume form on a convex hypersurface in [Formula: see text]. We compute the first variation, which leads to a similar generalization of the affine mean curvature. In Sec. 2, we investigate the constrained variational problem, for pseudoconvex hypersurfaces [Formula: see text] bounding compact domains [Formula: see text]. That is, we study critical points of the volume functional [Formula: see text] where the ordinary volume [Formula: see text] is fixed. The critical points are analogous to constant mean curvature submanifolds. We find that Sasaki–Einstein hypersurfaces satisfy the condition, and in particular the standard sphere [Formula: see text] C[Formula: see text] does. The main work in the paper comes in Sec. 3 where we compute the second variation about the sphere. We find that it is negative in “most” directions but non-negative in directions corresponding to deformations of [Formula: see text] by holomorphic diffeomorphisms. We are led to conjecture a “minimax” characterization of the sphere. We also discuss connections with the affine geometry case and with Kähler–Einstein geometry. Our original motivation for investigating these matters came from the case [Formula: see text] and the embedding problem studied in our previous paper [S. Donaldson and F. Lehmann, Closed 3-forms in five dimensions and embedding problems, preprint (2022), arXiv:2210.16208]. There are some special features in this case. The volume functional can be defined without reference to the embedding in [Formula: see text] using only a closed “pseudoconvex” real [Formula: see text]-form on [Formula: see text]. In Sec. 4, we review this and develop some of the theory from the point of the symplectic structure on exact [Formula: see text]-forms on [Formula: see text] and the moment map for the action of the diffeomorphisms of [Formula: see text].