@cassiomc1/forgeloop 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/.cursor/rules/project-loop.mdc +18 -0
  2. package/.forgeloop/.gitignore +2 -0
  3. package/.github/copilot-instructions.md +16 -0
  4. package/AGENTS.md +16 -0
  5. package/AGENT_COMPATIBILITY.md +147 -0
  6. package/CLAUDE.md +14 -0
  7. package/CONTRACT_COVERAGE.md +27 -0
  8. package/DELEGATION_PROTOCOL.md +91 -0
  9. package/ENG/accessibility-eng.md +155 -0
  10. package/ENG/clean-code-eng.md +223 -0
  11. package/ENG/design-code-eng.md +511 -0
  12. package/ENG/games-code-design-web-eng.md +751 -0
  13. package/ENG/perf-code-eng.md +441 -0
  14. package/ENG/premium-sites-studio-eng.md +320 -0
  15. package/ENG/sec-code-eng.md +706 -0
  16. package/ENG/test-code-eng.md +257 -0
  17. package/EXECUTION_STATE.md +107 -0
  18. package/GUIDE_ROUTER.md +274 -0
  19. package/LICENSE +21 -0
  20. package/LICENSE-DOCS.md +13 -0
  21. package/LOOP_ENGINEERING.md +551 -0
  22. package/LOOP_SYSTEM_DESIGN.md +394 -0
  23. package/ORCHESTRATOR_INTEGRATION.md +106 -0
  24. package/PROJECT_PROFILE.md +124 -0
  25. package/QUALITY_SCORECARD.md +54 -0
  26. package/README.md +492 -0
  27. package/TERMINOLOGY.md +21 -0
  28. package/THIRD_PARTY_NOTICES.md +129 -0
  29. package/THREAT_MODEL.md +35 -0
  30. package/package.json +51 -0
  31. package/schemas/delegated-result.schema.json +33 -0
  32. package/schemas/evidence.schema.json +15 -0
  33. package/schemas/execution-receipt.schema.json +46 -0
  34. package/schemas/routing-input.schema.json +17 -0
  35. package/schemas/routing-result.schema.json +17 -0
  36. package/schemas/task-brief.schema.json +24 -0
  37. package/schemas/work-state.schema.json +46 -0
  38. package/src/cli.js +341 -0
  39. package/src/commands/clear-state.js +11 -0
  40. package/src/commands/doctor.js +165 -0
  41. package/src/commands/init.js +42 -0
  42. package/src/commands/inspect.js +17 -0
  43. package/src/commands/route.js +32 -0
  44. package/src/commands/status.js +29 -0
  45. package/src/commands/update.js +109 -0
  46. package/src/commands/validate-protocol.js +133 -0
  47. package/src/commands/validate-receipt.js +19 -0
  48. package/src/commands/validate-state.js +30 -0
  49. package/src/core/agent-support.js +89 -0
  50. package/src/core/conformance.js +133 -0
  51. package/src/core/delegation.js +283 -0
  52. package/src/core/evidence.js +56 -0
  53. package/src/core/filesystem.js +122 -0
  54. package/src/core/inspect.js +115 -0
  55. package/src/core/json-safety.js +54 -0
  56. package/src/core/manifest.js +75 -0
  57. package/src/core/protocol.js +81 -0
  58. package/src/core/receipt.js +129 -0
  59. package/src/core/repository.js +19 -0
  60. package/src/core/router.js +296 -0
  61. package/src/core/schema-validation.js +179 -0
  62. package/src/core/templates.js +56 -0
  63. package/src/core/work-state.js +471 -0
