Skip to main content
A
Docs

Design System

The Midnight Gold design system with color tokens, typography, motion, and component guidelines.

Overview

The Midnight Gold design system is the shared visual language across all Anar products. It draws from GCC architectural luxury and modern command-center aesthetics: deep near-black backgrounds, heritage gold accents, and precise typography. All products are dark-theme only.

Color Tokens

Backgrounds

TokenValueUsage
--bg-base#09090BPage background
--bg-surface#111113Cards, panels
--bg-elevated#18181BElevated elements, modals
--bg-hover#1F1F23Hover states
--bg-overlayrgba(0,0,0,0.6)Modal overlays

Borders

TokenValueUsage
--border#27272ADefault border
--border-hover#3F3F46Hover border
--border-accentrgba(200,162,77,0.25)Gold accent border
--border-glassrgba(255,255,255,0.06)Glass-morphism border

Text

TokenValueUsage
--text-primary#F4F4F5Headings, primary content
--text-secondary#A1A1AABody text, descriptions
--text-muted#71717ALabels, captions
--text-dim#52525BDisabled text, placeholders

Gold (Primary Accent)

TokenValueUsage
--gold#C8A24DPrimary buttons, active states, links
--gold-light#E4C76BHover on gold elements
--gold-dim#9A7B3APressed/active state
--gold-mutedrgba(200,162,77,0.10)Gold-tinted backgrounds
--gold-glow0 0 24px rgba(200,162,77,0.15)Glow effect on accent elements

Semantic Colors

TokenValueUsage
--emerald#34D399Success states
--blue#60A5FAInformational, interactive
--danger#F87171Error states, destructive actions
--warning#FBBF24Warning states
--purple#A78BFASecondary accent

Each semantic color has a -muted variant at 10% opacity for backgrounds.

Chart Palette

Eight high-contrast colors for data visualization:

TokenValueColor
--chart-1#C8A24DGold
--chart-2#60A5FABlue
--chart-3#34D399Emerald
--chart-4#F87171Red
--chart-5#A78BFAPurple
--chart-6#FBBF24Amber
--chart-7#F472B6Pink
--chart-8#38BDF8Cyan

Typography

Font Families

TokenFontUsage
--font-displayBricolage GrotesqueHeadings, page titles
--font-bodyInstrument SansBody text, UI labels
--font-arabicIBM Plex Sans ArabicArabic content
--font-monoJetBrains MonoCode blocks, data

All fonts are loaded from Google Fonts. Add to your HTML head:

<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;500;600;700&family=Instrument+Sans:wght@400;500;600&family=IBM+Plex+Sans+Arabic:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">

Type Scale

TokenSizeUsage
--text-xs0.75remBadges, footnotes
--text-sm0.875remCaptions, secondary labels
--text-base1remBody text
--text-lg1.125remEmphasized body
--text-xl1.25remSection subtitles
--text-2xl1.5remCard titles
--text-3xl1.875remSection headings
--text-4xl2.25remPage headings
--text-5xl3remHero text

Line Heights

TokenValueUsage
--leading-tight1.15Headings
--leading-snug1.3Sub-headings
--leading-normal1.55Body text

Border Radius

TokenValueUsage
--radius-sm6pxButtons, inputs
--radius-md8pxCards
--radius-lg12pxLarge cards, panels
--radius-xl16pxModals
--radius-2xl24pxHero elements
--radius-full9999pxAvatars, pills

Shadows

TokenValueUsage
--shadow-xs0 1px 2px rgba(0,0,0,0.4)Subtle elevation
--shadow-sm0 2px 4px rgba(0,0,0,0.3)Buttons
--shadow-md0 4px 12px rgba(0,0,0,0.25)Cards
--shadow-lg0 8px 24px rgba(0,0,0,0.3)Dropdowns
--shadow-xl0 16px 48px rgba(0,0,0,0.4)Modals
--shadow-gold0 0 24px rgba(200,162,77,0.12)Gold-accented elements
--shadow-gold-lg0 4px 32px rgba(200,162,77,0.18)Featured gold elements

Motion

Easing Functions

TokenValueUsage
--ease-outcubic-bezier(0.16, 1, 0.3, 1)Default exit/reveal
--ease-in-outcubic-bezier(0.65, 0, 0.35, 1)Bidirectional transitions
--ease-springcubic-bezier(0.34, 1.56, 0.64, 1)Interactive elements (bounce)

Durations

TokenValueUsage
--duration-fast120msHover states, color changes
--duration-base200msDefault transitions
--duration-slow350msScale/opacity transitions
--duration-enter500msPage entrance animations

Animation Utilities

Apply staggered reveal animations to lists and grids:

<div class="animate-fade-up stagger-1">First item</div>
<div class="animate-fade-up stagger-2">Second item</div>
<div class="animate-fade-up stagger-3">Third item</div>

Each stagger step adds 80ms delay. The card-hover utility adds lift and shadow on hover:

<div class="card-hover bg-surface border border-border rounded-lg p-6">
  Hoverable card content
</div>

Hydration Safety

Use CSS transitions instead of framer-motion whileHover/whileTap for hover effects. Framer Motion hover props cause React hydration mismatches in server-rendered pages.

Background Effects

Noise Texture

Add the noise class to your root element for the subtle film-grain overlay:

<body class="noise bg-base text-primary">

Gold Spotlight

The --bg-spotlight token creates a cursor-following radial gold glow. Set --mouse-x and --mouse-y CSS custom properties from JavaScript:

document.addEventListener("mousemove", (e) => {
  document.documentElement.style.setProperty("--mouse-x", `${e.clientX}px`);
  document.documentElement.style.setProperty("--mouse-y", `${e.clientY}px`);
});

Gold Border Gradient

Use the border-gradient-gold utility for a subtle gold gradient border:

<div class="border-gradient-gold bg-surface rounded-lg p-6">
  Featured content
</div>

Tailwind Preset

Import the shared Tailwind preset in your product's tailwind.config.js:

const anarPreset = require("@anar/shared-design/tailwind-preset");

module.exports = {
  presets: [anarPreset],
  content: ["./src/**/*.{ts,tsx}"],
};

This adds all color tokens, font families, border radii, shadows, and animations to your Tailwind classes.

CSS Tokens

Import the CSS tokens file in your global stylesheet:

@import "@anar/shared-design/tokens.css";

The token files are located at:

  • CSS variables: shared/design/tokens.css
  • Tailwind preset: shared/design/tailwind-preset.js

Z-Index Scale

TokenValueUsage
--z-base0Default stacking
--z-dropdown100Dropdown menus
--z-sticky200Sticky headers
--z-modal300Modal dialogs
--z-toast400Toast notifications
--z-tooltip500Tooltips