Files
GMW/services/frontend/src/app/globals.css
T

334 lines
8.3 KiB
CSS
Raw Normal View History

@import "tailwindcss";
@custom-variant dark (&:is(.dark *));
/*
* GMW — Ambient Ops Console design system.
*
* A signal-driven, immersive ops aesthetic. Hierarchy comes from scale/weight
* and tonal surface blocks, not borders. The whole app sits behind a live
* WebGL haze (see components/ambient) tinted by a semantic signal:
* lime = OK / live
* amber = warn
* vermilion = flag / danger
*/
@theme {
/* ── Surfaces (dark-first; light overrides below) ── */
--color-canvas: oklch(0.12 0.014 70);
--color-canvas-2: oklch(0.16 0.02 70);
--color-surface: oklch(0.2 0.022 70 / 0.55);
--color-surface-2: oklch(0.26 0.024 70 / 0.45);
/* ── Ink ── */
--color-ink: oklch(0.95 0.008 75);
--color-ink-soft: oklch(0.66 0.02 75);
--color-ink-faint: oklch(0.5 0.02 75);
/* ── Structural ── */
--color-hairline: oklch(1 0 0 / 0.1);
--hairline-w: 1px;
/* ── Semantic signals ── */
--color-signal: oklch(0.86 0.19 128);
--color-signal-ink: oklch(0.18 0.03 70);
--color-signal-glow: oklch(0.86 0.19 128 / 0.4);
--color-amber: oklch(0.85 0.15 72);
--color-vermilion: oklch(0.68 0.21 25);
--color-vermilion-glow: oklch(0.68 0.21 25 / 0.4);
--color-ring: var(--color-signal);
/* ── Fonts ── */
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
--font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
/* ── Radii ── */
--radius-r: 16px;
--radius-r-panel: 12px;
--radius-r-control: 9px;
--radius-r-pill: 9999px;
}
/* ── Light theme overrides ── */
.light {
color-scheme: light;
--color-canvas: oklch(0.96 0.012 80);
--color-canvas-2: oklch(0.92 0.014 80);
--color-surface: oklch(1 0 0 / 0.7);
--color-surface-2: oklch(1 0 0 / 0.5);
--color-ink: oklch(0.22 0.02 70);
--color-ink-soft: oklch(0.46 0.02 70);
--color-ink-faint: oklch(0.6 0.02 70);
--color-hairline: oklch(0.22 0.02 70 / 0.12);
}
/* Light-theme scrollbar + selection tuned for pale canvas */
.light ::-webkit-scrollbar-thumb {
background: oklch(0.22 0.02 70 / 0.2);
}
.light ::-webkit-scrollbar-thumb:hover {
background: oklch(0.22 0.02 70 / 0.34);
}
.light ::selection {
background: var(--color-signal-glow);
color: var(--color-ink);
}
/* Constellation stage: soften glow layers so stars stay legible on pale sky */
.light .glass-glow,
.light [class*="shadow-[0_0"] {
--tw-shadow-color: oklch(0.5 0.1 150 / 0.18);
}
@layer base {
* {
@apply border-transparent;
}
html {
@apply font-sans antialiased scroll-smooth;
}
body {
@apply bg-canvas text-ink font-sans antialiased;
min-height: 100dvh;
}
::selection {
background: var(--color-signal-glow);
color: inherit;
}
/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: oklch(1 0 0 / 0.14);
border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
background: oklch(1 0 0 / 0.26);
}
:focus-visible {
outline: 2px solid var(--color-signal);
outline-offset: 2px;
}
}
@layer components {
/* Glass panel — the workhorse container. Floating, blurred, faint glow. */
.glass {
background: var(--color-surface);
border: var(--hairline-w) solid var(--color-hairline);
border-radius: var(--radius-r);
backdrop-filter: blur(18px) saturate(140%);
-webkit-backdrop-filter: blur(18px) saturate(140%);
box-shadow:
0 1px 0 0 oklch(1 0 0 / 0.06) inset,
0 18px 50px -28px oklch(0 0 0 / 0.8);
}
.glass-2 {
background: var(--color-surface-2);
border: var(--hairline-w) solid var(--color-hairline);
border-radius: var(--radius-r-panel);
backdrop-filter: blur(14px) saturate(130%);
-webkit-backdrop-filter: blur(14px) saturate(130%);
}
/* Section label — small uppercase mono eyebrow */
.eyebrow {
font-family: var(--font-mono);
font-size: 0.68rem;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--color-ink-faint);
}
.pill {
display: inline-flex;
align-items: center;
gap: 0.4rem;
padding: 0.22rem 0.7rem;
border-radius: var(--radius-r-pill);
font-size: 0.72rem;
font-weight: 600;
letter-spacing: 0.01em;
background: oklch(1 0 0 / 0.06);
border: 1px solid var(--color-hairline);
color: var(--color-ink-soft);
}
.mono {
font-family: var(--font-mono);
font-variant-numeric: tabular-nums;
letter-spacing: -0.01em;
}
.display {
font-family: var(--font-display);
font-weight: 800;
letter-spacing: -0.03em;
line-height: 0.96;
}
}
@layer utilities {
.text-signal { color: var(--color-signal); }
.text-amber { color: var(--color-amber); }
.text-vermilion { color: var(--color-vermilion); }
.text-ink-soft { color: var(--color-ink-soft); }
.text-ink-faint { color: var(--color-ink-faint); }
/* Fluid hero title — never overflows on small screens. */
.hero-clamp { font-size: clamp(1.9rem, 1.2rem + 4vw, 2.6rem); }
.glow-signal {
text-shadow: 0 0 22px var(--color-signal-glow);
}
.glow-vermilion {
text-shadow: 0 0 22px var(--color-vermilion-glow);
}
/* animated scan line for live headers */
.scan-line {
position: relative;
overflow: hidden;
}
.scan-line::after {
content: "";
position: absolute;
left: 0;
top: 0;
height: 1px;
width: 100%;
background: linear-gradient(
90deg,
transparent,
var(--color-signal) 25%,
var(--color-signal) 75%,
transparent
);
background-size: 200% 100%;
animation: scan 2.8s linear infinite;
opacity: 0.7;
}
.ring-focus {
transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.ring-focus:hover {
box-shadow: 0 0 0 1px var(--color-signal-glow);
}
}
/* ── Keyframes ── */
@keyframes scan {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
@keyframes eq {
0%, 100% { transform: scaleY(0.25); }
30% { transform: scaleY(1); }
60% { transform: scaleY(0.5); }
}
@keyframes fade-up {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes spin-disc {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@keyframes pulse-ring {
0% { transform: scale(0.85); opacity: 1; }
100% { transform: scale(2.6); opacity: 0; }
}
@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
@keyframes breathe {
0%, 100% { opacity: 0.55; }
50% { opacity: 1; }
}
.animate-eq {
animation: eq 0.9s ease-in-out infinite;
transform-origin: bottom;
}
.animate-spin-disc { animation: spin-disc 9s linear infinite; }
.animate-spin-disc.paused { animation-play-state: paused; }
.animate-pulse-ring { animation: pulse-ring 1.6s ease-out infinite; }
.animate-shimmer {
background: linear-gradient(
90deg,
transparent,
oklch(0.86 0.19 128 / 0.1),
transparent
);
background-size: 200% 100%;
animation: shimmer 1.6s infinite;
}
.animate-breathe { animation: breathe 3.5s ease-in-out infinite; }
/* Page-enter: subtle rise+settle. Respect reduced-motion (handled globally). */
.animate-fade-up {
animation: fade-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* List stagger: each child rises in sequence. Pair with inline
style={{ animationDelay }} set via staggerDelay(). */
.animate-stagger {
animation: fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Toast: slide up + settle from the dock edge. */
.animate-toast-in {
animation: toast-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes toast-in {
from {
opacity: 0;
transform: translateY(14px) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@media (prefers-reduced-motion: reduce) {
.scan-line::after,
.scan-line,
.animate-eq,
.animate-spin-disc,
.animate-pulse-ring,
.animate-shimmer,
.animate-breathe,
.animate-fade-up,
.animate-stagger,
.animate-toast-in {
animation: none !important;
}
.scan-line {
background: none !important;
}
*,
*::before,
*::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
scroll-behavior: auto !important;
}
html { scroll-behavior: auto; }
}