wealth/packages/island/src/styles/theme.css

348 lines
12 KiB
CSS

/*
* Lumina design tokens, generated from the Lumina Design System (tokens.json, v5).
* Three layers: primitives (no utilities, so screens can't use them), semantic
* variables that a future theme can switch, and @theme inline utilities.
*/
@theme {
/* Drop Tailwind's defaults so only Lumina tokens produce utilities. */
--color-*: initial;
--font-*: initial;
--text-*: initial;
--radius-*: initial;
--shadow-*: initial;
--breakpoint-*: initial;
--container-*: initial;
/* Faces and their fallback are declared in fonts.css. */
--font-sans: 'Yekan Bakh FaNum', 'Yekan Bakh Fallback', Tahoma, sans-serif;
/* Latin digits, for شبا and other codes banks print in Latin digits. */
--font-latin: 'Yekan Bakh', 'Yekan Bakh Fallback', Tahoma, sans-serif;
/* Sizes are the design system's px values ÷ 16, in rem, so text and spacing follow
the reader's browser font size. */
--text-display: 2rem;
--text-display--line-height: 2.75rem;
--text-display--font-weight: 700;
--text-heading-lg: 1.625rem;
--text-heading-lg--line-height: 2.375rem;
--text-heading-lg--font-weight: 700;
--text-heading-md: 1.3125rem;
--text-heading-md--line-height: 2rem;
--text-heading-md--font-weight: 700;
--text-heading-sm: 1.0625rem;
--text-heading-sm--line-height: 1.75rem;
--text-heading-sm--font-weight: 600;
--text-body-lg: 1.125rem;
--text-body-lg--line-height: 2rem;
--text-body-lg--font-weight: 400;
--text-body-md: 1rem;
--text-body-md--line-height: 1.75rem;
--text-body-md--font-weight: 400;
--text-body-sm: 0.875rem;
--text-body-sm--line-height: 1.5rem;
--text-body-sm--font-weight: 400;
--text-label: 0.875rem;
--text-label--line-height: 1.375rem;
--text-label--font-weight: 600;
--text-caption: 0.8125rem;
--text-caption--line-height: 1.375rem;
--text-caption--font-weight: 400;
--text-micro: 0.6875rem;
--text-micro--line-height: 1.125rem;
--text-micro--font-weight: 500;
/* 4px grid: space-1 … space-16 map to Tailwind's numeric spacing (p-4 = 1rem = 16px). */
--spacing: 0.25rem;
--spacing-touch-target: 2.75rem;
--spacing-control-sm: 2.25rem;
--spacing-control-md: 2.75rem;
--spacing-control-lg: 3.25rem;
--spacing-input-height: 3rem;
--container-mobile: 24.375rem;
--container-checkout: 30rem;
--container-form: 35rem;
--container-content: 40rem;
--radius-xs: 4px;
--radius-sm: 6px;
--radius-md: 8px;
--radius-lg: 12px;
--radius-xl: 16px;
--radius-full: 9999px;
--shadow-1:
0 1px 2px rgba(12, 16, 24, 0.06), 0 1px 3px rgba(12, 16, 24, 0.08);
--shadow-2:
0 6px 16px -4px rgba(12, 16, 24, 0.14),
0 2px 4px -2px rgba(12, 16, 24, 0.08);
--shadow-3:
0 24px 48px -12px rgba(12, 16, 24, 0.28),
0 8px 16px -8px rgba(12, 16, 24, 0.16);
/* No `tablet` (768px) breakpoint: bull keeps the bottom navigation up to 1024px,
and bear starts at 1024px, so layout never switches below that. */
--breakpoint-desktop: 1024px;
--breakpoint-wide: 1280px;
--ease-standard: cubic-bezier(0.2, 0, 0, 1);
/* The one looping motion: a spinner while an action is in flight. */
--animate-spin: spin 0.8s linear infinite;
/* Skeleton shimmer, from the inline start (right in RTL) to the end. */
--animate-shimmer: shimmer 1.6s linear infinite;
/* loading.tsx skeletons fade in after 300ms, so fast routes never flash one. */
--animate-appear-delayed: appear 0.2s ease-out 0.3s both;
/* The OTP caret, and the one shake of a wrong code. */
--animate-blink: blink 1.1s steps(1) infinite;
--animate-shake: shake 320ms ease-out 1;
/* A toast rises 16px as it fades in, and drops 8px as it fades out; sonner removes it 200ms
after it starts leaving, so the exit stays shorter than that. */
--animate-toast-in: toast-in 200ms var(--ease-standard) both;
--animate-toast-out: toast-out 160ms cubic-bezier(0.4, 0, 1, 1) forwards;
@keyframes toast-in {
from {
opacity: 0;
translate: 0 16px;
}
}
@keyframes toast-out {
to {
opacity: 0;
translate: 0 8px;
}
}
@keyframes shimmer {
from {
background-position: -50% 0;
}
to {
background-position: 150% 0;
}
}
@keyframes blink {
50% {
opacity: 0;
}
}
@keyframes shake {
20% {
transform: translateX(-6px);
}
40% {
transform: translateX(6px);
}
60% {
transform: translateX(-4px);
}
80% {
transform: translateX(3px);
}
}
@keyframes appear {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
}
:root {
/* Primitives: referenced only by the semantic layer below. */
--indigo-50: #f5f4ff;
--indigo-100: #e9e7ff;
--indigo-200: #d1cdff;
--indigo-300: #aea8ff;
--indigo-400: #827aff;
--indigo-500: #6459ff;
--indigo-600: #533afd;
--indigo-700: #402fcb;
--indigo-800: #30249e;
--indigo-900: #211c6d;
--indigo-950: #1c1e54;
--saffron-50: #fdf8ea;
--saffron-100: #faeecb;
--saffron-300: #edc256;
--saffron-400: #e2a82e;
--saffron-500: #c88a12;
--saffron-600: #a16b0b;
--saffron-700: #7b510c;
--saffron-800: #58390c;
--slate-0: #ffffff;
--slate-25: #fafbfc;
--slate-50: #f4f6f9;
--slate-100: #eceff4;
--slate-150: #e2e7ee;
--slate-200: #d5dce6;
--slate-300: #b9c2cf;
--slate-400: #7d889a;
--slate-500: #6a7586;
--slate-600: #515c6d;
--slate-700: #3a4352;
--slate-800: #262d39;
--slate-900: #151b25;
--green-50: #e8fcf6;
--green-100: #c9f7ea;
--green-200: #9aecd8;
--green-300: #64ddc3;
--green-500: #0abfa3;
--green-600: #039580;
--green-700: #0e7364;
--green-800: #0d5a4e;
--red-50: #fff2f4;
--red-100: #ffe1e5;
--red-200: #ffc2ca;
--red-300: #ff92a3;
--red-500: #ea2261;
--red-600: #ca1b52;
--red-700: #a51642;
--red-800: #831334;
--amber-50: #fffbeb;
--amber-100: #fef3c7;
--amber-200: #fde68a;
--amber-300: #fcd34d;
--amber-500: #f59e0b;
--amber-600: #d97706;
--amber-700: #b45309;
--amber-800: #92400e;
/* Semantic: what components use. A theme overrides only this block. */
--bg-page: var(--slate-50);
--surface: var(--slate-0);
--surface-sunken: var(--slate-100);
--surface-hover: var(--slate-25);
--surface-raised: var(--slate-0);
--surface-inverse: var(--slate-900);
--scrim: rgba(12, 16, 24, 0.48);
--lightbox: #000000;
--text-primary: var(--slate-900);
--text-secondary: var(--slate-600);
--text-tertiary: var(--slate-500);
--text-inverse: var(--slate-0);
/* Status tints that read on surface-inverse (the snackbar): the opposite theme's shades. */
--inverse-success: var(--green-500);
--inverse-danger: var(--red-300);
--inverse-info: var(--indigo-300);
/* Controls drawn on surface-inverse or the lightbox: translucent white pills. */
--inverse-control: rgba(255, 255, 255, 0.12);
--inverse-control-hover: rgba(255, 255, 255, 0.2);
/* Counters drawn over images («۱ / ۳»). */
--scrim-chip: rgba(12, 16, 24, 0.64);
--text-on-action: #ffffff;
--text-link: var(--indigo-600);
--border-subtle: var(--slate-150);
--border-default: var(--slate-400);
--border-strong: var(--slate-200);
--action-primary: var(--indigo-600);
--action-primary-hover: var(--indigo-700);
/* Not named in the design system, which paints pressed states from primitives. */
--action-primary-pressed: var(--indigo-800);
--action-primary-subtle: var(--indigo-50);
--action-primary-muted: var(--indigo-100);
--action-primary-text: var(--indigo-700);
--premium: var(--indigo-950);
--premium-on: var(--saffron-300);
--premium-accent: var(--saffron-600);
--premium-subtle: var(--saffron-50);
--premium-text: var(--saffron-700);
--success: var(--green-500);
--success-text: var(--green-700);
--success-subtle: var(--green-50);
--success-solid: var(--green-700);
/* Tracks and hairlines in a status hue: reached targets, the «دوباره آنلاین شدید» bar edge. */
--success-muted: var(--green-100);
--danger: var(--red-500);
--danger-text: var(--red-600);
--danger-solid: var(--red-600);
--danger-solid-hover: var(--red-700);
--danger-solid-pressed: var(--red-800);
--danger-subtle: var(--red-50);
/* The risk zone track in the prediction range. */
--danger-muted: var(--red-100);
--warning: var(--amber-500);
--warning-text: var(--amber-700);
--warning-subtle: var(--amber-50);
/* The «اتصال کند است» bar edge. */
--warning-muted: var(--amber-100);
--neutral-mark: var(--slate-400);
--skeleton: var(--slate-150);
--skeleton-highlight: var(--slate-50);
--opacity-frozen: 0.4;
--opacity-dimmed: 0.5;
--z-sticky: 10;
--z-menu: 850;
--z-overlay: 900;
--z-toast: 950;
--z-lightbox: 1000;
}
@theme inline {
--color-bg-page: var(--bg-page);
--color-surface: var(--surface);
--color-surface-sunken: var(--surface-sunken);
--color-surface-hover: var(--surface-hover);
--color-surface-raised: var(--surface-raised);
--color-surface-inverse: var(--surface-inverse);
--color-scrim: var(--scrim);
--color-lightbox: var(--lightbox);
--color-text-primary: var(--text-primary);
--color-text-secondary: var(--text-secondary);
--color-text-tertiary: var(--text-tertiary);
--color-text-inverse: var(--text-inverse);
--color-inverse-success: var(--inverse-success);
--color-inverse-danger: var(--inverse-danger);
--color-inverse-info: var(--inverse-info);
--color-inverse-control: var(--inverse-control);
--color-inverse-control-hover: var(--inverse-control-hover);
--color-scrim-chip: var(--scrim-chip);
--color-text-on-action: var(--text-on-action);
--color-text-link: var(--text-link);
--color-border-subtle: var(--border-subtle);
--color-border-default: var(--border-default);
--color-border-strong: var(--border-strong);
--color-action-primary: var(--action-primary);
--color-action-primary-hover: var(--action-primary-hover);
--color-action-primary-pressed: var(--action-primary-pressed);
--color-action-primary-subtle: var(--action-primary-subtle);
--color-action-primary-muted: var(--action-primary-muted);
--color-action-primary-text: var(--action-primary-text);
--color-premium: var(--premium);
--color-premium-on: var(--premium-on);
--color-premium-accent: var(--premium-accent);
--color-premium-subtle: var(--premium-subtle);
--color-premium-text: var(--premium-text);
--color-success: var(--success);
--color-success-text: var(--success-text);
--color-success-subtle: var(--success-subtle);
--color-success-solid: var(--success-solid);
--color-success-muted: var(--success-muted);
--color-danger: var(--danger);
--color-danger-text: var(--danger-text);
--color-danger-solid: var(--danger-solid);
--color-danger-solid-hover: var(--danger-solid-hover);
--color-danger-solid-pressed: var(--danger-solid-pressed);
--color-danger-subtle: var(--danger-subtle);
--color-danger-muted: var(--danger-muted);
--color-warning: var(--warning);
--color-warning-text: var(--warning-text);
--color-warning-subtle: var(--warning-subtle);
--color-warning-muted: var(--warning-muted);
--color-neutral-mark: var(--neutral-mark);
--color-skeleton: var(--skeleton);
--color-skeleton-highlight: var(--skeleton-highlight);
/* Inline, so a theme that overrides the semantic layer also recolours the ring. */
--shadow-focus-ring:
0 0 0 2px var(--surface), 0 0 0 4px var(--action-primary);
/* Focus on dark grounds (snackbar, connection bar, lightbox): the gap takes the ground's colour. */
--shadow-focus-ring-inverse:
0 0 0 2px var(--surface-inverse), 0 0 0 4px var(--inverse-info);
--shadow-focus-ring-lightbox:
0 0 0 2px var(--lightbox), 0 0 0 4px var(--inverse-info);
/* A focused text field: its border thickens and a soft halo of the same hue surrounds it. */
--shadow-focus-field:
0 0 0 1px var(--action-primary), 0 0 0 4px var(--action-primary-subtle);
--shadow-focus-field-error:
0 0 0 1px var(--danger), 0 0 0 4px var(--danger-subtle);
}