This commit is contained in:
新新 committed 2026-04-27 17:03:56 +08:00
commit fe636432d0
154 files changed
+30381

No files matched your search

@@ -0,0 +1,8 @@
# Next.js App Router Starter
Copy these files into an existing Next.js App Router project to bootstrap a strongly-themed, token-driven page.
- Files assume `app/` routing (not `pages/`).
- Uses CSS variables + CSS Modules (no external styling dependencies).
- Designed to be rethemed by editing `app/globals.css` tokens.
- Includes an “Assistant Rail” component demonstrating AI-native UX patterns (AI disclosure, citations, and human-in-control apply/undo).
@@ -0,0 +1,69 @@
:root {
--bg: #0b0d12;
--surface: rgba(255, 255, 255, 0.06);
--surface-2: rgba(255, 255, 255, 0.1);
--ink: rgba(255, 255, 255, 0.92);
--muted: rgba(255, 255, 255, 0.68);
--accent: #6ee7ff;
--danger: #ff5a7a;
--warning: #ffcc66;
--success: #55f2b1;
--info: #6ea8ff;
--radius-sm: 10px;
--radius-md: 16px;
--radius-lg: 22px;
--shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.28);
--shadow-md: 0 22px 70px rgba(0, 0, 0, 0.4);
--container: 1120px;
--gutter: clamp(16px, 3vw, 28px);
--grid-gap: clamp(14px, 2vw, 22px);
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--dur-1: 140ms;
--dur-2: 240ms;
--dur-3: 420ms;
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
margin: 0;
background: radial-gradient(1200px 900px at 18% -10%, rgba(110, 231, 255, 0.18), transparent 55%),
radial-gradient(900px 700px at 78% 10%, rgba(255, 115, 224, 0.14), transparent 60%),
var(--bg);
color: var(--ink);
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
"Apple Color Emoji", "Segoe UI Emoji";
line-height: 1.45;
}
a {
color: inherit;
text-decoration: none;
}
:focus-visible {
outline: 2px solid color-mix(in oklab, var(--accent), white 10%);
outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
@@ -0,0 +1,18 @@
import type { Metadata } from "next";
import "./globals.css";
import type { ReactNode } from "react";
export const metadata: Metadata = {
title: "Frontend Design Starter",
description: "Token-driven Next.js starter page for rapid retheming.",
};
export default function RootLayout({
children,
}: Readonly<{ children: ReactNode }>) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
@@ -0,0 +1,244 @@
.page {
min-height: 100dvh;
}
.skip {
position: absolute;
left: -999px;
top: 12px;
padding: 10px 12px;
border-radius: 999px;
background: var(--surface-2);
}
.skip:focus {
left: 12px;
}
.topbar {
position: sticky;
top: 0;
z-index: 10;
backdrop-filter: blur(18px);
background: color-mix(in oklab, var(--bg), transparent 35%);
border-bottom: 1px solid color-mix(in oklab, white, transparent 90%);
}
.topbarInner {
max-width: var(--container);
margin: 0 auto;
padding: 14px var(--gutter);
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
}
.brand {
display: inline-flex;
align-items: center;
gap: 10px;
font-weight: 650;
letter-spacing: 0.02em;
}
.mark {
width: 28px;
height: 28px;
border-radius: 10px;
background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.45), transparent 60%),
linear-gradient(135deg, rgba(110, 231, 255, 0.85), rgba(255, 115, 224, 0.62));
box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.nav {
display: flex;
gap: 14px;
color: var(--muted);
font-size: 14px;
}
.nav a {
padding: 8px 10px;
border-radius: 999px;
}
.nav a:hover {
background: rgba(255, 255, 255, 0.06);
color: var(--ink);
}
.hero {
max-width: var(--container);
margin: 0 auto;
padding: 54px var(--gutter) 28px;
display: grid;
grid-template-columns: 1.15fr 0.85fr;
gap: clamp(18px, 3vw, 36px);
align-items: start;
}
.headline {
margin: 0;
font-size: clamp(34px, 4vw, 56px);
line-height: 1.03;
letter-spacing: -0.02em;
}
.lede {
margin: 14px 0 0;
color: var(--muted);
font-size: clamp(16px, 1.4vw, 18px);
max-width: 58ch;
}
.ctaRow {
margin-top: 20px;
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.btn {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 11px 14px;
border-radius: 999px;
border: 1px solid color-mix(in oklab, white, transparent 85%);
background: rgba(255, 255, 255, 0.04);
box-shadow: var(--shadow-sm);
transition: transform var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out),
border-color var(--dur-2) var(--ease-out);
}
.btn:hover {
transform: translateY(-1px);
background: rgba(255, 255, 255, 0.07);
border-color: color-mix(in oklab, var(--accent), white 35%);
}
.btnPrimary {
border-color: color-mix(in oklab, var(--accent), white 40%);
background: linear-gradient(
180deg,
rgba(110, 231, 255, 0.22),
rgba(255, 255, 255, 0.06)
);
}
.panel {
border-radius: var(--radius-lg);
background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
border: 1px solid color-mix(in oklab, white, transparent 88%);
box-shadow: var(--shadow-md);
padding: 18px;
}
.rail {
margin-top: 16px;
}
.panelHeader {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.panelTitle {
margin: 0;
font-size: 15px;
letter-spacing: 0.02em;
color: color-mix(in oklab, var(--muted), white 18%);
}
.badge {
font-size: 12px;
color: color-mix(in oklab, var(--accent), white 20%);
background: rgba(110, 231, 255, 0.12);
border: 1px solid rgba(110, 231, 255, 0.28);
padding: 6px 10px;
border-radius: 999px;
}
.list {
margin: 14px 0 0;
padding: 0;
list-style: none;
display: grid;
gap: 10px;
}
.item {
border-radius: var(--radius-md);
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.06);
padding: 12px 12px;
}
.itemTitle {
font-weight: 620;
margin: 0;
font-size: 14px;
}
.itemBody {
margin: 6px 0 0;
color: var(--muted);
font-size: 13px;
}
.content {
max-width: var(--container);
margin: 0 auto;
padding: 28px var(--gutter) 64px;
}
.grid {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: var(--grid-gap);
}
.card {
grid-column: span 4;
border-radius: var(--radius-lg);
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.07);
padding: 18px;
transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.card:hover {
transform: translateY(-2px);
border-color: color-mix(in oklab, var(--accent), white 35%);
}
.card h2 {
margin: 0 0 8px;
font-size: 16px;
letter-spacing: 0.01em;
}
.card p {
margin: 0;
color: var(--muted);
font-size: 14px;
}
@media (max-width: 900px) {
.hero {
grid-template-columns: 1fr;
}
.card {
grid-column: span 6;
}
}
@media (max-width: 560px) {
.card {
grid-column: span 12;
}
}
@@ -0,0 +1,99 @@
import styles from "./page.module.css";
import { AssistantRail } from "../components/AssistantRail";
const quickWins = [
{
title: "Token-first styling",
body: "Retheme fast by editing CSS variables in globals.css (palette, radii, shadows, motion).",
},
{
title: "One signature move",
body: "Commit to a single memorable gesture (light sweep, stripe, grain, or brutal border logic).",
},
{
title: "Accessible by default",
body: "Semantic structure, visible focus, and reduced-motion support are built in.",
},
];
export default function Page() {
return (
<div className={styles.page}>
<a className={styles.skip} href="#content">
Skip to content
</a>
<header className={styles.topbar}>
<div className={styles.topbarInner}>
<a className={styles.brand} href="#">
<span aria-hidden className={styles.mark} />
Frontend Design
</a>
<nav className={styles.nav} aria-label="Primary">
<a href="#principles">Principles</a>
<a href="#cards">Patterns</a>
<a href="#cta">CTA</a>
</nav>
</div>
</header>
<main id="content">
<section className={styles.hero} aria-labelledby="headline">
<div>
<h1 id="headline" className={styles.headline}>
A token-driven page that looks intentional on day one.
</h1>
<p className={styles.lede}>
Build structure first, then motion, then polish. Keep the UI memorable with one
signature move—not ten random decorations.
</p>
<div className={styles.ctaRow} id="cta">
<a className={`${styles.btn} ${styles.btnPrimary}`} href="#">
Start a redesign <span aria-hidden>→</span>
</a>
<a className={styles.btn} href="#cards">
See patterns
</a>
</div>
</div>
<aside className={styles.panel} aria-label="Quick Wins" id="principles">
<div className={styles.panelHeader}>
<h2 className={styles.panelTitle}>Quick Wins</h2>
<span className={styles.badge}>Next.js App Router</span>
</div>
<ul className={styles.list}>
{quickWins.map((item) => (
<li key={item.title} className={styles.item}>
<p className={styles.itemTitle}>{item.title}</p>
<p className={styles.itemBody}>{item.body}</p>
</li>
))}
</ul>
</aside>
<div className={styles.rail}>
<AssistantRail />
</div>
</section>
<section className={styles.content} aria-labelledby="cards" id="cards">
<div className={styles.grid}>
<article className={styles.card}>
<h2>Hierarchy</h2>
<p>Make the primary action obvious, then design the supporting rails.</p>
</article>
<article className={styles.card}>
<h2>Texture</h2>
<p>Use subtle grain/mesh/stripe logic to avoid flat UI without clutter.</p>
</article>
<article className={styles.card}>
<h2>Motion</h2>
<p>Orchestrate a few meaningful reveals and micro-interactions—guarded by settings.</p>
</article>
</div>
</section>
</main>
</div>
);
}
@@ -0,0 +1,217 @@
.wrap {
display: grid;
gap: 12px;
}
.panel {
border-radius: var(--radius-lg);
background: linear-gradient(
180deg,
rgba(255, 255, 255, 0.07),
rgba(255, 255, 255, 0.03)
);
border: 1px solid color-mix(in oklab, white, transparent 88%);
box-shadow: var(--shadow-md);
padding: 16px;
}
.header {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
margin-bottom: 10px;
}
.title {
margin: 0;
font-size: 15px;
letter-spacing: 0.02em;
color: color-mix(in oklab, var(--muted), white 18%);
}
.disclosure {
display: inline-flex;
align-items: center;
gap: 8px;
}
.badge {
font-size: 12px;
color: color-mix(in oklab, var(--accent), white 18%);
background: rgba(110, 231, 255, 0.12);
border: 1px solid rgba(110, 231, 255, 0.28);
padding: 6px 10px;
border-radius: 999px;
}
.hint {
font-size: 12px;
color: var(--muted);
}
.promptRow {
display: flex;
gap: 10px;
margin-top: 10px;
}
.input {
flex: 1;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.12);
color: var(--ink);
padding: 10px 12px;
font: inherit;
}
.input::placeholder {
color: color-mix(in oklab, var(--muted), transparent 10%);
}
.btn {
border-radius: 999px;
border: 1px solid color-mix(in oklab, white, transparent 85%);
background: rgba(255, 255, 255, 0.04);
color: var(--ink);
padding: 10px 12px;
font: inherit;
cursor: pointer;
transition: transform var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out),
border-color var(--dur-2) var(--ease-out);
}
.btn:hover {
transform: translateY(-1px);
background: rgba(255, 255, 255, 0.07);
border-color: color-mix(in oklab, var(--accent), white 35%);
}
.btnPrimary {
border-color: color-mix(in oklab, var(--accent), white 40%);
background: linear-gradient(
180deg,
rgba(110, 231, 255, 0.2),
rgba(255, 255, 255, 0.06)
);
}
.output {
margin-top: 12px;
border-radius: var(--radius-md);
border: 1px solid rgba(255, 255, 255, 0.08);
background: rgba(255, 255, 255, 0.03);
padding: 12px;
}
.typing {
display: inline-flex;
gap: 6px;
align-items: center;
color: var(--muted);
font-size: 13px;
}
.dot {
width: 6px;
height: 6px;
border-radius: 999px;
background: color-mix(in oklab, var(--accent), white 15%);
opacity: 0.6;
animation: pulse 900ms var(--ease-out) infinite;
}
.dot:nth-child(2) {
animation-delay: 120ms;
}
.dot:nth-child(3) {
animation-delay: 240ms;
}
@keyframes pulse {
0%,
100% {
transform: translateY(0);
opacity: 0.45;
}
50% {
transform: translateY(-1px);
opacity: 0.9;
}
}
.text {
margin: 0;
color: color-mix(in oklab, var(--ink), white 2%);
font-size: 13px;
line-height: 1.45;
}
.citations {
margin-top: 10px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.chip {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 7px 10px;
border-radius: 999px;
border: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(255, 255, 255, 0.04);
color: var(--muted);
font-size: 12px;
}
.chipNumber {
width: 18px;
height: 18px;
border-radius: 999px;
display: inline-flex;
align-items: center;
justify-content: center;
background: rgba(110, 231, 255, 0.14);
border: 1px solid rgba(110, 231, 255, 0.26);
color: color-mix(in oklab, var(--accent), white 20%);
font-weight: 650;
font-size: 11px;
}
.controls {
margin-top: 12px;
display: flex;
flex-wrap: wrap;
gap: 10px;
align-items: center;
justify-content: space-between;
}
.controlRow {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.whyRow {
margin-top: 12px;
}
.status {
font-size: 12px;
color: var(--muted);
}
.statusStrong {
color: color-mix(in oklab, var(--success), white 18%);
}
@media (prefers-reduced-motion: reduce) {
.dot {
animation: none;
}
}
@@ -0,0 +1,167 @@
"use client";
import { useMemo, useState } from "react";
import styles from "./AssistantRail.module.css";
type Suggestion = {
id: string;
text: string;
citations: Array<{ title: string; href: string }>;
};
const seededSuggestions: Suggestion[] = [
{
id: "cta",
text: "Reduce competing CTAs: keep one primary action, demote the rest to secondary to sharpen hierarchy.",
citations: [
{ title: "Design System: CTA hierarchy", href: "#" },
{ title: "UX principle: one primary per view", href: "#" },
],
},
{
id: "motion",
text: "Use motion only as feedback (hover, state changes, subtle reveal). Respect reduced-motion automatically.",
citations: [
{ title: "Motion guidelines", href: "#" },
{ title: "Reduced motion support", href: "#" },
],
},
];
export function AssistantRail() {
const [prompt, setPrompt] = useState("Summarize how to improve this page’s hierarchy.");
const [isGenerating, setIsGenerating] = useState(false);
const [active, setActive] = useState<Suggestion | null>(seededSuggestions[0]);
const [appliedIds, setAppliedIds] = useState<string[]>([]);
const [lastAppliedId, setLastAppliedId] = useState<string | null>(null);
const [showWhy, setShowWhy] = useState(false);
const appliedSet = useMemo(() => new Set(appliedIds), [appliedIds]);
function run() {
setIsGenerating(true);
window.setTimeout(() => {
const promptLower = prompt.toLowerCase();
const keywordMatch =
promptLower.includes("motion") || promptLower.includes("animation")
? "motion"
: promptLower.includes("cta") || promptLower.includes("button")
? "cta"
: null;
const next =
(keywordMatch ? seededSuggestions.find((s) => s.id === keywordMatch) : null) ??
(() => {
const currentIndex = seededSuggestions.findIndex((s) => s.id === (active?.id ?? seededSuggestions[0].id));
const nextIndex = (currentIndex + 1) % seededSuggestions.length;
return seededSuggestions[nextIndex];
})();
setActive(next);
setShowWhy(false);
setIsGenerating(false);
}, 700);
}
function apply() {
if (!active || appliedSet.has(active.id)) return;
setAppliedIds((prev) => [...prev, active.id]);
setLastAppliedId(active.id);
}
function undo() {
if (!lastAppliedId) return;
setAppliedIds((prev) => prev.filter((id) => id !== lastAppliedId));
setLastAppliedId(null);
}
function resetApplied() {
if (!appliedIds.length) return;
const ok = window.confirm("Clear applied items? This is just a demo of confirmation UI.");
if (!ok) return;
setAppliedIds([]);
setLastAppliedId(null);
}
return (
<section className={styles.panel} aria-label="AI Assistant">
<div className={styles.header}>
<h2 className={styles.title}>Assistant Rail</h2>
<div className={styles.disclosure}>
<span className={styles.badge} title="This content is generated by AI. Review before applying.">
AI-generated
</span>
</div>
</div>
<p className={styles.hint}>
Human-in-control: you can apply or undo changes. This is a starter UI pattern, not a full chatbot.
</p>
<div className={styles.promptRow}>
<input
className={styles.input}
value={prompt}
onChange={(e) => setPrompt(e.target.value)}
placeholder="Ask for a UI change…"
aria-label="Prompt"
/>
<button className={`${styles.btn} ${styles.btnPrimary}`} type="button" onClick={run}>
Ask
</button>
</div>
<div className={styles.output} aria-live="polite">
{isGenerating ? (
<div className={styles.typing} aria-label="Generating">
<span>Thinking</span>
<span className={styles.dot} />
<span className={styles.dot} />
<span className={styles.dot} />
</div>
) : (
<>
<p className={styles.text}>{active?.text}</p>
<div className={styles.citations} aria-label="Citations">
{(active?.citations ?? []).map((c, idx) => (
<span key={c.title} className={styles.chip} title={c.title}>
<span className={styles.chipNumber}>{idx + 1}</span>
<a href={c.href}>{c.title}</a>
</span>
))}
</div>
<div className={styles.whyRow}>
<button className={styles.btn} type="button" onClick={() => setShowWhy((v) => !v)}>
Why this?
</button>
</div>
{showWhy ? (
<p className={styles.hint}>
This suggestion targets high-leverage UX: clearer hierarchy reduces cognitive load and makes the
primary action obvious. It also reduces regret by keeping changes easy to apply/undo.
</p>
) : null}
</>
)}
</div>
<div className={styles.controls}>
<div className={styles.controlRow}>
<button className={styles.btn} type="button" onClick={apply} disabled={!active || appliedSet.has(active.id)}>
Apply
</button>
<button className={styles.btn} type="button" onClick={undo} disabled={!lastAppliedId}>
Undo
</button>
<button className={styles.btn} type="button" onClick={resetApplied} disabled={!appliedIds.length}>
Reset
</button>
</div>
<div className={styles.status} aria-live="polite">
Applied:{" "}
<span className={appliedIds.length ? styles.statusStrong : undefined}>{appliedIds.length}</span>
</div>
</div>
</section>
);
}
@@ -0,0 +1,198 @@
:root {
--fd-bg: #0b0d10;
--fd-surface: rgba(255, 255, 255, 0.06);
--fd-ink: rgba(245, 244, 240, 0.96);
--fd-muted: rgba(245, 244, 240, 0.66);
--fd-accent: #d7ff3f;
--fd-accent2: #68e0ff;
--fd-radius: 20px;
--fd-stroke: rgba(245, 244, 240, 0.14);
--fd-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
--fd-ease: cubic-bezier(0.2, 0.9, 0.2, 1);
}
.shell {
position: relative;
color: var(--fd-ink);
border: 1px solid var(--fd-stroke);
border-radius: var(--fd-radius);
background:
radial-gradient(1000px 300px at 20% 0%, rgba(104, 224, 255, 0.14), transparent 60%),
radial-gradient(800px 340px at 85% 20%, rgba(215, 255, 63, 0.14), transparent 55%),
linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
box-shadow: var(--fd-shadow);
overflow: clip;
padding: 22px 20px;
}
.shell::before {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
background:
repeating-linear-gradient(
135deg,
rgba(245, 244, 240, 0.05),
rgba(245, 244, 240, 0.05) 1px,
transparent 1px,
transparent 9px
);
opacity: 0.35;
mix-blend-mode: soft-light;
}
.head {
position: relative;
padding-bottom: 14px;
border-bottom: 1px solid var(--fd-stroke);
margin-bottom: 16px;
}
.kicker {
display: inline-flex;
gap: 10px;
align-items: center;
font-size: 12px;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--fd-muted);
}
.kicker::before {
content: "";
width: 10px;
height: 10px;
border-radius: 999px;
background: radial-gradient(circle at 35% 35%, var(--fd-accent), rgba(215, 255, 63, 0.2));
box-shadow: 0 0 0 2px rgba(215, 255, 63, 0.12);
}
.title {
margin: 10px 0 6px;
font-size: 28px;
line-height: 1.05;
letter-spacing: -0.02em;
}
.subtitle {
margin: 0;
max-width: 62ch;
color: var(--fd-muted);
line-height: 1.35;
font-size: 14px;
}
.grid {
position: relative;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
}
.card {
border: 1px solid rgba(245, 244, 240, 0.12);
border-radius: 16px;
background: rgba(0, 0, 0, 0.2);
padding: 14px 14px 12px;
transform: translateY(0);
transition: transform 280ms var(--fd-ease), border-color 280ms var(--fd-ease);
}
.card:hover {
transform: translateY(-2px);
border-color: rgba(215, 255, 63, 0.35);
}
.cardTop {
display: flex;
justify-content: space-between;
gap: 10px;
align-items: baseline;
}
.cardLabel {
font-size: 12px;
letter-spacing: 0.08em;
text-transform: uppercase;
color: rgba(245, 244, 240, 0.72);
}
.cardHint {
font-size: 12px;
color: rgba(104, 224, 255, 0.8);
}
.cardValue {
margin-top: 12px;
font-size: 24px;
line-height: 1;
letter-spacing: -0.02em;
}
.foot {
position: relative;
display: flex;
justify-content: flex-end;
margin-top: 16px;
}
.cta {
appearance: none;
border: 1px solid rgba(245, 244, 240, 0.18);
color: var(--fd-ink);
background: rgba(0, 0, 0, 0.18);
border-radius: 999px;
padding: 12px 14px;
display: inline-flex;
gap: 10px;
align-items: center;
cursor: pointer;
transition: transform 220ms var(--fd-ease), border-color 220ms var(--fd-ease);
}
.cta:hover {
transform: translateY(-1px);
border-color: rgba(245, 244, 240, 0.34);
}
.cta:focus-visible {
outline: 3px solid rgba(104, 224, 255, 0.45);
outline-offset: 3px;
}
.ctaText {
font-size: 13px;
letter-spacing: 0.02em;
}
.ctaIcon {
color: var(--fd-accent);
transform: translateX(0);
transition: transform 220ms var(--fd-ease);
}
.cta:hover .ctaIcon {
transform: translateX(2px);
}
@media (max-width: 720px) {
.grid {
grid-template-columns: 1fr;
}
.title {
font-size: 26px;
}
}
@media (prefers-reduced-motion: reduce) {
.card,
.cta,
.ctaIcon {
transition: none;
}
.card:hover,
.cta:hover {
transform: none;
}
}
@@ -0,0 +1,52 @@
import styles from "./DesignPanel.module.css";
type Stat = { label: string; value: string; hint?: string };
const defaultStats: Stat[] = [
{ label: "Uptime", value: "99.98%", hint: "30d" },
{ label: "Latency", value: "84ms", hint: "p95" },
{ label: "Migrations", value: "12", hint: "this week" },
];
export function DesignPanel({
title = "System Brief",
subtitle = "A compact panel designed for strong hierarchy and quick scanning.",
stats = defaultStats,
ctaLabel = "View details",
}: {
title?: string;
subtitle?: string;
stats?: Stat[];
ctaLabel?: string;
}) {
return (
<section className={styles.shell} aria-label={title}>
<div className={styles.head}>
<div className={styles.kicker}>Field Report</div>
<h2 className={styles.title}>{title}</h2>
<p className={styles.subtitle}>{subtitle}</p>
</div>
<div className={styles.grid} role="list">
{stats.map((s) => (
<article key={s.label} className={styles.card} role="listitem">
<div className={styles.cardTop}>
<div className={styles.cardLabel}>{s.label}</div>
{s.hint ? <div className={styles.cardHint}>{s.hint}</div> : null}
</div>
<div className={styles.cardValue}>{s.value}</div>
</article>
))}
</div>
<div className={styles.foot}>
<button className={styles.cta} type="button">
<span className={styles.ctaText}>{ctaLabel}</span>
<span className={styles.ctaIcon} aria-hidden="true">
→
</span>
</button>
</div>
</section>
);
}
@@ -0,0 +1,131 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Avant Studio</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;700&family=Newsreader:opsz,wght@6..72,400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<div class="grain"></div>
<header class="top-bar">
<div class="logo">Avant Studio</div>
<nav>
<a href="#main">Work</a>
<a href="#process">Process</a>
<a href="#contact">Contact</a>
</nav>
<button class="cta">Start a project</button>
</header>
<main id="main">
<section class="hero">
<div class="hero-copy">
<p class="eyebrow">Design lab</p>
<h1>Striking, production-ready frontends without the generic glaze.</h1>
<p class="lede">We craft visceral digital spaces that move fast, feel tactile, and stay memorable. Built with intent, tuned for launch.</p>
<div class="actions">
<button class="cta primary">See capabilities</button>
<button class="ghost">View a live concept</button>
</div>
<div class="stats">
<div><span>42</span> shipped sites</div>
<div><span>95%</span> lighthouse perf</div>
<div><span>0</span> generic templates</div>
</div>
</div>
<div class="hero-card reveal">
<div class="tag">Now launching</div>
<div class="card-body">
<h2>Neon Observatory</h2>
<p>A retro-futurist control room with live telemetry, aurora gradients, and glitch hover states.</p>
<div class="pill">CSS Grid</div>
<div class="pill">Framer Motion</div>
<div class="pill">ARIA-first</div>
<div class="line"></div>
<div class="meta">
<span>ETA: 2 weeks</span>
<span>Visual QA locked</span>
</div>
</div>
</div>
</section>
<section class="grid" id="process">
<article class="panel reveal">
<p class="eyebrow">01 / Intent</p>
<h3>Pick a bold narrative, define the signature move, lock the palette.</h3>
<p>We interrogate purpose, audience, and constraints. Each build commits to one unmistakable gesture—stripe, glow, or grain—and sticks to it.</p>
</article>
<article class="panel reveal">
<p class="eyebrow">02 / Build</p>
<h3>Real code: semantic HTML, layered CSS, purposeful motion.</h3>
<p>CSS variables for theming, responsive grids, progressive enhancement. Animations gated by prefers-reduced-motion.</p>
</article>
<article class="panel reveal">
<p class="eyebrow">03 / Polish</p>
<h3>Accessibility, performance, and tactile interactions.</h3>
<p>Contrast checks, keyboard navigation, tuned shadows, intentional hover states. We avoid boilerplate aesthetics at all costs.</p>
</article>
</section>
<section class="timeline" id="contact">
<div class="timeline-head">
<p class="eyebrow">Field notes</p>
<h3>Recent drops</h3>
</div>
<div class="timeline-rail">
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
</div>
<div class="timeline-items">
<div class="timeline-card reveal">
<p class="label">2024</p>
<h4>Aerial atlas</h4>
<p>Editorial map portal with split-screen narrative and scroll-synced chapters.</p>
</div>
<div class="timeline-card reveal">
<p class="label">2023</p>
<h4>Glassfoundry</h4>
<p>Industrial dashboard with translucent panels, border glows, and live system vitals.</p>
</div>
<div class="timeline-card reveal">
<p class="label">2022</p>
<h4>Islands</h4>
<p>Pastel travel companion with hand-drawn dividers, slow float animations, and tactile cards.</p>
</div>
</div>
</section>
</main>
<footer class="footer">
<div class="marquee" aria-hidden="true">
<span>Distinctive frontends · Real code · No generic glaze · </span>
<span>Distinctive frontends · Real code · No generic glaze · </span>
<span>Distinctive frontends · Real code · No generic glaze · </span>
</div>
<div class="footer-grid">
<div>
<p class="eyebrow">Contact</p>
<a href="mailto:hello@avant.studio">hello@avant.studio</a>
</div>
<div>
<p class="eyebrow">Social</p>
<a href="#">Are.na</a>
<a href="#">Behance</a>
</div>
<div>
<p class="eyebrow">Collab</p>
<p>We ship components, pages, systems, and microsites.</p>
</div>
</div>
</footer>
<script src="./script.js"></script>
</body>
</html>
@@ -0,0 +1,13 @@
const observer = new IntersectionObserver(
entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
observer.unobserve(entry.target);
}
});
},
{ threshold: 0.2 }
);
document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
@@ -0,0 +1,425 @@
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@500;700&family=Newsreader:opsz,wght@6..72,400;600&display=swap');
:root {
--bg: #0b0c10;
--fg: #f6f1e6;
--muted: #a7acba;
--accent: #ff6b4a;
--accent-2: #6b9bff;
--card: rgba(255, 255, 255, 0.03);
--stroke: rgba(255, 255, 255, 0.12);
--radius: 18px;
--shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
--ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
font-family: 'Newsreader', 'Times New Roman', serif;
color: var(--fg);
background: var(--bg);
min-height: 100vh;
line-height: 1.7;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
background-image:
radial-gradient(1200px at 15% 20%, rgba(107, 155, 255, 0.25), transparent 50%),
radial-gradient(1400px at 80% 0%, rgba(255, 107, 74, 0.2), transparent 50%),
linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
}
.grain {
position: fixed;
inset: 0;
pointer-events: none;
background:
radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.04), transparent 35%),
repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 3px);
mix-blend-mode: soft-light;
opacity: 0.7;
z-index: 1;
}
a {
color: inherit;
text-decoration: none;
}
.skip-link {
position: absolute;
left: -999px;
top: 0;
padding: 12px 16px;
background: var(--accent);
color: #0b0c10;
border-radius: 8px;
font-weight: 700;
z-index: 999;
}
.skip-link:focus {
left: 16px;
top: 16px;
}
.top-bar {
position: sticky;
top: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 36px;
backdrop-filter: blur(10px);
background: rgba(11, 12, 16, 0.75);
border-bottom: 1px solid var(--stroke);
}
.logo {
font-family: 'Bricolage Grotesque', 'Arial Black', sans-serif;
font-weight: 700;
letter-spacing: -0.02em;
}
nav {
display: flex;
gap: 18px;
font-size: 0.95rem;
}
nav a {
padding: 8px 12px;
border-radius: 999px;
border: 1px solid transparent;
transition: border-color 220ms var(--ease), color 220ms var(--ease);
}
nav a:hover,
nav a:focus-visible {
border-color: var(--stroke);
color: var(--accent);
}
button {
font-family: 'Bricolage Grotesque', sans-serif;
font-weight: 700;
border: none;
cursor: pointer;
}
.cta {
padding: 12px 18px;
border-radius: 999px;
background: linear-gradient(120deg, var(--accent), var(--accent-2));
color: #0b0c10;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.cta:hover {
transform: translateY(-3px);
box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}
.hero {
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 32px;
padding: 96px 36px 48px;
position: relative;
}
.hero-copy h1 {
font-family: 'Bricolage Grotesque', sans-serif;
font-size: clamp(2.4rem, 5vw, 3.6rem);
line-height: 1.1;
letter-spacing: -0.03em;
margin: 12px 0;
}
.hero .lede {
max-width: 56ch;
color: var(--muted);
font-size: 1.05rem;
}
.eyebrow {
text-transform: uppercase;
letter-spacing: 0.18em;
font-size: 0.78rem;
color: var(--accent);
margin: 0 0 8px;
}
.actions {
display: flex;
gap: 12px;
margin: 24px 0 18px;
}
.ghost {
padding: 12px 16px;
border-radius: 999px;
background: transparent;
border: 1.5px solid var(--stroke);
color: var(--fg);
transition: border-color 220ms var(--ease), color 220ms var(--ease), transform 220ms var(--ease);
}
.ghost:hover {
border-color: var(--accent);
color: var(--accent);
transform: translateY(-2px);
}
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 12px;
margin-top: 20px;
color: var(--muted);
font-size: 0.95rem;
}
.stats span {
display: block;
font-family: 'Bricolage Grotesque', sans-serif;
font-size: 1.5rem;
color: var(--fg);
}
.hero-card {
background: var(--card);
border: 1px solid var(--stroke);
border-radius: 22px;
padding: 24px;
box-shadow: var(--shadow);
position: relative;
overflow: hidden;
}
.hero-card::after {
content: '';
position: absolute;
inset: -30%;
background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.04), transparent 45%);
transform: rotate(8deg);
opacity: 0.8;
}
.hero-card .tag {
display: inline-block;
padding: 8px 12px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.07);
color: var(--accent);
font-size: 0.85rem;
position: relative;
z-index: 2;
}
.hero-card .card-body {
position: relative;
z-index: 2;
}
.hero-card h2 {
font-family: 'Bricolage Grotesque', sans-serif;
margin: 12px 0 8px;
}
.hero-card p {
color: var(--muted);
margin-bottom: 12px;
}
.pill {
display: inline-block;
padding: 8px 12px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--stroke);
margin: 4px 6px 4px 0;
font-size: 0.85rem;
}
.line {
margin: 16px 0;
height: 1px;
background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.meta {
display: flex;
justify-content: space-between;
color: var(--muted);
font-size: 0.9rem;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 18px;
padding: 48px 36px;
}
.panel {
border: 1px solid var(--stroke);
border-radius: var(--radius);
padding: 22px;
background: rgba(255, 255, 255, 0.02);
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}
.panel h3 {
margin: 6px 0 10px;
font-family: 'Bricolage Grotesque', sans-serif;
}
.panel p {
color: var(--muted);
}
.timeline {
padding: 24px 36px 80px;
border-top: 1px solid var(--stroke);
}
.timeline-head h3 {
font-family: 'Bricolage Grotesque', sans-serif;
margin: 8px 0 16px;
}
.timeline-rail {
position: relative;
height: 3px;
background: var(--stroke);
border-radius: 999px;
margin: 24px 0 32px;
}
.timeline-rail .dot {
position: absolute;
top: -6px;
width: 15px;
height: 15px;
background: var(--accent);
border-radius: 50%;
box-shadow: 0 0 0 6px rgba(255, 107, 74, 0.15);
}
.timeline-rail .dot:nth-child(1) { left: 8%; }
.timeline-rail .dot:nth-child(2) { left: 50%; }
.timeline-rail .dot:nth-child(3) { left: 88%; }
.timeline-items {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 16px;
}
.timeline-card {
border: 1px solid var(--stroke);
border-radius: var(--radius);
padding: 18px;
background: rgba(255, 255, 255, 0.02);
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
.timeline-card .label {
font-size: 0.9rem;
letter-spacing: 0.12em;
color: var(--accent);
text-transform: uppercase;
margin-bottom: 6px;
}
.timeline-card h4 {
margin: 4px 0 8px;
font-family: 'Bricolage Grotesque', sans-serif;
}
.timeline-card p {
color: var(--muted);
}
.footer {
border-top: 1px solid var(--stroke);
padding: 28px 36px 48px;
position: relative;
overflow: hidden;
}
.marquee {
display: grid;
grid-auto-flow: column;
gap: 16px;
font-family: 'Bricolage Grotesque', sans-serif;
text-transform: uppercase;
letter-spacing: 0.14em;
color: var(--muted);
animation: scroll 18s linear infinite;
}
@keyframes scroll {
from { transform: translateX(0); }
to { transform: translateX(-50%); }
}
.footer-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 12px;
margin-top: 24px;
}
.footer-grid a {
display: block;
color: var(--fg);
text-decoration: underline;
margin-bottom: 4px;
}
.reveal {
opacity: 0;
transform: translateY(22px);
transition: transform 320ms var(--ease), opacity 320ms var(--ease);
}
.reveal.visible {
opacity: 1;
transform: translateY(0);
}
@media (max-width: 960px) {
.hero {
grid-template-columns: 1fr;
padding-top: 72px;
}
.top-bar {
position: sticky;
}
nav {
display: none;
}
.actions {
flex-direction: column;
align-items: flex-start;
}
}
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
transition: none !important;
}
}