/* Ginspire design system v2 — shared tokens + primitives.
   Indigo accent kept from v1 (#4f46e5); refined neutrals, type scale, depth and radii.
   Mirror of packages/core/src/tokens.ts. */

:root {
  /* Brand */
  --accent: #4f46e5;
  --accent-600: #4338ca;
  --accent-700: #3730a3;
  --accent-50: #eef2ff;
  --accent-100: #e0e7ff;
  --accent-200: #c7d2fe;
  --navy: #0e2a5c;

  /* Neutrals (cool slate) */
  --ink: #0b0d14;
  --text: #1f2330;
  --muted: #5f6b7e;
  --faint: #98a2b3;
  --line: #e7e9f0;
  --line-strong: #d6dae4;
  --bg: #f7f7fa;
  --surface: #ffffff;
  --surface-2: #fafbfc;

  /* Status */
  --success: #16a34a;
  --success-50: #ecfdf3;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --warn: #d97706;
  --warn-50: #fffbeb;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px; /* buttons, inputs */
  --r-lg: 14px; /* cards */
  --r-xl: 20px; /* feature panels */
  --r-pill: 999px;

  /* Spacing (4px grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-24: 96px;

  /* Depth */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.06), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 16px 32px -12px rgba(16, 24, 40, 0.14), 0 4px 8px -4px rgba(16, 24, 40, 0.06);
  --ring: 0 0 0 3px rgba(79, 70, 229, 0.22);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01", "ss03";
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img,
svg {
  display: block;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--accent-50);
  color: var(--accent-700);
  padding: 1px 6px;
  border-radius: var(--r-xs);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.wordmark-tile {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, #6366f1 0%, var(--accent) 45%, var(--accent-700) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 6px -1px rgba(79, 70, 229, 0.45);
}
.wordmark-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.035em;
}
.wordmark-dot {
  color: var(--accent);
}
.wordmark-lg .wordmark-tile {
  width: 38px;
  height: 38px;
  font-size: 21px;
  border-radius: 11px;
}
.wordmark-lg .wordmark-text {
  font-size: 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font: 600 13.5px/1 var(--font-sans);
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease),
    transform 0.15s var(--ease), color 0.15s var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn-lg {
  height: 46px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 12px;
}
.btn-block {
  width: 100%;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(55, 48, 163, 0.35), 0 4px 12px -4px rgba(79, 70, 229, 0.5);
}
.btn-primary:hover {
  background: var(--accent-600);
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  border-color: var(--faint);
  background: var(--surface-2);
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover {
  background: #252a36;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.05);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.icon-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad {
  padding: var(--s-6);
}

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