@@ -0,0 +1,511 @@
1
+ ---
2
+ name: design-code-eng
3
+ language: en
4
+ description: "Visual direction, UX, motion, and perceived performance for premium digital experiences."
5
+ version: "2026.09"
6
+ last-reviewed: "2026-08-10"
7
+ ---
8
+
9
+ # Web Design Premium v2 — Practical Guidelines
10
+
11
+ > This guide provides strong defaults, not a blind recipe. Use its values, palettes, and snippets as a verifiable starting point; depart from them only for an explicit user/product requirement or a documented exception that preserves hierarchy, accessibility, and performance. Do not invent values "by eye".
12
+ > **Related documents**: for the complete studio-level website production process, see [`premium-sites-studio-eng.md`](./premium-sites-studio-eng.md). For the quality/structure of the code that implements this design, see [`clean-code-eng.md`](./clean-code-eng.md). For accessibility/visual/E2E testing, see [`test-code-eng.md`](./test-code-eng.md). For form security, authentication, and client-side storage, see [`sec-code-eng.md`](./sec-code-eng.md). To translate visual direction into HTML video, see [HyperFrames](https://hyperframes.heygen.com). This file focuses exclusively on UI/UX/visuals — it does not repeat code, testing, or security rules.
13
+ >
14
+ > **Tooling policy**: identify the stack, the stage, and the applicable checks; prefer an already available equivalent that produces compatible evidence. Ask for authorization before installing a tool or changing the environment. If no safe equivalent exists, record the required check as blocked and never claim that it passed. Do not install merely optional resources.
15
+
16
+ ## How to use this guide (strong default process)
17
+
18
+ Adopt this order as the default when creating a page from scratch; document an exception when the product, platform, or user requires a different sequence:
19
+
20
+ 1. **Choose 1 ready-made semantic palette** from the "Ready-made semantic palettes" section (do not mix palettes).
21
+ 2. **Choose 1 ready-made typographic combination** from the "Typographic Combinations" section.
22
+ 3. **Define the page's section list** using the "Premium Page Anatomy".
23
+ 4. **Apply the exact grid and spacing** from the "Layout & Spacing" section.
24
+ 5. **Apply components** (buttons, cards, nav) with the exact specs from the "Components" section.
25
+ 6. **Add motion** only according to the snippets in the "Motion" section — never "creative" motion outside the standard.
26
+ 7. **Run the Anti-Slop Checklist** before considering it ready.
27
+ 8. **Audit and polish the entire interface with Impeccable**: run `/impeccable audit` to identify quality issues and `/impeccable polish` to apply improvements. Evaluate the complete interface, not only one component, preserve the existing design system, and repeat the audit after the changes.
28
+
29
+ Do not skip steps 1 and 2 without a documented exception. The biggest cause of an "amateur" result is mixing random palettes/fonts or using framework defaults (e.g., Bootstrap blue, Inter everywhere, generic shadow `box-shadow: 0 0 10px rgba(0,0,0,0.1)`).
30
+
31
+ > **This guide covers 3 contexts.** For web sites/products (desktop and mobile), follow the flow above normally. For **native mobile apps** (iOS/Android), go directly to the "Premium Mobile Apps" section. For **native desktop apps** (Windows/macOS), go to "Premium Desktop Apps". In the latter two cases, this guide's palettes and typography still serve as tone references, but platform guidelines (HIG, Material Design, Fluent) take priority over the generic values defined here.
32
+
33
+ ---
34
+
35
+ ## Principles (Anti-Slop)
36
+
37
+ - Fewer elements, more intention: each block must have a clear function.
38
+ - Avoid a template appearance: vary composition, rhythm, and hierarchy between sections (never repeat the same section layout 2x in a row).
39
+ - Visual consistency over effects: motion and 3D should reinforce the narrative, not distract.
40
+ - Premium finish = refined detail in typography, spacing, contrast, and microinteractions — not quantity of elements.
41
+ - **Golden rule of whitespace**: if you are wondering whether there is too much space, there is too little. Premium sites breathe.
42
+
43
+ ---
44
+
45
+ ## Ready-made semantic palettes (choose 1, do not mix)
46
+
47
+ Each palette implements **seven base semantic tokens**: `background-base`, `background-alt`, `text`, `text-secondary`, `primary`, `border/divider`, and `semantic-accent`. They provide function and contrast; they are not the same as optional decorative accents.
48
+
49
+ **A. Dark Editorial (fashion, architecture, luxury)**
50
+
51
+ - Background: `#0B0B0C` | Alt background: `#141416`
52
+ - Text: `#F5F4F1` | Secondary text: `#A8A7A3`
53
+ - Primary: `#C9A876` (matte gold)
54
+ - Border/divider: `#2A2A2C`
55
+ - Accent (rare use): `#D14F3E`
56
+
57
+ **B. Light Clean Corporate (SaaS, premium fintech)**
58
+
59
+ - Background: `#FAFAF8` | Alt background: `#F0EFEB`
60
+ - Text: `#141414` | Secondary text: `#5C5C5C`
61
+ - Primary: `#1F3D2B` (deep green)
62
+ - Border/divider: `#E3E1DB`
63
+ - Accent (rare use): `#C4623A`
64
+
65
+ **C. Minimal Warm Neutral (studios, portfolio, branding)**
66
+
67
+ - Background: `#F7F5F2` | Alt background: `#EDEAE4`
68
+ - Text: `#1C1B19` | Secondary text: `#726F68`
69
+ - Primary: `#3D3A34` (almost-black brown)
70
+ - Border/divider: `#DEDAD2`
71
+ - Accent (rare use): `#8A6E4B`
72
+
73
+ **D. Vibrant Dark Tech (digital product, AI, dev tools)**
74
+
75
+ - Background: `#08090C` | Alt background: `#101218`
76
+ - Text: `#EDEEF0` | Secondary text: `#8A8F98`
77
+ - Primary: `#6E6AF5` (indigo)
78
+ - Border/divider: `#1F2128`
79
+ - Accent (rare use): `#3EDBB8`
80
+
81
+ Color usage rules:
82
+
83
+ - Primary: used in CTAs, active links, key icons. Max. 10% of the visible area.
84
+ - Semantic accent: reserve it for a consistent role (for example, a state, short emphasis, or signal) and do not change its meaning between components.
85
+ - **Decorative** accents are extras, not tokens: as a default, limit them to 1–2 simultaneous accents per screen/view (for example, a badge or highlight). That limit does not count functional background, text, primary, or border tokens.
86
+ - Derived states (hover, focus, pressed, disabled, error, success, and selection) must preserve contrast, meaning, and coherence with their source tokens.
87
+ - As a default, use gradients of at most 2 colors and 5%–20% opacity over a solid background; document the exception and test contrast if the product requires more.
88
+
89
+ ---
90
+
91
+ ## Ready-made Typographic Combinations (choose 1)
92
+
93
+ Format: Display (headings) + Text (body). Families marked as Google Fonts can be loaded from that catalog; `General Sans`, `Clash Display`, and `Satoshi` are **not** Google Fonts and must not be assumed free by default.
94
+
95
+ 1. **Classic editorial**: `Fraunces` (display, serif, weights 400/600) + `Inter` (body).
96
+ 2. **Modern luxury**: `Playfair Display` (display) + `Manrope` (body).
97
+ 3. **Tech/product**: `Space Grotesk` (Google Fonts) or `General Sans` (external, subject to license) as display + `Inter` (Google Fonts) as body.
98
+ 4. **Warm minimal**: `Instrument Serif` (display, only for large headings) + neutral `Sans` such as `Public Sans` (body).
99
+ 5. **Contemporary bold**: `Clash Display` (external, subject to license) as display + `Satoshi` (external, subject to license) as body.
100
+
101
+ Rules:
102
+
103
+ - Never use more than 2 font families on the entire page.
104
+ - Never use the display font for long paragraphs (only H1/H2/short highlight blocks).
105
+ - Typographic scale (rem, base 16px):
106
+ - H1: `clamp(2.75rem, 5vw, 5rem)`, line-height `1.05`, letter-spacing `-0.02em`
107
+ - H2: `clamp(2rem, 3.5vw, 3rem)`, line-height `1.1`, letter-spacing `-0.01em`
108
+ - H3: `clamp(1.5rem, 2.2vw, 2rem)`, line-height `1.2`
109
+ - Body: `1.125rem` (18px), line-height `1.6`
110
+ - Small/caption: `0.875rem`, line-height `1.5`
111
+ - Maximum running-text width: `65ch`.
112
+ - Font weight: headings 500–700, body 400–450 (never 300 for body text, as it harms legibility).
113
+ - Before using an external font, record its source/vendor, license, and authorized files/weights; include an appropriate system fallback, for example `system-ui, -apple-system, "Segoe UI", sans-serif`. Do not assume a font seen in a gallery may be hosted or redistributed.
114
+
115
+ ---
116
+
117
+ ## Layout & Spacing (measurable defaults)
118
+
119
+ - Maximum container: `1280px`, centered, side padding `clamp(24px, 6vw, 96px)`.
120
+ - Grid: 12 columns, gap `24px` desktop / `16px` mobile.
121
+ - Spacing scale (use multiples of this scale as the default; document values outside it when they improve a concrete need):
122
+ `4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192px`
123
+ - Vertical spacing between sections: minimum `96px` mobile, `160px` desktop.
124
+ - Section internal spacing (top/bottom padding): `64px` mobile, `120px` desktop.
125
+ - Breakpoints: mobile `< 640px`, tablet `640–1024px`, desktop `> 1024px`.
126
+ - Rhythm: alternate between "dense" sections (text + image + CTA) and "empty" sections (one large centered sentence, lots of space). Rule of thumb: every 2 dense sections, 1 breathing section.
127
+ - Consistent border-radius: choose 1 scale value and use it everywhere — `8px` (sober/corporate) or `16px` (soft/product) or `2px` (editorial/luxury). Never mix different radii in the same project.
128
+ - Standard shadow (use only 1 recipe per project, applied consistently):
129
+ - Subtle: `0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06)`
130
+ - Elevated (modals/dropdowns): `0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08)`
131
+
132
+ ---
133
+
134
+ ## Web Mobile — Specifics (it is not just "shrinking desktop")
135
+
136
+ A premium mobile site is not a reduced desktop layout — hierarchy, density, and interaction change.
137
+
138
+ - **Viewport**: always `<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">`.
139
+ - **Safe areas**: use `env(safe-area-inset-top/bottom/left/right)` in fixed elements (nav, sticky CTA) to respect the notch/Dynamic Island/home indicator.
140
+ - **Touch, not hover**: every interactive element must have a minimum real touch area of `44x44px`, even if the visual element is smaller (use invisible padding to compensate).
141
+ - **Never depend on hover** to reveal essential information or interaction (tooltips, dropdown menus) — always have a touch/click equivalent.
142
+ - **Mobile nav**: prefer a fullscreen hamburger menu (see Components section) or fixed bottom nav for web apps/PWAs with few sections (3–5 items).
143
+ - **Sticky CTA**: on long conversion pages, consider a CTA fixed to the bottom of the mobile viewport (bar with 1 button, height `56–64px`, subtle upward shadow), with `env(safe-area-inset-bottom)` in the padding.
144
+ - **Content density**: reduce to 1 column, headline smaller than the desktop scale but still dominant (use the `clamp()` already defined — never set a fixed `px` value that ignores the clamp).
145
+ - **Forms**: inputs with minimum `font-size` of `16px` (prevents automatic zoom in iOS Safari), correct `inputmode`/`type` (`email`, `tel`, `numeric`) for the contextual keyboard.
146
+ - **Mobile-first performance**: always test using simulated 4G/3G network throttling; images on mobile must be smaller variants via `srcset`, never the same desktop image resized by CSS.
147
+ - **Gestures**: swipe in carousels/galleries must have a fallback of visible dots/arrows; never depend only on the gesture without a visual indication that more content exists.
148
+
149
+ ---
150
+
151
+ ## Premium Page Anatomy (recommended order)
152
+
153
+ Use this as the standard skeleton for landing pages; adapt it according to the product, but maintain the logic of "open strong → prove → convert".
154
+
155
+ 1. **Nav**: logo on the left, 3–5 links in the center/right, 1 prominent CTA. Fixed or with a transparent background that gains blur while scrolling.
156
+ 2. **Hero**: 1 strong headline (max. 8–10 words), 1 subheadline (1–2 sentences), 1 primary CTA + 1 secondary (text/link). Never more than 2 CTAs in the hero.
157
+ 3. **Light social proof**: client/press logos in grayscale, single line, no embellishment.
158
+ 4. **Value section (2–3 blocks)**: each block = 1 idea, icon or simple image, short title, 1–2 lines of text.
159
+ 5. **Product/demo section**: real screenshot, mockup, or short video — never a generic stock illustration.
160
+ 6. **Testimonials or data/numbers**: 2–4 real testimonials OR 3–4 large metrics with numbers.
161
+ 7. **Intermediate conversion CTA**: breathing section, large centered sentence + 1 button.
162
+ 8. **FAQ** (if applicable): simple accordion, 4–6 questions.
163
+ 9. **Final CTA**: repeat the central value proposition + primary button.
164
+ 10. **Footer**: organized link columns, social media, copyright. No excessive columns (max. 4).
165
+
166
+ Rule: never repeat the same "image left + text right" pattern in 2 consecutive sections — alternate sides, or switch to a centered layout.
167
+
168
+ ---
169
+
170
+ ## Color, Contrast, and Depth
171
+
172
+ - Minimum AA contrast: normal text ≥ 4.5:1, large text (≥24px) ≥ 3:1.
173
+ - Soft backgrounds and subtle gradients (opacity 5–20%, without banding).
174
+ - Depth built with light layers: blur (`8–24px`), subtle shadow, controlled overlay — never hard shadows (`0 0 20px black`).
175
+
176
+ ### Liquid Glass, glassmorphism, and translucency
177
+
178
+ - **Glassmorphism** is a static approximation: transparency, `backdrop-filter: blur()`, a subtle border, and shadow. **Liquid Glass** describes a dynamic material that attempts to simulate refraction, specular highlights, tint, shadow, and deformation responsive to content or movement.
179
+ - Do not call CSS blur real refraction. On the web, refraction normally requires displacement or shaders, for example SVG, WebGL, or WebGPU; these are optional, costlier enhancements that require a fallback.
180
+ - Reserve transparency/refraction for one or two low-density floating surfaces — contextual navigation, toolbar, tab bar, sheet, popover, or a focused control. Body copy, long forms, prices, critical states, decisions, and essential CTAs remain on solid or predictably contrasting surfaces.
181
+ - Validate every state against the most complex background that could pass behind the surface. Glass over glass, long text over moving/refracted backgrounds, and transparency across every layer turn depth into noise.
182
+
183
+ ### Normative progressive-enhancement contract for Canvas and Liquid Glass
184
+
185
+ This contract applies to Canvas UI, Canvas/WebGL/WebGPU, SVG displacement, and Liquid Glass; other sections only complement it.
186
+
187
+ 1. **Functional base first:** deliver semantic HTML and real HTML controls before any effect. Content, action, and focus, hover, pressed, disabled, error, success, and selection states must work without JavaScript, WebGL, or a shader.
188
+ 2. **Equivalent fallback:** without the enhancement, render an opaque surface with the same content, controls, actions, states, and predictable contrast. Do not transfer meaning to refraction, glare, transparency, motion, or pointer input.
189
+ 3. **Preferences and compatibility:** detect capability and compatibility before loading effects; respect `prefers-reduced-motion` with a static version, and reduce or remove transparency for contrast/transparency preferences (`prefers-contrast`, `forced-colors`, or an equivalent control where no reliable media query exists).
190
+ 4. **Runtime budget:** initialize on demand; pause outside the viewport and while the page is hidden; limit DPR/resolution, blur, multipass filters, and simultaneous animated effects/surfaces. Simplify or disable on a modest device before sacrificing interaction, readability, or initial load.
191
+ 5. **Measurable acceptance:** test variants in supported browsers, on a modest device, with reduced motion, and against the worst plausible background (light, dark, complex image, and video). Record DPR, active surfaces, and the result for readability, equivalent states, and performance budget; if any fails, ship the opaque fallback.
192
+
193
+ ---
194
+
195
+ ## Motion (GSAP / ScrollTrigger)
196
+
197
+ Use this base reveal pattern as a strong default. Change it only for a user/product requirement or documented exception that preserves hierarchy, accessibility, and the progressive-enhancement contract:
198
+
199
+ ```js
200
+ gsap.registerPlugin(ScrollTrigger);
201
+
202
+ gsap.utils.toArray('[data-reveal]').forEach((el) => {
203
+ gsap.from(el, {
204
+ y: 24,
205
+ opacity: 0,
206
+ duration: 0.8,
207
+ ease: 'power3.out',
208
+ scrollTrigger: {
209
+ trigger: el,
210
+ start: 'top 85%',
211
+ toggleActions: 'play none none none',
212
+ },
213
+ });
214
+ });
215
+ ```
216
+
217
+ ### Motion for video with HyperFrames (optional)
218
+
219
+ When the output is a video, trailer, product demo, or motion graphic rendered from HTML, CSS, and JavaScript, consider [HyperFrames](https://hyperframes.heygen.com). It complements — and does not replace — this guide's visual rules.
220
+
221
+ - Preserve brand tokens (palette, typography, spacing, and radius) when adapting the interface to the frame; do not simply capture the entire page.
222
+ - Prefer deterministic, frame-controllable animation with a paused/seekable timeline so preview, tests, and rendering reproduce the same result.
223
+ - Keep text large enough for the output format, maintain AA contrast and safe areas, and do not make meaning depend on audio or motion.
224
+ - Respect `prefers-reduced-motion` in interactive previews and provide a static or reduced-motion alternative when appropriate.
225
+ - Start with the [official quickstart](https://hyperframes.heygen.com/quickstart) and use `npx hyperframes preview`, `npx hyperframes lint`, and `npx hyperframes render` in the quality loop when the project uses the CLI.
226
+
227
+ Motion rules:
228
+
229
+ - Vertical displacement: `16–32px` (never more than that — avoids a "flying" effect).
230
+ - Duration: `0.6–0.9s` for reveals, `0.2–0.35s` for hover/microinteractions.
231
+ - Easing: `power3.out` or `expo.out` for entrances; `power2.inOut` for state transitions.
232
+ - Stagger between elements in a list: `0.06–0.1s`.
233
+ - Never: bounce, elastic, exaggerated rotation, aggressive parallax (>30% of scroll speed), video autoplay with sound, infinite decorative loops that compete with the content.
234
+ - On Liquid Glass surfaces, elastic easing remains prohibited. Any internal micro-deformation, morphing, glare, or cursor/touch response is visual finish only: short and pausable, never required to understand, focus, or act. With `prefers-reduced-motion: reduce`, use a static surface.
235
+ - Wrap motion logic in this guard by default; a documented exception must still respect `prefers-reduced-motion` and the progressive-enhancement contract:
236
+
237
+ ```js
238
+ if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
239
+ // initialize animations
240
+ }
241
+ ```
242
+
243
+ ---
244
+
245
+ ## 3D and Interactivity (Three.js) — optional, only if justified
246
+
247
+ - Use only if it reinforces the product/narrative (e.g., physical product, technical data, technology brand). If you are not sure it helps, do not use it.
248
+ - Keep elements subtle: light particles, simple shapes, soft lighting.
249
+ - For purely decorative 3D scenes, apply the progressive-enhancement contract: the 2D/opaque fallback must serve browsers without WebGL and people who reduce motion.
250
+ - Limit: <5000 particles, no heavy post-processing (bloom may stay, avoid SSAO/motion blur).
251
+ - Pause rendering when the canvas leaves the viewport (`IntersectionObserver`).
252
+
253
+ Canvas, WebGL, SVG displacement, and Liquid Glass effects follow the **normative progressive-enhancement contract** above. Apply it to decorative 3D scenes too; do not create an alternate interaction path.
254
+
255
+ ---
256
+
257
+ ## Premium Components (measurable defaults)
258
+
259
+ **Primary button**
260
+
261
+ - Padding: `14px 28px` (mobile `12px 24px`)
262
+ - Border-radius: equal to the radius chosen in the project
263
+ - Font-weight: 500–600, font-size `1rem`
264
+ - Transition: `transform 0.2s ease` (change the background color immediately; use a slight `translateY(-1px)` on hover)
265
+ - Minimum touch area: `44x44px`
266
+ - Focus state: visible outline (`2px solid`, primary color, offset `2px`) — never `outline: none` without a replacement.
267
+
268
+ **Cards**
269
+
270
+ - Internal padding: `32px` (mobile `24px`)
271
+ - Border: `1px solid` palette border color, OR subtle shadow — choose 1 of the two, not both.
272
+ - Radius: equal to the project standard.
273
+ - Hover (if clickable): subtle elevation with `translateY(-2px)`; transition only `transform` for `0.25s ease`.
274
+
275
+ **Navigation**
276
+
277
+ - Height: `72–88px` desktop, `64px` mobile.
278
+ - Active item: subtle underline or primary color — never a fully colored background.
279
+ - Mobile menu: fullscreen overlay, fade+slide transition `0.3s`, with an instant/static alternative when reduced motion is active.
280
+
281
+ **Images**
282
+
283
+ - Use `object-fit: cover` with a fixed `aspect-ratio` only for editorial/decorative imagery (for example, a card photo or avatar). For logos, charts, screenshots, and informational content, use `contain` or preserve intrinsic proportion so information is not cropped.
284
+ - `border-radius` consistent with the rest of the UI.
285
+ - Never stretch/distort an image.
286
+
287
+ **Optional canvas/WebGL effects**
288
+
289
+ - For high-impact moments — such as heroes, reveals, and special interactions — consult [Canvas UI](https://canvasui.dev/) as an **adaptable reference**, never as automatically reusable source material.
290
+ - Before reusing any asset, text, image, or code, confirm provenance, authorship, license, and credit obligations; adapt tokens, composition, and behavior to the project's identity without copying a result or component.
291
+ - Keep text, navigation, controls, and every essential action as semantic, accessible HTML. Canvas follows the **normative progressive-enhancement contract** and is never the only communication channel.
292
+
293
+ **Liquid Glass surface (optional)**
294
+
295
+ - Use it for short-content controls or contextual navigation; keep the real element focusable and actionable in HTML.
296
+ - Prefer a simple shape, restrained tint/blur/highlights, and conventional focus states. Internal micro-deformation, glare, and pointer tracking follow the Liquid Glass rule in the Motion section and the progressive-enhancement contract.
297
+ - Do not apply chromatic aberration, distortion, or reflection to readable text, essential icons, fields, tables, or status messages.
298
+
299
+ **UI libraries and data visualization**
300
+
301
+ - For accessible, composable, and customizable web components, consult [shadcn/ui](https://ui.shadcn.com/); adapt tokens, states, and composition to the project's visual system instead of copying defaults without intent.
302
+ - For charts and data visualization, consult [TanStack Charts](https://github.com/TanStack/charts); preserve responsiveness, contrast, keyboard readability, and never rely on color alone to communicate series or states.
303
+ - For subtle interaction sounds, consult [Cuelume](https://cuelume-site.pages.dev/); provide volume/mute controls and never rely on audio to communicate essential information.
304
+
305
+ ## External design-reference map
306
+
307
+ Select references for a product problem; they do not override project tokens or semantics. Check every adoption for keyboard and focus access, contrast, reduced motion, touch behavior, bundle/runtime cost, and fallback behavior. Cursor, canvas, 3D, audio, and decorative motion are progressive enhancement only. Do not copy source or assets; check the license and current terms for each exact resource, and treat a catalog listing as no transfer of rights.
308
+
309
+ - **Component source and interaction inspiration**: use [21st.dev](https://21st.dev/) to study components and interactions; inspect each source, dependency, community contribution, and premium-material term before adoption.
310
+ - **Component and motion inspiration**: use [React Bits](https://reactbits.dev/) to study component and motion behavior; distinguish public/free material from React Bits Pro and inspect each source/dependency license.
311
+ - **Component inspiration**: use [Fancy Components](https://www.fancycomponents.dev/) to study component composition; verify its terms separately from Motion, Tailwind, shadcn, or other dependencies.
312
+ - **Motion primitives**: use [Motion Primitives](https://motion-primitives.com/) to study discrete interaction patterns; distinguish documented open-source material from its Pro offering and verify component/dependency terms.
313
+ - **Component and design-system research**: use [Component Gallery](https://component.gallery/) for comparison, not for license assumptions.
314
+ - **Numeric feedback**: reserve [NumberFlow](https://number-flow.barvian.me/) for changing metrics, with locale-aware formatting and static or reduced-motion behavior.
315
+ - **Pointer enhancement**: activate [Cursify](https://cursify.ui-layouts.com/) only when `(hover: hover) and (pointer: fine)`; retain native controls and default cursor behavior, with equivalent tap interaction for touch/coarse pointers.
316
+ - **Typography discovery**: verify each [UNCUT](https://uncut.wtf/) font's author, license, weights, and hosting rights.
317
+ - **Creative coding and WebGL**: [cables.gl](https://cables.gl/) requires a semantic fallback, pause/offscreen behavior, a performance budget, and asset/operator provenance.
318
+
319
+ ---
320
+
321
+ ## UX, Accessibility, and Quality
322
+
323
+ - 100% functional keyboard navigation, focus always visible, no interaction traps.
324
+ - Minimum AA contrast (see Color section).
325
+ - Never communicate state through color alone (add an icon, text, or pattern).
326
+ - Test at 200% zoom and reflow at 320 CSS px wide.
327
+ - Every `<img>` with descriptive `alt`; decorative icons with `aria-hidden="true"`.
328
+ - When the platform exposes contrast or transparency preferences, including `prefers-contrast` and `forced-colors` where applicable, provide an opaque or less-transparent variant. Where no reliable media query exists, provide an equivalent in-product control.
329
+
330
+ ---
331
+
332
+ ## Performance
333
+
334
+ - For DOM/CSS animations, animate only `transform` and `opacity`; use `will-change` sparingly (remove after the animation). Shader/filter deformation or glare follows the progressive-enhancement contract.
335
+ - Images in `WebP`/`AVIF`, `srcset` + `loading="lazy"` (except the hero image, which must be eager/preload).
336
+ - Fonts: `font-display: swap`, preload only the critical hero font (1–2 files, max.).
337
+ - Performance budget: LCP < 2.5s, CLS < 0.1, and INP ≤ 200 ms at p75 in field data, reported separately for mobile and desktop, unless a different documented product target applies; motion/3D JS must not block the initial load (load via `defer`/lazy-init after interaction or scroll).
338
+
339
+ ---
340
+
341
+ ## Blacklist — Anti-Patterns (never do)
342
+
343
+ - Generic framework blue (`#007BFF`, `#3B82F6` default) as the primary color without intention.
344
+ - Generic shadow `box-shadow: 0 0 10px rgba(0,0,0,0.1)` on everything.
345
+ - `Inter` or `Roboto` as the site's only font without a display font.
346
+ - Generic stock-library icons (3D arrows, rocket emojis, "lightbulb").
347
+ - Centered text in long paragraph blocks.
348
+ - More than 2 font families or more than 2 simultaneous decorative accents; the seven functional semantic tokens do not count toward that limit.
349
+ - Sections all using the same grid/alignment pattern ("cloned template" look).
350
+ - Identical "fade in" animation applied indiscriminately to EVERYTHING without timing hierarchy.
351
+ - Buttons without a noticeable hover/focus state.
352
+ - Excessive badges, tags, and decorative "glassmorphism" without a function.
353
+ - Footer with 6+ columns of irrelevant links just to fill space.
354
+ - Glass over glass.
355
+ - More than two translucent layers without a semantic function.
356
+ - Long text over a moving/refracted background.
357
+ - Chromatic aberration on readable content.
358
+ - Decorative video behind controls.
359
+ - Blur-only presented as refraction.
360
+ - Reliance on glare, transparency, movement, or a mouse pointer to communicate state.
361
+
362
+ ---
363
+
364
+ ## Review Checklist (before publishing)
365
+
366
+ - [ ] I chose 1 semantic palette, did not mix in another palette, and documented the 1–2 additional decorative accents when used.
367
+ - [ ] I used at most 2 font families, following the defined scale.
368
+ - [ ] Spacing between sections follows the scale (minimum 96–160px).
369
+ - [ ] No section repeats the same layout as the previous one.
370
+ - [ ] Each section has 1 purpose and (when applicable) 1 clear CTA.
371
+ - [ ] Motion follows the defined snippets/patterns and respects `prefers-reduced-motion`.
372
+ - [ ] Text contrast passes AA.
373
+ - [ ] Buttons/links have visible focus and noticeable hover.
374
+ - [ ] The page works (visually and functionally) without motion/3D JS.
375
+ - [ ] I validated contrast and legibility against the worst possible background and at 200% zoom.
376
+ - [ ] The interface preserves content, focus, states, and actions without WebGL, SVG displacement, transparency, or motion.
377
+ - [ ] Canvas/Liquid Glass effects obey the contract: equivalent HTML and opaque fallback, no-JS/WebGL operation, preferences honored, pauses outside the viewport/on a hidden page, and recorded DPR/blur/effect budget.
378
+ - [ ] No more than two translucent layers compete on the same screen, and each has a clear contextual function.
379
+ - [ ] Where the platform exposes contrast/transparency preferences, including `prefers-contrast` or `forced-colors` when applicable, the opaque/less-transparent variant works; without a reliable media query, there is an equivalent in-product control.
380
+ - [ ] No item from the "Blacklist" is present.
381
+ - [ ] Tested at 320 CSS px reflow and desktop (1440px).
382
+ - [ ] Ran `/impeccable audit` and `/impeccable polish` across the entire interface and addressed applicable findings.
383
+
384
+ ---
385
+
386
+ ## Premium Mobile Apps (iOS & Android)
387
+
388
+ > Native apps do NOT strictly follow this guide's web palette/typography guidelines. The priority is the platform's design language (Apple HIG / Material Design 3), ensuring that the app looks "premium native", not like a packaged website.
389
+
390
+ ### iOS/iPadOS (Human Interface Guidelines)
391
+
392
+ - **Liquid Glass**: apply this guidance only when the target Apple platform and corresponding SDK/API apply. Build with the current Apple SDK and check API availability at runtime before using the material. When available, prefer native APIs and respect HIG, Reduce Transparency, and Increase Contrast. On earlier systems, retain legible conventional surfaces. Do not impose this aesthetic on Windows or Android.
393
+ - **Typography**: system font `SF Pro` (Display for large headings, Text for body). Use the system's dynamic styles (Dynamic Type) instead of fixed sizes, to support accessibility:
394
+ - Large Title `34pt`, Title 1 `28pt`, Title 2 `22pt`, Title 3 `20pt`
395
+ - Headline `17pt` (semibold), Body `17pt`, Callout `16pt`, Subhead `15pt`
396
+ - Footnote `13pt`, Caption `12pt`
397
+ - **Spacing**: `8pt` grid. Safe screen margins: `16–20pt`. Always respect *safe areas* (notch, Dynamic Island, home indicator) via `safeAreaInsets`.
398
+ - **Navigation**: bottom Tab Bar for up to 5 main destinations; top Navigation Bar with a Large Title that collapses while scrolling. Avoid side-drawer navigation (drawer) — it is not an iOS standard.
399
+ - **Components**: use native controls (`UIButton`, `UISwitch`, `UISegmentedControl` or equivalent SwiftUI) and `SF Symbols` icons (never custom icons when an equivalent SF Symbol exists).
400
+ - **Minimum touch area**: `44x44pt`.
401
+ - **Color**: define semantic colors (`label`, `secondaryLabel`, `systemBackground`) that automatically adapt to Light/Dark Mode — never hardcode an absolute color in system elements.
402
+ - **Motion**: use native spring curves from UIKit/SwiftUI, duration `0.3–0.35s` for screen transitions, `0.2s` for microinteractions. Use haptics (`UIImpactFeedbackGenerator`) moderately, only for significant actions (confirmation, error, success).
403
+ - **Modals and sheets**: use `sheet`/`.presentationDetents` (native bottom sheet) instead of custom modals whenever possible.
404
+
405
+ ### Android (Material Design 3 / Material You)
406
+
407
+ - **Typography**: `Roboto` (or a brand font registered in the theme) following the M3 type scale: Display, Headline, Title, Body, Label (each with a Large/Medium/Small variant).
408
+ - **Spacing**: `8dp` grid, screen margins `16dp` (`24dp` on large screens/tablets).
409
+ - **Navigation**: Bottom Navigation Bar (3–5 destinations) on phones; Navigation Rail or Navigation Drawer on tablets/large screens. Top App Bar with title and contextual actions.
410
+ - **Components**: use Material 3 components (`FilledButton`, `FAB`, `Card`, `Chip`, `NavigationBar`) with *tonal elevation* (surfaces with layers of color, not just shadow). Consider dynamic color (Material You) when it makes sense for the product.
411
+ - **Minimum touch area**: `48x48dp`.
412
+ - **Dark theme**: required to support (`isSystemInDarkTheme()` / `DayNight` theme), it is not optional in premium Android products.
413
+ - **Motion**: use M3 easing curves (`emphasized`, `standard`), durations `200–500ms` according to the size of the transition (small → fast, full screen → longer). Container transitions (`Container Transform`) for navigation between card and detail.
414
+ - **Icons**: `Material Symbols` (outlined by default, filled for active/selected state). For searching and discovering web/app icons, see also [Koboyo Icons](https://koboyo.com/icons).
415
+
416
+ ### Common rules for both platforms
417
+
418
+ - Never clone 100% of one platform's visual style onto the other (e.g., an iOS-style Tab Bar inside an Android app). Adapt the same brand/palette to each OS's native language.
419
+ - Onboarding: maximum 3–4 screens, always with an option to skip.
420
+ - Empty, error, and loading states (skeleton screens) are mandatory on every screen with asynchronous data — never leave a blank screen during loading.
421
+ - Test on at least 1 small device (e.g., iPhone SE / compact Android) and 1 large device (Pro Max / Android tablet).
422
+ - System gestures (swipe back, notification shade) must never be blocked by app overlays.
423
+ - The app icon and splash screen follow each platform's official grids (Apple App Icon grid; Android Adaptive Icon with foreground/background layers).
424
+
425
+ **Quick checklist — Mobile Apps**
426
+
427
+ - [ ] I used native platform components/navigation (Tab Bar on iOS, Bottom Nav/Rail on Android), not a generic hybrid.
428
+ - [ ] Dynamic Type (iOS) / system font scale (Android) work without breaking the layout.
429
+ - [ ] Dark Mode implemented and tested on both platforms.
430
+ - [ ] Touch areas ≥ 44pt (iOS) / 48dp (Android).
431
+ - [ ] Loading, empty, and error states covered on all screens with data.
432
+ - [ ] Safe areas respected (notch, system gestures, home indicator).
433
+
434
+ ---
435
+
436
+ ## Premium Desktop Apps (Windows & macOS)
437
+
438
+ > Like mobile, native desktop apps should follow the operating system's visual language. A "premium" desktop app looks like part of the OS, not a resizable website window.
439
+
440
+ ### Windows (Fluent Design / WinUI 3)
441
+
442
+ - **Typography**: `Segoe UI Variable` (Display for headings, Text for body), following the Fluent Type Ramp (Display, Title Large, Title, Subtitle, Body Large, Body, Caption).
443
+ - **Spacing**: `4px`/`8px` grid. Standard content padding `24px` in main panels.
444
+ - **Navigation**: `NavigationView` with a collapsible left rail/panel for apps with multiple sections; custom title bar optional, but always with the standard controls (minimize/maximize/close) in the correct corner.
445
+ - **Materials**: use `Mica` (main window) or `Acrylic` (floating panels, flyouts) for subtle translucent depth — do not overuse it, apply it to only 1–2 layers per screen.
446
+ - **Components**: native Fluent controls (`Button`, `ToggleSwitch`, `NavigationView`, `InfoBar`), radius `4–8px`, respecting the system's light/dark theme (`Windows.UI.ViewManagement`).
447
+ - **Keyboard and accessibility**: 100% navigation via `Tab`/arrows, shortcuts with accelerators (`Alt` underlines the menu letter), tooltips on every control without visible text.
448
+ - **Scaling**: test at 100%, 125%, 150%, and 200% Windows scaling (DPI scaling) without cutting off text/icons.
449
+
450
+ ### macOS (Human Interface Guidelines)
451
+
452
+ - **Liquid Glass**: apply this guidance only when the target Apple platform and corresponding SDK/API apply. Build with the current Apple SDK and check API availability at runtime before using the material. When available, prefer native APIs and respect HIG, Reduce Transparency, and Increase Contrast. On earlier systems, retain legible conventional surfaces. Do not impose this aesthetic on Windows or Android.
453
+ - **Typography**: `SF Pro` (Display/Text), respecting system text sizes; support user text-size preferences when applicable.
454
+ - **Spacing**: `8pt` grid, generous margins (macOS tends to have more breathing room than Windows). Content padding `20–24pt`.
455
+ - **Navigation**: `NSSplitView`/left sidebar + contextual top toolbar; the system menu bar (top of the screen) must contain all of the app's main commands, not only shortcuts hidden in the UI.
456
+ - **Window**: respect the native traffic-light controls (close/minimize/maximize), system rounded corners, and support native full screen (`Full Screen` on macOS) and the system's Split View.
457
+ - **Materials**: `vibrancy`/blur (`NSVisualEffectView`) in sidebars and floating panels, moderately.
458
+ - **Components**: native AppKit/SwiftUI controls for macOS (do not reuse iOS components without adaptation — macOS has different density and affordances, e.g., mouse/trackpad use, hover states exist here unlike on mobile).
459
+ - **Keyboard shortcuts**: every relevant command should have a `Cmd+` shortcut, displayed in the menu itself. Full support for keyboard navigation.
460
+ - **Accent Color**: respect the accent color chosen by the user in the system when it makes sense for the product, instead of always forcing the brand color on all native controls.
461
+
462
+ ### Common rules for both platforms
463
+
464
+ - Support window resizing with a defined minimum layout (never allow the UI to break below a reasonable minimum size, e.g. `960x600px`).
465
+ - Persist user preferences (window size/position, theme, open panels) between sessions.
466
+ - Dark Mode and Light Mode mandatory, following the system preference by default, with an option for manual override.
467
+ - Immediate visual feedback for every action (hover, pressed, disabled, loading) — on desktop, hover is a valid and expected affordance, unlike on mobile.
468
+ - Contextual menus (right-click) should expose the most-used actions for that element.
469
+ - Never use only custom modals when the OS standard (native file dialogs, system alerts) resolves the need with greater familiarity for the user.
470
+
471
+ **Quick checklist — Desktop Apps**
472
+
473
+ - [ ] Layout, typography, and materials follow the native language (Fluent on Windows, HIG on macOS), not a generic hybrid between the two.
474
+ - [ ] Window is resizable with a defined minimum and no layout breakage.
475
+ - [ ] Dark Mode and Light Mode work according to the system preference.
476
+ - [ ] 100% keyboard navigation, with shortcuts visible in menus.
477
+ - [ ] Hover/pressed/disabled/loading states implemented (desktop has cursor/hover).
478
+ - [ ] Tested at least 2 DPI scales (Windows) or 2 screen sizes (macOS).
479
+
480
+ ---
481
+
482
+ ## Sources and References (Base Skills)
483
+
484
+ - TasteSkill / Anti-Slop: https://github.com/Leonxlnx/taste-skill | https://www.tasteskill.dev/
485
+ - Emil Kowalski (Design Engineering / Motion): https://github.com/emilkowalski/skills
486
+ - GSAP: https://github.com/greensock/gsap-skills
487
+ - ScrollWorld: https://github.com/oso95/scroll-world
488
+ - Three.js: https://threejs.org/
489
+ - HyperFrames (HTML video and motion): https://hyperframes.heygen.com/ | https://github.com/heygen-com/hyperframes
490
+ - Koboyo Icons (Icon Search & Discovery): https://koboyo.com/icons
491
+ - Apple Human Interface Guidelines (iOS/macOS): https://developer.apple.com/design/human-interface-guidelines/
492
+ - Material Design 3 (Android): https://m3.material.io/
493
+ - Microsoft Fluent Design / WinUI 3 (Windows): https://learn.microsoft.com/windows/apps/design/
494
+ - shadcn/ui (accessible, composable web components): https://ui.shadcn.com/
495
+ - TanStack Charts (data visualization): https://github.com/TanStack/charts
496
+ - Cuelume (web interaction sounds): https://cuelume-site.pages.dev/
497
+ - Canvas UI (adaptable canvas/WebGL reference; confirm provenance, license, and credits before any reuse): https://canvasui.dev/
498
+ - Component source and interaction inspiration (inspect source/dependencies; separate free from premium material): https://21st.dev/ | https://reactbits.dev/ | https://www.fancycomponents.dev/ | https://motion-primitives.com/
499
+ - Component and design-system research (comparison, not license assumptions): https://component.gallery/
500
+ - Numeric feedback (changing metrics with locale-aware formatting and static/reduced-motion behavior): https://number-flow.barvian.me/
501
+ - Pointer enhancement (only when `(hover: hover) and (pointer: fine)`; retain native controls/default cursor and equivalent tap interaction for touch/coarse pointers): https://cursify.ui-layouts.com/
502
+ - Typography discovery (verify each font's author, license, weights, and hosting rights): https://uncut.wtf/
503
+ - Creative coding and WebGL (semantic fallback, pause/offscreen behavior, performance budget, and asset/operator provenance): https://cables.gl/
504
+ - Impeccable (interface auditing and polish): https://impeccable.style/
505
+ - Gradient Studio (external procedural gradient exploration with CSS, Tailwind, and SCSS export by Amit Gajare; validate current provenance, reuse terms, output contrast, and performance budgets before adoption): https://gradientsaas.blogspot.com/
506
+ - Liquid Glass Design (an independent inspiration gallery, not affiliated with Apple; not a specification or asset library): https://liquidglassdesign.com/
507
+ - Guide to the material, glassmorphism, and web implementation: https://liquidglassdesign.com/what-is-liquid-glass
508
+ - Design and development resources: https://liquidglassdesign.com/resources
509
+ - Rights: the gallery's images and works are distinct from external resources it merely indexes. Consult the [terms](https://liquidglassdesign.com/terms); do not rehost, redistribute, or directly use images or works commercially without permission. For each external prompt or code resource, verify its license, provenance, credits, compatibility, and maintenance individually before use; being indexed does not transfer rights.
510
+ - Apple — Adopting Liquid Glass (official guidance for Apple platforms): https://developer.apple.com/documentation/TechnologyOverviews/adopting-liquid-glass
511
+ - Liquid Glass React, SVG, and Studio (experimental implementations; assess license, compatibility, weight, and maintenance): https://github.com/rdev/liquid-glass-react | https://github.com/shuding/liquid-glass | https://github.com/iyinchao/liquid-glass-studio