/* neoCatalyst Labs — Design System
   Shared stylesheet. Import on every page.
   ─────────────────────────────────────────── */

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

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

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --ink:           #0a0d12;
  --ink-2:         #3a4150;
  --ink-mute:      #5a6475;     /* WCAG AA compliant on --bg */
  --bg:            #f4f5f7;
  --bg-card:       #ffffff;
  --bg-soft:       oklch(0.97 0.005 250);
  --accent:        oklch(0.50 0.14 155);   /* green — matches #16a34a */
  --accent-hex:    #16a34a;
  --accent-light:  oklch(0.96 0.04 155);
  --accent-border: oklch(0.75 0.10 155);
  --neo-blue:      #3B82F6;
  --border:        #e2e5ea;
  --rule:          oklch(0.92 0.005 250);
  --radius:        10px;
  --maxw:          1080px;
  --header-h:      58px;
  --warn:          #d97706;
  --error:         #dc2626;
  --error-bg:      #fef2f2;
  --error-border:  #fecaca;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Geist', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--neo-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography helpers ─────────────────────────────────────────────────── */
.eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-2);
}
.section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-2);
}
.display {
  font-size: 48px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05;
}
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--maxw); height: 100%; margin: 0 auto;
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

/* ── Brand mark ─────────────────────────────────────────────────────────── */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%; background: #0a0d12; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 11px; letter-spacing: -0.02em;
}
.brand-title { font-size: 15px; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--ink-mute); }

/* Wordmark colours */
.brand-neo      { color: var(--neo-blue); font-weight: 600; }
.brand-catalyst { color: var(--accent-hex); font-weight: 700; }
.brand-labs     { color: var(--ink); font-weight: 500; }

/* ── Navigation ─────────────────────────────────────────────────────────── */
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: var(--radius); transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Geist', sans-serif; font-size: 14px; font-weight: 600;
  padding: 8px 18px; border-radius: var(--radius); border: none;
  cursor: pointer; text-decoration: none; transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 14px oklch(0.50 0.14 155 / 0.35); }

.btn-ghost {
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }

.btn-blue { background: var(--neo-blue); color: #fff; }
.btn-blue:hover { box-shadow: 0 4px 14px rgba(59,130,246,0.35); }

.btn-lg { font-size: 16px; padding: 12px 28px; border-radius: 11px; }
.btn-sm { font-size: 13px; padding: 6px 12px; border-radius: 7px; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
}
.card-hover {
  transition: box-shadow 0.2s, transform 0.2s;
}
.card-hover:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.09); transform: translateY(-2px);
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 7px; letter-spacing: 0.01em;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg-card); color: var(--ink);
  font-family: 'Geist', sans-serif; font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.50 0.14 155 / 0.12);
}
.form-input::placeholder { color: var(--ink-mute); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--ink-mute); margin-top: 5px; }

.form-error {
  background: var(--error-bg); border: 1px solid var(--error-border);
  color: var(--error); padding: 10px 14px; border-radius: 8px;
  font-size: 14px; display: none;
}
.form-error.visible { display: block; }

/* ── Status badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
}
.badge-green  { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.badge-blue   { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }
.badge-gray   { background: var(--bg); color: var(--ink-mute); border: 1px solid var(--border); }
.badge-amber  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-red    { background: var(--error-bg); color: var(--error); border: 1px solid var(--error-border); }

/* ── Step badges ────────────────────────────────────────────────────────── */
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
  background: var(--ink-2);
}

/* ── Divider ────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ── Toasts ─────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: 10px; font-size: 14px; font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
  animation: toastIn 0.2s ease; pointer-events: auto;
  max-width: 320px;
}
.toast.toast-success { background: var(--accent-hex); }
.toast.toast-error   { background: var(--error); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page wrapper ───────────────────────────────────────────────────────── */
.page-body {
  min-height: 100vh; display: flex; flex-direction: column;
}
.page-content {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 28px 80px;
  flex: 1;
}

/* ── Stat grid ──────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-mute); margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1; }
.stat-sub   { font-size: 12px; color: var(--ink-mute); margin-top: 4px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.app-footer {
  border-top: 1px solid var(--border); padding: 28px;
  background: var(--bg-card);
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.footer-brand { font-size: 14px; font-weight: 600; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-link { font-size: 13px; color: var(--ink-mute); }
.footer-link:hover { color: var(--ink); }
.footer-copy { font-size: 12px; color: var(--ink-mute); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .page-content { padding: 24px 16px 60px; }
  .display { font-size: 32px; }
  .nav-links .nav-link { display: none; }
  .nav-links .nav-link.mobile-show { display: flex; }
}
