feat: rebrand MONO->0pt (hero, header, layout) + add project docs/contract

Hero is now a data-native 0pt artifact (no photos, keeps grain/reveal/float); header is the 0pt wordmark with Swedish nav; layout is sv + loads JetBrains Mono + 0pt metadata; globals wires the loaded fonts. Adds CLAUDE.md + docs/01-09 as the build contract. next build green (5 routes).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 17:38:07 +02:00
co-authored by Claude Opus 4.8
parent 24035dec8b
commit 22e09d984d
14 changed files with 1052 additions and 322 deletions
+63 -95
View File
@@ -1,126 +1,94 @@
"use client";
import { useState, useEffect } from "react";
import Link from "next/link";
import { Menu, X } from "lucide-react";
import { useEffect, useState } from "react";
const NAV = [
{ label: "Katalog", href: "/#katalog" },
{ label: "Så funkar det", href: "/#motorn" },
{ label: "Källor", href: "/#tackning" },
{ label: "Priser", href: "/#priser" },
];
function Wordmark() {
return (
<Link href="/" className="flex items-center gap-2">
<span className="text-xl font-semibold tracking-[-0.02em]">0pt</span>
<span className="inline-block h-1 w-1" style={{ backgroundColor: "var(--accent-red)" }} />
<span className="font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground">your data</span>
</Link>
);
}
export function Header() {
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [isScrolled, setIsScrolled] = useState(false);
const [scrolled, setScrolled] = useState(false);
const [open, setOpen] = useState(false);
useEffect(() => {
const handleScroll = () => {
setIsScrolled(window.scrollY > 50);
};
window.addEventListener("scroll", handleScroll, { passive: true });
return () => window.removeEventListener("scroll", handleScroll);
const onScroll = () => setScrolled(window.scrollY > 40);
window.addEventListener("scroll", onScroll, { passive: true });
onScroll();
return () => window.removeEventListener("scroll", onScroll);
}, []);
return (
<header
className={`fixed top-4 left-1/2 -translate-x-1/2 z-50 w-[90%] max-w-3xl transition-all duration-300 ${isScrolled ? "bg-background/80 backdrop-blur-md rounded-full" : "bg-transparent"}`}
<header
className="sticky top-0 z-50 border-b border-border transition-colors"
style={{
boxShadow: isScrolled ? "rgba(14, 63, 126, 0.04) 0px 0px 0px 1px, rgba(42, 51, 69, 0.04) 0px 1px 1px -0.5px, rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.04) 0px 6px 6px -3px, rgba(14, 63, 126, 0.04) 0px 12px 12px -6px, rgba(14, 63, 126, 0.04) 0px 24px 24px -12px" : "none"
backgroundColor: scrolled ? "rgba(255,255,255,0.82)" : "var(--background)",
backdropFilter: scrolled ? "blur(8px)" : "none",
}}
>
<div className="flex items-center justify-between transition-all duration-300 px-2 pl-5 py-2">
{/* Logo */}
<Link href="#hero" className="text-lg font-medium tracking-tight transition-colors duration-300 text-foreground">
MONO
</Link>
<div className="mx-auto flex h-16 max-w-[80rem] items-center justify-between px-6">
<Wordmark />
{/* Desktop Navigation */}
<nav className="hidden items-center gap-10 md:flex">
<Link
href="#technology"
className="text-sm transition-colors text-muted-foreground hover:text-foreground"
>
Design
</Link>
<Link
href="#gallery"
className="text-sm transition-colors text-muted-foreground hover:text-foreground"
>
Gallery
</Link>
<Link
href="#accessories"
className="text-sm transition-colors text-muted-foreground hover:text-foreground"
>
Models
</Link>
<Link
href="#about"
className="text-sm transition-colors text-muted-foreground hover:text-foreground"
>
About
</Link>
<nav className="hidden items-center gap-7 md:flex">
{NAV.map((n) => (
<Link
key={n.label}
href={n.href}
className="font-mono text-[12px] uppercase tracking-[0.1em] text-muted-foreground transition-colors hover:text-foreground"
>
{n.label}
</Link>
))}
</nav>
{/* CTA */}
<div className="hidden items-center gap-6 md:flex">
<div className="hidden items-center gap-5 md:flex">
<Link href="/bestall" className="font-mono text-[12px] uppercase tracking-[0.1em] text-muted-foreground transition-colors hover:text-foreground">
Logga in
</Link>
<Link
href="#reserve"
className="px-4 py-2 text-sm font-medium transition-all rounded-full bg-foreground text-background hover:opacity-80"
href="/bestall"
className="bg-foreground px-5 py-2.5 font-mono text-[12px] uppercase tracking-[0.1em] text-background transition-colors hover:bg-[var(--accent-red)]"
>
Contact
Starta beställning
</Link>
</div>
{/* Mobile Menu Button */}
<button
type="button"
onClick={() => setIsMenuOpen(!isMenuOpen)}
className="transition-colors md:hidden text-foreground"
aria-label="Toggle menu"
aria-label="Meny"
onClick={() => setOpen((v) => !v)}
className="flex h-9 w-9 items-center justify-center border border-border md:hidden"
>
{isMenuOpen ? <X size={24} /> : <Menu size={24} />}
<span className="font-mono text-sm">{open ? "✕" : "≡"}</span>
</button>
</div>
{/* Mobile Menu */}
{isMenuOpen && (
<div className="border-t border-border bg-background px-6 py-8 md:hidden rounded-b-2xl">
<nav className="flex flex-col gap-6">
<Link
href="#technology"
className="text-lg text-foreground"
onClick={() => setIsMenuOpen(false)}
>
Design
{open ? (
<div className="border-t border-border bg-background md:hidden">
<div className="flex flex-col gap-1 px-6 py-4">
{NAV.map((n) => (
<Link key={n.label} href={n.href} onClick={() => setOpen(false)} className="py-2 font-mono text-[12px] uppercase tracking-[0.1em] text-muted-foreground">
{n.label}
</Link>
))}
<Link href="/bestall" onClick={() => setOpen(false)} className="mt-2 bg-foreground px-5 py-3 text-center font-mono text-[12px] uppercase tracking-[0.1em] text-background">
Starta beställning
</Link>
<Link
href="#gallery"
className="text-lg text-foreground"
onClick={() => setIsMenuOpen(false)}
>
Gallery
</Link>
<Link
href="#accessories"
className="text-lg text-foreground"
onClick={() => setIsMenuOpen(false)}
>
Models
</Link>
<Link
href="#about"
className="text-lg text-foreground"
onClick={() => setIsMenuOpen(false)}
>
About
</Link>
<Link
href="#reserve"
className="mt-4 bg-foreground px-5 py-3 text-center text-sm font-medium text-background rounded-full"
onClick={() => setIsMenuOpen(false)}
>
Contact
</Link>
</nav>
</div>
</div>
)}
) : null}
</header>
);
}
+81 -189
View File
@@ -1,208 +1,100 @@
"use client";
import Image from "next/image";
import { useEffect, useRef, useState } from "react";
import Link from "next/link";
import { useReveal } from "@/hooks/use-reveal";
const word = "MONO";
const sideImages = [
{
src: "/images/hero-side-1.png",
alt: "Modern architecture with corten steel",
position: "left",
span: 1,
},
{
src: "/images/hero-side-2.png",
alt: "Aerial view of modern home",
position: "left",
span: 1,
},
{
src: "/images/hero-side-3.png",
alt: "Interior view with landscape",
position: "right",
span: 1,
},
{
src: "/images/hero-side-4.png",
alt: "Modern architecture at night",
position: "right",
span: 1,
},
const STATS = [
["20", "marknader täckta"],
["Per fält", "härkomst & konfidens"],
["50/50", "start & godkänt"],
["GDPR", "native, med DPA"],
];
// Data-native hero artifact: a miniature company table that "is" the product.
const ROWS: [string, string, string, 0 | 1 | 2 | 3][] = [
["556016-0680", "Volvo Group", "GLEIF", 3],
["915933149", "Equinor ASA", "Brreg", 3],
["25052943", "Maersk A/S", "CVR", 2],
["0112038-9", "Nokia Oyj", "PRH", 2],
["—", "E-post (FI)", "licens", 0],
];
const PROV = ["var(--prov-0)", "var(--prov-1)", "var(--prov-2)", "var(--prov-3)"];
export function HeroSection() {
const sectionRef = useRef<HTMLElement>(null);
const [scrollProgress, setScrollProgress] = useState(0);
useEffect(() => {
const handleScroll = () => {
if (!sectionRef.current) return;
const rect = sectionRef.current.getBoundingClientRect();
const scrollableHeight = window.innerHeight * 2;
const scrolled = -rect.top;
const progress = Math.max(0, Math.min(1, scrolled / scrollableHeight));
setScrollProgress(progress);
};
window.addEventListener("scroll", handleScroll, { passive: true });
handleScroll();
return () => {
window.removeEventListener("scroll", handleScroll);
};
}, []);
// Text fades out first (0 to 0.2)
const textOpacity = Math.max(0, 1 - (scrollProgress / 0.2));
// Image transforms start after text fades (0.2 to 1)
const imageProgress = Math.max(0, Math.min(1, (scrollProgress - 0.2) / 0.8));
// Smooth interpolations - More balanced distribution
const centerWidth = 100 - (imageProgress * 80); // 100% to 20% (same as each side image)
const centerHeight = 100; // Always 100% height
const sideWidth = imageProgress * 40; // 0% to 40% (20% per image, 2 images = 40%)
const sideOpacity = imageProgress;
const sideTranslateLeft = -100 + (imageProgress * 100); // -100% to 0%
const sideTranslateRight = 100 - (imageProgress * 100); // 100% to 0%
const borderRadius = 0; // No border radius
const gap = imageProgress * 8; // 0px to 8px
// Vertical offset for side columns to move them up on mobile
const sideTranslateY = -(imageProgress * 15); // Move up by 15% when fully expanded
const ref = useReveal<HTMLElement>();
return (
<section ref={sectionRef} className="relative bg-background">
{/* Sticky container for scroll animation */}
<div className="sticky top-0 h-screen overflow-hidden">
<div className="flex h-full w-full items-center justify-center">
{/* Bento Grid Container */}
<div
className="relative flex h-full w-full items-stretch justify-center"
style={{ gap: `${gap}px` }}
>
{/* Left Column */}
<div
className="flex h-full flex-row will-change-transform"
style={{
width: `${sideWidth}%`,
gap: `${gap}px`,
transform: `translateX(${sideTranslateLeft}%) translateY(${sideTranslateY}%)`,
opacity: sideOpacity,
}}
>
{sideImages.filter(img => img.position === "left").map((img, idx) => (
<div
key={idx}
className="relative h-full overflow-hidden will-change-transform"
style={{
flex: img.span,
borderRadius: `${borderRadius}px`,
}}
>
<Image
src={img.src || "/placeholder.svg"}
alt={img.alt}
fill
className="object-cover"
/>
</div>
))}
</div>
<section ref={ref} className="grain-overlay relative overflow-hidden border-b border-border bg-background">
{/* faint oversized wordmark */}
<div aria-hidden className="pointer-events-none absolute -right-10 top-1/2 -translate-y-1/2 select-none">
<span className="text-[34vw] font-semibold leading-none tracking-tighter text-border/60 md:text-[22vw]">0pt</span>
</div>
<span aria-hidden className="animate-float pointer-events-none absolute right-[8%] top-[22%] inline-block h-3 w-3" style={{ backgroundColor: "var(--accent-red)" }} />
{/* Main Hero Image - Center */}
<div
className="relative overflow-hidden will-change-transform"
style={{
width: `${centerWidth}%`,
height: `${centerHeight}%`,
flex: "0 0 auto",
borderRadius: `${borderRadius}px`,
}}
<div className="relative mx-auto grid max-w-[80rem] grid-cols-1 gap-12 px-6 py-24 lg:grid-cols-[1.1fr_0.9fr] lg:py-32">
<div className="flex flex-col justify-center">
<p className="reveal delay-1 font-mono text-[11px] uppercase tracking-[0.14em] text-muted-foreground">
00 — Datatjänster på beställning · Norden &amp; EU
</p>
<h1 className="reveal delay-2 mt-5 text-[clamp(2.6rem,7vw,6rem)] font-medium leading-[0.95] tracking-[-0.025em]">
Beställ exakt den data du behöver.
<br />
<span style={{ color: "var(--accent-red)" }}>Validera varje fält.</span>
</h1>
<p className="reveal delay-3 mt-6 max-w-[54ch] text-lg text-muted-foreground">
Sätt ihop ditt eget datajobb. Betala 50 % för att starta. Följ produktionen i realtid. Godkänn
resultatet med full insyn i var varje uppgift kommer ifrån — och hur säker den är.
</p>
<div className="reveal delay-4 mt-8 flex flex-wrap gap-3">
<Link
href="/bestall"
className="bg-foreground px-6 py-3.5 font-mono text-[12px] uppercase tracking-[0.1em] text-background transition-colors hover:bg-[var(--accent-red)]"
>
{/* Text Behind - Fades out first */}
<div
className="absolute inset-0 z-0 flex items-center justify-center"
style={{ opacity: textOpacity, transform: 'translateY(-200px)' }}
>
<h1 className="whitespace-nowrap text-[35vw] font-bold leading-[0.8] tracking-tighter text-black">
{word.split("").map((letter, index) => (
<span
key={index}
className="inline-block animate-[slideUp_0.8s_ease-out_forwards] opacity-0"
style={{
animationDelay: `${index * 0.08}s`,
transition: 'all 1.5s',
transitionTimingFunction: 'cubic-bezier(0.86, 0, 0.07, 1)',
}}
>
{letter}
</span>
))}
</h1>
Bygg en beställning
</Link>
<Link
href="/order/SX-4471/validera"
className="border border-foreground px-6 py-3.5 font-mono text-[12px] uppercase tracking-[0.1em] transition-colors hover:bg-foreground hover:text-background"
>
Se ett levererat dataset
</Link>
</div>
<div className="reveal delay-5 mt-12 grid grid-cols-2 gap-px border border-border bg-border sm:grid-cols-4">
{STATS.map(([n, l]) => (
<div key={l} className="bg-background p-4">
<p className="text-2xl font-semibold tracking-[-0.02em]">{n}</p>
<p className="mt-1 font-mono text-[10px] uppercase tracking-[0.08em] text-muted-foreground">{l}</p>
</div>
<Image
src="/images/hero-mono.png"
alt="Modern architectural structure with reflection"
fill
className="absolute inset-0 z-10 object-cover"
priority
/>
</div>
))}
</div>
</div>
{/* Right Column */}
<div
className="flex h-full flex-row will-change-transform"
style={{
width: `${sideWidth}%`,
gap: `${gap}px`,
transform: `translateX(${sideTranslateRight}%) translateY(${sideTranslateY}%)`,
opacity: sideOpacity,
}}
>
{sideImages.filter(img => img.position === "right").map((img, idx) => (
<div
key={idx}
className="relative h-full overflow-hidden will-change-transform"
style={{
flex: img.span,
borderRadius: `${borderRadius}px`,
}}
>
<Image
src={img.src || "/placeholder.svg"}
alt={img.alt}
fill
className="object-cover"
/>
{/* the artifact */}
<div className="reveal-fade flex items-center">
<div className="w-full border border-border bg-background">
<div className="flex items-center justify-between border-b border-border px-4 py-2">
<span className="font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground">dim_company · exempel</span>
<span className="font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground">härkomst</span>
</div>
{ROWS.map((r, i) => (
<div key={i} className={`reveal delay-${i + 1} flex items-center justify-between border-b border-border px-4 py-3 last:border-b-0`}>
<div className="min-w-0">
<p className="truncate text-sm">{r[1]}</p>
<p className="font-mono text-[10.5px] text-muted-foreground">{r[0]}</p>
</div>
))}
</div>
<span className="ml-3 inline-flex items-center gap-1.5 border border-border px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground">
<span
className="inline-block h-[7px] w-[7px]"
style={{ backgroundColor: r[3] === 0 ? "transparent" : PROV[r[3]], border: r[3] === 0 ? `1px solid ${PROV[0]}` : "none" }}
/>
{r[2]}
</span>
</div>
))}
</div>
</div>
</div>
{/* Tagline Section - Fixed at bottom */}
<div
className="pointer-events-none fixed bottom-0 left-0 right-0 z-10 px-6 pb-12 md:px-12 md:pb-16 lg:px-20 lg:pb-20"
style={{ opacity: textOpacity }}
>
<p className="mx-auto max-w-2xl text-center text-2xl leading-relaxed text-white md:text-3xl lg:text-[2.5rem] lg:leading-snug">
Lightweight, durable
<br />
and adventure-ready.
</p>
</div>
{/* Scroll space to enable animation */}
<div className="h-[200vh]" />
</section>
);
}