| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777 |
- import { Head, Link, usePage } from '@inertiajs/react';
- import {
- ArrowRight,
- Check,
- ChevronDown,
- Globe,
- Layers,
- MessageCircle,
- Package,
- Palette,
- ShieldCheck,
- Sparkles,
- Tag,
- Truck,
- Video,
- } from 'lucide-react';
- import type { CSSProperties, FormEvent, ReactNode, RefObject } from 'react';
- import { useEffect, useRef, useState } from 'react';
- import {
- lessMotion,
- onScroll,
- revealDelay,
- usePageReveal,
- useSeen,
- useTyping,
- } from '@/components/home/motion';
- import { fontsUrl, heading, Logo, palette } from '@/components/home/brand';
- import { dashboard, login, privacy, register, terms } from '@/routes';
-
- type Plan = {
- key: string;
- name: string;
- price: number;
- stores: number;
- regenerations: number;
- edits: number;
- /** "total" for the trial, "month" for paid plans. */
- period: string;
- };
-
- /** Where the page's "Start free" buttons go: the dashboard for someone signed in, otherwise sign-up. */
- function useStartUrl(): string {
- const { auth } = usePage().props as { auth?: { user?: unknown } };
-
- return auth?.user ? dashboard().url : register().url;
- }
-
- export default function Home({
- plans,
- trialDays,
- storeDomain,
- }: {
- plans: Plan[];
- trialDays: number;
- storeDomain: string;
- }) {
- const page = useRef<HTMLDivElement>(null);
- usePageReveal(page);
-
- return (
- <>
- <Head title="Online stores designed by AI">
- <link rel="stylesheet" href={fontsUrl} />
- <meta
- name="description"
- content="Describe your brand and AI Commerce designs a store that is ready to sell, with payments, shipping across Malaysia, WhatsApp and discounts built in."
- />
- </Head>
-
- <div
- ref={page}
- style={palette}
- className="min-h-screen bg-(--h-paper) font-['Instrument_Sans',ui-sans-serif,system-ui,sans-serif] text-(--h-ink) antialiased"
- >
- <Nav />
- <main>
- <Hero storeDomain={storeDomain} trialDays={trialDays} />
- <ShopTypes />
- <TwoSides storeDomain={storeDomain} />
- <Steps />
- <ChatSection />
- <Styles />
- <Features />
- <Pricing plans={plans} trialDays={trialDays} />
- <Faq trialDays={trialDays} />
- <FinalCall trialDays={trialDays} />
- </main>
- <Footer />
- </div>
- </>
- );
- }
-
- function Section({
- id,
- className,
- children,
- }: {
- id?: string;
- className?: string;
- children: ReactNode;
- }) {
- return (
- <section
- id={id}
- className={`scroll-mt-20 px-5 sm:px-8 ${className ?? ''}`}
- >
- <div className="mx-auto w-full max-w-6xl">{children}</div>
- </section>
- );
- }
-
- function Kicker({ children }: { children: ReactNode }) {
- return (
- <p className="text-sm font-semibold tracking-wide text-(--h-pandan) uppercase">
- {children}
- </p>
- );
- }
-
- function Title({
- children,
- className,
- }: {
- children: ReactNode;
- className?: string;
- }) {
- return (
- <h2
- className={`${heading} mt-3 text-3xl leading-[1.1] font-extrabold tracking-tight text-balance sm:text-4xl md:text-5xl ${className ?? ''}`}
- >
- {children}
- </h2>
- );
- }
-
- function Nav() {
- const { auth } = usePage().props as { auth?: { user?: unknown } };
- const start = useStartUrl();
-
- return (
- <header className="sticky top-0 z-30 border-b border-(--h-line)/70 bg-(--h-paper)/85 px-5 backdrop-blur sm:px-8">
- <div className="mx-auto flex h-16 w-full max-w-6xl items-center justify-between gap-3">
- <a
- href="#top"
- aria-label="AI Commerce home"
- className="shrink-0"
- >
- <Logo />
- </a>
- <nav
- aria-label="Main"
- className="hidden items-center gap-7 text-sm font-medium text-(--h-muted) md:flex"
- >
- <a href="#how" className="hover:text-(--h-ink)">
- How it works
- </a>
- <a href="#features" className="hover:text-(--h-ink)">
- Features
- </a>
- <a href="#pricing" className="hover:text-(--h-ink)">
- Pricing
- </a>
- <a href="#faq" className="hover:text-(--h-ink)">
- Questions
- </a>
- </nav>
- <div className="flex items-center gap-2">
- {auth?.user ? (
- <Link
- href={dashboard()}
- className="rounded-full bg-(--h-ink) px-4 py-2 text-sm font-semibold whitespace-nowrap text-white hover:bg-(--h-pandan-deep)"
- >
- Dashboard
- </Link>
- ) : (
- <>
- <Link
- href={login()}
- className="rounded-full px-3 py-2 text-sm font-semibold whitespace-nowrap hover:bg-(--h-pandan-soft)"
- >
- Log in
- </Link>
- <Link
- href={start}
- className="rounded-full bg-(--h-ink) px-4 py-2 text-sm font-semibold whitespace-nowrap text-white hover:bg-(--h-pandan-deep)"
- >
- Start free
- </Link>
- </>
- )}
- </div>
- </div>
- </header>
- );
- }
-
- /** "Sambal Mak Teh" becomes "sambal-mak-teh", the way store addresses are made. */
- function slugify(name: string): string {
- return name
- .toLowerCase()
- .normalize('NFKD')
- .replace(/[^a-z0-9\s-]/g, '')
- .trim()
- .replace(/[\s-]+/g, '-')
- .slice(0, 40);
- }
-
- function Hero({
- storeDomain,
- trialDays,
- }: {
- storeDomain: string;
- trialDays: number;
- }) {
- const { auth } = usePage().props as { auth?: { user?: unknown } };
- const [name, setName] = useState('');
- const slug = slugify(name) || 'your-store';
- const stage = useRef<HTMLElement>(null);
- const [animate] = useState(() => !lessMotion());
- const typing = useTyping(bubbleText, animate, 600);
- const { progress, pinned, motion } = useAssembly(stage, typing.done);
-
- function start(event: FormEvent) {
- event.preventDefault();
-
- // Kept in this browser so the "Create a store" form can fill in the name after sign-up.
- try {
- if (name.trim() !== '') {
- window.localStorage.setItem('pending-store-name', name.trim());
- }
- } catch {
- // Private windows may refuse storage; the merchant just types the name again.
- }
-
- window.location.href = auth?.user
- ? `/stores/create?name=${encodeURIComponent(name.trim())}`
- : register().url;
- }
-
- return (
- <section
- id="top"
- ref={stage}
- // On wide screens the hero stays pinned while the store comes together, so it is taller.
- className={pinned ? 'relative lg:h-[210vh]' : 'relative'}
- >
- <div
- className={
- pinned
- ? 'lg:sticky lg:top-16 lg:flex lg:h-[calc(100vh-4rem)] lg:items-center'
- : ''
- }
- >
- <div className="relative w-full overflow-hidden px-5 pt-14 pb-20 sm:px-8 md:pt-20 md:pb-28">
- {/* Soft shapes in the background, in the page's colours. */}
- <div
- aria-hidden="true"
- className="pointer-events-none absolute -top-40 -right-40 size-[520px] rounded-full bg-(--h-kunyit-soft) opacity-70 blur-3xl"
- />
- <div
- aria-hidden="true"
- className="pointer-events-none absolute top-40 -left-48 size-[420px] rounded-full bg-(--h-pandan-soft) blur-3xl"
- />
-
- <div className="relative mx-auto grid w-full max-w-6xl items-center gap-14 lg:grid-cols-[1.05fr_1fr]">
- <div className="relative z-30">
- <p className="inline-flex items-center gap-2 rounded-full border border-(--h-line) bg-(--h-card) px-3 py-1 text-sm font-medium text-(--h-muted)">
- <span className="size-2 rounded-full bg-(--h-bunga)" />
- Made for Malaysian sellers
- </p>
- <h1
- className={`${heading} mt-6 text-[2.6rem] leading-[1.03] font-extrabold tracking-tight text-balance sm:text-6xl`}
- >
- Tell us about your brand.{' '}
- <span className="text-(--h-pandan)">
- Get a store that is ready to sell.
- </span>
- </h1>
- <p className="mt-6 max-w-xl text-lg leading-relaxed text-(--h-muted)">
- Write a few lines about what you sell. AI
- Commerce designs your whole online store, with
- payments, shipping across Malaysia, WhatsApp and
- discounts already in place. Then change anything
- by chat.
- </p>
-
- <form
- onSubmit={start}
- className="mt-8 max-w-xl rounded-2xl border border-(--h-line) bg-(--h-card) p-2 shadow-[0_10px_30px_-12px_rgba(16,36,28,0.25)]"
- >
- <label
- htmlFor="store-name"
- className="block px-3 pt-2 text-xs font-semibold tracking-wide text-(--h-muted) uppercase"
- >
- Name your store
- </label>
- <div className="flex flex-col gap-2 sm:flex-row sm:items-center">
- <input
- id="store-name"
- value={name}
- onChange={(event) =>
- setName(event.target.value)
- }
- maxLength={60}
- placeholder="Sambal Mak Teh"
- className="min-w-0 flex-1 bg-transparent px-3 py-2 text-lg font-semibold outline-none placeholder:font-normal placeholder:text-(--h-muted)/60"
- />
- <button
- type="submit"
- className="inline-flex items-center justify-center gap-2 rounded-xl bg-(--h-pandan) px-5 py-3 font-semibold text-white transition-colors hover:bg-(--h-pandan-deep) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--h-pandan)"
- >
- Start free
- <ArrowRight
- className="size-4"
- aria-hidden="true"
- />
- </button>
- </div>
- <p
- className="px-3 pt-1 pb-2 text-sm text-(--h-muted)"
- aria-live="polite"
- >
- Your store's address:{' '}
- <span className="font-semibold text-(--h-ink)">
- {slug}.{storeDomain}
- </span>
- </p>
- </form>
- <p className="mt-4 text-sm text-(--h-muted)">
- Free for {trialDays} days. No card needed to
- start.
- </p>
- </div>
-
- <HeroVisual
- storeDomain={storeDomain}
- progress={progress}
- pinned={pinned}
- motion={motion}
- typed={typing.shown}
- />
- </div>
- </div>
- </div>
- </section>
- );
- }
-
- type Motion = { progress: number; pinned: boolean; motion: boolean };
-
- /** What the merchant types in the hero picture. */
- const bubbleText =
- 'Homemade Kelantan sambal and serunding in jars. Warm, family recipes for busy families.';
-
- /**
- * How far the hero's store has come together, from 0 (pieces scattered) to 1 (finished store).
- *
- * - Wide screens: the hero stays pinned while the visitor scrolls, and scrolling puts the store together.
- * - Phones and tablets: it plays once by itself, after the merchant's words have been typed out.
- * - Visitors who ask their device for less motion see the finished store, with nothing moving.
- */
- function useAssembly(
- stage: RefObject<HTMLElement | null>,
- ready: boolean,
- ): Motion {
- const [state, setState] = useState<Motion>(() => {
- const reduce = lessMotion();
- const wide =
- typeof window !== 'undefined' &&
- window.matchMedia('(min-width: 1024px)').matches;
-
- return reduce
- ? { progress: 1, pinned: false, motion: false }
- : { progress: 0, pinned: wide, motion: true };
- });
-
- useEffect(() => {
- if (!state.motion) {
- return;
- }
-
- let frame = 0;
-
- if (state.pinned) {
- // Scrolling through the pinned hero puts the store together; it is finished a little before
- // the pin ends, so the finished store stays in view for a moment.
- const update = () => {
- cancelAnimationFrame(frame);
- frame = requestAnimationFrame(() => {
- const section = stage.current;
-
- if (!section) {
- return;
- }
-
- const travel = section.offsetHeight - window.innerHeight;
- const scrolled = -section.getBoundingClientRect().top;
- const progress =
- travel > 0 ? clamp(scrolled / (travel * 0.8)) : 1;
-
- setState((current) =>
- current.progress === progress
- ? current
- : { ...current, progress },
- );
- });
- };
-
- update();
- window.addEventListener('scroll', update, { passive: true });
- window.addEventListener('resize', update);
-
- return () => {
- cancelAnimationFrame(frame);
- window.removeEventListener('scroll', update);
- window.removeEventListener('resize', update);
- };
- }
-
- // Not pinned: play once, over about a second and a half, after the merchant's words are typed.
- if (!ready) {
- return;
- }
-
- const started = performance.now() + 300;
- const play = (now: number) => {
- const progress = clamp((now - started) / 1500);
-
- setState((current) => ({ ...current, progress }));
-
- if (progress < 1) {
- frame = requestAnimationFrame(play);
- }
- };
-
- frame = requestAnimationFrame(play);
-
- return () => cancelAnimationFrame(frame);
- }, [state.motion, state.pinned, stage, ready]);
-
- return state;
- }
-
- function clamp(value: number): number {
- return Math.min(1, Math.max(0, value));
- }
-
- /** Slow at the start and the end, quick in the middle. */
- function ease(t: number): number {
- return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
- }
-
- /**
- * Where one piece is on its way in: it starts moved by (x, y), turned by r degrees and scaled by s,
- * and arrives at its place in the store. Each piece starts a little later than the one before.
- */
- function flyIn(
- progress: number,
- from: { x: number; y: number; r: number; s?: number },
- delay: number,
- ): CSSProperties {
- const t = ease(clamp((progress - delay) / 0.55));
- const left = 1 - t;
-
- return {
- transform: `translate(${from.x * left}px, ${from.y * left}px) rotate(${from.r * left}deg) scale(${1 + ((from.s ?? 1) - 1) * left})`,
- };
- }
-
- /** A merchant's words turning into a finished store, with the parts that come built in. */
- function HeroVisual({
- storeDomain,
- progress,
- pinned,
- motion,
- typed,
- }: {
- storeDomain: string;
- progress: number;
- pinned: boolean;
- motion: boolean;
- /** How many letters of the merchant's words have been typed so far. */
- typed: number;
- }) {
- const chip =
- 'flex items-center gap-1.5 rounded-full border border-(--h-line) bg-(--h-card) px-3 py-1.5 text-xs font-semibold whitespace-nowrap text-(--h-ink) shadow-[0_10px_24px_-10px_rgba(16,36,28,0.35)]';
- const frameIn = ease(clamp((progress - 0.2) / 0.5));
- const chipsIn = clamp((progress - 0.55) / 0.35);
- const products = [
- {
- name: 'Sambal tumis',
- price: 'RM 14.90',
- colour: '#B4361E',
- from: { x: -40, y: 210, r: -12, s: 1.1 },
- delay: 0.12,
- },
- {
- name: 'Serunding',
- price: 'RM 18.90',
- colour: '#8A5A2B',
- from: { x: 60, y: 280, r: 9, s: 1.1 },
- delay: 0.2,
- },
- {
- name: 'Budu',
- price: 'RM 9.90',
- colour: '#5B3A1C',
- from: { x: 170, y: 190, r: 15, s: 1.1 },
- delay: 0.28,
- },
- ];
-
- // A tag floats in from (x, y) once the store is together, and then bobs gently.
- const tag = (
- from: { x: number; y: number },
- bob: string,
- children: ReactNode,
- place: string,
- ) => (
- <span
- className={`absolute z-20 ${place}`}
- style={{
- opacity: chipsIn,
- transform: `translate(${from.x * (1 - chipsIn)}px, ${from.y * (1 - chipsIn)}px)`,
- }}
- >
- <span className={`${chip} ${motion ? bob : ''}`}>{children}</span>
- </span>
- );
-
- return (
- <div
- className="relative mx-auto w-full max-w-lg pt-12"
- aria-hidden="true"
- >
- {/* What the merchant typed. It comes first, and moves to its corner as the store forms. */}
- <div
- className="group/bubble relative z-10 ml-auto w-[80%] transition-[translate,scale] duration-300 ease-out hover:z-30 motion-safe:hover:-translate-y-2 motion-safe:hover:scale-[1.03]"
- style={flyIn(progress, { x: 30, y: 150, r: -4, s: 1.12 }, 0)}
- >
- <div
- className={`${motion ? 'h-float' : ''} rotate-[1.5deg] rounded-2xl rounded-br-sm bg-(--h-ink) p-4 text-sm text-white shadow-lg transition-[rotate,box-shadow] duration-300 group-hover/bubble:rotate-0 group-hover/bubble:shadow-2xl`}
- >
- <p className="text-xs font-semibold tracking-wide text-(--h-kunyit) uppercase">
- You write
- </p>
- {/* The full words hold the bubble's size, so it does not grow while they are typed. */}
- <p className="relative mt-1.5 leading-relaxed">
- <span className="invisible">{bubbleText}</span>
- <span className="absolute inset-0">
- {bubbleText.slice(0, typed)}
- {typed < bubbleText.length && (
- <span className="ml-0.5 inline-block h-[1.05em] w-0.5 translate-y-0.5 animate-pulse bg-(--h-kunyit)" />
- )}
- </span>
- </p>
- </div>
- </div>
-
- {/* The store it becomes: its frame fades in while its pieces fly into place. */}
- {/* The store floats gently on its own beat, like the bubble above it. */}
- <div
- className={`group/store relative -mt-3 transition-[translate,scale] duration-300 ease-out hover:z-20 motion-safe:hover:-translate-y-2 motion-safe:hover:scale-[1.02] ${motion ? 'h-float h-float-late' : ''}`}
- >
- <div
- className="absolute inset-0 rounded-2xl border border-(--h-line) bg-(--h-card) shadow-[0_30px_60px_-25px_rgba(16,36,28,0.45)] transition-shadow duration-300 group-hover/store:shadow-[0_45px_90px_-30px_rgba(16,36,28,0.6)]"
- style={{
- opacity: frameIn,
- transform: `scale(${0.94 + 0.06 * frameIn})`,
- }}
- />
- <div className="relative">
- <div
- className="flex items-center gap-1.5 border-b border-(--h-line) px-3 py-2"
- style={{ opacity: frameIn }}
- >
- <span className="size-2 rounded-full bg-(--h-line)" />
- <span className="size-2 rounded-full bg-(--h-line)" />
- <span className="size-2 rounded-full bg-(--h-line)" />
- <span className="ml-2 truncate rounded-md bg-(--h-paper) px-2 py-0.5 text-[10px] text-(--h-muted)">
- sambal-mak-teh.{storeDomain}
- </span>
- </div>
- <div
- className="relative bg-[#2B1A10] px-5 pt-5 pb-6 text-[#FBE9D0] shadow-lg"
- style={flyIn(
- progress,
- { x: 90, y: -50, r: 6, s: 0.92 },
- 0.05,
- )}
- >
- <p className="text-[10px] font-semibold tracking-[0.2em] text-[#E9A53B] uppercase">
- Kelantan kitchen
- </p>
- <p className="mt-1.5 font-serif text-2xl leading-tight">
- Mak Teh's cooking, now in a jar
- </p>
- <span className="mt-3 inline-block rounded-md bg-[#E9A53B] px-3 py-1.5 text-[11px] font-bold text-[#2B1A10]">
- Shop the jars
- </span>
- {/* Beside the button, where the band is always empty. */}
- {tag(
- { x: 60, y: -10 },
- 'h-bob h-bob-slow',
- <>
- <MessageCircle className="size-3.5 text-[#25D366]" />
- WhatsApp button
- </>,
- 'right-3 bottom-5 sm:-right-8',
- )}
- </div>
- <div className="grid grid-cols-3 gap-2 p-3">
- {products.map((product) => (
- <div
- key={product.name}
- className="rounded-lg bg-(--h-paper) p-2 shadow-sm"
- style={flyIn(
- progress,
- product.from,
- product.delay,
- )}
- >
- <div className="grid aspect-square place-items-center rounded-md bg-[#F6E7D3]">
- <span
- className="block h-10 w-8 rounded-t-md rounded-b-lg"
- style={{ background: product.colour }}
- />
- </div>
- <p className="mt-1.5 truncate text-[10px] font-semibold">
- {product.name}
- </p>
- <p className="text-[10px] text-(--h-muted)">
- {product.price}
- </p>
- </div>
- ))}
- </div>
- </div>
- </div>
-
- {tag(
- { x: -40, y: -30 },
- 'h-bob',
- <>
- <Sparkles className="size-3.5 text-(--h-kunyit)" />
- Designed in minutes
- </>,
- 'top-0 left-0',
- )}
- {tag(
- { x: -60, y: 20 },
- 'h-bob h-bob-slow',
- <>
- <ShieldCheck className="size-3.5 text-(--h-pandan)" />
- Stripe checkout
- </>,
- 'bottom-24 -left-3 sm:-left-10',
- )}
- {tag(
- { x: 20, y: 50 },
- 'h-bob',
- <>
- <Truck className="size-3.5 text-(--h-bunga)" />
- Shipping to Sabah and Sarawak
- </>,
- '-bottom-5 right-4',
- )}
-
- {pinned && (
- <p
- className="absolute -bottom-14 left-0 w-full text-center text-sm font-medium text-(--h-muted)"
- style={{ opacity: clamp(1 - progress * 2.5) }}
- >
- Scroll to watch your store come together ↓
- </p>
- )}
- </div>
- );
- }
-
- /** The kinds of things Malaysian sellers sell, drifting slowly sideways. Hovering stops it. */
- function ShopTypes() {
- const types = [
- 'Sambal',
- 'Batik',
- 'Skincare',
- 'Kek lapis',
- 'Tudung',
- 'Kopi',
- 'Kerepek',
- 'Baju kurung',
- 'Lilin wangi',
- 'Madu',
- 'Kuih raya',
- 'Songket',
- 'Rempah',
- 'Kasut',
- 'Barang kemas',
- 'Kraf tangan',
- ];
-
- // The list is drawn twice, so when the first copy has slid out the second has taken its place.
- const row = (copy: boolean) => (
- <ul
- aria-hidden={copy || undefined}
- className="flex shrink-0 items-center gap-8 pr-8"
- >
- {types.map((type) => (
- <li
- key={type}
- className="flex items-center gap-8 whitespace-nowrap"
- >
- <span>{type}</span>
- <span
- className="size-1.5 rounded-full bg-(--h-kunyit)"
- aria-hidden="true"
- />
- </li>
- ))}
- </ul>
- );
-
- return (
- <section
- aria-label="Made for every kind of seller"
- className="flex items-center gap-6 overflow-hidden bg-(--h-pandan-deep) py-5 text-white"
- >
- <p className="hidden shrink-0 pl-8 text-sm font-semibold text-(--h-kunyit) md:block">
- Made for sellers of
- </p>
- <div className="min-w-0 flex-1 [mask-image:linear-gradient(to_right,transparent,black_6%,black_94%,transparent)]">
- <div
- className={`h-marquee flex w-max ${heading} text-lg font-bold sm:text-xl`}
- >
- {row(false)}
- {row(true)}
- </div>
- </div>
- </section>
- );
- }
-
- function TwoSides({ storeDomain }: { storeDomain: string }) {
- const sides = [
- {
- tag: 'Your store',
- title: 'The page your customers see',
- address: `your-store.${storeDomain}`,
- points: [
- 'Your products, photos, prices and choices such as sizes',
- 'Cart and secure checkout, with shipping worked out for them',
- 'Opens on any phone. No sign-in for shoppers.',
- ],
- dark: false,
- },
- {
- tag: 'Your dashboard',
- title: 'Where you run the business',
- address: 'Products, Orders, Discounts, Design',
- points: [
- 'Add products, bundles, collections and discount codes',
- 'See orders, mark them shipped and add tracking numbers',
- 'Change the design with buttons, or simply ask the AI',
- ],
- dark: true,
- },
- ];
-
- return (
- <Section className="py-24">
- <div data-reveal className="max-w-2xl">
- <Kicker>One store, two sides</Kicker>
- <Title>
- A store for your customers. A control room for you.
- </Title>
- </div>
- <div className="mt-10 grid gap-5 md:grid-cols-2">
- {sides.map((side, index) => (
- <div
- key={side.tag}
- data-reveal
- style={revealDelay(index + 1)}
- className={`rounded-3xl p-7 sm:p-9 ${
- side.dark
- ? 'bg-(--h-pandan-deep) text-white'
- : 'border border-(--h-line) bg-(--h-card)'
- }`}
- >
- <p
- className={`text-sm font-semibold ${side.dark ? 'text-(--h-kunyit)' : 'text-(--h-pandan)'}`}
- >
- {side.tag}
- </p>
- <h3
- className={`${heading} mt-2 text-2xl font-extrabold`}
- >
- {side.title}
- </h3>
- <p
- className={`mt-3 inline-block rounded-lg px-3 py-1 font-mono text-sm ${side.dark ? 'bg-white/10' : 'bg-(--h-paper)'}`}
- >
- {side.address}
- </p>
- <ul className="mt-6 space-y-3">
- {side.points.map((point) => (
- <li key={point} className="flex gap-3">
- <Check
- className={`mt-0.5 size-5 shrink-0 ${side.dark ? 'text-(--h-kunyit)' : 'text-(--h-pandan)'}`}
- aria-hidden="true"
- />
- <span
- className={
- side.dark
- ? 'text-white/85'
- : 'text-(--h-muted)'
- }
- >
- {point}
- </span>
- </li>
- ))}
- </ul>
- </div>
- ))}
- </div>
- </Section>
- );
- }
-
- function Steps() {
- const start = useStartUrl();
- const list = useRef<HTMLOListElement>(null);
- const [line, setLine] = useState<StepLine | null>(null);
- const [fill, setFill] = useState(() => (lessMotion() ? 1 : 0));
- const steps = [
- {
- title: 'Describe your brand',
- text: 'Pick a category and write a few lines in your own words: what you sell, who it is for, the feeling you want.',
- },
- {
- title: 'Get your designed store',
- text: 'The AI chooses colours, fonts, a style and the sections that suit your brand, and writes the words in English or Bahasa Malaysia.',
- },
- {
- title: 'Add products and go live',
- text: 'Add your photos, prices and stock, set your shipping fees, then press Publish. Your store gets its own address.',
- },
- ];
-
- useEffect(() => {
- const ol = list.current;
-
- if (!ol) {
- return;
- }
-
- const still = lessMotion();
-
- return onScroll(() => {
- // The middle of each number, from the cards' layout positions (their fade-up does not move these).
- const centres = Array.from(ol.querySelectorAll('li')).map(
- (item) => ({ x: item.offsetLeft + 50, y: item.offsetTop + 50 }),
- );
- const first = centres[0];
- const last = centres[centres.length - 1];
-
- if (!first || !last || centres.length < 2) {
- return;
- }
-
- const total = Math.hypot(last.x - first.x, last.y - first.y) || 1;
- const stops = centres.map(
- (centre) =>
- Math.hypot(centre.x - first.x, centre.y - first.y) / total,
- );
- const vertical = last.y - first.y > last.x - first.x;
-
- setLine((current) =>
- current &&
- current.x1 === first.x &&
- current.y1 === first.y &&
- current.x2 === last.x &&
- current.y2 === last.y
- ? current
- : {
- x1: first.x,
- y1: first.y,
- x2: last.x,
- y2: last.y,
- stops,
- vertical,
- },
- );
-
- if (still) {
- return;
- }
-
- const top = ol.getBoundingClientRect().top;
-
- // Side by side: the line grows while the steps rise from low on the screen to the middle.
- // One under another (phones): the tip of the line follows a point 60% down the screen.
- setFill(
- vertical
- ? clamp(
- (window.innerHeight * 0.6 - top - first.y) /
- (last.y - first.y),
- )
- : clamp(
- (window.innerHeight * 0.85 - top - first.y) /
- (window.innerHeight * 0.4),
- ),
- );
- });
- }, []);
-
- return (
- <Section id="how" className="bg-(--h-card) py-24">
- <div
- data-reveal
- className="flex flex-wrap items-end justify-between gap-6"
- >
- <div className="max-w-2xl">
- <Kicker>How it works</Kicker>
- <Title>From a few lines to a live store</Title>
- </div>
- <Link
- href={start}
- className="inline-flex items-center gap-2 rounded-full border border-(--h-ink) px-5 py-2.5 font-semibold hover:bg-(--h-ink) hover:text-white"
- >
- Try it free
- <ArrowRight className="size-4" aria-hidden="true" />
- </Link>
- </div>
- <ol
- ref={list}
- data-reveal
- style={revealDelay(1)}
- className="relative mt-12 grid gap-5 md:grid-cols-3"
- >
- {steps.map((step, index) => {
- const lit =
- fill > 0 && fill >= (line?.stops[index] ?? 1) - 0.02;
-
- return (
- <li
- key={step.title}
- className="flex gap-5 rounded-3xl border border-(--h-line) bg-(--h-paper) p-7 md:block"
- >
- <span
- className={`${heading} relative z-20 grid size-11 shrink-0 place-items-center rounded-xl text-lg font-extrabold transition-[background-color,color,box-shadow,scale] duration-500 ${
- lit
- ? 'scale-110 bg-(--h-kunyit) text-(--h-ink) shadow-[0_8px_20px_-6px_rgba(242,179,61,0.9)]'
- : 'bg-(--h-card) text-(--h-muted) ring-2 ring-(--h-line) ring-inset'
- }`}
- >
- {index + 1}
- </span>
- <div>
- <h3
- className={`${heading} mt-2 text-xl font-extrabold md:mt-5`}
- >
- {step.title}
- </h3>
- <p className="mt-2 leading-relaxed text-(--h-muted)">
- {step.text}
- </p>
- </div>
- </li>
- );
- })}
-
- {/* The line from step 1 to step 3. It fills in pandan green as the visitor scrolls. */}
- {line && (
- <div
- aria-hidden="true"
- className="pointer-events-none absolute z-10 overflow-hidden rounded-full bg-(--h-line)"
- style={
- line.vertical
- ? {
- left: line.x1 - 1.5,
- top: line.y1,
- width: 3,
- height: line.y2 - line.y1,
- }
- : {
- left: line.x1,
- top: line.y1 - 1.5,
- width: line.x2 - line.x1,
- height: 3,
- }
- }
- >
- <div
- className="size-full bg-(--h-pandan)"
- style={{
- transformOrigin: line.vertical ? 'top' : 'left',
- transform: line.vertical
- ? `scaleY(${fill})`
- : `scaleX(${fill})`,
- }}
- />
- </div>
- )}
- </ol>
- </Section>
- );
- }
-
- type StepLine = {
- x1: number;
- y1: number;
- x2: number;
- y2: number;
- /** Where along the line each step's number sits, from 0 (the first) to 1 (the last). */
- stops: number[];
- vertical: boolean;
- };
-
- function ChatSection() {
- const box = useRef<HTMLDivElement>(null);
- const seen = useSeen(box, 0.75);
- const [still] = useState(lessMotion);
- // 1 the merchant's message, 2 the AI typing, 3 its reply, 4 the change waiting for an OK, 5 confirmed.
- const [step, setStep] = useState(() => (still ? 5 : 0));
- const [round, setRound] = useState(0);
-
- useEffect(() => {
- if (!seen || still) {
- return;
- }
-
- const timers = (
- [
- [1, 150],
- [2, 900],
- [3, 2200],
- [4, 2900],
- [5, 4400],
- ] as const
- ).map(([value, wait]) => window.setTimeout(() => setStep(value), wait));
-
- return () => timers.forEach((timer) => window.clearTimeout(timer));
- }, [seen, still, round]);
-
- const show = (from: number) =>
- `transition-[opacity,translate] duration-500 ease-out ${step >= from ? 'opacity-100' : 'translate-y-3 opacity-0'}`;
-
- return (
- <Section className="py-24">
- <div className="grid items-center gap-12 lg:grid-cols-2">
- <div data-reveal>
- <Kicker>Change anything by chat</Kicker>
- <Title>Just say what you want. You stay in charge.</Title>
- <p className="mt-5 max-w-lg text-lg leading-relaxed text-(--h-muted)">
- Ask in English or Bahasa Malaysia: a new colour, a sale
- for Raya, a bundle, product descriptions, a video. The
- AI prepares it, and anything that touches your prices,
- products or discounts waits for your OK.
- </p>
- <ul className="mt-6 space-y-2.5">
- {[
- '"Make the main colour dark green"',
- '"Buat kod RAYA10, 10% sampai hujung bulan"',
- '"Write descriptions for my new products"',
- ].map((example) => (
- <li
- key={example}
- className="w-fit rounded-full bg-(--h-pandan-soft) px-4 py-1.5 text-sm font-medium text-(--h-pandan-deep)"
- >
- {example}
- </li>
- ))}
- </ul>
- </div>
-
- <div
- ref={box}
- data-reveal
- style={revealDelay(1)}
- className="rounded-3xl border border-(--h-line) bg-(--h-card) p-5 shadow-[0_25px_50px_-25px_rgba(16,36,28,0.35)] sm:p-7"
- aria-label="Example of a chat with the AI"
- >
- <div
- className={`ml-auto w-fit max-w-[85%] rounded-2xl rounded-br-sm bg-(--h-ink) px-4 py-3 text-sm text-white ${show(1)}`}
- >
- Buat kod RAYA10, 10% sampai hujung bulan
- </div>
- <div className="mt-4 flex gap-3">
- <span
- className={`grid size-8 shrink-0 place-items-center rounded-full bg-(--h-kunyit) ${show(2)}`}
- >
- <Sparkles className="size-4" aria-hidden="true" />
- </span>
- <div className="min-w-0 flex-1 space-y-3">
- <div className="relative">
- <p
- className={`rounded-2xl rounded-tl-sm bg-(--h-paper) px-4 py-3 text-sm ${show(3)}`}
- >
- Saya dah sediakan kod RAYA10. Sila sahkan di
- bawah.
- </p>
- {step === 2 && (
- <span
- aria-hidden="true"
- className="absolute top-0 left-0 flex h-11 items-center gap-1.5 rounded-2xl rounded-tl-sm bg-(--h-paper) px-4"
- >
- {[0, 150, 300].map((wait) => (
- <span
- key={wait}
- className="h-dot size-1.5 rounded-full bg-(--h-muted)"
- style={{
- animationDelay: `${wait}ms`,
- }}
- />
- ))}
- </span>
- )}
- </div>
- <div
- className={`rounded-2xl border border-(--h-line) p-4 text-sm ${show(4)}`}
- >
- <p
- className={`text-xs font-semibold transition-colors ${step >= 5 ? 'text-(--h-pandan)' : 'text-(--h-muted)'}`}
- >
- {step >= 5
- ? 'Confirmed. RAYA10 is live in your store.'
- : 'Waiting for your OK'}
- </p>
- <p className="mt-2">
- Create the discount code{' '}
- <span className="font-semibold">
- RAYA10
- </span>
- : 10% off, until the end of the month
- </p>
- <div className="mt-3 flex gap-2">
- <span
- className={`inline-flex items-center gap-1 rounded-lg bg-(--h-pandan) px-3 py-1.5 text-xs font-semibold text-white transition-shadow duration-300 ${step >= 5 ? 'ring-4 ring-(--h-pandan)/25' : ''}`}
- >
- {step >= 5 && (
- <Check
- className="size-3.5"
- aria-hidden="true"
- />
- )}
- Confirm
- </span>
- <span className="rounded-lg border border-(--h-line) px-3 py-1.5 text-xs font-semibold">
- Cancel
- </span>
- </div>
- </div>
- </div>
- </div>
- {!still && (
- <div className="mt-3 flex justify-end">
- <button
- type="button"
- onClick={() => {
- setStep(0);
- setRound((count) => count + 1);
- }}
- className={`text-xs font-semibold text-(--h-muted) transition-opacity hover:text-(--h-ink) ${step >= 5 ? 'opacity-100' : 'pointer-events-none opacity-0'}`}
- tabIndex={step >= 5 ? 0 : -1}
- >
- Play again
- </button>
- </div>
- )}
- </div>
- </div>
- </Section>
- );
- }
-
- type Look = {
- name: string;
- note: string;
- /** The small sample card the visitor clicks. */
- card: string;
- title: string;
- button: string;
- /** The big sample store: its page, banner and product tiles. */
- page: string;
- hero: string;
- tile: string;
- };
-
- /** The six ready-made looks, each drawn in its own style. */
- const looks: Look[] = [
- {
- name: 'Minimal',
- note: 'Clean and quiet',
- card: 'bg-white text-[#1d1d1d] rounded-md',
- title: 'font-sans font-semibold tracking-tight',
- button: 'bg-[#1d1d1d] text-white rounded',
- page: 'bg-white text-[#1d1d1d]',
- hero: 'bg-[#f1f1f1] rounded-md',
- tile: 'bg-[#f6f6f6] rounded-md',
- },
- {
- name: 'Soft',
- note: 'Rounded and friendly',
- card: 'bg-[#FFF4EC] text-[#4a2e22] rounded-3xl shadow-md',
- title: 'font-sans font-bold',
- button: 'bg-[#E27D60] text-white rounded-full',
- page: 'bg-[#FFF4EC] text-[#4a2e22]',
- hero: 'bg-[#FBDCCB] rounded-3xl',
- tile: 'bg-white rounded-3xl shadow-md',
- },
- {
- name: 'Elegant',
- note: 'Serif and premium',
- card: 'bg-[#F5EFE6] text-[#2b2420] rounded-none',
- title: 'font-serif tracking-[0.12em] uppercase',
- button: 'border border-[#2b2420] rounded-none',
- page: 'bg-[#F5EFE6] text-[#2b2420]',
- hero: 'bg-[#E7DCCB] rounded-none',
- tile: 'bg-[#FBF7F1] rounded-none',
- },
- {
- name: 'Bold',
- note: 'Loud and heavy',
- card: 'bg-[#FFE14D] text-black rounded-none border-2 border-black shadow-[5px_5px_0_#000]',
- title: 'font-sans font-black uppercase',
- button: 'bg-[#FFE14D] text-black rounded-none border-2 border-[#FFE14D]',
- page: 'bg-[#FFE14D] text-black',
- hero: 'bg-black text-[#FFE14D] rounded-none',
- tile: 'bg-white rounded-none border-2 border-black shadow-[4px_4px_0_#000]',
- },
- {
- name: 'Playful',
- note: 'Round and lively',
- card: 'bg-[#E8F1FF] text-[#1b2a4a] rounded-[28px] shadow-md',
- title: 'font-sans font-black',
- button: 'bg-[#3D6DF2] text-white rounded-full shadow-[2px_2px_0_#1b2a4a]',
- page: 'bg-[#E8F1FF] text-[#1b2a4a]',
- hero: 'bg-[#C9DBFF] rounded-[28px]',
- tile: 'bg-white rounded-[22px] shadow-md',
- },
- {
- name: 'Classic',
- note: 'Simple and safe',
- card: 'bg-white text-[#24323a] rounded-xl border border-[#dfe6ea]',
- title: 'font-sans font-semibold',
- button: 'bg-[#24323a] text-white rounded-lg',
- page: 'bg-white text-[#24323a]',
- hero: 'bg-[#EEF3F5] rounded-xl',
- tile: 'bg-white rounded-xl border border-[#dfe6ea]',
- },
- ];
-
- /** How long each look shows before the next one, in milliseconds. */
- const lookTime = 3200;
-
- /**
- * One sample store that changes look every few seconds, to show that the same store can look many ways.
- * Clicking a look shows it and stops the changing.
- */
- function Styles() {
- const box = useRef<HTMLDivElement>(null);
- const seen = useSeen(box, 0.8);
- const [active, setActive] = useState(0);
- const [auto, setAuto] = useState(() => !lessMotion());
- const playing = auto && seen;
- const look = looks[active];
-
- useEffect(() => {
- if (!playing) {
- return;
- }
-
- const timer = window.setTimeout(
- () => setActive((current) => (current + 1) % looks.length),
- lookTime,
- );
-
- return () => window.clearTimeout(timer);
- }, [playing, active]);
-
- return (
- <Section className="bg-(--h-pandan-deep) py-24 text-white">
- <div data-reveal className="max-w-2xl">
- <p className="text-sm font-semibold tracking-wide text-(--h-kunyit) uppercase">
- Looks like your brand
- </p>
- <Title className="text-white">
- Six ready-made styles. Your colours. Twenty fonts.
- </Title>
- <p className="mt-5 text-lg leading-relaxed text-white/75">
- The AI picks the style that fits your brand. A fashion store
- and a sambal store will not look alike. Switch with one
- click, or fine-tune buttons, cards, spacing and motion.
- </p>
- </div>
-
- <div
- ref={box}
- data-reveal
- style={revealDelay(1)}
- className="mt-12 grid items-center gap-8 lg:grid-cols-[1.25fr_1fr]"
- >
- {/* The sample store, drawn in the chosen look. */}
- <div
- aria-hidden="true"
- className="relative overflow-hidden rounded-2xl bg-white shadow-2xl"
- >
- <div className="flex items-center gap-1.5 border-b border-black/10 px-3 py-2">
- <span className="size-2 rounded-full bg-black/15" />
- <span className="size-2 rounded-full bg-black/15" />
- <span className="size-2 rounded-full bg-black/15" />
- <span className="ml-2 rounded-md bg-black/5 px-2 py-0.5 text-[10px] text-black/55">
- sambal-mak-teh
- </span>
- <span
- key={look.name}
- className="h-pop ml-auto rounded-full bg-(--h-kunyit) px-2.5 py-0.5 text-[10px] font-bold text-(--h-ink)"
- >
- Style: {look.name}
- </span>
- </div>
- <div
- className={`p-4 transition-colors duration-500 sm:p-6 ${look.page}`}
- >
- <div className="flex items-center justify-between">
- <span className={`text-sm ${look.title}`}>
- Mak Teh
- </span>
- <span className="text-[11px] opacity-60">
- Shop · About · Cart
- </span>
- </div>
- <div
- className={`mt-4 px-5 py-7 transition-all duration-500 sm:px-7 sm:py-9 ${look.hero}`}
- >
- <p className="text-[10px] tracking-[0.2em] uppercase opacity-70">
- Kelantan kitchen
- </p>
- <p
- className={`mt-2 text-2xl leading-tight sm:text-3xl ${look.title}`}
- >
- Sambal made the slow way
- </p>
- <span
- className={`mt-4 inline-block px-4 py-2 text-xs font-semibold transition-all duration-500 ${look.button}`}
- >
- Shop now
- </span>
- </div>
- <div className="mt-4 grid grid-cols-3 gap-3">
- {[
- {
- name: 'Sambal tumis',
- price: 'RM 14.90',
- colour: '#B4361E',
- },
- {
- name: 'Serunding',
- price: 'RM 18.90',
- colour: '#8A5A2B',
- },
- {
- name: 'Budu',
- price: 'RM 9.90',
- colour: '#5B3A1C',
- },
- ].map((product) => (
- <div
- key={product.name}
- className={`overflow-hidden transition-all duration-500 ${look.tile}`}
- >
- <div className="grid aspect-[4/3] place-items-center bg-[#F6E7D3]">
- <span
- className="block h-9 w-7 rounded-t-md rounded-b-lg"
- style={{
- background: product.colour,
- }}
- />
- </div>
- <p className="truncate px-2 pt-2 text-[11px] font-semibold">
- {product.name}
- </p>
- <p className="px-2 pb-2 text-[11px] opacity-70">
- {product.price}
- </p>
- </div>
- ))}
- </div>
- </div>
- </div>
-
- {/* The six looks. The one showing has a ring and, while they change by themselves, a timer bar. */}
- <ul className="grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-2">
- {looks.map((item, index) => (
- <li key={item.name}>
- <button
- type="button"
- aria-pressed={index === active}
- onClick={() => {
- setActive(index);
- setAuto(false);
- }}
- className={`relative flex h-24 w-full flex-col justify-between overflow-hidden p-4 text-left transition-[opacity,box-shadow,translate] duration-300 sm:h-28 ${item.card} ${
- index === active
- ? 'ring-4 ring-(--h-kunyit) ring-offset-2 ring-offset-(--h-pandan-deep)'
- : 'opacity-75 hover:opacity-100 motion-safe:hover:-translate-y-0.5'
- }`}
- >
- <span className="text-xs opacity-60">
- {item.note}
- </span>
- <span className={`text-base ${item.title}`}>
- {item.name}
- </span>
- {playing && index === active && (
- <span
- key={`${active}-bar`}
- className="h-bar absolute bottom-0 left-0 h-1 bg-current opacity-40"
- style={{
- animationDuration: `${lookTime}ms`,
- }}
- />
- )}
- </button>
- </li>
- ))}
- </ul>
- </div>
- </Section>
- );
- }
-
- function Features() {
- const features: { icon: ReactNode; title: string; text: string }[] = [
- {
- icon: <ShieldCheck />,
- title: 'Secure checkout',
- text: 'Shoppers pay on a secure Stripe page. Orders, stock and confirmation emails update by themselves.',
- },
- {
- icon: <Truck />,
- title: 'Shipping across Malaysia',
- text: 'One fee for Peninsular Malaysia, another for Sabah, Sarawak and Labuan, and free shipping over an amount you choose.',
- },
- {
- icon: <MessageCircle />,
- title: 'WhatsApp built in',
- text: 'A chat button on every page, and a link on each product so shoppers can ask before they buy.',
- },
- {
- icon: <Tag />,
- title: 'Codes and sales',
- text: 'Discount codes like RAYA10, and automatic sales like "buy 2, get 10% off", shown in a bar at the top.',
- },
- {
- icon: <Package />,
- title: 'Options and bundles',
- text: 'Sizes and flavours with their own price and stock, and bundles whose stock follows the products inside.',
- },
- {
- icon: <Layers />,
- title: 'Collections',
- text: 'Group products into "Sun care" or "Gift sets", with their own pages and a "shop by" section.',
- },
- {
- icon: <Globe />,
- title: 'English or Bahasa Malaysia',
- text: 'Your store, checkout and messages to shoppers in the language your customers read.',
- },
- {
- icon: <Video />,
- title: 'Your photos and videos',
- text: 'Big photo banners, a second photo on hover, and YouTube or Vimeo videos that load only when played.',
- },
- ];
-
- return (
- <Section id="features" className="py-24">
- <div data-reveal className="max-w-2xl">
- <Kicker>Made for the way you sell</Kicker>
- <Title>
- Everything a small shop needs, already switched on
- </Title>
- </div>
- <ul className="mt-12 grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
- {features.map((feature, index) => (
- <li
- key={feature.title}
- data-reveal
- style={revealDelay(index % 4)}
- className="rounded-3xl border border-(--h-line) bg-(--h-card) p-6 transition-transform motion-safe:hover:-translate-y-1"
- >
- <span className="grid size-11 place-items-center rounded-xl bg-(--h-pandan-soft) text-(--h-pandan) [&_svg]:size-5">
- {feature.icon}
- </span>
- <h3
- className={`${heading} mt-5 text-lg font-extrabold`}
- >
- {feature.title}
- </h3>
- <p className="mt-2 text-sm leading-relaxed text-(--h-muted)">
- {feature.text}
- </p>
- </li>
- ))}
- </ul>
- <p className="mt-6 flex items-center gap-2 text-sm text-(--h-muted)">
- <Palette className="size-4" aria-hidden="true" />
- Every store also gets a photo hero, trust points, an FAQ, a
- phone menu and an add-to-cart bar on phones.
- </p>
- </Section>
- );
- }
-
- function Pricing({ plans, trialDays }: { plans: Plan[]; trialDays: number }) {
- const start = useStartUrl();
- const paid = plans.filter((plan) => plan.price > 0);
- const trial = plans.find((plan) => plan.price === 0);
-
- const limits = (plan: Plan) => {
- const per = plan.period === 'month' ? 'a month' : 'in total';
-
- return [
- `${plan.stores} ${plan.stores === 1 ? 'store' : 'stores'}`,
- `${plan.regenerations} full redesigns ${per}`,
- `${plan.edits.toLocaleString('en-MY')} AI changes ${per}`,
- ];
- };
-
- return (
- <Section id="pricing" className="bg-(--h-card) py-24">
- <div data-reveal className="mx-auto max-w-2xl text-center">
- <Kicker>Pricing</Kicker>
- <Title>Start free. Pay when your shop is ready.</Title>
- <p className="mt-5 text-lg text-(--h-muted)">
- Every plan has every selling feature. Plans differ in how
- many stores you run and how much you use the AI.
- </p>
- </div>
-
- {trial && (
- <div
- data-reveal
- className="mx-auto mt-10 flex max-w-4xl flex-wrap items-center justify-between gap-4 rounded-2xl bg-(--h-kunyit-soft) px-6 py-4"
- >
- <p>
- <span className="font-semibold">
- {trial.name}: free for {trialDays} days.
- </span>{' '}
- <span className="text-(--h-muted)">
- {limits(trial).join(' · ')}. No card needed.
- </span>
- </p>
- <Link
- href={start}
- className="rounded-full bg-(--h-ink) px-5 py-2 text-sm font-semibold text-white hover:bg-(--h-pandan-deep)"
- >
- Start free
- </Link>
- </div>
- )}
-
- <ul className="mx-auto mt-6 grid max-w-4xl gap-5 md:grid-cols-3">
- {paid.map((plan, index) => {
- const featured = index === 1;
-
- return (
- <li
- key={plan.key}
- data-reveal
- style={revealDelay(index + 1)}
- className={`relative flex flex-col rounded-3xl p-7 transition-[translate,box-shadow] duration-300 ease-out hover:z-10 hover:shadow-[0_35px_70px_-30px_rgba(16,36,28,0.45)] motion-safe:hover:-translate-y-2 ${
- featured
- ? 'bg-(--h-pandan-deep) text-white shadow-xl md:-my-3 md:py-10'
- : 'border border-(--h-line) bg-(--h-paper)'
- }`}
- >
- {featured && (
- <span className="absolute -top-3 left-7 rounded-full bg-(--h-kunyit) px-3 py-1 text-xs font-bold text-(--h-ink)">
- For growing brands
- </span>
- )}
- <h3 className={`${heading} text-xl font-extrabold`}>
- {plan.name}
- </h3>
- <p className="mt-4 flex items-baseline gap-1">
- <span
- className={`${heading} text-4xl font-extrabold`}
- >
- RM {plan.price.toLocaleString('en-MY')}
- </span>
- <span
- className={
- featured
- ? 'text-white/70'
- : 'text-(--h-muted)'
- }
- >
- / month
- </span>
- </p>
- <ul className="mt-6 flex-1 space-y-2.5 text-sm">
- {limits(plan).map((limit) => (
- <li key={limit} className="flex gap-2.5">
- <Check
- className={`size-4 shrink-0 ${featured ? 'text-(--h-kunyit)' : 'text-(--h-pandan)'}`}
- aria-hidden="true"
- />
- {limit}
- </li>
- ))}
- <li className="flex gap-2.5">
- <Check
- className={`size-4 shrink-0 ${featured ? 'text-(--h-kunyit)' : 'text-(--h-pandan)'}`}
- aria-hidden="true"
- />
- Every selling feature
- </li>
- </ul>
- <Link
- href={start}
- className={`mt-8 rounded-full px-5 py-2.5 text-center font-semibold ${
- featured
- ? 'bg-(--h-kunyit) text-(--h-ink) hover:bg-white'
- : 'border border-(--h-ink) hover:bg-(--h-ink) hover:text-white'
- }`}
- >
- Start with the free trial
- </Link>
- </li>
- );
- })}
- </ul>
- <p className="mt-8 text-center text-sm text-(--h-muted)">
- Prices in ringgit. Cancel any time from your Billing page.
- </p>
- </Section>
- );
- }
-
- function Faq({ trialDays }: { trialDays: number }) {
- const questions = [
- {
- q: 'Do I need a designer or any technical skills?',
- a: 'No. You describe your brand in your own words and the AI designs the store. You add products with a simple form, and change the design with buttons or by chat.',
- },
- {
- q: 'Will my store look like everyone else’s?',
- a: 'No. The AI picks colours, fonts, a style and sections to suit your category and your words, and it is told not to repeat your other stores. You can also switch between six ready-made looks.',
- },
- {
- q: 'Can the AI change my prices or products without asking?',
- a: 'No. Anything that touches products, prices, stock or discounts is shown to you first, and nothing changes until you press Confirm.',
- },
- {
- q: 'How do shoppers pay?',
- a: 'On a secure Stripe checkout page. Orders, stock and confirmation emails update by themselves once a payment goes through.',
- },
- {
- q: 'Can my store be in Bahasa Malaysia?',
- a: 'Yes. Choose English or Bahasa Malaysia when you create the store, and the AI writes it in that language. You can chat with the AI in either.',
- },
- {
- q: 'Can I use my own domain name?',
- a: 'Not yet. Every store gets its own address on our domain today, and your own domain is on our list.',
- },
- {
- q: 'What happens after the free trial?',
- a: `You get ${trialDays} days to try everything. After that, choose a plan on the Billing page to keep using the AI and keep your store online.`,
- },
- ];
-
- return (
- <Section id="faq" className="py-24">
- <div className="grid gap-10 lg:grid-cols-[1fr_1.6fr]">
- <div data-reveal>
- <Kicker>Questions</Kicker>
- <Title>Good to know</Title>
- </div>
- <div
- data-reveal
- style={revealDelay(1)}
- className="divide-y divide-(--h-line) border-y border-(--h-line)"
- >
- {questions.map((item) => (
- <details key={item.q} className="group py-5">
- <summary className="flex cursor-pointer list-none items-center justify-between gap-4 text-lg font-semibold [&::-webkit-details-marker]:hidden">
- {item.q}
- <ChevronDown
- className="size-5 shrink-0 text-(--h-muted) transition-transform group-open:rotate-180"
- aria-hidden="true"
- />
- </summary>
- <p className="mt-3 max-w-2xl leading-relaxed text-(--h-muted)">
- {item.a}
- </p>
- </details>
- ))}
- </div>
- </div>
- </Section>
- );
- }
-
- function FinalCall({ trialDays }: { trialDays: number }) {
- const start = useStartUrl();
-
- return (
- <Section className="pb-24">
- <div
- data-reveal
- className="relative overflow-hidden rounded-[2rem] bg-(--h-kunyit) px-7 py-14 text-center sm:px-12"
- >
- <div
- aria-hidden="true"
- className="absolute -right-16 -bottom-24 size-72 rounded-full bg-(--h-bunga)/25"
- />
- <div
- aria-hidden="true"
- className="absolute -top-20 -left-10 size-56 rounded-full bg-white/30"
- />
- <h2
- className={`${heading} relative mx-auto max-w-2xl text-3xl leading-tight font-extrabold text-balance sm:text-5xl`}
- >
- Your brand deserves a proper store.
- </h2>
- <p className="relative mx-auto mt-4 max-w-lg text-lg">
- Describe it today, and see it designed in minutes. Free for{' '}
- {trialDays} days.
- </p>
- <Link
- href={start}
- className="relative mt-8 inline-flex items-center gap-2 rounded-full bg-(--h-ink) px-7 py-3.5 font-semibold text-white hover:bg-(--h-pandan-deep)"
- >
- Start free
- <ArrowRight className="size-4" aria-hidden="true" />
- </Link>
- </div>
- </Section>
- );
- }
-
- function Footer() {
- return (
- <footer className="border-t border-(--h-line) px-5 py-10 sm:px-8">
- <div className="mx-auto flex w-full max-w-6xl flex-col gap-6 text-sm text-(--h-muted) sm:flex-row sm:items-center sm:justify-between">
- <Logo />
- <nav aria-label="Footer" className="flex flex-wrap gap-6">
- <a href="#how" className="hover:text-(--h-ink)">
- How it works
- </a>
- <a href="#pricing" className="hover:text-(--h-ink)">
- Pricing
- </a>
- <a href="#faq" className="hover:text-(--h-ink)">
- Questions
- </a>
- <Link href={terms()} className="hover:text-(--h-ink)">
- Terms
- </Link>
- <Link href={privacy()} className="hover:text-(--h-ink)">
- Privacy
- </Link>
- <Link href={login()} className="hover:text-(--h-ink)">
- Log in
- </Link>
- </nav>
- <p>
- © {new Date().getFullYear()} AI Commerce. Made in Malaysia.
- </p>
- </div>
- </footer>
- );
- }
|