Files
gitlab-instance-0a899031_no…/app/page.tsx
2026-05-20 18:29:19 -05:00

317 lines
14 KiB
TypeScript

import Link from "next/link";
import { BookCover } from "@/components/BookCover";
import { FaqAccordion } from "@/components/FaqAccordion";
import { HighlightIcon } from "@/components/HighlightIcon";
import { SiteHeader } from "@/components/SiteHeader";
import {
ebookMeta,
heroStats,
highlights,
nomadHubs,
pillars,
tableOfContents,
testimonial,
} from "@/content/ebook";
const hubMarquee = [...nomadHubs, ...nomadHubs];
export default function LandingPage() {
return (
<div className="relative min-h-screen">
<SiteHeader />
<main>
{/* Hero */}
<section className="relative overflow-hidden px-4 pb-14 pt-8 sm:px-6 sm:pb-20 sm:pt-12 lg:px-8 lg:pb-28 lg:pt-16">
<div className="mx-auto grid max-w-6xl items-center gap-12 lg:grid-cols-2 lg:gap-20">
<div className="order-2 text-center lg:order-1 lg:text-left">
<p className="mb-4 inline-flex items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-4 py-1.5 text-xs font-semibold uppercase tracking-[0.16em] text-[var(--accent)] backdrop-blur-md">
<span className="relative flex h-2 w-2">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-[var(--gradient-1)] opacity-60" />
<span className="relative inline-flex h-2 w-2 rounded-full bg-[var(--gradient-1)]" />
</span>
Free ebook · Digital nomad · English
</p>
<h1 className="font-display text-[2.35rem] font-extrabold leading-[1.06] tracking-tight sm:text-5xl lg:text-[3.4rem]">
Work from{" "}
<span className="gradient-text">anywhere</span>
<span className="block text-[var(--foreground)]">with a plan.</span>
</h1>
<p className="mx-auto mt-5 max-w-xl text-lg leading-relaxed text-[var(--muted)] lg:mx-0">
<span className="font-semibold text-[var(--foreground)]">
{ebookMeta.title}
</span>{" "}
is a field guide for remote workers and founders building a
location-independent lifebases, visas, gear, community, and
rhythm.
</p>
<p className="mt-4 text-sm text-[var(--muted)]">
by{" "}
<span className="font-medium text-[var(--foreground)]">
{ebookMeta.author}
</span>
<span className="mx-2 opacity-40">·</span>
{ebookMeta.readTime}
<span className="mx-2 opacity-40">·</span>
{ebookMeta.pages} pages
</p>
<div className="mt-8 flex flex-col items-center justify-center gap-3 sm:flex-row lg:justify-start">
<Link href="/read" className="btn-primary w-full sm:w-auto">
Read free no signup
</Link>
<a href="#contents" className="btn-secondary w-full sm:w-auto">
Browse chapters
</a>
</div>
<dl className="mt-10 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:max-w-xl">
{heroStats.map((stat) => (
<div
key={stat.label}
className="rounded-xl border border-[var(--border)] bg-[var(--surface)]/60 px-3 py-3 text-center backdrop-blur-sm"
>
<dt className="font-display text-lg font-bold text-[var(--foreground)]">
{stat.value}
</dt>
<dd className="mt-0.5 text-[10px] font-medium uppercase tracking-wider text-[var(--muted)]">
{stat.label}
</dd>
</div>
))}
</dl>
</div>
<div className="order-1 flex justify-center lg:order-2 lg:justify-end">
<BookCover />
</div>
</div>
</section>
{/* Hub marquee */}
<section
className="border-y border-[var(--border)] bg-[var(--surface-solid)]/40 py-4"
aria-label="Popular nomad hubs"
>
<div className="overflow-hidden">
<div className="marquee-track gap-3 px-2">
{hubMarquee.map((hub, i) => (
<span
key={`${hub.city}-${i}`}
className="mx-1.5 inline-flex shrink-0 items-center gap-2 rounded-full border border-[var(--border)] bg-[var(--surface)] px-4 py-2 text-sm backdrop-blur-sm"
>
<span className="font-semibold text-[var(--foreground)]">
{hub.city}
</span>
<span className="text-[var(--muted)]">{hub.country}</span>
<span className="hidden text-xs text-[var(--accent)] sm:inline">
· {hub.vibe}
</span>
</span>
))}
</div>
</div>
</section>
{/* Highlights */}
<section className="px-4 py-16 sm:px-6 sm:py-20 lg:px-8">
<div className="mx-auto max-w-6xl">
<p className="text-center text-xs font-semibold uppercase tracking-[0.2em] text-[var(--accent)]">
What you&apos;ll master
</p>
<h2 className="mt-2 text-center font-serif text-2xl font-medium tracking-tight sm:text-3xl">
Built for the{" "}
<span className="gradient-text">digital nomad</span> reality
</h2>
<div className="mt-10 grid gap-4 sm:grid-cols-2">
{highlights.map((item) => (
<div
key={item.title}
className="glass-card group rounded-2xl p-6 transition-transform duration-300 hover:-translate-y-1"
>
<div className="mb-4 flex h-11 w-11 items-center justify-center rounded-xl bg-gradient-to-br from-[var(--gradient-1)]/15 via-[var(--gradient-2)]/15 to-[var(--gradient-3)]/15 text-[var(--accent)]">
<HighlightIcon name={item.icon} />
</div>
<h3 className="font-display text-base font-bold text-[var(--foreground)]">
{item.title}
</h3>
<p className="mt-2 text-sm leading-relaxed text-[var(--muted)]">
{item.description}
</p>
</div>
))}
</div>
</div>
</section>
{/* Pillars */}
<section className="border-y border-[var(--border)] bg-[var(--surface-solid)]/50 px-4 py-16 sm:px-6 sm:py-24 lg:px-8">
<div className="mx-auto max-w-6xl">
<div className="mx-auto max-w-2xl text-center">
<p className="text-xs font-semibold uppercase tracking-[0.2em] text-[var(--accent)]">
Four pillars
</p>
<h2 className="mt-2 font-serif text-2xl font-medium sm:text-3xl">
Location freedom,{" "}
<span className="gradient-text">without chaos</span>
</h2>
</div>
<div className="mt-12 grid gap-6 sm:grid-cols-2">
{pillars.map((pillar, index) => (
<article
key={pillar.title}
className="glass-card rounded-2xl p-6 sm:p-8"
>
<span className="font-mono text-xs font-bold text-[var(--accent)]">
0{index + 1}
</span>
<h3 className="mt-2 font-display text-lg font-bold">
{pillar.title}
</h3>
<p className="mt-2 text-[var(--muted)] leading-relaxed">
{pillar.body}
</p>
</article>
))}
</div>
</div>
</section>
{/* Testimonial */}
<section className="px-4 py-16 sm:px-6 lg:px-8">
<figure className="glass-card relative mx-auto max-w-3xl overflow-hidden rounded-3xl p-8 sm:p-10">
<div
className="absolute -right-8 -top-8 h-32 w-32 rounded-full bg-[var(--gradient-1)]/20 blur-2xl"
aria-hidden
/>
<blockquote className="relative font-serif text-xl leading-relaxed text-[var(--foreground)] sm:text-2xl">
&ldquo;{testimonial.quote}&rdquo;
</blockquote>
<figcaption className="relative mt-6 flex flex-wrap items-center gap-3 text-sm">
<span className="font-display font-bold">{testimonial.author}</span>
<span className="text-[var(--muted)]">{testimonial.role}</span>
<span className="w-full text-xs text-[var(--accent)] sm:w-auto">
{testimonial.location}
</span>
</figcaption>
</figure>
</section>
{/* Table of contents */}
<section
id="contents"
className="border-t border-[var(--border)] px-4 py-16 sm:px-6 sm:py-24 lg:px-8"
>
<div className="mx-auto max-w-6xl">
<div className="mb-10 flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between">
<div>
<p className="text-xs font-semibold uppercase tracking-[0.2em] text-[var(--accent)]">
Table of contents
</p>
<h2 className="mt-2 font-serif text-2xl font-medium sm:text-3xl">
Six chapters + introduction
</h2>
</div>
<p className="max-w-sm text-sm text-[var(--muted)]">
Read in-browser on laptop, tablet, or phonewith light/dark mode
for late-night flights.
</p>
</div>
<ol className="grid gap-3 lg:grid-cols-2">
{tableOfContents.map((item, index) => (
<li key={item.id}>
<Link
href={`/read#${item.id}`}
className="glass-card group flex gap-4 rounded-2xl p-5 transition-all hover:border-[var(--accent)]/35 hover:shadow-[var(--glow-sm)]"
>
<span className="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-[var(--gradient-1)] to-[var(--gradient-3)] text-sm font-bold text-white">
{String(index + 1).padStart(2, "0")}
</span>
<span className="min-w-0 flex-1">
<span className="block font-display font-semibold leading-snug group-hover:text-[var(--accent)]">
{item.title}
</span>
{item.summary ? (
<span className="mt-1 block text-sm text-[var(--muted)] line-clamp-2">
{item.summary}
</span>
) : null}
</span>
<span
className="shrink-0 self-center text-[var(--muted)] transition-transform group-hover:translate-x-1 group-hover:text-[var(--accent)]"
aria-hidden
>
</span>
</Link>
</li>
))}
</ol>
</div>
</section>
{/* FAQ */}
<section className="border-t border-[var(--border)] bg-[var(--surface-solid)]/40 px-4 py-16 sm:px-6 sm:py-24 lg:px-8">
<div className="mx-auto max-w-3xl">
<p className="text-center text-xs font-semibold uppercase tracking-[0.2em] text-[var(--accent)]">
FAQ
</p>
<h2 className="mt-2 text-center font-serif text-2xl font-medium sm:text-3xl">
Before you pack
</h2>
<div className="mt-10">
<FaqAccordion />
</div>
</div>
</section>
{/* CTA */}
<section className="px-4 py-16 sm:px-6 sm:py-24 lg:px-8">
<div className="relative mx-auto max-w-6xl overflow-hidden rounded-3xl">
<div
className="absolute inset-0 bg-gradient-to-br from-teal-700 via-teal-600 to-sky-800 dark:from-teal-900 dark:via-teal-800 dark:to-slate-900"
aria-hidden
/>
<div
className="absolute inset-0 bg-[url('data:image/svg+xml,%3Csvg width=%2260%22 height=%2260%22 viewBox=%220 0 60 60%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg fill=%22none%22 fill-rule=%22evenodd%22%3E%3Cg fill=%22%23ffffff%22 fill-opacity=%220.06%22%3E%3Cpath d=%22M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z%22/%3E%3C/g%3E%3C/g%3E%3C/svg%3E')] opacity-80"
aria-hidden
/>
<div className="relative px-8 py-14 text-center sm:px-16 sm:py-20">
<p className="text-xs font-bold uppercase tracking-[0.2em] text-teal-200">
Your next base starts here
</p>
<h2 className="mt-3 font-display text-2xl font-bold text-white sm:text-4xl">
Read the nomad playbook tonight
</h2>
<p className="mx-auto mt-4 max-w-lg text-base text-teal-50/90 sm:text-lg">
No signup. No paywall. Open on any device, switch themes for red-eye
flights, and jump straight to visas or community.
</p>
<Link
href="/read"
className="mt-8 inline-flex h-12 items-center justify-center rounded-full bg-white px-10 text-sm font-bold text-teal-800 shadow-xl transition-transform hover:scale-[1.02] active:scale-[0.98]"
>
Open {ebookMeta.title}
</Link>
</div>
</div>
</section>
</main>
<footer className="border-t border-[var(--border)]">
<div className="mx-auto flex max-w-6xl flex-col items-center justify-between gap-4 px-4 py-8 text-sm text-[var(--muted)] sm:flex-row sm:px-6 lg:px-8">
<p>
© {ebookMeta.year} {ebookMeta.author} · {ebookMeta.title} digital
nomad field guide
</p>
<Link
href="/read"
className="font-medium text-[var(--accent)] transition-opacity hover:opacity-80"
>
Read the ebook
</Link>
</div>
</footer>
</div>
);
}