import { ArrowRight, ShieldCheck } from 'lucide-react';
import Link from 'next/link';

import { Container, Section } from '@/components/layout/container';
import { Reveal } from '@/components/motion/reveal';
import { buttonVariants } from '@/components/ui/button';
import { cn } from '@/lib/utils';

export function PricingTeaser() {
  return (
    <Section muted>
      <Container>
        <Reveal>
          <div className="gradient-border grid items-center gap-10 rounded-2xl p-6 shadow-md md:p-12 lg:grid-cols-2">
            <div>
              <p className="inline-flex rounded-pill bg-primary-soft px-3 py-1 text-caption font-semibold uppercase tracking-[0.14em] text-primary">Pricing</p>
              <h2 className="mt-4 text-balance font-display text-[1.75rem] font-extrabold leading-9 tracking-[-0.02em] md:text-[2.25rem] md:leading-[2.75rem]">
                Simple, pay-as-you-ship pricing
              </h2>
              <p className="mt-4 max-w-md text-[1.0625rem] leading-7 text-muted-foreground">
                The price you see already includes the courier rate and a small platform fee. No subscriptions. You only pay when you buy a label.
              </p>
              <div className="mt-8 flex flex-wrap items-center gap-x-6 gap-y-3">
                <Link href="/register" className={cn(buttonVariants({ size: 'lg' }), 'group')}>
                  Get started
                  <ArrowRight className="h-4 w-4 transition-transform duration-180 ease-brand group-hover:translate-x-[3px]" aria-hidden="true" />
                </Link>
                <Link href="/pricing" className="rounded-sm text-body font-semibold text-primary underline-offset-4 hover:underline">
                  See pricing
                </Link>
              </div>
            </div>
            <div className="rounded-xl border border-border bg-surface-muted p-5 md:p-6">
              <div className="flex items-center justify-between">
                <p className="text-caption font-semibold uppercase tracking-[0.12em] text-subtle-foreground">Example only</p>
                <p className="text-caption text-muted-foreground">Berlin → Toronto · 2.4 kg</p>
              </div>
              <dl className="mt-5 grid gap-3 text-body">
                <div className="flex justify-between">
                  <dt className="text-muted-foreground">Courier rate</dt>
                  <dd className="font-semibold tabular-nums">36.90</dd>
                </div>
                <div className="flex justify-between">
                  <dt className="text-muted-foreground">Platform fee</dt>
                  <dd className="font-medium text-success">included</dd>
                </div>
                <div className="my-1 border-t border-dashed border-border-strong" aria-hidden="true" />
                <div className="flex items-end justify-between">
                  <dt className="font-semibold">Total</dt>
                  <dd className="font-display text-[2.5rem] font-extrabold leading-none tracking-[-0.03em] tabular-nums">36.90</dd>
                </div>
              </dl>
              <span className="mt-5 inline-flex items-center gap-1.5 rounded-pill bg-success-soft px-3 py-1 text-caption font-semibold text-success">
                <ShieldCheck className="h-3.5 w-3.5" aria-hidden="true" />
                Price shown before you buy
              </span>
            </div>
          </div>
        </Reveal>
      </Container>
    </Section>
  );
}
