/* DealDesk Bot - Design System */
/* Based on Precision & Density principles */

:root {
  /* Colors - Slate + Teal palette */
  --foreground: #0f172a;     /* Slate 900 - headers, logo */
  --text: #334155;           /* Slate 700 - body text */
  --secondary: #64748b;      /* Slate 500 - muted text */
  --muted: #94a3b8;          /* Slate 400 - subtle elements */
  --faint: #e2e8f0;          /* Slate 200 - borders */
  --border: rgba(0, 0, 0, 0.08);
  --background: #ffffff;
  --background-subtle: #f8fafc; /* Slate 50 - cards, code */

  /* Accent - Teal for actions */
  --accent: #14b8a6;         /* Teal 500 - buttons, links */
  --accent-hover: #0d9488;   /* Teal 600 - hover states */

  /* Status colors */
  --success: #10b981;        /* Emerald 500 - approved */
  --warning: #f59e0b;        /* Amber 500 - escalate */
  --error: #ef4444;          /* Red 500 - rejected */

  /* Spacing - 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', Monaco, Consolas, 'Liberation Mono', monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;

  /* Radius */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Navigation */
nav {
  border-bottom: 1px solid var(--faint);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  background: var(--background);
  z-index: 100;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo-mark {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark svg {
  width: 14px;
  height: 14px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-6);
}

nav a {
  color: var(--secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.15s;
}

nav a:hover {
  color: var(--foreground);
}

/* Hero */
.hero {
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--faint);
}

.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
  max-width: 560px;
}

.hero p {
  font-size: var(--text-md);
  color: var(--secondary);
  max-width: 480px;
  margin-bottom: var(--space-6);
}

.hero .cta {
  display: inline-block;
}

.hero .cta img {
  display: block;
}

/* Typography */
h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--faint);
}

h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

p {
  color: var(--secondary);
  margin-bottom: var(--space-4);
}

/* Main content */
main {
  padding: var(--space-8) 0 var(--space-16);
}

/* Section */
section {
  margin-bottom: var(--space-12);
}

section:last-child {
  margin-bottom: 0;
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.feature {
  padding: var(--space-4);
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  background: var(--background);
}

.feature h3 {
  margin-bottom: var(--space-1);
}

.feature p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* Steps */
.steps {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  counter-reset: step;
}

.step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.step-number {
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: var(--background);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 600;
  flex-shrink: 0;
  counter-increment: step;
}

.step-number::before {
  content: counter(step);
}

.step-content h3 {
  margin-bottom: var(--space-1);
}

.step-content p {
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* Lists */
ul, ol {
  margin: var(--space-3) 0 var(--space-4);
  padding-left: var(--space-6);
  color: var(--secondary);
}

li {
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

li::marker {
  color: var(--muted);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
}

th, td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--faint);
}

th {
  font-weight: 500;
  color: var(--foreground);
  background: var(--background-subtle);
}

td {
  color: var(--secondary);
}

td strong {
  color: var(--foreground);
  font-weight: 500;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--background-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--foreground);
}

pre {
  background: var(--foreground);
  color: var(--faint);
  padding: var(--space-4);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: var(--space-4) 0;
  font-size: var(--text-xs);
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Footer */
footer {
  border-top: 1px solid var(--faint);
  padding: var(--space-6) 0;
  margin-top: var(--space-12);
}

footer p {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0;
}

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

footer a:hover {
  color: var(--foreground);
}

/* Utility */
.text-muted {
  color: var(--muted);
  font-size: var(--text-sm);
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Responsive */
@media (max-width: 640px) {
  .features {
    grid-template-columns: 1fr;
  }

  nav .container {
    flex-direction: column;
    gap: var(--space-3);
  }

  nav ul {
    gap: var(--space-4);
  }

  .hero h1 {
    font-size: var(--text-2xl);
  }

  .hero {
    padding: var(--space-8) 0;
  }
}
