/* =========================================================================
   Vault — design tokens.
   Inherited from nanocore.co.za so the two products read as one family.
   Colour is used ONLY where it carries meaning (status, priority, alerts).
   ========================================================================= */

/* -------------------------------------------------------------------------
   Fonts are self-hosted (latin subset, woff2).  Vault is an internal tool —
   no third-party requests, nothing to break if a client network blocks
   Google Fonts, and no round-trip before the first paint.
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  /* surfaces --------------------------------------------------------------- */
  --bg:        #000000;
  --bg-1:      #060708;
  --bg-2:      #0b0d10;
  --panel:     #0d0f13;
  --panel-2:   #121419;
  --panel-3:   #171a20;
  --hover:     rgba(255, 255, 255, 0.045);
  --active:    rgba(255, 255, 255, 0.08);

  /* lines ------------------------------------------------------------------ */
  --line:      rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-hard: rgba(255, 255, 255, 0.22);

  /* text ------------------------------------------------------------------- */
  --fg:        #ffffff;
  --fg-dim:    rgba(255, 255, 255, 0.72);
  --muted:     rgba(255, 255, 255, 0.50);
  --faint:     rgba(255, 255, 255, 0.30);
  --ghost:     rgba(255, 255, 255, 0.16);

  /* meaning ---------------------------------------------------------------- */
  --ok:        #22c55e;
  --warn:      #f59e0b;
  --danger:    #ef4444;
  --info:      #3b82f6;
  --accent:    #a855f7;

  /* type ------------------------------------------------------------------- */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;

  /* metrics ---------------------------------------------------------------- */
  --radius:    14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --rail:      260px;
  --topbar:    60px;
  --row:       44px;
  --tap:       44px;

  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --fast:      0.16s var(--ease);
  --med:       0.28s var(--ease);

  --shadow:    0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.45);

  --z-panel:   60;
  --z-modal:   80;
  /* popovers sit above the item panel and modals — they are opened *from*
     them, so anything lower is invisible the moment it matters */
  --z-pop:     90;
  --z-toast:   100;
}

/* reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The canvas is plain black.
   The website's ambient grid + glow lived here originally, but Vault is a
   dense data tool you read for hours — texture behind text is noise, not brand. */

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: #fff; color: #000; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* shared primitives -------------------------------------------------------- */
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 22px;
  min-height: var(--tap);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  transition: border-color var(--med), box-shadow var(--med), transform var(--med), background var(--med), opacity var(--med);
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff, 0 0 26px rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--solid { background: #fff; color: #000; border-color: #fff; }
.btn--solid:hover:not(:disabled) { background: #ececec; box-shadow: 0 0 30px rgba(255, 255, 255, 0.3); }
.btn--sm { padding: 8px 16px; min-height: 36px; font-size: 11px; }
.btn--danger:hover:not(:disabled) {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger), 0 0 24px rgba(239, 68, 68, 0.22);
  color: var(--danger);
}

:where(button, a, input, textarea, select):focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
