import type { Metadata } from "next";
import { SiteFrame } from "../../components/SiteFrame/SiteFrame";
import { JsonLd } from "@/app/lib/structured-data";
import { AnimatedDiv } from "@/app/components/Motion/AnimatedSection";
import styles from "../../inner-page.module.css";

export const metadata: Metadata = {
  title: "Terms & Conditions",
  description: "Terms governing your use of Meliorate services and website.",
  alternates: { canonical: "/terms-and-conditions" },
  openGraph: {
    title: "Terms & Conditions",
    description: "Terms governing your use of Meliorate services and website.",
    url: "/terms-and-conditions",
  },
  robots: { index: false, follow: true },
};

export default function TermsAndConditionsPage() {
  return (
    <SiteFrame>
      <JsonLd
        data={{
          "@context": "https://schema.org",
          "@type": "BreadcrumbList",
          itemListElement: [
            { "@type": "ListItem", position: 1, name: "Home", item: "https://meliorate.pro" },
            { "@type": "ListItem", position: 2, name: "Terms & Conditions", item: "https://meliorate.pro/terms-and-conditions" },
          ],
        }}
      />
      <section className={styles.pageSection}>
        <div className={styles.container}>
          <AnimatedDiv>
            <span className={styles.eyebrow}>Legal</span>
            <h1 className={styles.title}>Terms &amp; Conditions</h1>
            <p className={styles.description}>
              These terms govern your access to and use of Meliorate&apos;s website, products,
              and services. By engaging with us, you agree to these terms.
            </p>
            <p className={styles.lastUpdated}>Last updated: March 6, 2026</p>
          </AnimatedDiv>

          <AnimatedDiv delay={0.15} variant="fadeIn">
          <div className={styles.content}>
            <section className={styles.section}>
              <h2>Use of services</h2>
              <p>
                You agree to use our services lawfully and not interfere with platform security,
                operations, or availability.
              </p>
            </section>

            <section className={styles.section}>
              <h2>Commercial terms</h2>
              <p>
                Scope, timelines, fees, and deliverables are defined in project-specific proposals
                or agreements. In case of conflict, signed agreements take precedence.
              </p>
            </section>

            <section className={styles.section}>
              <h2>Intellectual property</h2>
              <p>
                Unless otherwise agreed in writing, all pre-existing tools, frameworks, and
                materials remain the property of their original owners.
              </p>
            </section>

            <section className={styles.section}>
              <h2>Warranties and liability</h2>
              <p>
                Services are provided on an "as is" and "as available" basis. To the maximum
                extent permitted by law, Meliorate is not liable for indirect or consequential losses.
              </p>
            </section>

            <section className={styles.section}>
              <h2>Termination</h2>
              <p>
                Either party may terminate engagements under the terms of the applicable service
                agreement. Outstanding obligations survive termination where stated.
              </p>
            </section>

            <section className={styles.section}>
              <h2>Contact</h2>
              <p>
                Questions about these terms can be sent via <a className={styles.link} href="/contact">Contact Form</a>.
              </p>
            </section>
          </div>
          </AnimatedDiv>
        </div>
      </section>
    </SiteFrame>
  );
}