/* ============================================================
   MemAgent — shared design system
   Monochrome, light, technical. Space Grotesk + Manrope + JetBrains Mono.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* surfaces — warm near-white monochrome */
  --bg:        oklch(0.982 0.003 95);
  --surface:   oklch(0.998 0.001 95);
  --panel:     oklch(0.967 0.003 95);
  --panel-2:   oklch(0.951 0.004 95);
  --raised:    oklch(1 0 0);

  /* ink scale */
  --ink:       oklch(0.215 0.008 80);
  --ink-soft:  oklch(0.33 0.008 80);
  --muted:     oklch(0.505 0.008 80);
  --faint:     oklch(0.66 0.006 85);
  --ghost:     oklch(0.80 0.005 90);

  /* lines */
  --line:      oklch(0.905 0.003 90);
  --line-soft: oklch(0.935 0.003 90);
  --line-strong: oklch(0.86 0.004 88);

  /* graphite accent (the "silver/neutral" choice, used as ink-strong) */
  --accent:      oklch(0.255 0.008 80);
  --accent-ink:  oklch(0.985 0.002 95);

  /* single quiet functional signal — "live / active" */
  --live:      oklch(0.64 0.085 150);
  --live-soft: oklch(0.92 0.04 150);

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.05), 0 1px 1px oklch(0.2 0.01 80 / 0.04);
  --shadow:    0 2px 4px oklch(0.2 0.01 80 / 0.05), 0 8px 24px oklch(0.2 0.01 80 / 0.06);
  --shadow-lg: 0 4px 8px oklch(0.2 0.01 80 / 0.05), 0 24px 60px oklch(0.2 0.01 80 / 0.10);

  --sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { font-size: 15px; line-height: 1.5; }

::selection { background: oklch(0.255 0.008 80 / 0.12); }

/* ---------- shared primitives ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand .mark {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand .mark::before {
  content: "M";
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  color: var(--accent-ink);
  letter-spacing: -0.01em;
  animation: markGlide 1s linear infinite;
}
@keyframes markGlide {
  0%   { transform: translateX(-22px); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateX(22px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand .mark::before { animation: none; transform: none; opacity: 1; }
}
.brand .name { font-size: 17px; }
.brand .name b { font-weight: 600; }

.mono { font-family: var(--mono); }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.btn {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--raised);
  color: var(--ink);
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color .15s, background .15s, transform .05s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: oklch(0.32 0.008 80); border-color: oklch(0.32 0.008 80); }

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  position: relative;
  flex: none;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--live);
  opacity: .4;
}
