/* ============================================================
   Cuck Code — centralized design tokens (the color key).
   Every color on the site lives here; nothing else may
   hardcode one. Values are taken from the product's own brand
   file (Cuck Code › brand/brand.config.ts) so the marketing
   site and the app share one identity.

   The scheme is TONAL and FLAT: near-white / near-black grey
   layers. Ink (near-black on light, near-white on dark) is the
   PRIMARY accent — buttons, wordmark. Red is only the THREAD:
   active nav, links' hover, the logo's iris, the "CODE" of the
   wordmark, focus-thread and destructive moments. Nothing else
   is red, and nothing glows. Corners are squared (4px); only
   pills are fully round.
   ============================================================ */

:root {
  /* ---- backgrounds (tonal layers) ---- */
  --bg-0: #0f0f0f;            /* page background             */
  --bg-1: #171717;            /* nav / sections              */
  --bg-2: #1e1e1e;            /* cards, raised surfaces      */
  --bg-3: #262626;            /* hover states, inputs        */

  /* ---- tonal lines (structure, not hairlines) ---- */
  --border-0: #242424;        /* subtle separators           */
  --border-1: #383838;        /* strong edges, hover         */

  /* ---- ink (three steps, near-white on dark) ---- */
  --text-1: #f5f5f5;          /* primary (fg)                */
  --text-2: #d4d4d4;          /* secondary (fgMuted)         */
  --text-3: #a3a3a3;          /* muted / captions (fgSubtle) */

  /* ---- the ink PRIMARY accent (buttons, wordmark) ---- */
  --accent: #f5f5f5;          /* primary ink                 */
  --accent-bright: #ffffff;   /* hover                       */
  --on-accent: #0f0f0f;       /* text on the ink button      */
  --accent-soft: #262626;     /* pressed / subtle surface    */
  --accent-border: #3a3a3a;   /* border on raised ink        */

  /* ---- the RED thread (sparing: nav-active, iris, the
        wordmark "CODE", release bars, danger) ---- */
  --thread: #f87171;          /* thread on dark              */
  --thread-bright: #ff8a8a;   /* hover                       */
  --on-thread: #0f0f0f;       /* text on a solid thread fill (dangerFg) */
  --thread-soft: #2e1416;     /* red-tinted surface          */
  --thread-border: rgba(248, 113, 113, 0.32); /* red-tinted border */

  /* ---- tones ---- */
  --success: #34d399;         /* "Added" / confirmed         */
  --danger: #f87171;          /* destructive (the thread)    */
  --focus: #60a5fa;           /* focus ring (blue)           */
  --selection: #1e3a5f;       /* text selection (blue tint, never the thread) */
  --link: #93c5fd;            /* links (link blue, never the thread) */
  --warning: #fbbf24;         /* heads-up / placeholder notice */
  --warning-soft: #2a2110;    /* warning-tinted surface      */
  --warning-border: rgba(251, 191, 36, 0.32); /* warning border */

  /* ---- glows & shadows (flat, contact — never red) ---- */
  --shadow-1: 0 1px 3px rgb(0 0 0 / 0.5);
  --shadow-2: 0 1px 3px rgb(0 0 0 / 0.5), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  /* a faint neutral ambient wash (never red) for the hero */
  --glow-accent: rgba(255, 255, 255, 0.03);

  /* ---- code blocks ---- */
  --code-bg: #0a0a0a;
  --code-text: #e5e5e5;
  --code-accent: #f0646a;     /* the terminal accent / thread in code */

  /* ---- terminal (always dark: the CLI reads the terminal's own
        background, not the app's theme; values from brand.config.ts
        terminal.dark) ---- */
  --term-bg: #0a0a0a;         /* terminal body background          */
  --term-bar: #141414;        /* title bar / status bar fill       */
  --term-border: #1e1e1e;     /* terminal outer border             */
  --term-dot: #2a2a2a;        /* inactive window dots              */
  --term-accent: #f0646a;     /* iris, prompt sign, caret          */
  --term-faint: #525252;      /* hint, status text, placeholder    */
  --term-ink: #e5e5e5;        /* primary text (name, reply, user)  */
  --term-muted: #a3a3a3;      /* secondary text (header facts)     */
  --term-panel: #1a1a1a;      /* prompt bar fill (tints.panel)     */

  /* ---- spacing scale ---- */
  --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;

  /* ---- type (Manrope + Red Hat Mono, as in the app) ---- */
  --font-sans: "Manrope Variable", "Manrope", "system-ui", -apple-system,
    "Segoe UI Variable Text", "Segoe UI", "Roboto", "Noto Sans", "Ubuntu",
    "Cantarell", "Arimo", "Liberation Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Red Hat Mono Variable", "Red Hat Mono", "ui-monospace",
    "SF Mono", "Cascadia Code", "Cascadia Mono", "Menlo", "Consolas",
    "DejaVu Sans Mono", "Liberation Mono", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.5rem;

  /* ---- radii (squared: 4px on every corner; only pills round) ---- */
  --radius-sm: 4px;
  --radius-md: 4px;
  --radius-lg: 4px;
  --radius-full: 9999px;

  /* ---- layout ---- */
  --max-width: 1080px;
  --nav-height: 64px;

  /* ---- motion (quick and exact, no overshoot) ---- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --speed: 180ms;
}

/* ============================================================
   Light theme — the same tonal key, light values
   ============================================================ */
[data-theme="light"] {
  --bg-0: #f3f4f6;
  --bg-1: #ffffff;
  --bg-2: #f9fafb;
  --bg-3: #e5e7eb;

  --border-0: #e5e7eb;
  --border-1: #d1d5db;

  --text-1: #111827;
  --text-2: #374151;
  --text-3: #575e6c;

  --accent: #111827;
  --accent-bright: #1f2937;
  --on-accent: #ffffff;
  --accent-soft: #e9ebef;
  --accent-border: #d1d5db;

  --thread: #ba1a20;
  --thread-bright: #c81e1e;
  --on-thread: #ffffff;
  --thread-soft: #fce8e8;
  --thread-border: rgba(186, 26, 32, 0.32);

  --success: #036c4f;
  --danger: #ba1a20;
  --focus: #2563eb;
  --selection: #dbe6fd;
  --link: #1d4ed8;
  --warning: #9a4805;
  --warning-soft: #fdf1e2;
  --warning-border: rgba(154, 72, 5, 0.32);

  --shadow-1: 0 1px 3px rgb(17 24 39 / 0.08);
  --shadow-2: 0 1px 3px rgb(17 24 39 / 0.1), 0 12px 32px -12px rgb(17 24 39 / 0.18);
  --glow-accent: rgba(17, 24, 39, 0.03);

  --code-bg: #f3f4f6;
  --code-text: #111827;
  --code-accent: #ba1a20;
}
