<script lang="ts">
	import ContentContainer from '$lib/components/layout/ContentContainer.svelte';
	import PublicBackLink from '$lib/components/PublicBackLink.svelte';
</script>

<svelte:head>
	<title>Privacy Policy - Nexus</title>
	<meta
		name="description"
		content="Privacy Policy for Nexus, the business management platform operated by Nexus Cleaning Solutions."
	/>
</svelte:head>

<!-- Hero Section -->
<section class="py-20 md:py-28">
	<ContentContainer>
		<PublicBackLink class="mb-6" />
		<div class="max-w-3xl">
			<h1 class="text-4xl font-bold tracking-tight text-theme md:text-5xl">Privacy Policy</h1>
			<p class="mt-6 text-lg text-theme-secondary">Last updated: December 2024</p>
		</div>
	</ContentContainer>
</section>

<!-- Content Section -->
<section class="pb-20">
	<ContentContainer>
		<div class="prose prose-lg max-w-3xl dark:prose-invert">
			<h2 class="text-2xl font-bold text-theme">The Short Version</h2>
			<p class="text-theme-secondary">
				We collect only what we need to provide our cleaning services and run Nexus. We don't sell
				your data. We use it to serve you better, and we protect it like it's our own.
			</p>

			<h2 class="mt-10 text-2xl font-bold text-theme">Who We Are</h2>
			<p class="text-theme-secondary">
				Nexus Cleaning Solutions is a commercial cleaning company based in Macomb County,
				Michigan. Nexus is our business management platform that helps us coordinate services with
				our customers and team members. The Nexus platform is developed and maintained by Corellon
				Digital; Nexus Cleaning Solutions is the data controller responsible for your
				information.
			</p>

			<h2 class="mt-10 text-2xl font-bold text-theme">Information We Collect</h2>

			<h3 class="mt-6 text-xl font-semibold text-theme">Information You Give Us</h3>
			<p class="text-theme-secondary">When you use Nexus, you may provide:</p>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>
					<strong>Account information:</strong> Name, email address, phone number
				</li>
				<li>
					<strong>Business information:</strong> Company name, service addresses, billing details
				</li>
				<li>
					<strong>Communications:</strong> Messages you send through Nexus, contact form submissions
				</li>
				<li>
					<strong>Content you upload:</strong> Photos or documents related to your services
				</li>
			</ul>

			<h3 class="mt-6 text-xl font-semibold text-theme">Information We Collect Automatically</h3>
			<p class="text-theme-secondary">When you use Nexus, we automatically collect:</p>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>
					<strong>Usage data:</strong> How you interact with Nexus (pages visited, features used)
				</li>
				<li>
					<strong>Device information:</strong> Browser type, operating system, device type
				</li>
				<li>
					<strong>Log data:</strong> IP address, access times, referring pages
				</li>
			</ul>

			<h3 class="mt-6 text-xl font-semibold text-theme">Cookies</h3>
			<p class="text-theme-secondary">
				We use cookies to keep you logged in and remember your preferences (like dark mode). We
				don't use tracking cookies for advertising. The only cookies we use are:
			</p>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>
					<strong>Session cookies:</strong> Encrypted cookies that keep you logged in (expire after 24
					hours of inactivity)
				</li>
				<li>
					<strong>Preference cookies:</strong> Remember your settings like theme preference (stored locally
					on your device)
				</li>
			</ul>

			<h2 class="mt-10 text-2xl font-bold text-theme">How We Use Your Information</h2>
			<p class="text-theme-secondary">We use your information to:</p>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>Provide and improve our cleaning services</li>
				<li>Schedule and coordinate service appointments</li>
				<li>Send you invoices and process payments</li>
				<li>Communicate with you about your services</li>
				<li>Respond to your questions and requests</li>
				<li>Send service notifications and updates</li>
				<li>Maintain and improve Nexus</li>
				<li>Comply with legal obligations</li>
			</ul>

			<h2 class="mt-10 text-2xl font-bold text-theme">Who We Share Information With</h2>
			<p class="text-theme-secondary">
				We don't sell your personal information. We share it only when necessary:
			</p>

			<h3 class="mt-6 text-xl font-semibold text-theme">Service Providers</h3>
			<p class="text-theme-secondary">
				We work with trusted companies that help us run our business:
			</p>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>
					<strong>Wave:</strong> Our accounting software for invoicing and payments
				</li>
				<li>
					<strong>Email services:</strong> Gmail SMTP for verification emails and notifications
				</li>
				<li>
					<strong>Have I Been Pwned:</strong> We check passwords against known breach databases to protect
					your account (only a secure hash is checked, not your actual password)
				</li>
			</ul>

			<h3 class="mt-6 text-xl font-semibold text-theme">Data Hosting</h3>
			<p class="text-theme-secondary">
				Your data is stored on dedicated servers that we fully control and manage. We use
				InterServer for physical server infrastructure, but all software, databases, and your
				information are managed exclusively by us. Access to our servers is restricted to VPN and
				strict firewall rules—no third-party cloud provider has access to your data.
			</p>

			<h3 class="mt-6 text-xl font-semibold text-theme">Our Team</h3>
			<p class="text-theme-secondary">
				Our team members access information they need to do their jobs—like your service address so
				they know where to go, or your contact info so they can reach you about your appointment.
			</p>

			<h3 class="mt-6 text-xl font-semibold text-theme">Legal Requirements</h3>
			<p class="text-theme-secondary">
				We may share information if required by law, court order, or to protect the rights and
				safety of Nexus, our customers, or others.
			</p>

			<h2 class="mt-10 text-2xl font-bold text-theme">How We Protect Your Information</h2>
			<p class="text-theme-secondary">
				We take security seriously and use enterprise-grade protection:
			</p>

			<h3 class="mt-6 text-xl font-semibold text-theme">Authentication Security</h3>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>
					<strong>Password protection:</strong> Passwords are hashed using bcrypt and checked against
					known breach databases to prevent use of compromised passwords
				</li>
				<li>
					<strong>Multi-factor authentication:</strong> Support for security keys (WebAuthn/passkeys)
					and authenticator apps (TOTP)
				</li>
				<li>
					<strong>Secure sessions:</strong> Sessions are encrypted and automatically expire after 24
					hours of inactivity
				</li>
			</ul>

			<h3 class="mt-6 text-xl font-semibold text-theme">Data Protection</h3>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>All data is transmitted over encrypted connections (HTTPS/TLS)</li>
				<li>Sensitive data is encrypted at rest using XChaCha20-Poly1305</li>
				<li>Session cookies are secure, encrypted, and scoped to our domain</li>
				<li>Access to customer data is limited to team members who need it</li>
			</ul>
			<p class="mt-4 text-theme-secondary">
				No system is 100% secure, but we work hard to protect your information and will notify you
				if there's ever a breach that affects your data.
			</p>

			<h2 class="mt-10 text-2xl font-bold text-theme">How Long We Keep Your Information</h2>
			<p class="text-theme-secondary">We keep your information for as long as:</p>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>You have an active account with us</li>
				<li>We need it to provide services to you</li>
				<li>
					We're required to keep it for legal or tax purposes (typically 7 years for financial
					records)
				</li>
			</ul>
			<p class="mt-4 text-theme-secondary">
				If you close your account, we'll delete or anonymize your personal information, except where
				we need to keep it for legal compliance.
			</p>

			<h2 class="mt-10 text-2xl font-bold text-theme">Your Rights</h2>
			<p class="text-theme-secondary">You have the right to:</p>
			<ul class="list-disc space-y-2 pl-6 text-theme-secondary">
				<li>
					<strong>Access your data:</strong> See what information we have about you
				</li>
				<li>
					<strong>Correct your data:</strong> Update inaccurate information
				</li>
				<li>
					<strong>Delete your data:</strong> Request we remove your personal information
				</li>
				<li>
					<strong>Export your data:</strong> Get a copy of your data in a portable format
				</li>
				<li>
					<strong>Opt out of communications:</strong> Unsubscribe from marketing emails (you'll still
					get essential service communications)
				</li>
			</ul>
			<p class="mt-4 text-theme-secondary">
				To exercise any of these rights, contact us using the information below.
			</p>

			<h2 class="mt-10 text-2xl font-bold text-theme">Children's Privacy</h2>
			<p class="text-theme-secondary">
				Nexus is designed for businesses and is not intended for anyone under 18. We don't knowingly
				collect personal information from minors.
			</p>

			<h2 class="mt-10 text-2xl font-bold text-theme">Changes to This Policy</h2>
			<p class="text-theme-secondary">
				We may update this Privacy Policy from time to time. If we make significant changes, we'll
				let you know through Nexus or by email. The "Last updated" date at the top shows when this
				policy was last revised.
			</p>

			<h2 class="mt-10 text-2xl font-bold text-theme">Contact Us</h2>
			<p class="text-theme-secondary">
				Questions about this Privacy Policy or how we handle your data? Reach out:
			</p>
			<ul class="list-none space-y-2 pl-0 text-theme-secondary">
				<li>
					<strong>Email:</strong>
					<a
						href="mailto:service@nexusclean.net"
						class="text-primary-600 hover:underline dark:text-primary-400"
					>
						service@nexusclean.net
					</a>
				</li>
				<li>
					<strong>Phone:</strong>
					<a href="tel:+15864058925" class="text-primary-600 hover:underline dark:text-primary-400">
						(586) 405-8925
					</a>
				</li>
			</ul>
		</div>
	</ContentContainer>
</section>
