/* BlackHole brand tokens -- the single source of truth for every surface.
 *
 * These values are the landing page's. The marketing site, the SOC console and its
 * sign-in screen, the forensic desktop app and the legal pages were each carrying
 * their own near-copy, which is why the backgrounds never quite matched: the hub sat
 * on #050f16 while everything else sat on #06121a, and the hairlines were #1a3440 in
 * one place and #1e3a46 in three others.
 *
 * Copied into each project rather than linked across origins, so no site can be taken
 * down by another being unreachable. tools/check-brand.py fails if the copies drift.
 *
 * Older names (--bg, --border, --ink, --dim, --surface) are kept as aliases at the
 * bottom so existing stylesheets keep working without being rewritten line by line.
 */

:root{
  /* ---- surfaces, darkest to lightest ---- */
  --void:#050f16;          /* the page behind everything */
  --deep:#06121a;
  --horizon:#0a1922;
  --panel:#0e1f2a;
  --line:#1a3440;          /* hairline */
  --line2:#24485a;         /* hairline, emphasised */

  /* ---- type ---- */
  --text:#e6f4f1;
  --text2:#cfe3df;
  --muted:#9dbab6;
  --faint:#76958f;

  /* ---- accent ---- */
  --cyan:#2de2b0;
  --blue:#38c9e0;
  --violet:#5b8cff;
  --accent:#2de2b0;
  --on-accent:#06121a;
  --solid-hover:#6fedc9;
  --hover-tint:rgba(45,226,176,.08);

  /* ---- status ---- */
  --crit:#ff6b7a;
  --high:#ffb873;
  --med:#f2cc5b;
  --low:#a9bee6;
  --ok:#2de2b0;
  --vt:#9db8ff;

  /* ---- glass and glow ---- */
  --glass:rgba(10,25,34,.6);
  --glass2:rgba(6,18,26,.5);
  --nav-bg:rgba(5,15,22,.74);
  --card-a:rgba(10,25,34,.8);
  --card-b:rgba(6,18,26,.6);
  --glow:rgba(45,226,176,.28);
  --glow2:rgba(91,140,255,.16);
  --disk:linear-gradient(90deg,var(--cyan),var(--blue),var(--violet));

  /* ---- cursor (marketing surfaces only) ---- */
  --cur:#2de2b0;
  --cur-ring:rgba(91,140,255,.85);

  /* ---- type faces and metrics ---- */
  --display:"Manrope",system-ui,sans-serif;
  --sans:"Manrope",system-ui,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,monospace;
  --radius:16px;           /* cards */
  --radius-sm:8px;         /* inputs, buttons, small chips */
  --radius-pill:100px;
  --wrap:1200px;
}

[data-theme="light"]{
  --void:#f2f7f6; --deep:#e8f1ef; --horizon:#ffffff; --panel:#eef5f3;
  --line:#d3e3e0; --line2:#b9d1cc;
  --text:#06121a; --text2:#1e3340; --muted:#3f5855; --faint:#566f6b;
  --cyan:#0a7a5e; --blue:#0f8fa6; --violet:#3b5fd6;
  --accent:#0a7a5e; --on-accent:#ffffff; --solid-hover:#0c8c6c;
  --hover-tint:rgba(10,122,94,.07);
  --crit:#c8324a; --high:#a35a00; --med:#8a6b00; --low:#3b5fd6; --ok:#0a7a5e; --vt:#3b5fd6;
  --glass:rgba(255,255,255,.72); --glass2:rgba(255,255,255,.6); --nav-bg:rgba(242,247,246,.82);
  --card-a:rgba(255,255,255,.86); --card-b:rgba(246,251,250,.78);
  --glow:rgba(10,122,94,.3); --glow2:rgba(59,95,214,.12);
  --cur:#0a7a5e; --cur-ring:rgba(59,95,214,.7); --cur-hot:#06121a;
}

/* ---- the one background, on every surface ----
 * The canvas is painted by brand-bg.js and sits behind everything. html carries the
 * base colour so the page is never white for the frame before the canvas paints, and
 * body is transparent so the canvas shows through.
 */
html{background:var(--void)}
body{background:transparent;color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased}
#fx{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;display:block}

/* ---- the brand lockup ----
 * The glyph is drawn inline rather than loaded as an image so its strokes follow the
 * theme: as an <img> it stayed fixed green on the light background.
 */
.bh-brand{display:flex;align-items:center;gap:12px;font-family:var(--display);font-weight:800;
  font-size:22px;letter-spacing:-0.03em;line-height:1;color:var(--text)}
.bh-brand .glyph{width:32px;height:32px;flex:none}
.glyph .r{fill:none;stroke:var(--accent)}
.glyph .c{fill:var(--accent)}
.bh-brand small{display:block;font-family:var(--mono);font-size:9px;letter-spacing:0.22em;
  color:var(--faint);margin-top:5px;font-weight:400;text-transform:uppercase}

/* ---- supporting tones and the names older stylesheets use ----
 * Most of these are aliases onto the tokens above, so they follow the theme for
 * free. The handful that are their own colour -- input fields, the tinted backing
 * behind a severity chip -- are real values, and so each needs a light counterpart
 * below. Miss one and it stays dark on the light theme while everything around it
 * changes, which is exactly how the sign-in fields ended up black on white.
 */
:root{
  --bg:var(--deep); --bg-elev:var(--horizon); --bg2:var(--horizon);
  --surface:var(--panel); --surface-2:var(--line2); --side:var(--horizon);
  --border:var(--line); --border-2:var(--line2);
  --ink:var(--text); --ink2:var(--text2); --dim:var(--muted); --dim2:var(--faint);
  --body:var(--text2); --text-2:var(--text2); --muted-2:var(--text2); --fg:var(--text);
  --accent-hover:var(--solid-hover); --accent-ink:var(--on-accent);
  --pulse:var(--violet); --purple:#a9c0ff;

  --field:#081720; --panel2:#081720;
  --accent-soft:#0d3530; --accent-border:#1d6657; --purple-soft:#17254a;
  --crit-bg:#3a1418; --high-bg:#3a2412; --med-bg:#332b10; --low-bg:#1b2333;
}

[data-theme="light"]{
  --purple:#3b5fd6;
  --field:#ffffff; --panel2:#ffffff;
  --accent-soft:#dff3ed; --accent-border:#9fd6c6; --purple-soft:#e6ecfb;
  --crit-bg:#fbe6e9; --high-bg:#fcebdc; --med-bg:#fbf1d0; --low-bg:#e6ecfb;
}
