| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| <title>Phantom Digital — Motion Studio</title> |
| <script src="https://cdn.tailwindcss.com"></script> |
| <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=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" /> |
| <script src="https://unpkg.com/lucide@latest"></script> |
| <style> |
| :root { |
| |
| --color-midnight-ink: #05060f; |
| --color-graphite-plate: #2f343e; |
| --color-steel-border: #3f4959; |
| --color-fog: #81899b; |
| --color-pebble: #9da7ba; |
| --color-moonlight: #c7d3ea; |
| --color-ice: #d1e4fa; |
| --color-glacier: #d8ecf8; |
| --color-frost-link: #b6d9fc; |
| --color-electric-iris: #663af3; |
| --color-ember: #e46d4c; |
| --color-azure: #027dea; |
| --color-cipher-mint: #269684; |
| --color-blueprint-glow: #bacff7; |
| --gradient-blueprint-glow: linear-gradient(0deg, #d8ecf8 0%, #98c0ef 100%); |
| |
| |
| --font-untitled-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
| --font-aeonikpro: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
| --font-dotdigital: 'JetBrains Mono', ui-monospace, monospace; |
| |
| |
| --motion-duration-fast: 150ms; |
| --motion-duration-normal: 300ms; |
| --motion-duration-slow: 600ms; |
| --motion-duration-cinematic: 1200ms; |
| --motion-easing-spring: cubic-bezier(0.34, 1.56, 0.64, 1); |
| --motion-easing-exit: cubic-bezier(0.22, 1, 0.36, 1); |
| --motion-easing-enter: cubic-bezier(0.16, 1, 0.3, 1); |
| --motion-easing-standard: cubic-bezier(0.4, 0, 0.2, 1); |
| |
| |
| --text-caption: 12px; |
| --leading-caption: 1.5; |
| --tracking-caption: -0.01px; |
| --text-body-sm: 14px; |
| --leading-body-sm: 1.43; |
| --tracking-body-sm: -0.01px; |
| --text-body: 16px; |
| --leading-body: 1.5; |
| --tracking-body: -0.01px; |
| --text-subheading: 18px; |
| --leading-subheading: 1.33; |
| --tracking-subheading: -0.01px; |
| --text-heading-sm: 24px; |
| --leading-heading-sm: 1.2; |
| --tracking-heading-sm: -0.01px; |
| --text-heading: 28px; |
| --leading-heading: 1.17; |
| --text-display: 48px; |
| --leading-display: 1.14; |
| |
| |
| --spacing-4: 4px; |
| --spacing-8: 8px; |
| --spacing-16: 16px; |
| --spacing-24: 24px; |
| --spacing-120: 120px; |
| |
| |
| --radius-sm: 2px; |
| --radius-md: 6px; |
| --radius-lg: 10px; |
| --radius-2xl: 16px; |
| --radius-full: 999px; |
| |
| |
| --shadow-sm: rgba(186, 207, 247, 0.32) 0 0 6px 0; |
| --shadow-md: rgba(238, 186, 247, 0.24) 0 0 12px 0; |
| --shadow-subtle: rgba(186, 215, 247, 0.12) 0 0 0 1px inset; |
| } |
| |
| * { box-sizing: border-box; } |
| html { scroll-behavior: smooth; } |
| |
| body { |
| background-color: var(--color-midnight-ink); |
| color: var(--color-moonlight); |
| font-family: var(--font-untitled-sans); |
| font-size: var(--text-body); |
| line-height: var(--leading-body); |
| letter-spacing: var(--tracking-body); |
| -webkit-font-smoothing: antialiased; |
| -moz-osx-font-smoothing: grayscale; |
| overflow-x: hidden; |
| } |
| |
| .blueprint-grid { |
| background-image: |
| linear-gradient(rgba(186, 207, 247, 0.04) 1px, transparent 1px), |
| linear-gradient(90deg, rgba(186, 207, 247, 0.04) 1px, transparent 1px); |
| background-size: 40px 40px; |
| background-position: -1px -1px; |
| } |
| |
| .font-display { font-family: var(--font-aeonikpro); } |
| .font-mono { font-family: var(--font-dotdigital); } |
| |
| .text-caption { font-size: var(--text-caption); line-height: var(--leading-caption); letter-spacing: var(--tracking-caption); } |
| .text-body-sm { font-size: var(--text-body-sm); line-height: var(--leading-body-sm); letter-spacing: var(--tracking-body-sm); } |
| .text-subheading { font-size: var(--text-subheading); line-height: var(--leading-subheading); letter-spacing: var(--tracking-subheading); } |
| .text-heading-sm { font-size: var(--text-heading-sm); line-height: var(--leading-heading-sm); letter-spacing: var(--tracking-heading-sm); } |
| .text-heading { font-size: var(--text-heading); line-height: var(--leading-heading); } |
| .text-display { font-size: var(--text-display); line-height: var(--leading-display); } |
| .text-label { font-family: var(--font-dotdigital); font-size: 15px; line-height: 1.2; letter-spacing: 0.1em; text-transform: uppercase; } |
| |
| .bg-ink { background-color: var(--color-midnight-ink); } |
| .bg-graphite { background-color: var(--color-graphite-plate); } |
| .bg-iris { background-color: var(--color-electric-iris); } |
| .text-fog { color: var(--color-fog); } |
| .text-pebble { color: var(--color-pebble); } |
| .text-moonlight { color: var(--color-moonlight); } |
| .text-ice { color: var(--color-ice); } |
| .text-glacier { color: var(--color-glacier); } |
| .text-frost { color: var(--color-frost-link); } |
| .text-iris { color: var(--color-electric-iris); } |
| .text-ember { color: var(--color-ember); } |
| .text-azure { color: var(--color-azure); } |
| .text-mint { color: var(--color-cipher-mint); } |
| |
| .border-steel { border-color: var(--color-steel-border); } |
| .border-subtle { border-color: rgba(186, 215, 247, 0.12); } |
| |
| .surface-card { |
| background-color: var(--color-graphite-plate); |
| border-radius: var(--radius-2xl); |
| box-shadow: var(--shadow-subtle); |
| position: relative; |
| } |
| |
| .surface-iris { |
| background: linear-gradient(135deg, rgba(102, 58, 243, 0.15), rgba(102, 58, 243, 0.04)); |
| border: 1px solid rgba(102, 58, 243, 0.3); |
| border-radius: var(--radius-2xl); |
| } |
| |
| .btn { |
| font-family: var(--font-untitled-sans); |
| font-weight: 600; |
| font-size: var(--text-body-sm); |
| padding: 12px 20px; |
| border-radius: var(--radius-sm); |
| display: inline-flex; |
| align-items: center; |
| gap: 8px; |
| transition: all var(--motion-duration-normal) var(--motion-easing-standard); |
| cursor: pointer; |
| border: 1px solid transparent; |
| } |
| .btn-primary { background-color: var(--color-electric-iris); color: var(--color-ice); box-shadow: var(--shadow-md); } |
| .btn-primary:hover { background-color: #7a52ff; box-shadow: rgba(102, 58, 243, 0.4) 0 0 18px 0; transform: translateY(-1px); } |
| .btn-secondary { background-color: transparent; color: var(--color-moonlight); border-color: var(--color-steel-border); } |
| .btn-secondary:hover { border-color: var(--color-frost-link); color: var(--color-frost-link); box-shadow: var(--shadow-sm); } |
| .btn-ghost { background-color: transparent; color: var(--color-fog); } |
| .btn-ghost:hover { color: var(--color-moonlight); } |
| |
| .glow-sm { box-shadow: var(--shadow-sm); } |
| .glow-md { box-shadow: var(--shadow-md); } |
| .inset-hairline { box-shadow: var(--shadow-subtle); } |
| .gradient-text { background: var(--gradient-blueprint-glow); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; } |
| |
| @keyframes pulse-glow { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } } |
| .pulse-dot { animation: pulse-glow 2s ease-in-out infinite; } |
| |
| @keyframes scan-line { 0% { transform: translateY(-100%); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(100vh); opacity: 0; } } |
| .scan-line { |
| position: fixed; top: 0; left: 0; right: 0; height: 2px; |
| background: linear-gradient(90deg, transparent, var(--color-blueprint-glow), transparent); |
| animation: scan-line 8s linear infinite; pointer-events: none; z-index: 1; opacity: 0.3; |
| } |
| |
| .nav-blur { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background-color: rgba(5, 6, 15, 0.7); border-bottom: 1px solid rgba(186, 215, 247, 0.08); } |
| .section-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(186, 215, 247, 0.15), transparent); } |
| |
| .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--motion-duration-slow) var(--motion-easing-enter), transform var(--motion-duration-slow) var(--motion-easing-enter); } |
| .reveal.visible { opacity: 1; transform: translateY(0); } |
| |
| ::-webkit-scrollbar { width: 8px; } |
| ::-webkit-scrollbar-track { background: var(--color-midnight-ink); } |
| ::-webkit-scrollbar-thumb { background: var(--color-graphite-plate); border-radius: 4px; } |
| ::-webkit-scrollbar-thumb:hover { background: var(--color-steel-border); } |
| |
| .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%); background-color: var(--color-graphite-plate); border: 1px solid var(--color-steel-border); border-radius: var(--radius-md); padding: 12px 20px; color: var(--color-ice); font-size: var(--text-body-sm); z-index: 100; transition: transform var(--motion-duration-normal) var(--motion-easing-spring); box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 10px; } |
| .toast.show { transform: translateX(-50%) translateY(0); } |
| |
| .mobile-menu { max-height: 0; overflow: hidden; transition: max-height var(--motion-duration-normal) var(--motion-easing-standard); } |
| .mobile-menu.open { max-height: 400px; } |
| |
| |
| |
| |
| .skeleton { |
| background: linear-gradient(90deg, rgba(47,52,62,0.4) 25%, rgba(47,52,62,0.8) 50%, rgba(47,52,62,0.4) 75%); |
| background-size: 200% 100%; |
| animation: shimmer 2s infinite linear; |
| border-radius: var(--radius-md); |
| } |
| @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } |
| |
| |
| .orbital { |
| width: 40px; height: 40px; border-radius: 50%; |
| border: 2px solid rgba(102, 58, 243, 0.2); |
| border-top-color: var(--color-electric-iris); |
| animation: spin 1s infinite linear; |
| } |
| @keyframes spin { to { transform: rotate(360deg); } } |
| |
| |
| .hover-card { transition: transform var(--motion-duration-normal) var(--motion-easing-spring), box-shadow var(--motion-duration-normal) var(--motion-easing-standard); } |
| .hover-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); } |
| |
| |
| .ambient-beam { |
| position: absolute; width: 200%; height: 1px; background: linear-gradient(90deg, transparent, var(--color-electric-iris), transparent); |
| animation: beam-scan 4s infinite linear; opacity: 0.5; |
| } |
| @keyframes beam-scan { 0% { transform: translateX(-50%) rotate(-5deg); } 100% { transform: translateX(0%) rotate(-5deg); } } |
| |
| |
| .thinking-dot { width: 6px; height: 6px; border-radius: 50%; background-color: var(--color-frost-link); display: inline-block; margin: 0 2px; } |
| .thinking-dot:nth-child(1) { animation: think 1.4s infinite; } |
| .thinking-dot:nth-child(2) { animation: think 1.4s infinite 0.2s; } |
| .thinking-dot:nth-child(3) { animation: think 1.4s infinite 0.4s; } |
| @keyframes think { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } } |
| |
| |
| .progress-bar-fill { |
| height: 100%; background: linear-gradient(90deg, var(--color-electric-iris), #a98cff); |
| border-radius: var(--radius-full); transition: width var(--motion-duration-cinematic) var(--motion-easing-exit); |
| } |
| |
| |
| .state-dot { transition: all var(--motion-duration-fast) var(--motion-easing-standard); } |
| .state-dot:hover { transform: scale(1.5); } |
| |
| |
| .timeline-block { transition: transform var(--motion-duration-fast) var(--motion-easing-spring); } |
| .timeline-block:hover { transform: scaleY(1.2); } |
| |
| |
| @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; |
| } |
| .scan-line, .pulse-dot, .skeleton, .orbital, .ambient-beam, .thinking-dot { animation: none !important; } |
| } |
| |
| @media (max-width: 768px) { |
| .text-display { font-size: 36px; } |
| .text-heading { font-size: 24px; } |
| } |
| </style> |
| </head> |
| <body class="blueprint-grid"> |
|
|
| <div class="scan-line"></div> |
|
|
| |
| <nav class="nav-blur fixed top-0 left-0 right-0 z-50"> |
| <div class="max-w-[1200px] mx-auto px-6 py-4 flex items-center justify-between"> |
| <a href="index.html" class="flex items-center gap-3"> |
| <div class="w-9 h-9 rounded-[6px] bg-iris flex items-center justify-center glow-md"> |
| <i data-lucide="hexagon" class="w-5 h-5 text-ice"></i> |
| </div> |
| <span class="font-display font-bold text-glacier text-[18px] tracking-tight">Phantom</span> |
| <span class="text-label text-fog hidden sm:inline">MOTION</span> |
| </a> |
|
|
| <div class="hidden md:flex items-center gap-8"> |
| <a href="index.html" class="text-body-sm text-pebble hover:text-frost transition-colors">Style Guide</a> |
| <a href="#library" class="text-body-sm text-pebble hover:text-frost transition-colors">Library</a> |
| <a href="#editor" class="text-body-sm text-pebble hover:text-frost transition-colors">Studio</a> |
| <a href="#tokens" class="text-body-sm text-pebble hover:text-frost transition-colors">Tokens</a> |
| <a href="#agent" class="text-body-sm text-pebble hover:text-frost transition-colors">AI Agent</a> |
| <button class="btn btn-primary" onclick="showToast('Motion contract exported')"> |
| <i data-lucide="download" class="w-4 h-4"></i> |
| Export |
| </button> |
| </div> |
|
|
| <button id="menuToggle" class="md:hidden text-moonlight" aria-label="Menu"> |
| <i data-lucide="menu" class="w-6 h-6"></i> |
| </button> |
| </div> |
|
|
| <div id="mobileMenu" class="mobile-menu md:hidden"> |
| <div class="px-6 pb-4 flex flex-col gap-4"> |
| <a href="index.html" class="text-body-sm text-pebble py-2">Style Guide</a> |
| <a href="#library" class="text-body-sm text-pebble py-2">Library</a> |
| <a href="#editor" class="text-body-sm text-pebble py-2">Studio</a> |
| <a href="#tokens" class="text-body-sm text-pebble py-2">Tokens</a> |
| <a href="#agent" class="text-body-sm text-pebble py-2">AI Agent</a> |
| <button class="btn btn-primary w-full justify-center" onclick="showToast('Motion contract exported')"> |
| <i data-lucide="download" class="w-4 h-4"></i> |
| Export |
| </button> |
| </div> |
| </div> |
| </nav> |
|
|
| |
| <header id="top" class="relative pt-32 pb-20 px-6 overflow-hidden"> |
| <div class="max-w-[1200px] mx-auto relative z-10"> |
| <div class="flex items-center gap-3 mb-8 reveal"> |
| <span class="w-2 h-2 rounded-full bg-iris pulse-dot glow-md"></span> |
| <span class="text-label text-fog">Phantom Motion · v1.0 · UDC-Studio</span> |
| </div> |
|
|
| <h1 class="font-display text-display text-glacier font-bold mb-6 reveal leading-[1.14]"> |
| Motion at rest.<br /> |
| <span class="gradient-text">Activated by intent.</span> |
| </h1> |
|
|
| <p class="text-body max-w-2xl text-pebble mb-10 reveal"> |
| A premium motion-component system that feels cinematic, fast, and restrained. |
| Every animation communicates state, progress, hierarchy, or system activity. |
| No decorative noise — only purposeful, tokenized, accessible motion. |
| </p> |
|
|
| <div class="flex flex-wrap items-center gap-4 mb-16 reveal"> |
| <button class="btn btn-primary" onclick="document.getElementById('library').scrollIntoView({behavior:'smooth'})"> |
| <i data-lucide="boxes" class="w-4 h-4"></i> |
| Component Library |
| </button> |
| <button class="btn btn-secondary" onclick="document.getElementById('editor').scrollIntoView({behavior:'smooth'})"> |
| <i data-lucide="sliders-horizontal" class="w-4 h-4"></i> |
| Open Studio |
| </button> |
| </div> |
|
|
| |
| <div class="relative h-24 reveal overflow-hidden"> |
| <div class="ambient-beam" style="top: 20%;"></div> |
| <div class="ambient-beam" style="top: 50%; animation-delay: 1s;"></div> |
| <div class="ambient-beam" style="top: 80%; animation-delay: 2s;"></div> |
| </div> |
| </div> |
| </header> |
|
|
| <div class="section-divider max-w-[1200px] mx-auto"></div> |
|
|
| |
| <section id="editor" class="py-[120px] px-6"> |
| <div class="max-w-[1200px] mx-auto"> |
| <div class="mb-16 reveal"> |
| <div class="text-label text-iris mb-4">§ 02 — Motion Studio</div> |
| <h2 class="font-display text-heading text-glacier font-bold mb-4">Studio Environment</h2> |
| <p class="text-body text-pebble max-w-2xl"> |
| Design, preview, and export motion systems. Scrub timelines, toggle triggers, |
| test states, and generate variants with AI. |
| </p> |
| </div> |
|
|
| <div class="surface-card p-4 md:p-6 reveal overflow-hidden"> |
| |
| <div class="flex flex-wrap items-center justify-between gap-4 pb-4 border-b border-subtle border"> |
| <div class="flex items-center gap-4"> |
| <div class="flex gap-1.5"> |
| <div class="w-3 h-3 rounded-full bg-ember/80"></div> |
| <div class="w-3 h-3 rounded-full bg-azure/80"></div> |
| <div class="w-3 h-3 rounded-full bg-mint/80"></div> |
| </div> |
| <div class="text-label text-fog">motion://kpi-card/animator</div> |
| </div> |
| <div class="flex items-center gap-3"> |
| <span class="text-caption text-mint flex items-center gap-1.5"> |
| <i data-lucide="activity" class="w-3 h-3"></i> 60 FPS |
| </span> |
| <span class="text-caption text-fog">Budget: 16ms</span> |
| <button class="btn btn-ghost py-1 px-2 text-caption"><i data-lucide="play" class="w-3 h-3"></i></button> |
| </div> |
| </div> |
|
|
| |
| <div class="grid grid-cols-12 gap-4 mt-4"> |
| |
| |
| <div class="col-span-12 md:col-span-3 space-y-4"> |
| <div class="bg-ink rounded-[10px] p-4 border border-subtle border"> |
| <div class="text-label text-fog mb-3">Trigger Inspector</div> |
| <div class="space-y-2"> |
| <div class="flex items-center justify-between p-2 rounded-md hover:bg-graphite/50 cursor-pointer"> |
| <span class="text-body-sm text-pebble flex items-center gap-2"><i data-lucide="mouse-pointer" class="w-3 h-3"></i> Hover</span> |
| <span class="w-8 h-4 bg-iris rounded-full relative"><span class="absolute right-0.5 top-0.5 w-3 h-3 bg-ice rounded-full"></span></span> |
| </div> |
| <div class="flex items-center justify-between p-2 rounded-md hover:bg-graphite/50 cursor-pointer"> |
| <span class="text-body-sm text-pebble flex items-center gap-2"><i data-lucide="eye" class="w-3 h-3"></i> Viewport</span> |
| <span class="w-8 h-4 bg-iris rounded-full relative"><span class="absolute right-0.5 top-0.5 w-3 h-3 bg-ice rounded-full"></span></span> |
| </div> |
| <div class="flex items-center justify-between p-2 rounded-md hover:bg-graphite/50 cursor-pointer"> |
| <span class="text-body-sm text-pebble flex items-center gap-2"><i data-lucide="crosshair" class="w-3 h-3"></i> Focus</span> |
| <span class="w-8 h-4 bg-steel-border rounded-full relative"><span class="absolute left-0.5 top-0.5 w-3 h-3 bg-fog rounded-full"></span></span> |
| </div> |
| </div> |
| </div> |
|
|
| <div class="bg-ink rounded-[10px] p-4 border border-subtle border"> |
| <div class="text-label text-fog mb-3">Motion Tokens</div> |
| <div class="space-y-3"> |
| <div> |
| <div class="flex justify-between text-caption text-fog mb-1"><span>Duration</span><span class="font-mono text-frost">300ms</span></div> |
| <div class="h-1 bg-graphite rounded-full"><div class="h-1 bg-iris rounded-full" style="width: 30%"></div></div> |
| </div> |
| <div> |
| <div class="flex justify-between text-caption text-fog mb-1"><span>Easing</span><span class="font-mono text-frost">Spring</span></div> |
| <div class="h-1 bg-graphite rounded-full"><div class="h-1 bg-iris rounded-full" style="width: 70%"></div></div> |
| </div> |
| <div> |
| <div class="flex justify-between text-caption text-fog mb-1"><span>Distance</span><span class="font-mono text-frost">12px</span></div> |
| <div class="h-1 bg-graphite rounded-full"><div class="h-1 bg-iris rounded-full" style="width: 40%"></div></div> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="col-span-12 md:col-span-6 bg-ink rounded-[10px] p-4 border border-subtle border relative min-h-[300px] flex flex-col"> |
| <div class="text-label text-fog mb-4 flex justify-between"> |
| <span>Preview Stage</span> |
| <span class="text-caption text-fog normal-case">Hover me</span> |
| </div> |
| <div class="flex-1 flex flex-col items-center justify-center gap-4"> |
| |
| <div class="hover-card surface-iris p-6 w-full max-w-sm cursor-pointer"> |
| <div class="flex items-center justify-between mb-4"> |
| <div class="text-label text-frost">SYSTEM STATUS</div> |
| <span class="w-2 h-2 rounded-full bg-mint pulse-dot"></span> |
| </div> |
| <div class="font-display text-heading-sm text-glacier font-bold mb-2">All Systems Operational</div> |
| <div class="text-body-sm text-pebble">Latency: 12ms · Uptime: 99.9%</div> |
| <div class="mt-4 h-1 bg-graphite rounded-full overflow-hidden"> |
| <div class="progress-bar-fill" style="width: 92%"></div> |
| </div> |
| </div> |
| </div> |
| <div class="ambient-beam" style="bottom: 10%; opacity: 0.3;"></div> |
| </div> |
|
|
| |
| <div class="col-span-12 md:col-span-3 space-y-4"> |
| <div class="bg-ink rounded-[10px] p-4 border border-subtle border"> |
| <div class="text-label text-fog mb-3">Timeline</div> |
| <div class="space-y-2 relative"> |
| <div class="absolute left-[40px] top-0 bottom-0 w-px bg-steel-border"></div> |
| <div class="flex items-center gap-2"> |
| <span class="text-caption text-fog w-8 text-right">0ms</span> |
| <div class="timeline-block h-2 w-12 bg-iris rounded-sm"></div> |
| </div> |
| <div class="flex items-center gap-2"> |
| <span class="text-caption text-fog w-8 text-right">150</span> |
| <div class="timeline-block h-2 w-16 bg-frost/50 rounded-sm"></div> |
| </div> |
| <div class="flex items-center gap-2"> |
| <span class="text-caption text-fog w-8 text-right">300</span> |
| <div class="timeline-block h-2 w-20 bg-iris rounded-sm"></div> |
| </div> |
| <div class="flex items-center gap-2"> |
| <span class="text-caption text-fog w-8 text-right">600</span> |
| <div class="timeline-block h-2 w-10 bg-azure/50 rounded-sm"></div> |
| </div> |
| </div> |
| </div> |
|
|
| <div class="bg-ink rounded-[10px] p-4 border border-subtle border"> |
| <div class="text-label text-fog mb-3">State Matrix</div> |
| <div class="grid grid-cols-4 gap-2"> |
| <div class="state-dot w-full aspect-square rounded-sm bg-iris"></div> |
| <div class="state-dot w-full aspect-square rounded-sm bg-graphite"></div> |
| <div class="state-dot w-full aspect-square rounded-sm bg-mint"></div> |
| <div class="state-dot w-full aspect-square rounded-sm bg-ember"></div> |
| <div class="state-dot w-full aspect-square rounded-sm bg-graphite"></div> |
| <div class="state-dot w-full aspect-square rounded-sm bg-iris"></div> |
| <div class="state-dot w-full aspect-square rounded-sm bg-graphite"></div> |
| <div class="state-dot w-full aspect-square rounded-sm bg-azure"></div> |
| </div> |
| </div> |
| </div> |
|
|
| </div> |
| |
| |
| <div class="mt-4 pt-4 border-t border-subtle border flex flex-wrap items-center gap-2"> |
| <span class="text-caption text-fog mr-2">Export Targets:</span> |
| <span class="pill text-caption py-1 px-2">Framer Motion</span> |
| <span class="pill text-caption py-1 px-2">GSAP</span> |
| <span class="pill text-caption py-1 px-2">CSS Keyframes</span> |
| <span class="pill text-caption py-1 px-2">Lottie</span> |
| <span class="pill text-caption py-1 px-2">Tailwind</span> |
| <span class="pill text-caption py-1 px-2">WAAPI</span> |
| </div> |
| </div> |
| </div> |
| </section> |
|
|
| <div class="section-divider max-w-[1200px] mx-auto"></div> |
|
|
| |
| <section id="library" class="py-[120px] px-6"> |
| <div class="max-w-[1200px] mx-auto"> |
| <div class="mb-16 reveal"> |
| <div class="text-label text-iris mb-4">§ 03 — Component Library</div> |
| <h2 class="font-display text-heading text-glacier font-bold mb-4">Phantom Motion Pack</h2> |
| <p class="text-body text-pebble max-w-2xl"> |
| High-quality animated components. Scroll to trigger. Hover to interact. |
| All components are contract-backed and respect reduced-motion preferences. |
| </p> |
| </div> |
|
|
| |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-6"> |
| |
| |
| <div class="surface-card p-6 reveal hover-card"> |
| <div class="flex justify-between items-start mb-4"> |
| <div class="text-label text-fog">API REQUESTS</div> |
| <i data-lucide="trending-up" class="w-4 h-4 text-mint"></i> |
| </div> |
| <div class="font-display text-heading text-glacier font-bold counter" data-target="84592">0</div> |
| <div class="text-body-sm text-mint mt-2">+12.4% this week</div> |
| <div class="mt-4"> |
| <svg viewBox="0 0 100 30" class="w-full h-10"> |
| <polyline class="sparkline" points="0,25 15,20 30,22 45,10 60,15 75,5 90,8 100,2" fill="none" stroke="var(--color-electric-iris)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> |
| </svg> |
| </div> |
| </div> |
|
|
| |
| <div class="surface-card p-6 reveal"> |
| <div class="text-label text-fog mb-4">DEPLOYMENT PIPELINE</div> |
| <div class="space-y-4"> |
| <div> |
| <div class="flex justify-between text-caption text-pebble mb-1"> |
| <span>Build</span><span class="text-mint">100%</span> |
| </div> |
| <div class="h-2 bg-ink rounded-full overflow-hidden"><div class="progress-bar-fill" style="width: 100%"></div></div> |
| </div> |
| <div> |
| <div class="flex justify-between text-caption text-pebble mb-1"> |
| <span>Test</span><span class="text-frost live-progress" data-target="78">0%</span> |
| </div> |
| <div class="h-2 bg-ink rounded-full overflow-hidden"><div class="progress-bar-fill live-bar" data-target="78" style="width: 0%"></div></div> |
| </div> |
| <div> |
| <div class="flex justify-between text-caption text-pebble mb-1"> |
| <span>Deploy</span><span class="text-fog">Pending</span> |
| </div> |
| <div class="h-2 bg-ink rounded-full overflow-hidden"><div class="progress-bar-fill" style="width: 0%"></div></div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="surface-card p-6 reveal flex flex-col items-center"> |
| <div class="text-label text-fog mb-4 self-start">CPU LOAD</div> |
| <div class="relative w-32 h-32"> |
| <svg viewBox="0 0 100 100" class="w-full h-full -rotate-90"> |
| <circle cx="50" cy="50" r="40" stroke="var(--color-graphite-plate)" stroke-width="8" fill="none" /> |
| <circle class="gauge-arc" cx="50" cy="50" r="40" stroke="var(--color-electric-iris)" stroke-width="8" fill="none" stroke-linecap="round" stroke-dasharray="251.2" stroke-dashoffset="251.2" data-target="65" /> |
| </svg> |
| <div class="absolute inset-0 flex flex-col items-center justify-center"> |
| <div class="font-display text-heading-sm text-glacier font-bold counter" data-target="65">0</div> |
| <div class="text-caption text-fog">%</div> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-6"> |
| |
| |
| <div class="surface-card p-6 reveal"> |
| <div class="text-label text-fog mb-4">AGENT TASK QUEUE</div> |
| <div class="space-y-3"> |
| <div class="flex items-center gap-3 p-2 rounded-md bg-ink/50"> |
| <div class="orbital" style="width:16px; height:16px; border-width:1px;"></div> |
| <span class="text-body-sm text-ice">Processing batch #402</span> |
| </div> |
| <div class="flex items-center gap-3 p-2 rounded-md bg-ink/50"> |
| <i data-lucide="check-circle" class="w-4 h-4 text-mint"></i> |
| <span class="text-body-sm text-pebble">Validate schema</span> |
| </div> |
| <div class="flex items-center gap-3 p-2 rounded-md bg-ink/50"> |
| <div class="w-4 h-4 rounded-full border border-steel-border"></div> |
| <span class="text-body-sm text-fog">Sync to vault</span> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="surface-card p-6 reveal"> |
| <div class="text-label text-fog mb-4">API EVENT STREAM</div> |
| <div class="space-y-2 font-mono text-caption"> |
| <div class="flex gap-2"><span class="text-fog">12:04:01</span><span class="text-mint">POST</span><span class="text-pebble truncate">/v1/agents/run</span></div> |
| <div class="flex gap-2"><span class="text-fog">12:04:03</span><span class="text-frost">GET</span><span class="text-pebble truncate">/v1/status</span></div> |
| <div class="flex gap-2"><span class="text-fog">12:04:05</span><span class="text-ember">ERR</span><span class="text-pebble truncate">/v1/upload</span></div> |
| <div class="flex gap-2"><span class="text-fog">12:04:06</span><span class="text-mint">POST</span><span class="text-pebble truncate">/v1/retry</span></div> |
| <div class="flex gap-2"><span class="text-fog">12:04:08</span><span class="text-azure">WS</span><span class="text-pebble truncate">connection_open</span></div> |
| </div> |
| </div> |
|
|
| |
| <div class="surface-card p-6 reveal"> |
| <div class="text-label text-fog mb-4">SYSTEM HEALTH</div> |
| <div class="grid grid-cols-3 gap-3"> |
| <div class="flex flex-col items-center p-2 rounded-md bg-ink/50"> |
| <div class="w-3 h-3 rounded-full bg-mint pulse-dot mb-2"></div> |
| <span class="text-caption text-pebble">Core</span> |
| </div> |
| <div class="flex flex-col items-center p-2 rounded-md bg-ink/50"> |
| <div class="w-3 h-3 rounded-full bg-mint pulse-dot mb-2" style="animation-delay: 0.5s"></div> |
| <span class="text-caption text-pebble">DB</span> |
| </div> |
| <div class="flex flex-col items-center p-2 rounded-md bg-ink/50"> |
| <div class="w-3 h-3 rounded-full bg-ember mb-2"></div> |
| <span class="text-caption text-pebble">Queue</span> |
| </div> |
| </div> |
| <div class="mt-4 text-body-sm text-pebble">Response Time</div> |
| <div class="flex items-end gap-1 mt-2 h-12"> |
| <div class="w-2 bg-iris/40 rounded-t" style="height: 40%"></div> |
| <div class="w-2 bg-iris/60 rounded-t" style="height: 60%"></div> |
| <div class="w-2 bg-iris rounded-t" style="height: 80%"></div> |
| <div class="w-2 bg-iris/60 rounded-t" style="height: 50%"></div> |
| <div class="w-2 bg-iris/40 rounded-t" style="height: 30%"></div> |
| <div class="w-2 bg-iris/80 rounded-t" style="height: 70%"></div> |
| <div class="w-2 bg-iris rounded-t" style="height: 90%"></div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> |
| |
| |
| <div class="surface-card p-6 reveal flex flex-col items-center justify-center min-h-[200px]"> |
| <div class="text-label text-fog mb-6 self-start">LOADING STATES</div> |
| <div class="flex gap-8 items-center"> |
| <div class="orbital"></div> |
| <div class="relative w-10 h-10"> |
| <div class="absolute inset-0 border-2 border-iris/20 rounded-full"></div> |
| <div class="absolute inset-0 border-2 border-transparent border-t-frost rounded-full" style="animation: spin 1.5s infinite linear reverse;"></div> |
| </div> |
| <div class="flex items-center gap-1"> |
| <span class="thinking-dot"></span> |
| <span class="thinking-dot"></span> |
| <span class="thinking-dot"></span> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="surface-card p-6 reveal"> |
| <div class="text-label text-fog mb-4">SKELETON GRID</div> |
| <div class="space-y-3"> |
| <div class="flex gap-4"> |
| <div class="skeleton w-12 h-12 rounded-full"></div> |
| <div class="flex-1 space-y-2"> |
| <div class="skeleton h-4 w-3/4"></div> |
| <div class="skeleton h-3 w-1/2"></div> |
| </div> |
| </div> |
| <div class="skeleton h-24 w-full"></div> |
| <div class="flex gap-2"> |
| <div class="skeleton h-8 w-20"></div> |
| <div class="skeleton h-8 w-20"></div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="surface-card p-6 reveal"> |
| <div class="text-label text-fog mb-4">NOTIFICATION STACK</div> |
| <div class="space-y-3"> |
| <div class="surface-iris p-3 flex items-center gap-3"> |
| <i data-lucide="check-circle" class="w-5 h-5 text-mint"></i> |
| <div> |
| <div class="text-body-sm text-ice font-medium">Deployment Successful</div> |
| <div class="text-caption text-fog">prod-cluster · 2m ago</div> |
| </div> |
| </div> |
| <div class="bg-graphite p-3 flex items-center gap-3 rounded-[10px] border border-subtle border"> |
| <i data-lucide="alert-triangle" class="w-5 h-5 text-ember"></i> |
| <div> |
| <div class="text-body-sm text-ice font-medium">High Memory Usage</div> |
| <div class="text-caption text-fog">node-04 · 5m ago</div> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| </div> |
| </div> |
| </section> |
|
|
| <div class="section-divider max-w-[1200px] mx-auto"></div> |
|
|
| |
| <section id="tokens" class="py-[120px] px-6"> |
| <div class="max-w-[1200px] mx-auto"> |
| <div class="mb-16 reveal"> |
| <div class="text-label text-iris mb-4">§ 04 — Contracts & Tokens</div> |
| <h2 class="font-display text-heading text-glacier font-bold mb-4">Motion Architecture</h2> |
| </div> |
|
|
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6"> |
| |
| <div class="surface-card p-8 reveal"> |
| <div class="text-label text-fog mb-6">Motion Tokens</div> |
| <div class="space-y-4"> |
| <div class="grid grid-cols-3 gap-4 pb-4 border-b border-subtle border"> |
| <div><div class="text-caption text-fog mb-1">Duration</div><div class="text-body-sm text-ice">300ms</div></div> |
| <div><div class="text-caption text-fog mb-1">Easing</div><div class="text-body-sm text-ice">Spring</div></div> |
| <div><div class="text-caption text-fog mb-1">Stagger</div><div class="text-body-sm text-ice">50ms</div></div> |
| </div> |
| <div class="grid grid-cols-3 gap-4 pb-4 border-b border-subtle border"> |
| <div><div class="text-caption text-fog mb-1">Opacity Ramp</div><div class="text-body-sm text-ice">0 → 1</div></div> |
| <div><div class="text-caption text-fog mb-1">Blur Ramp</div><div class="text-body-sm text-ice">8px → 0</div></div> |
| <div><div class="text-caption text-fog mb-1">Scale Range</div><div class="text-body-sm text-ice">0.95 → 1</div></div> |
| </div> |
| <div class="grid grid-cols-3 gap-4"> |
| <div><div class="text-caption text-fog mb-1">Spring K</div><div class="text-body-sm text-ice">340</div></div> |
| <div><div class="text-caption text-fog mb-1">Damping</div><div class="text-body-sm text-ice">30</div></div> |
| <div><div class="text-caption text-fog mb-1">Mass</div><div class="text-body-sm text-ice">1</div></div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="surface-card p-8 reveal"> |
| <div class="flex items-center justify-between mb-6"> |
| <div class="text-label text-fog">Motion Contract</div> |
| <span class="badge badge-iris"><i data-lucide="file-code" class="w-3 h-3"></i> JSON</span> |
| </div> |
| <pre class="font-mono text-caption text-pebble leading-[1.6] overflow-x-auto"><code>{ |
| "ref": "motion://kpi-card/animator", |
| "states": ["idle", "hover", "active"], |
| "triggers": ["scroll", "hover"], |
| "timeline": [ |
| { "step": 0, "opacity": 0, "y": 12 }, |
| { "step": 300, "opacity": 1, "y": 0 } |
| ], |
| "tokens": { |
| "duration": "300ms", |
| "easing": "cubic-bezier(0.34, 1.56, 0.64, 1)" |
| }, |
| "reduced_motion": "fade_only", |
| "budget": "16ms", |
| "adapters": ["framer", "gsap", "css"] |
| }</code></pre> |
| </div> |
| </div> |
| </div> |
| </section> |
|
|
| <div class="section-divider max-w-[1200px] mx-auto"></div> |
|
|
| |
| <section id="agent" class="py-[120px] px-6"> |
| <div class="max-w-[1200px] mx-auto"> |
| <div class="mb-16 reveal"> |
| <div class="text-label text-iris mb-4">§ 05 — AI Agent</div> |
| <h2 class="font-display text-heading text-glacier font-bold mb-4">AI Motion Generation</h2> |
| </div> |
|
|
| <div class="surface-card p-8 reveal"> |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-8"> |
| |
| <div class="flex flex-col gap-4"> |
| <div class="flex gap-3"> |
| <div class="w-8 h-8 rounded-full bg-iris flex items-center justify-center flex-shrink-0"><i data-lucide="bot" class="w-4 h-4 text-ice"></i></div> |
| <div class="surface-iris p-4 rounded-[10px]"> |
| <p class="text-body-sm text-ice">I can generate motion components, create timeline variants, and add reduced-motion fallbacks. What do you need?</p> |
| </div> |
| </div> |
| <div class="flex gap-3 flex-row-reverse"> |
| <div class="w-8 h-8 rounded-full bg-graphite flex items-center justify-center flex-shrink-0 border border-subtle"><i data-lucide="user" class="w-4 h-4 text-pebble"></i></div> |
| <div class="bg-graphite p-4 rounded-[10px] border border-subtle border"> |
| <p class="text-body-sm text-moonlight">Add a cinematic page transition to the dashboard loader.</p> |
| </div> |
| </div> |
| <div class="flex gap-3"> |
| <div class="w-8 h-8 rounded-full bg-iris flex items-center justify-center flex-shrink-0"><i data-lucide="bot" class="w-4 h-4 text-ice"></i></div> |
| <div class="surface-iris p-4 rounded-[10px]"> |
| <p class="text-body-sm text-ice mb-2">Proposing motion patch:</p> |
| <ul class="text-body-sm text-pebble space-y-1"> |
| <li>• Added <span class="text-frost">1200ms</span> fade-in</li> |
| <li>• Added <span class="text-frost">8px</span> blur ramp</li> |
| <li>• Added reduced-motion fallback</li> |
| </ul> |
| <button class="btn btn-primary mt-4 py-1.5 text-caption" onclick="showToast('Motion patch applied')"> |
| <i data-lucide="check" class="w-3 h-3"></i> Apply Patch |
| </button> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="space-y-4"> |
| <div class="text-label text-fog">Agent Capabilities</div> |
| <div class="space-y-3"> |
| <div class="flex items-start gap-3 p-3 rounded-[10px] bg-ink/50"> |
| <i data-lucide="wand-2" class="w-5 h-5 text-iris mt-0.5"></i> |
| <div> |
| <div class="text-body-sm text-ice font-medium">Generate Variants</div> |
| <div class="text-caption text-fog">Create alternate timeline sequences</div> |
| </div> |
| </div> |
| <div class="flex items-start gap-3 p-3 rounded-[10px] bg-ink/50"> |
| <i data-lucide="accessibility" class="w-5 h-5 text-iris mt-0.5"></i> |
| <div> |
| <div class="text-body-sm text-ice font-medium">Accessibility Audits</div> |
| <div class="text-caption text-fog">Add reduced-motion fallbacks automatically</div> |
| </div> |
| </div> |
| <div class="flex items-start gap-3 p-3 rounded-[10px] bg-ink/50"> |
| <i data-lucide="gauge" class="w-5 h-5 text-iris mt-0.5"></i> |
| <div> |
| <div class="text-body-sm text-ice font-medium">Reduce Excessive Motion</div> |
| <div class="text-caption text-fog">Optimize for 16ms performance budget</div> |
| </div> |
| </div> |
| <div class="flex items-start gap-3 p-3 rounded-[10px] bg-ink/50"> |
| <i data-lucide="repeat" class="w-5 h-5 text-iris mt-0.5"></i> |
| <div> |
| <div class="text-body-sm text-ice font-medium">Framework Adaptation</div> |
| <div class="text-caption text-fog">Convert patterns for Framer, GSAP, WAAPI</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </section> |
|
|
| |
| <footer class="py-16 px-6 border-t border-subtle border"> |
| <div class="max-w-[1200px] mx-auto"> |
| <div class="flex flex-col md:flex-row md:items-center justify-between gap-8"> |
| <div class="flex items-center gap-3"> |
| <div class="w-9 h-9 rounded-[6px] bg-iris flex items-center justify-center glow-md"> |
| <i data-lucide="hexagon" class="w-5 h-5 text-ice"></i> |
| </div> |
| <div> |
| <div class="font-display font-bold text-glacier text-[18px]">Phantom Digital</div> |
| <div class="text-caption text-fog">Motion Studio · v1.0 · UDC-Studio</div> |
| </div> |
| </div> |
| <div class="flex flex-col md:items-end gap-2"> |
| <div class="text-caption text-fog">The Motion Moat: Capturing interaction design.</div> |
| <a href="mailto:design@phantomdigital.com" class="text-body-sm text-frost hover:text-ice transition-colors flex items-center gap-2"> |
| <i data-lucide="mail" class="w-4 h-4"></i> |
| design@phantomdigital.com |
| </a> |
| </div> |
| </div> |
| <div class="mt-8 pt-8 border-t border-subtle border flex flex-col md:flex-row justify-between gap-4"> |
| <div class="text-caption text-fog">© 2024 Phantom Digital. Motion at rest.</div> |
| <div class="flex gap-6"> |
| <a href="index.html" class="text-caption text-fog hover:text-frost transition-colors">Style Guide</a> |
| <a href="#library" class="text-caption text-fog hover:text-frost transition-colors">Library</a> |
| <a href="#tokens" class="text-caption text-fog hover:text-frost transition-colors">Tokens</a> |
| </div> |
| </div> |
| </div> |
| </footer> |
|
|
| |
| <div id="toast" class="toast"> |
| <i data-lucide="check-circle" class="w-4 h-4 text-mint"></i> |
| <span id="toastMessage">Action completed</span> |
| </div> |
|
|
| <script src="motion.js"></script> |
| <script> |
| |
| lucide.createIcons(); |
| |
| |
| const menuToggle = document.getElementById('menuToggle'); |
| const mobileMenu = document.getElementById('mobileMenu'); |
| menuToggle.addEventListener('click', () => { |
| mobileMenu.classList.toggle('open'); |
| const isOpen = mobileMenu.classList.contains('open'); |
| menuToggle.innerHTML = isOpen ? '<i data-lucide="x" class="w-6 h-6"></i>' : '<i data-lucide="menu" class="w-6 h-6"></i>'; |
| lucide.createIcons(); |
| }); |
| mobileMenu.querySelectorAll('a').forEach(link => { |
| link.addEventListener('click', () => { |
| mobileMenu.classList.remove('open'); |
| menuToggle.innerHTML = '<i data-lucide="menu" class="w-6 h-6"></i>'; |
| lucide.createIcons(); |
| }); |
| }); |
| |
| |
| let toastTimeout; |
| function showToast(message) { |
| const toast = document.getElementById('toast'); |
| const toastMsg = document.getElementById('toastMessage'); |
| toastMsg.textContent = message; |
| toast.classList.add('show'); |
| clearTimeout(toastTimeout); |
| toastTimeout = setTimeout(() => toast.classList.remove('show'), 3000); |
| } |
| |
| |
| const revealObserver = new IntersectionObserver((entries) => { |
| entries.forEach((entry, index) => { |
| if (entry.isIntersecting) { |
| setTimeout(() => entry.target.classList.add('visible'), index * 50); |
| revealObserver.unobserve(entry.target); |
| |
| |
| if (entry.target.querySelector('.counter')) { |
| entry.target.querySelectorAll('.counter').forEach(animateCounter); |
| } |
| if (entry.target.querySelector('.live-bar')) { |
| entry.target.querySelectorAll('.live-bar').forEach(animateBar); |
| } |
| if (entry.target.querySelector('.gauge-arc')) { |
| entry.target.querySelectorAll('.gauge-arc').forEach(animateGauge); |
| } |
| if (entry.target.querySelector('.sparkline')) { |
| entry.target.querySelectorAll('.sparkline').forEach(animateSparkline); |
| } |
| } |
| }); |
| }, { threshold: 0.1 }); |
| document.querySelectorAll('.reveal').forEach(el => revealObserver.observe(el)); |
| |
| function animateCounter(el) { |
| const target = parseInt(el.dataset.target); |
| const duration = 1500; |
| const start = performance.now(); |
| function update(now) { |
| const progress = Math.min((now - start) / duration, 1); |
| const eased = 1 - Math.pow(1 - progress, 3); |
| el.textContent = Math.floor(eased * target).toLocaleString(); |
| if (progress < 1) requestAnimationFrame(update); |
| } |
| requestAnimationFrame(update); |
| } |
| |
| function animateBar(el) { |
| const target = el.dataset.target; |
| setTimeout(() => { |
| el.style.width = target + '%'; |
| const label = el.parentElement.previousElementSibling.querySelector('.live-progress'); |
| if (label) { |
| let current = 0; |
| const interval = setInterval(() => { |
| current += 2; |
| if (current >= target) { current = target; clearInterval(interval); } |
| label.textContent = current + '%'; |
| }, 30); |
| } |
| }, 300); |
| } |
| |
| function animateGauge(el) { |
| const target = parseInt(el.dataset.target); |
| const circumference = 251.2; |
| const offset = circumference - (circumference * target / 100); |
| setTimeout(() => { |
| el.style.transition = 'stroke-dashoffset 1.5s cubic-bezier(0.22, 1, 0.36, 1)'; |
| el.style.strokeDashoffset = offset; |
| }, 300); |
| } |
| |
| function animateSparkline(el) { |
| const length = el.getTotalLength(); |
| el.style.strokeDasharray = length; |
| el.style.strokeDashoffset = length; |
| setTimeout(() => { |
| el.style.transition = 'stroke-dashoffset 2s cubic-bezier(0.16, 1, 0.3, 1)'; |
| el.style.strokeDashoffset = 0; |
| }, 300); |
| } |
| </script> |
| </body> |
| </html> |