/*
    The Nexus design system, as tokens.

    Taken from the Capmap frontend, which is where this system is
    actually used: the values are its Tailwind palette at the steps its
    source reaches for, counted rather than chosen. Nothing here was
    retyped.
*/

:root {
  /* surfaces, darkest first */
  --bg-root: #020617;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;

  --border-subtle: #1e293b;
  --border-strong: #6b7a91;

  /* text */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --text-inverse: #0f172a;

  /* primary accent - indigo */
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-soft: #a5b4fc;
  --accent-faint: #c7d2fe;

  /* semantic */
  --ok: #10b981;
  --ok-soft: #6ee7b7;
  --warn: #f59e0b;
  --warn-soft: #fcd34d;
  --danger: #f43f5e;
  --danger-soft: #fda4af;
  --info: #06b6d4;

  /* type and shape */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-xs: 0.6875rem;
  --text-sm: 0.75rem;
  --text-md: 0.8125rem;
  --text-base: 0.875rem;
  --text-lg: 1rem;
  --text-xl: 1.25rem;
  --text-input-min: 16px;

  --leading-tight: 1.25;
  --leading-body: 1.55;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --space-unit: 4px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;

  --ground: radial-gradient(900px 520px at 12% -8%, rgb(99 102 241 / 0.07), transparent 62%),
            radial-gradient(760px 480px at 96% 108%, rgb(6 182 212 / 0.06), transparent 58%),
            var(--bg-root);

  --glass-bg: rgb(30 41 59 / 0.72);
  --glass-border: rgb(255 255 255 / 0.10);
  --glass-blur: blur(20px) saturate(140%);
  --glass-sheen: inset 0 1px 0 rgb(255 255 255 / 0.06);

  --focus-ring: 0 0 0 2px var(--bg-root), 0 0 0 4px var(--accent);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.40);
  --shadow-md: 0 4px 12px 0 rgb(0 0 0 / 0.45);
  --shadow-lg: 0 12px 32px 0 rgb(0 0 0 / 0.55);

  --logo-url: url("https://assets.my-nexus.work/nexus-logo.svg");
}

.nexus-loading {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 120px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
}

.nexus-loading::before {
  content: "";
  width: 44px;
  height: 44px;
  background: var(--logo-url) center / contain no-repeat;
  animation: nexus-pulse 1.4s ease-in-out infinite;
}

@keyframes nexus-pulse {
  0%, 100% { opacity: .35; transform: scale(.94); }
  50%      { opacity: 1;   transform: scale(1); }
}

.nexus-loading-inline {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  background: var(--logo-url) center / contain no-repeat;
  animation: nexus-pulse 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .nexus-loading::before,
  .nexus-loading-inline { animation: none; opacity: .7; }
}
