From a74a2c62003ae5fa9754aba154c9db2926495426 Mon Sep 17 00:00:00 2001 From: rajun Date: Tue, 27 Oct 2026 16:28:47 +0530 Subject: [PATCH] feat: add theme tokens, breakpoints and animations --- app/app.css | 253 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 200 insertions(+), 53 deletions(-) diff --git a/app/app.css b/app/app.css index e29413d..905b821 100644 --- a/app/app.css +++ b/app/app.css @@ -1,70 +1,217 @@ @import 'tailwindcss'; +@import 'tw-animate-css'; @theme { - --font-sans: - 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', - 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + --font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif; + --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; + + /* Type scale (design: 26 / 17 / 15 / 14 / 13 / 12 / 11 / 10) */ + --text-3xs: 0.625rem; + --text-3xs--line-height: 0.875rem; + --text-2xs: 0.6875rem; + --text-2xs--line-height: 1rem; + --text-xs: 0.75rem; + --text-xs--line-height: 1.125rem; + --text-sm: 0.8125rem; + --text-sm--line-height: 1.25rem; + --text-base: 0.875rem; + --text-base--line-height: 1.375rem; + --text-md: 0.9375rem; + --text-md--line-height: 1.375rem; + --text-lg: 1.0625rem; + --text-lg--line-height: 1.5rem; + --text-xl: 1.25rem; + --text-xl--line-height: 1.75rem; + --text-display: 1.625rem; + --text-display--line-height: 2.125rem; + /* Login page headings */ + --text-2xl: 1.75rem; + --text-2xl--line-height: 2.125rem; + --text-3xl: 2rem; + --text-3xl--line-height: 2.375rem; + --text-4xl: 2.25rem; + --text-4xl--line-height: 2.5rem; + --text-5xl: 2.75rem; + --text-5xl--line-height: 3rem; + + /* Login layout: side by side from 960px, wide showcase from 1200px */ + --breakpoint-split: 60rem; + --breakpoint-wide: 75rem; + + /* Radii */ + --radius-chip: 5px; + --radius-option: 7px; + --radius-item: 8px; + --radius-control: 9px; + --radius-group: 10px; + --radius-field: 11px; + --radius-card-sm: 12px; + --radius-card: 14px; + --radius-panel: 16px; + --radius-phone-screen: 37px; + --radius-phone: 46px; + + /* Surfaces */ + --color-background: #0b0b0c; + --color-sidebar: #0d0d0e; + --color-surface-sunken: #0d0d0f; + --color-surface-well: #0f0f10; + --color-surface: #121213; + --color-surface-dialog: #121214; + --color-surface-raised: #141416; + --color-surface-control: #161618; + --color-surface-hover-subtle: #18181b; + --color-surface-hover: #1c1c1f; + --color-surface-pressed: #26262a; + --color-overlay: rgb(0 0 0 / 0.62); + --color-shadow: #000000; + + /* Borders */ + --color-border-divider: #1f1f22; + --color-border-subtle: #232326; + --color-border-dialog: #26262a; + --color-border-control: #2a2a2e; + --color-border-dashed: #36363b; + --color-border-strong: #3a3a3f; + + /* Text */ + --color-text-primary: #f4f4f5; + --color-text-emphasis: #d4d4d8; + --color-text-secondary: #a1a1aa; + --color-text-subtle: #8b8b90; + --color-text-muted: #71717a; + --color-text-faint: #6b6b72; + --color-text-placeholder: #5c5c62; + --color-ink: #141414; + + /* Brand */ + --color-primary: #f97316; + --color-primary-hover: #fb8a3c; + --color-primary-foreground: #ffffff; + --color-accent-100: #ffedd5; + --color-accent-200: #fed7aa; + --color-accent-300: #fdba74; + --color-accent-400: #fb923c; + --color-accent-600: #ea580c; + --color-accent-700: #c2410c; + --color-accent-800: #9a3412; + --color-accent-900: #7c2d12; + + /* Status */ + --color-danger: #f87171; + --color-warning: #fbbf24; + --color-success: #22c55e; + --color-success-strong: #16a34a; + --color-note-surface: #18140f; + --color-note-border: #3a2a17; + --color-note-text: #e7c9a4; + + /* Client logos */ + --color-logo-tile-light: #f6f5f3; + --color-logo-tile-dark: #161618; + --color-logo-chip-light: #ffffff; + --color-logo-chip-dark: #151517; + --color-logo-badge: #ebeae7; + + /* Illustration, AR page & phone frame */ + --color-wood-light: #92582f; + --color-wood-dark: #3f2412; + --color-phone-frame: #1a1a1c; + --color-phone-frame-edge: #2c2c30; + --color-camera: #1a1917; + --color-room-wall: #3a3430; + --color-room-floor: #4a423b; + --color-room-floor-near: #544a42; + --color-viewer: #f4f3f0; + --color-viewer-stripe: #ebe9e5; + --color-viewer-stripe-alt: #f1efec; + --color-viewer-caption: #8a8780; + --color-qr-surface: #ffffff; + + /* shadcn/ui compatibility — vendored primitives read these names */ + --color-foreground: var(--color-text-primary); + --color-muted-foreground: var(--color-text-muted); + --color-accent: var(--color-surface-hover); + --color-accent-foreground: var(--color-text-primary); + --color-popover: var(--color-surface-raised); + --color-popover-foreground: var(--color-text-primary); + --color-secondary: var(--color-surface-control); + --color-destructive: var(--color-danger); + --color-border: var(--color-border-subtle); + --color-input: var(--color-border-control); + --color-ring: var(--color-primary); + + /* Motion */ + --animate-fade-up: fade-up 0.5s ease-out; + /* Opacity only, so absolutely placed children keep their containing block while it runs */ + --animate-screen-in: screen-in 0.45s ease-out; + /* Duration comes from the component, which also advances the story when it ends */ + --animate-story-progress: story-progress linear forwards; + /* Moves a full-height box, so the line inside travels from 8% to 92% of the scan frame */ + --animate-scan: scan 2.8s ease-in-out infinite alternate; + --animate-float: float 3.2s ease-in-out infinite; + /* A third-width bar sliding across its track */ + --animate-loading-bar: loading-bar 1.4s ease-in-out infinite; + + @keyframes screen-in { + from { opacity: 0; } + } + + @keyframes story-progress { + from { transform: scaleX(0); } + to { transform: scaleX(1); } + } + + @keyframes float { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-8px); } + } + + @keyframes loading-bar { + from { transform: translateX(-100%); } + to { transform: translateX(300%); } + } + + @keyframes scan { + from { transform: translateY(8%); } + to { transform: translateY(92%); } + } + + @keyframes fade-up { + from { opacity: 0; transform: translateY(12px); } + to { opacity: 1; transform: translateY(0); } + } +} + +@utility eyebrow { + font-size: var(--text-2xs); + line-height: var(--text-2xs--line-height); + font-weight: 500; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--color-text-faint); } html, body { - @apply bg-white dark:bg-gray-950; - - @media (prefers-color-scheme: dark) { - color-scheme: dark; - } -} -* { - box-sizing: border-box; -} - -body { - font-family: - 'Inter', - -apple-system, - BlinkMacSystemFont, - 'Segoe UI', - 'Roboto', - sans-serif; - background: #050509; + background-color: var(--color-background); + color: var(--color-text-primary); + color-scheme: dark; margin: 0; - padding: 0; - height: 100vh; + min-height: 100vh; + -webkit-font-smoothing: antialiased; } -.container { - max-width: 1200px; - margin: 0 auto; - padding: 1rem; -} - -model-viewer { - width: 100%; - height: 500px; - background: linear-gradient(to bottom, #e0e7ff, #f3f4f6); - border-radius: 16px; - box-shadow: - 0 20px 25px -5px rgba(0, 0, 0, 0.1), - 0 10px 10px -5px rgba(0, 0, 0, 0.04); - position: relative; -} - -@media (max-width: 768px) { - model-viewer { - height: 400px; - } -} ::placeholder { - color: rgb(156 163 175); /* gray-400 */ + color: var(--color-text-placeholder); opacity: 1; } -@keyframes float { - 0%, 100% { transform: translateY(0); } - 50% { transform: translateY(-12px); } +::selection { + background-color: color-mix(in srgb, var(--color-primary) 25%, transparent); } -@keyframes fade-up { - from { opacity: 0; transform: translateY(12px); } - to { opacity: 1; transform: translateY(0); } +/* Pages that render their own AR launch button hide model-viewer's built-in one */ +model-viewer[data-custom-ar-button]::part(default-ar-button) { + display: none; }