// contact-form.jsx — Facility Review Request form // Style departure from homepage forms: feels like a quiet engineering intake // rather than a sales pop. White card, mono labels, restrained focus state. const FREE_DOMAINS = new Set([ 'gmail.com', 'googlemail.com', 'yahoo.com', 'yahoo.ca', 'yahoo.co.uk', 'outlook.com', 'hotmail.com', 'hotmail.ca', 'live.com', 'msn.com', 'icloud.com', 'me.com', 'mac.com', 'protonmail.com', 'proton.me', 'aol.com', 'mail.com', 'ymail.com', 'rogers.com', 'bell.net', 'shaw.ca', 'sympatico.ca', 'telus.net']); const isBusinessEmail = (email) => { if (!email || !email.includes('@')) return false; const domain = email.split('@')[1]?.toLowerCase(); return domain && !FREE_DOMAINS.has(domain); }; const isValidPhone = (phone) => { if (!phone) return false; const digits = phone.replace(/\D/g, ''); // North American: 10 digits, or 11 with leading 1 return digits.length === 10 || digits.length === 11 && digits.startsWith('1'); }; // ---------- Field primitives ---------- const FieldLabel = ({ children, hint, htmlFor }) => ; const fieldBase = { fontFamily: 'var(--ff-sans)', fontSize: 14.5, color: 'var(--gi-deep-ink)', padding: '14px 0', border: 'none', borderBottom: '1.5px solid rgba(15,33,51,0.14)', background: 'transparent', width: '100%', outline: 'none', transition: 'border-color 200ms cubic-bezier(.2,0,0,1)', appearance: 'none', WebkitAppearance: 'none' }; const TextInput = React.forwardRef(({ error, onChange, ...props }, ref) => { const [focused, setFocused] = React.useState(false); return ( setFocused(true)} onBlur={() => setFocused(false)} onChange={onChange} style={{ ...fieldBase, borderBottomColor: error ? '#B33A3A' : focused ? 'var(--gi-soft-green)' : 'rgba(15,33,51,0.14)' }} {...props} />); }); const Select = ({ id, name, value, onChange, error, children, required, placeholder }) => { const [focused, setFocused] = React.useState(false); return (
); }; const Textarea = ({ id, name, value, onChange, placeholder, maxLength }) => { const [focused, setFocused] = React.useState(false); return (