400 lines
11 KiB
CSS
400 lines
11 KiB
CSS
@import "tailwindcss";
|
||
@import "tw-animate-css";
|
||
|
||
@variant dark (&:where(.dark, .dark *));
|
||
|
||
:root {
|
||
/* Base font size */
|
||
--font-size: 16px;
|
||
|
||
/* GLYPHDIFF Design System */
|
||
/* Primary Colors */
|
||
--swiss-beige: #f3f0e9;
|
||
--swiss-red: #ff3b30;
|
||
--swiss-black: #1a1a1a;
|
||
--swiss-white: #ffffff;
|
||
|
||
/* Neutral Grays */
|
||
--neutral-50: #fafafa;
|
||
--neutral-100: #f5f5f5;
|
||
--neutral-200: #e5e5e5;
|
||
--neutral-300: #d4d4d4;
|
||
--neutral-400: #a3a3a3;
|
||
--neutral-500: #737373;
|
||
--neutral-600: #525252;
|
||
--neutral-700: #404040;
|
||
--neutral-800: #262626;
|
||
--neutral-900: #171717;
|
||
|
||
/* Dark Mode Backgrounds */
|
||
--dark-bg: #121212;
|
||
--dark-card: #1e1e1e;
|
||
--dark-border: rgba(255, 255, 255, 0.1);
|
||
|
||
/* Light Mode Backgrounds */
|
||
--light-bg: #f3f0e9;
|
||
--light-card: #ffffff;
|
||
--light-border: rgba(0, 0, 0, 0.05);
|
||
|
||
/* Semantic Colors */
|
||
--color-brand: var(--swiss-red);
|
||
--color-surface: var(--swiss-beige);
|
||
--color-paper: var(--swiss-white);
|
||
|
||
/* Base Tailwind Colors (for compatibility) */
|
||
--background: #ffffff;
|
||
--foreground: oklch(0.145 0 0);
|
||
--card: #ffffff;
|
||
--card-foreground: oklch(0.145 0 0);
|
||
--popover: oklch(1 0 0);
|
||
--popover-foreground: oklch(0.145 0 0);
|
||
--primary: #030213;
|
||
--primary-foreground: oklch(1 0 0);
|
||
--secondary: oklch(0.95 0.0058 264.53);
|
||
--secondary-foreground: #030213;
|
||
--muted: #ececf0;
|
||
--muted-foreground: #717182;
|
||
--accent: #e9ebef;
|
||
--accent-foreground: #030213;
|
||
--destructive: #d4183d;
|
||
--destructive-foreground: #ffffff;
|
||
--border: rgba(0, 0, 0, 0.1);
|
||
--input: transparent;
|
||
--input-background: #f3f3f5;
|
||
--switch-background: #cbced4;
|
||
--font-weight-medium: 500;
|
||
--font-weight-normal: 400;
|
||
--ring: oklch(0.708 0 0);
|
||
--chart-1: oklch(0.646 0.222 41.116);
|
||
--chart-2: oklch(0.6 0.118 184.704);
|
||
--chart-3: oklch(0.398 0.07 227.392);
|
||
--chart-4: oklch(0.828 0.189 84.429);
|
||
--chart-5: oklch(0.769 0.188 70.08);
|
||
--radius: 0rem;
|
||
--sidebar: oklch(0.985 0 0);
|
||
--sidebar-foreground: oklch(0.145 0 0);
|
||
--sidebar-primary: #030213;
|
||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||
--sidebar-accent: oklch(0.97 0 0);
|
||
--sidebar-accent-foreground: oklch(0.205 0 0);
|
||
--sidebar-border: oklch(0.922 0 0);
|
||
--sidebar-ring: oklch(0.708 0 0);
|
||
|
||
/* Spacing Scale (rem-based) */
|
||
--space-xs: 0.25rem;
|
||
--space-sm: 0.5rem;
|
||
--space-md: 0.75rem;
|
||
--space-lg: 1rem;
|
||
--space-xl: 1.5rem;
|
||
--space-2xl: 2rem;
|
||
--space-3xl: 3rem;
|
||
--space-4xl: 4rem;
|
||
|
||
/* Typography Scale */
|
||
--text-xs: 0.75rem;
|
||
--text-sm: 0.875rem;
|
||
--text-base: 1rem;
|
||
--text-lg: 1.125rem;
|
||
--text-xl: 1.25rem;
|
||
--text-2xl: 1.5rem;
|
||
--text-3xl: 1.875rem;
|
||
--text-4xl: 2.25rem;
|
||
--text-5xl: 3rem;
|
||
--text-6xl: 3.75rem;
|
||
--text-7xl: 4.5rem;
|
||
--text-8xl: 6rem;
|
||
|
||
/* Comparison Font Sizes */
|
||
--comparison-font-mobile: 3rem;
|
||
--comparison-font-tablet: 4.5rem;
|
||
--comparison-font-desktop: 6rem;
|
||
}
|
||
|
||
.dark {
|
||
--color-surface: var(--dark-bg);
|
||
--color-paper: var(--dark-card);
|
||
|
||
--background: oklch(0.145 0 0);
|
||
--foreground: oklch(0.985 0 0);
|
||
--card: oklch(0.145 0 0);
|
||
--card-foreground: oklch(0.985 0 0);
|
||
--popover: oklch(0.145 0 0);
|
||
--popover-foreground: oklch(0.985 0 0);
|
||
--primary: oklch(0.985 0 0);
|
||
--primary-foreground: oklch(0.205 0 0);
|
||
--secondary: oklch(0.269 0 0);
|
||
--secondary-foreground: oklch(0.985 0 0);
|
||
--muted: oklch(0.269 0 0);
|
||
--muted-foreground: oklch(0.708 0 0);
|
||
--accent: oklch(0.269 0 0);
|
||
--accent-foreground: oklch(0.985 0 0);
|
||
--destructive: oklch(0.396 0.141 25.723);
|
||
--destructive-foreground: oklch(0.637 0.237 25.331);
|
||
--border: oklch(0.269 0 0);
|
||
--input: oklch(0.269 0 0);
|
||
--ring: oklch(0.439 0 0);
|
||
--font-weight-medium: 500;
|
||
--font-weight-normal: 400;
|
||
--chart-1: oklch(0.488 0.243 264.376);
|
||
--chart-2: oklch(0.696 0.17 162.48);
|
||
--chart-3: oklch(0.769 0.188 70.08);
|
||
--chart-4: oklch(0.627 0.265 303.9);
|
||
--chart-5: oklch(0.645 0.246 16.439);
|
||
--sidebar: oklch(0.205 0 0);
|
||
--sidebar-foreground: oklch(0.985 0 0);
|
||
--sidebar-primary: oklch(0.488 0.243 264.376);
|
||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||
--sidebar-accent: oklch(0.269 0 0);
|
||
--sidebar-accent-foreground: oklch(0.985 0 0);
|
||
--sidebar-border: oklch(0.269 0 0);
|
||
--sidebar-ring: oklch(0.439 0 0);
|
||
}
|
||
|
||
@theme {
|
||
--color-background: var(--background);
|
||
--color-foreground: var(--foreground);
|
||
--color-card: var(--card);
|
||
--color-card-foreground: var(--card-foreground);
|
||
--color-popover: var(--popover);
|
||
--color-popover-foreground: var(--popover-foreground);
|
||
--color-primary: var(--primary);
|
||
--color-primary-foreground: var(--primary-foreground);
|
||
--color-secondary: var(--secondary);
|
||
--color-secondary-foreground: var(--secondary-foreground);
|
||
--color-muted: var(--muted);
|
||
--color-muted-foreground: var(--muted-foreground);
|
||
--color-accent: var(--accent);
|
||
--color-accent-foreground: var(--accent-foreground);
|
||
--color-destructive: var(--destructive);
|
||
--color-destructive-foreground: var(--destructive-foreground);
|
||
--color-border: var(--border);
|
||
--color-input: var(--input);
|
||
--color-input-background: var(--input-background);
|
||
--color-switch-background: var(--switch-background);
|
||
--color-ring: var(--ring);
|
||
--color-chart-1: var(--chart-1);
|
||
--color-chart-2: var(--chart-2);
|
||
--color-chart-3: var(--chart-3);
|
||
--color-chart-4: var(--chart-4);
|
||
--color-chart-5: var(--chart-5);
|
||
--radius-sm: 0rem;
|
||
--radius-md: 0rem;
|
||
--radius-lg: 0rem;
|
||
--radius-xl: 0rem;
|
||
--color-sidebar: var(--sidebar);
|
||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||
--color-sidebar-primary: var(--sidebar-primary);
|
||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||
--color-sidebar-accent: var(--sidebar-accent);
|
||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||
--color-sidebar-border: var(--sidebar-border);
|
||
--color-sidebar-ring: var(--sidebar-ring);
|
||
|
||
--color-swiss-beige: var(--swiss-beige);
|
||
--color-swiss-red: var(--swiss-red);
|
||
--color-swiss-black: var(--swiss-black);
|
||
--color-swiss-white: var(--swiss-white);
|
||
--color-brand: var(--color-brand);
|
||
--color-surface: var(--color-surface);
|
||
--color-paper: var(--color-paper);
|
||
--color-dark-bg: var(--dark-bg);
|
||
--color-dark-card: var(--dark-card);
|
||
|
||
--font-logo: 'Syne', system-ui, -apple-system, 'Segoe UI', Inter, Roboto, Arial, sans-serif;
|
||
--font-mono: 'Space Mono', monospace;
|
||
--font-primary: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Inter, Roboto, Arial, sans-serif;
|
||
--font-secondary: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
|
||
|
||
/* Micro typography scale — extends Tailwind's text-xs (0.75rem) downward */
|
||
--text-5xs: 0.4375rem;
|
||
--text-4xs: 0.5rem;
|
||
--text-3xs: 0.5625rem;
|
||
--text-2xs: 0.625rem;
|
||
/* Monospace label tracking — used in Loader and Footnote */
|
||
--tracking-wider-mono: 0.2em;
|
||
}
|
||
|
||
@layer base {
|
||
* {
|
||
@apply border-border outline-ring/50;
|
||
}
|
||
|
||
body {
|
||
@apply bg-background text-foreground;
|
||
font-family: "Karla", system-ui, -apple-system, "Segoe UI", Inter, Roboto, Arial, sans-serif;
|
||
font-optical-sizing: auto;
|
||
}
|
||
|
||
html {
|
||
font-size: var(--font-size);
|
||
}
|
||
|
||
h1 {
|
||
font-size: var(--text-2xl);
|
||
font-weight: var(--font-weight-medium);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
h2 {
|
||
font-size: var(--text-xl);
|
||
font-weight: var(--font-weight-medium);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
h3 {
|
||
font-size: var(--text-lg);
|
||
font-weight: var(--font-weight-medium);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
h4 {
|
||
font-size: var(--text-base);
|
||
font-weight: var(--font-weight-medium);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
label {
|
||
font-size: var(--text-base);
|
||
font-weight: var(--font-weight-medium);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
button {
|
||
font-size: var(--text-base);
|
||
font-weight: var(--font-weight-medium);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
input {
|
||
font-size: var(--text-base);
|
||
font-weight: var(--font-weight-normal);
|
||
line-height: 1.5;
|
||
}
|
||
}
|
||
|
||
@layer utilities {
|
||
/* 21× border-black/5 dark:border-white/10 → single token */
|
||
.border-subtle {
|
||
@apply border-black/5 dark:border-white/10;
|
||
}
|
||
/* Secondary text pair */
|
||
.text-secondary {
|
||
@apply text-neutral-500 dark:text-neutral-400;
|
||
}
|
||
/* Standard focus ring */
|
||
.focus-ring {
|
||
@apply focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2;
|
||
}
|
||
}
|
||
|
||
/* Global utility - useful across your app */
|
||
@media (prefers-reduced-motion: reduce) {
|
||
* {
|
||
animation-duration: 0.01ms !important;
|
||
animation-iteration-count: 1 !important;
|
||
transition-duration: 0.01ms !important;
|
||
}
|
||
}
|
||
|
||
/* Performance optimization for collapsible elements */
|
||
[data-state="open"] {
|
||
will-change: height;
|
||
}
|
||
|
||
/* Smooth focus transitions - good globally */
|
||
.peer:focus-visible ~ * {
|
||
transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
|
||
@keyframes nudge {
|
||
0%, 100% {
|
||
transform: translateY(0) scale(1) rotate(0deg);
|
||
}
|
||
2% {
|
||
transform: translateY(-2px) scale(1.1) rotate(-1deg);
|
||
}
|
||
4% {
|
||
transform: translateY(0) scale(1) rotate(1deg);
|
||
}
|
||
6% {
|
||
transform: translateY(-2px) scale(1.1) rotate(0deg);
|
||
}
|
||
8% {
|
||
transform: translateY(0) scale(1) rotate(0deg);
|
||
}
|
||
}
|
||
|
||
.animate-nudge {
|
||
animation: nudge 10s ease-in-out infinite;
|
||
}
|
||
|
||
/* ============================================
|
||
SCROLLBAR STYLES
|
||
============================================ */
|
||
|
||
/* ---- Modern API: color + width (Chrome 121+, FF 64+) ---- */
|
||
@supports (scrollbar-width: auto) {
|
||
* {
|
||
scrollbar-width: thin;
|
||
scrollbar-color: hsl(0 0% 70% / 0.4) var(--color-surface);
|
||
}
|
||
|
||
.dark * {
|
||
scrollbar-color: hsl(0 0% 40% / 0.5) var(--color-surface);
|
||
}
|
||
}
|
||
|
||
/* ---- Webkit layer: runs ON TOP in Chrome, standalone in old Safari ---- */
|
||
/* Handles things scrollbar-width can't: hiding buttons, exact sizing */
|
||
@supports selector(::-webkit-scrollbar) {
|
||
::-webkit-scrollbar {
|
||
width: 6px;
|
||
height: 6px;
|
||
}
|
||
|
||
::-webkit-scrollbar-button {
|
||
display: none; /* kills arrows */
|
||
}
|
||
|
||
::-webkit-scrollbar-track {
|
||
background: var(--color-surface);
|
||
}
|
||
|
||
::-webkit-scrollbar-thumb {
|
||
background: hsl(0 0% 70% / 0.4);
|
||
border-radius: 3px;
|
||
}
|
||
|
||
::-webkit-scrollbar-thumb:hover {
|
||
background: hsl(0 0% 50% / 0.6);
|
||
}
|
||
|
||
::-webkit-scrollbar-thumb:active {
|
||
background: hsl(0 0% 40% / 0.8);
|
||
}
|
||
|
||
::-webkit-scrollbar-corner {
|
||
background: var(--color-surface);
|
||
}
|
||
|
||
.dark ::-webkit-scrollbar-thumb { background: hsl(0 0% 40% / 0.5); }
|
||
.dark ::-webkit-scrollbar-thumb:hover { background: hsl(0 0% 55% / 0.6); }
|
||
.dark ::-webkit-scrollbar-thumb:active { background: hsl(0 0% 65% / 0.7); }
|
||
}
|
||
|
||
html {
|
||
scroll-behavior: smooth;
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
html { scroll-behavior: auto; }
|
||
}
|
||
|
||
body {
|
||
overscroll-behavior-y: none;
|
||
}
|
||
|
||
.scroll-stable {
|
||
scrollbar-gutter: stable;
|
||
}
|