From c27b428f2fa60c08381ef51b2fe4757f96e3b0d5 Mon Sep 17 00:00:00 2001 From: "Christopher S. Aondona" Date: Sat, 28 Nov 2026 16:08:32 +0100 Subject: [PATCH] Synchronize documentation theme with current platform styles --- README.md | 4 + package.json | 4 +- pnpm-lock.yaml | 16 +- public/manifest.webmanifest | 4 +- scripts/theme.test.mjs | 37 ++ src/app.css | 626 ++++++++++++++++++++++-------- src/components/brand-wordmark.tsx | 2 +- src/components/footer.tsx | 2 +- src/lib/site.ts | 2 +- 9 files changed, 520 insertions(+), 177 deletions(-) create mode 100644 scripts/theme.test.mjs diff --git a/README.md b/README.md index e257a08..4193db0 100644 --- a/README.md +++ b/README.md @@ -95,3 +95,7 @@ Fumadocs MDX uses `async: true`, so individual documents are compiled into page- ## Worker types `worker-configuration.d.ts` is generated locally by `wrangler types` and is intentionally **not tracked**. `pnpm typecheck` regenerates it before React Router types and the TypeScript compiler run; run `pnpm exec wrangler types` separately after changing bindings if editor types need refreshing. `opencode.json` is also ignored as machine-specific OpenCode configuration. The `DOCS_ENV` value is used server-side to keep staging out of search indexes. + +## Design system + +The shared tokens, fonts and base styles in `src/app.css` are synchronized from [the platform design system](https://github.com/0xbuffdev/platform/blob/16241087830ddd0c96ae7dd7ba81023cd8892365/packages/ui/src/styles/app.css). Keep the Fumadocs adapter, local source detection and documentation-specific rules when updating that snapshot. The documentation application does not import the platform's private workspace packages. diff --git a/package.json b/package.json index 419b3bf..a798aba 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "build:staging": "node scripts/build-env.mjs staging" }, "dependencies": { - "@fontsource-variable/dm-sans": "^5.3.0", - "@fontsource-variable/jetbrains-mono": "^5.3.0", + "@fontsource-variable/geist": "^5.3.0", + "@fontsource-variable/geist-mono": "^5.3.0", "@fontsource-variable/orbitron": "^5.3.0", "@react-router/serve": "^8", "@types/mdx": "^2.0.14", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e81259c..864b6d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,10 +11,10 @@ importers: '@0xbuff/throughline': specifier: 0.0.2 version: 0.0.2(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - '@fontsource-variable/dm-sans': + '@fontsource-variable/geist': specifier: ^5.3.0 version: 5.3.0 - '@fontsource-variable/jetbrains-mono': + '@fontsource-variable/geist-mono': specifier: ^5.3.0 version: 5.3.0 '@fontsource-variable/orbitron': @@ -507,11 +507,11 @@ packages: '@floating-ui/utils@0.2.12': resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} - '@fontsource-variable/dm-sans@5.3.0': - resolution: {integrity: sha512-BpUG5bqePiDFMBM4ZtLSlPdAIOM990uB1dlXzIf4aw21yQR7BmykedLXXXMqGWsR18aMLOsbWccwJNh3ztTQaA==} + '@fontsource-variable/geist-mono@5.3.0': + resolution: {integrity: sha512-vBbuwDEo9AkrqADMXOrlAR3DFcJi4/JxeuU43FoiQERnNwsfXNnvxvReZG02cQKmyk4DZkZdBZX3oTDvy2zBAw==} - '@fontsource-variable/jetbrains-mono@5.3.0': - resolution: {integrity: sha512-F32xpS2NsGYoQi2ADSkKTgpJj7ozajsGgDJ8woTnqjmIB+dxDIqImjl4pXZVEExu8UFZ2ndhmX18EBS/hdz3Lw==} + '@fontsource-variable/geist@5.3.0': + resolution: {integrity: sha512-j0m+vLQuG5XAYoHtGCVu0spvlGreR3EzpECUVzkFmI1mTVnAO38l/NEPDCFgZ177JxzYJCLSmTQibIiYPilGrA==} '@fontsource-variable/orbitron@5.3.0': resolution: {integrity: sha512-KwW0YX1DJNqF0v86W1hZonuauypCFaltGdpB6qwCeu5bUyHoFpeZ84aAjChZSRF7RWZFithg/il0nMwYxJgqDA==} @@ -4996,9 +4996,9 @@ snapshots: '@floating-ui/utils@0.2.12': {} - '@fontsource-variable/dm-sans@5.3.0': {} + '@fontsource-variable/geist-mono@5.3.0': {} - '@fontsource-variable/jetbrains-mono@5.3.0': {} + '@fontsource-variable/geist@5.3.0': {} '@fontsource-variable/orbitron@5.3.0': {} diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest index e6406c2..a4b5e5a 100644 --- a/public/manifest.webmanifest +++ b/public/manifest.webmanifest @@ -4,8 +4,8 @@ "start_url": "/", "scope": "/", "display": "standalone", - "background_color": "#14120f", - "theme_color": "#14120f", + "background_color": "#0a0a0a", + "theme_color": "#0a0a0a", "icons": [ { "src": "/icon-192.png", diff --git a/scripts/theme.test.mjs b/scripts/theme.test.mjs new file mode 100644 index 0000000..ee27f0a --- /dev/null +++ b/scripts/theme.test.mjs @@ -0,0 +1,37 @@ +import assert from "node:assert/strict"; +import { readFile } from "node:fs/promises"; +import test from "node:test"; + +const css = await readFile("src/app.css", "utf8"); +const pkg = JSON.parse(await readFile("package.json", "utf8")); +const lock = await readFile("pnpm-lock.yaml", "utf8"); + +test("documentation uses the platform fonts and separate brand color", () => { + for (const name of ["geist", "geist-mono", "orbitron"]) { + assert.ok(pkg.dependencies["@fontsource-variable/" + name]); + assert.ok(css.includes('@import "@fontsource-variable/' + name + '";')); + assert.ok(lock.includes("'@fontsource-variable/" + name + "@5.3.0'")); + } + assert.doesNotMatch(css, /DM Sans|JetBrains Mono|--brand-primary/); + assert.doesNotMatch(lock, /@fontsource-variable\/(dm-sans|jetbrains-mono)/); + assert.match(css, /--font-sans:\s*'Geist Variable'/); + assert.match(css, /--font-mono:\s*'Geist Mono Variable'/); + assert.match(css, /--color-brand-orange:\s*var\(--brand-orange\)/); + assert.match(css, /--radius:\s*0\.375rem/); +}); + +test("Fumadocs uses platform surfaces and semantic colors in both themes", () => { + for (const [selector, background, primary, brand] of [ + [":root", "#fafafa", "#171717", "#c2410c"], + [".dark", "#0a0a0a", "#ededed", "#ff7148"], + ]) { + const blocks = [...css.matchAll(/(:root|\.dark)\s*\{([^}]+)\}/g)] + .filter((match) => match[1] === selector).map((match) => match[2]).join("\n"); + assert.ok(blocks.includes("--background: " + background + ";")); + assert.ok(blocks.includes("--primary: " + primary + ";")); + assert.ok(blocks.includes("--brand-orange: " + brand + ";")); + for (const token of ["background", "foreground", "primary", "primary-foreground", "border", "ring"]) { + assert.ok(blocks.includes("--color-fd-" + token + ": var(--" + token + ");")); + } + } +}); diff --git a/src/app.css b/src/app.css index 5235bd2..e9a4a1a 100644 --- a/src/app.css +++ b/src/app.css @@ -1,140 +1,206 @@ -/* 0xBUFF documentation — application stylesheet. - - The platform design system is the single source of truth for tokens; this - file carries those tokens verbatim (fonts, palette, radii, base layer, the - shared `bg-dots` / `caret-blink` / `scroll-reveal` utilities) the same way - `@repo/ui/src/app.css` does for the monorepo apps. - - Markdown prose and code blocks are styled by fumadocs (`preset` + - `neutral` + fumadocs' typography plugin) — no `.content` / - code-block contract CSS is layered on top of them. Where the two systems - meet, the `--color-fd-*` mapping below points fumadocs' surface at the - platform tokens. */ +/* Synced from 0xbuffdev/platform packages/ui/src/styles/app.css + at 16241087830ddd0c96ae7dd7ba81023cd8892365. Fumadocs imports, local source paths and + documentation-specific adapters are maintained here. */ +/* ============================================================ + 01. IMPORTS & SOURCE DETECTION + ============================================================ */ + @import "tailwindcss"; @import "tw-animate-css"; @import "shadcn/tailwind.css"; @import "fumadocs-ui/css/neutral.css"; @import "fumadocs-ui/css/preset.css"; @import "katex/dist/katex.css"; -@import "@fontsource-variable/dm-sans"; -@import "@fontsource-variable/jetbrains-mono"; + +@import "@fontsource-variable/geist"; +@import "@fontsource-variable/geist-mono"; @import "@fontsource-variable/orbitron"; -/* Include app routes, local UI components, and markdown sources. */ +/* Scan the documentation app and local MDX collection. */ @source "./**/*.{ts,tsx,md,mdx}"; +@source "../content/docs"; @custom-variant dark (&:is(.dark *)); -/* Brand palette. Light is :root, dark is .dark (runtime toggle, default dark). - Canonical shadcn names: brand orange lives in --primary, violet/green in - --chart-2/--chart-3. --accent is the neutral hover surface per shadcn. */ + +/* ============================================================ + 02. DESIGN TOKENS — LIGHT THEME + ============================================================ */ + :root { - --brand-primary: #c2410c; - --background: #f2f0ea; - --foreground: #181817; - - --card: #f2f0ea; - --card-foreground: #181817; - --popover: #f2f0ea; - --popover-foreground: #181817; - --primary: var(--brand-primary); - --primary-foreground: #fff; - --secondary: color-mix(in srgb, #181817 6%, #f2f0ea); - --secondary-foreground: #181817; - --muted: color-mix(in srgb, #181817 6%, #f2f0ea); - --muted-foreground: #63615b; - --accent: color-mix(in srgb, #181817 6%, #f2f0ea); - --accent-foreground: #181817; + color-scheme: light; + + /* Surfaces */ + --background: #fafafa; + --foreground: #171717; + + --card: #fdfdfd; + --card-foreground: #171717; + + --popover: #fdfdfd; + --popover-foreground: #171717; + + /* Brand */ + --brand-orange: #c2410c; + --brand-orange-foreground: #ffffff; + + /* Semantic colors */ + --primary: #171717; + --primary-foreground: #fafafa; + + --secondary: #f2f2f2; + --secondary-foreground: #262626; + + --muted: #f5f5f5; + --muted-foreground: #737373; + + --accent: #ededed; + --accent-foreground: #262626; + --destructive: oklch(0.545 0.235 27.325); - /* Amber, for callouts. Deliberately not a `--chart-*` step: that ramp runs - purple through green and has no warm-yellow neighbour to borrow. */ --warning: #c98a1b; - --border: rgba(24, 24, 23, 0.16); - --input: #7d7b75; - --ring: var(--brand-primary); - --chart-1: var(--brand-primary); - --chart-2: #6a4fc9; - --chart-3: #3f6b0f; - --chart-4: #63615b; - --chart-5: #181817; - --radius: 0.25rem; - --sidebar: #f2f0ea; - --sidebar-foreground: #181817; - --sidebar-primary: var(--brand-primary); - --sidebar-primary-foreground: #fff; - --sidebar-accent: color-mix(in srgb, #181817 6%, #f2f0ea); - --sidebar-accent-foreground: #181817; - --sidebar-border: rgba(24, 24, 23, 0.16); - --sidebar-ring: var(--brand-primary); + + /* Borders and inputs */ + --border: #e5e5e5; + --input: #d4d4d4; + --ring: #404040; + + /* Charts */ + --chart-1: #171717; + --chart-2: #525252; + --chart-3: #737373; + --chart-4: #a3a3a3; + --chart-5: #d4d4d4; + + /* Sidebar */ + --sidebar: #fafafa; + --sidebar-foreground: #171717; + --sidebar-primary: #171717; + --sidebar-primary-foreground: #fafafa; + --sidebar-accent: #f5f5f5; + --sidebar-accent-foreground: #171717; + --sidebar-border: #e5e5e5; + --sidebar-ring: #171717; + + /* Shape */ + --radius: 0.375rem; } + +/* ============================================================ + 03. DESIGN TOKENS — DARK THEME + ============================================================ */ + .dark { - --brand-primary: #ff7148; - --background: #111110; - --foreground: #f1efe8; - - --card: #1d1d1b; - --card-foreground: #efede5; - --popover: #111110; - --popover-foreground: #f1efe8; - --primary: var(--brand-primary); - --primary-foreground: #1a1917; - --secondary: color-mix(in srgb, #f1efe8 8%, #111110); - --secondary-foreground: #f1efe8; - --muted: color-mix(in srgb, #f1efe8 8%, #111110); - --muted-foreground: #99978e; - --accent: color-mix(in srgb, #f1efe8 8%, #111110); - --accent-foreground: #f1efe8; + color-scheme: dark; + + /* Surfaces */ + --background: #0a0a0a; + --foreground: #ededed; + + --card: #111111; + --card-foreground: #ededed; + + --popover: #111111; + --popover-foreground: #ededed; + + /* Brand */ + --brand-orange: #ff7148; + --brand-orange-foreground: #1a1917; + + /* Semantic colors */ + --primary: #ededed; + --primary-foreground: #171717; + + --secondary: #171717; + --secondary-foreground: #ededed; + + --muted: #171717; + --muted-foreground: #a3a3a3; + + --accent: #262626; + --accent-foreground: #fafafa; + --destructive: oklch(0.704 0.191 22.216); - /* Lifted the way every other token lifts here — lighter, not neon. */ --warning: #e8b04a; - --border: rgba(241, 239, 232, 0.16); - --input: #77766f; - --ring: var(--brand-primary); - --chart-1: var(--brand-primary); - --chart-2: #8b72ec; - --chart-3: #a5ce82; - --chart-4: #99978e; - --chart-5: #f1efe8; - --sidebar: #111110; - --sidebar-foreground: #f1efe8; - --sidebar-primary: var(--brand-primary); - --sidebar-primary-foreground: #1a1917; - --sidebar-accent: color-mix(in srgb, #f1efe8 8%, #111110); - --sidebar-accent-foreground: #f1efe8; - --sidebar-border: rgba(241, 239, 232, 0.16); - --sidebar-ring: var(--brand-primary); - --radius: 0.25rem; + + /* Borders and inputs */ + --border: #262626; + --input: #404040; + --ring: #ededed; + + /* Charts */ + --chart-1: #fafafa; + --chart-2: #d4d4d4; + --chart-3: #a3a3a3; + --chart-4: #737373; + --chart-5: #525252; + + /* Sidebar */ + --sidebar: #0a0a0a; + --sidebar-foreground: #ededed; + --sidebar-primary: #ededed; + --sidebar-primary-foreground: #171717; + --sidebar-accent: #171717; + --sidebar-accent-foreground: #fafafa; + --sidebar-border: #262626; + --sidebar-ring: #ededed; } + +/* ============================================================ + 04. TAILWIND THEME MAPPING + ============================================================ */ + @theme inline { - --font-sans: 'DM Sans Variable', 'DM Sans', sans-serif; - --font-mono: 'JetBrains Mono Variable', 'JetBrains Mono', monospace; + /* Typography */ + --font-sans: 'Geist Variable', Arial, sans-serif; + --font-mono: 'Geist Mono Variable', monospace; --font-display: 'Orbitron Variable', 'Orbitron', sans-serif; + + /* Surfaces */ --color-background: var(--background); --color-foreground: var(--foreground); + --color-card: var(--card); --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); --color-popover-foreground: var(--popover-foreground); + + /* Brand */ + --color-brand-orange: var(--brand-orange); + --color-brand-orange-foreground: var(--brand-orange-foreground); + + /* Semantic colors */ --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); --color-warning: var(--warning); + + /* Borders and inputs */ --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); + + /* Charts */ --color-chart-1: var(--chart-1); --color-chart-2: var(--chart-2); --color-chart-3: var(--chart-3); --color-chart-4: var(--chart-4); --color-chart-5: var(--chart-5); + + /* Sidebar */ --color-sidebar: var(--sidebar); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar-primary: var(--sidebar-primary); @@ -143,7 +209,9 @@ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); --color-sidebar-ring: var(--sidebar-ring); - --radius-sm: 0.25rem; + + /* Border radius */ + --radius-sm: calc(var(--radius) - 2px); --radius-md: var(--radius); --radius-lg: calc(var(--radius) + 2px); --radius-xl: calc(var(--radius) + 4px); @@ -152,117 +220,184 @@ --radius-4xl: calc(var(--radius) + 16px); } -/* Map fumadocs' own `fd-*` surface onto the platform tokens, so nav, docs - chrome, and search inherit the brand palette instead of fumadocs' neutral - greys. Both blocks cascade after the fumadocs imports above, so light and - dark both resolve from here. */ -:root { - --fd-radius: var(--radius); - --color-fd-background: var(--background); - --color-fd-foreground: var(--foreground); - --color-fd-muted: var(--muted); - --color-fd-muted-foreground: var(--muted-foreground); - --color-fd-popover: var(--popover); - --color-fd-popover-foreground: var(--popover-foreground); - --color-fd-card: var(--card); - --color-fd-card-foreground: var(--card-foreground); - --color-fd-border: var(--border); - --color-fd-primary: var(--primary); - --color-fd-primary-foreground: var(--primary-foreground); - --color-fd-secondary: var(--secondary); - --color-fd-secondary-foreground: var(--secondary-foreground); - --color-fd-accent: var(--accent); - --color-fd-accent-foreground: var(--accent-foreground); - --color-fd-ring: var(--ring); -} -.dark { - --fd-radius: var(--radius); - --color-fd-background: var(--background); - --color-fd-foreground: var(--foreground); - --color-fd-muted: var(--muted); - --color-fd-muted-foreground: var(--muted-foreground); - --color-fd-popover: var(--popover); - --color-fd-popover-foreground: var(--popover-foreground); - --color-fd-card: var(--card); - --color-fd-card-foreground: var(--card-foreground); - --color-fd-border: var(--border); - --color-fd-primary: var(--primary); - --color-fd-primary-foreground: var(--primary-foreground); - --color-fd-secondary: var(--secondary); - --color-fd-secondary-foreground: var(--secondary-foreground); - --color-fd-accent: var(--accent); - --color-fd-accent-foreground: var(--accent-foreground); - --color-fd-ring: var(--ring); -} +/* ============================================================ + 05. BASE STYLES + ============================================================ */ @layer base { + /* Global defaults */ * { @apply border-border outline-ring/50; } + html { scroll-behavior: smooth; } - @media (prefers-reduced-motion: reduce) { - html { - scroll-behavior: auto; - } - *, - *::before, - *::after { - animation-duration: 0.01ms !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; - } - /* The blink is a hard `infinite` loop, so collapsing the duration alone - still leaves it looping. Kill it outright. */ - .caret-blink { - animation: none !important; - } - } + body { background: var(--background); color: var(--foreground); font-family: var(--font-sans); + @apply antialiased; } + + /* Text selection */ ::selection { background: var(--primary); color: var(--primary-foreground); } + + /* Buttons */ + button, + [data-slot="button"] { + border-radius: var(--radius); + } + button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; } - code, pre { + + /* Typography */ + code, + pre { font-family: var(--font-mono), monospace; } + + /* Links */ a { color: inherit; text-decoration: none; } + + + /* ---------------------------------------------------------- + GLOBAL SCROLLBARS + ---------------------------------------------------------- */ + + /* + * Small but visible scrollbars. + * + * Applies to the document and nested scrollable containers. + * Colors adapt automatically through --foreground. + * + * Browser and OS settings may control whether scrollbars + * remain visible when scrolling stops. + */ + + * { + scrollbar-width: thin; + scrollbar-color: + color-mix( + in srgb, + var(--foreground) 40%, + transparent + ) + transparent; + } + + /* + * Fallback for browsers that support WebKit scrollbar + * pseudo-elements but not the standard scrollbar-width. + */ + + @supports not (scrollbar-width: thin) { + *::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + *::-webkit-scrollbar-track { + background: transparent; + } + + *::-webkit-scrollbar-thumb { + background: color-mix( + in srgb, + var(--foreground) 40%, + transparent + ); + + border: 1px solid transparent; + border-radius: 999px; + background-clip: padding-box; + } + + *::-webkit-scrollbar-thumb:hover { + background: color-mix( + in srgb, + var(--foreground) 60%, + transparent + ); + + background-clip: padding-box; + } + + *::-webkit-scrollbar-corner { + background: transparent; + } + } } -/* Dot matrix behind the hero — one utility instead of an inline - `background-image` + `background-size` pair repeated per call site. */ + +/* ============================================================ + 06. BACKGROUND UTILITIES + ============================================================ */ + +/* + * Dot matrix background. + * Useful for hero sections and decorative surfaces. + */ @utility bg-dots { + --dot-color: var(--foreground); background-image: radial-gradient( - color-mix(in oklch, var(--foreground) 14%, transparent) 1px, + color-mix(in oklch, var(--dot-color) 14%, transparent) 1px, transparent 1px ); + background-size: 24px 24px; } -/* grid-bg */ +/* + * Grid background with a vertical fade. + */ @utility bg-grid-pattern { - background-image: linear-gradient(to right, var(--border) 1px, transparent 1px), - linear-gradient(to bottom, var(--border) 1px, transparent 1px); + background-image: + linear-gradient( + to right, + var(--border) 1px, + transparent 1px + ), + linear-gradient( + to bottom, + var(--border) 1px, + transparent 1px + ); + background-size: 40px 40px; - mask-image: linear-gradient(to bottom, black 40%, transparent 100%); - -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%); + + mask-image: linear-gradient( + to bottom, + black 40%, + transparent 100% + ); + + -webkit-mask-image: linear-gradient( + to bottom, + black 40%, + transparent 100% + ); + opacity: 0.15; } + +/* ============================================================ + 07. CURSOR ANIMATIONS + ============================================================ */ + @utility caret-blink { animation: caret-blink 1.1s steps(1) infinite; } @@ -273,16 +408,25 @@ } } -/* Scroll-driven entrance for the oversized division words: the letters - materialise out of a blur while the tracking tightens. Wrapped in - `@supports` so browsers without `animation-timeline` render the text - statically instead of leaving it stuck at `opacity: 0`. */ + +/* ============================================================ + 08. SCROLL-DRIVEN ANIMATIONS + ============================================================ */ + +/* + * Scroll-driven entrance for oversized division words. + * + * Text becomes visible, sharpens, and tightens its tracking + * as it enters the viewport. + */ + @keyframes scroll-reveal { from { opacity: 0.08; letter-spacing: 0.08em; filter: blur(6px); } + to { opacity: 1; letter-spacing: -0.025em; @@ -290,6 +434,11 @@ } } +/* + * Unsupported browsers render the text normally because + * the animation is only applied when view timelines exist. + */ + @supports (animation-timeline: view()) { @media (prefers-reduced-motion: no-preference) { .scroll-reveal { @@ -300,6 +449,159 @@ } } + +/* ============================================================ + 09. DECORATIVE INTERLUDE ANIMATIONS + ============================================================ */ + +/* + * Shared, CSS-only motion for decorative illustrations. + * + * Animations are intentionally slow to avoid unnecessary + * visual noise and JavaScript-driven layout work. + */ + +/* Byte movement */ + +@keyframes ui-vi-byte-drift { + from { + transform: translateX(-22px); + } + + to { + transform: translateX(22px); + } +} + +.ui-vi-bytes { + animation: ui-vi-byte-drift 16s ease-in-out infinite alternate; +} + + +/* Trace movement */ + +@keyframes ui-vi-trace-flow { + to { + stroke-dashoffset: -50; + } +} + +.ui-vi-flow-trace { + animation: ui-vi-trace-flow 4.5s linear infinite; +} + + +/* Signal movement */ + +@keyframes ui-vi-signal-flow { + to { + stroke-dashoffset: -60; + } +} + +.ui-vi-signal-trace { + animation: ui-vi-signal-flow 5.5s linear infinite; +} + + +/* Pulse animation */ + +@keyframes ui-vi-pulse { + 0%, + 100% { + opacity: 0.4; + } + + 50% { + opacity: 1; + } +} + +.ui-vi-pulse { + animation: ui-vi-pulse 3.5s ease-in-out infinite; +} + + +/* ============================================================ + 10. ACCESSIBILITY — REDUCED MOTION + ============================================================ */ + +/* + * Respect the user's reduced-motion preference. + * + * Disables smooth scrolling, minimizes transitions, + * and stops continuously repeating decorative animations. + */ + +@media (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } + + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } + + /* + * Explicitly disable infinite animations rather than + * merely shortening their duration. + */ + + .caret-blink, + .ui-vi-bytes, + .ui-vi-flow-trace, + .ui-vi-signal-trace, + .ui-vi-pulse { + animation: none !important; + } +} + + +/* Adapt Fumadocs surfaces to the canonical platform theme in both modes. */ +:root { + --fd-radius: var(--radius); + --color-fd-background: var(--background); + --color-fd-foreground: var(--foreground); + --color-fd-muted: var(--muted); + --color-fd-muted-foreground: var(--muted-foreground); + --color-fd-popover: var(--popover); + --color-fd-popover-foreground: var(--popover-foreground); + --color-fd-card: var(--card); + --color-fd-card-foreground: var(--card-foreground); + --color-fd-border: var(--border); + --color-fd-primary: var(--primary); + --color-fd-primary-foreground: var(--primary-foreground); + --color-fd-secondary: var(--secondary); + --color-fd-secondary-foreground: var(--secondary-foreground); + --color-fd-accent: var(--accent); + --color-fd-accent-foreground: var(--accent-foreground); + --color-fd-ring: var(--ring); +} + +.dark { + --fd-radius: var(--radius); + --color-fd-background: var(--background); + --color-fd-foreground: var(--foreground); + --color-fd-muted: var(--muted); + --color-fd-muted-foreground: var(--muted-foreground); + --color-fd-popover: var(--popover); + --color-fd-popover-foreground: var(--popover-foreground); + --color-fd-card: var(--card); + --color-fd-card-foreground: var(--card-foreground); + --color-fd-border: var(--border); + --color-fd-primary: var(--primary); + --color-fd-primary-foreground: var(--primary-foreground); + --color-fd-secondary: var(--secondary); + --color-fd-secondary-foreground: var(--secondary-foreground); + --color-fd-accent: var(--accent); + --color-fd-accent-foreground: var(--accent-foreground); + --color-fd-ring: var(--ring); +} + /* The width of the column the page rails bound. This is the SSOT for the frame geometry: `PAGE_COLUMN` in `components/frame.tsx` and the intersection markers below both use this value, so a rail and a marker cannot drift apart. */ diff --git a/src/components/brand-wordmark.tsx b/src/components/brand-wordmark.tsx index 85eeed8..2cd5f19 100644 --- a/src/components/brand-wordmark.tsx +++ b/src/components/brand-wordmark.tsx @@ -1,7 +1,7 @@ import { SITE } from "~/lib/site"; export function BrandWordmark({ - accentClassName = "text-primary", + accentClassName = "text-brand-orange", }: { accentClassName?: string; }) { diff --git a/src/components/footer.tsx b/src/components/footer.tsx index 9c8c826..294838c 100644 --- a/src/components/footer.tsx +++ b/src/components/footer.tsx @@ -115,7 +115,7 @@ export function Footer() { "text-foreground/[0.04] leading-none tracking-tighter xl:text-[14rem]", )} > - +

diff --git a/src/lib/site.ts b/src/lib/site.ts index 9633fb0..afda7fa 100644 --- a/src/lib/site.ts +++ b/src/lib/site.ts @@ -29,7 +29,7 @@ export const SITE = { defaultImagePath: BRAND_ICON_PATH, defaultImageAlt: `${BRAND_PREFIX}${BRAND_ACCENT} mark in white and orange on a charcoal background`, primaryColor: "#ff7148", - themeColor: "#14120f", + themeColor: "#0a0a0a", locale: "en_US", faviconPath: "/favicon.svg", faviconIcoPath: "/favicon.ico",