/* Rane brand tokens. One source for colour, type, radius, spacing and
   motion. Dark is the default; light follows the system, and
   [data-theme="light"|"dark"] on <html> forces either. */

:root {
  /* Type: Inter (variable, self-hosted, latin) for everything; the
     system monospace for code, labels and numbers. No third family. */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "JetBrains Mono", Consolas, "Liberation Mono", monospace;

  --text-xs: 0.75rem;     /* 12 */
  --text-sm: 0.875rem;    /* 14 */
  --text-md: 1rem;        /* 16 */
  --text-lg: 1.125rem;    /* 18 */
  --text-xl: 1.375rem;    /* 22 */
  --text-2xl: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem);
  --text-hero: clamp(2.4rem, 1.3rem + 4.4vw, 4.75rem);
  --leading-tight: 1.02;
  --leading-snug: 1.2;
  --leading-body: 1.6;
  --tracking-tight: -0.04em;
  --tracking-snug: -0.025em;
  --tracking-caps: 0.06em;

  /* Space: a 4 px base. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radius: the mark's tile is 9/32 of its side. UI corners stay small
     and precise; only the mark is rounder. */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Motion: quick out. Everything honours reduced motion. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 220ms;
  --dur-slow: 480ms;

  /* Brand constants (theme independent). */
  --indigo-500: #4f46e5;  /* the dashboard's light accent */
  --indigo-300: #8b93ff;  /* the dashboard's dark accent */
  --rain-400: #5cc8ff;    /* second stop, inside the mark only */
  --rain-600: #0284c7;

  /* Dark (default). */
  color-scheme: dark;
  --bg: #09090b;
  --bg-elev: #0e0e11;
  --surface: #111114;
  --surface-2: #17171b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ededf0;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: var(--indigo-300);
  --accent-ink: #0b0b10;
  --accent-soft: rgba(139, 147, 255, 0.14);
  --ok: #4cc77a;
  --del: #ff7a85;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  /* The dashboard's job timeline, so the site shows the product as it is. */
  --tl-clone: #9d90ff;
  --tl-boot: #6b9bff;
  --tl-runner: #35c3cf;
  --tl-idle: #3a3a43;
  --tl-job: #3fb36b;
  --tl-teardown: #e0a43b;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #fbfbfa;
    --bg-elev: #f4f4f3;
    --surface: #ffffff;
    --surface-2: #f6f6f5;
    --border: rgba(16, 16, 24, 0.09);
    --border-strong: rgba(16, 16, 24, 0.16);
    --text: #0f0f12;
    --text-2: #4b4b55;
    --text-3: #6e6e78;
    --accent: var(--indigo-500);
    --accent-ink: #ffffff;
    --accent-soft: rgba(79, 70, 229, 0.08);
    --ok: #157f3c;
    --del: #c0262d;
    --shadow: 0 1px 2px rgba(16, 16, 24, 0.04), 0 30px 70px -36px rgba(30, 30, 60, 0.25);
    --tl-clone: #8b7cf6;
    --tl-boot: #5b8def;
    --tl-runner: #2bb3c0;
    --tl-idle: #c9c9d0;
    --tl-job: #2fa55a;
    --tl-teardown: #e0a43b;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfbfa;
  --bg-elev: #f4f4f3;
  --surface: #ffffff;
  --surface-2: #f6f6f5;
  --border: rgba(16, 16, 24, 0.09);
  --border-strong: rgba(16, 16, 24, 0.16);
  --text: #0f0f12;
  --text-2: #4b4b55;
  --text-3: #6e6e78;
  --accent: var(--indigo-500);
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --ok: #157f3c;
  --del: #c0262d;
  --shadow: 0 1px 2px rgba(16, 16, 24, 0.04), 0 30px 70px -36px rgba(30, 30, 60, 0.25);
  --tl-clone: #8b7cf6;
  --tl-boot: #5b8def;
  --tl-runner: #2bb3c0;
  --tl-idle: #c9c9d0;
  --tl-job: #2fa55a;
  --tl-teardown: #e0a43b;
}
