/**
 * CanvasForge – Design System
 * Modern SaaS styling: Powerlibs, Stripe, Vercel, Linear inspired.
 */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-light: #f8fafc;

  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-light: #60a5fa;

  --text-primary: #0f172a;
  --text-dark: #e5e7eb;
  --text-muted: #64748b;

  --border: #e2e8f0;
  --border-dark: #334155;

  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.dark,
html.dark {
  --bg-primary: #0b1220;
  --bg-secondary: #111827;
  --bg-card: #0f172a;
  --bg-light: #1e293b;

  --text-primary: #f1f5f9;
  --text-dark: #e5e7eb;
  --text-muted: #94a3b8;

  --border: #334155;
  --border-dark: #1f2937;
}

.section {
  padding: 80px 0;
}
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}
.container-narrow {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.btn-hover {
  transition: transform 0.15s ease;
}
.btn-hover:hover {
  transform: scale(1.02);
}
.btn-hover:active {
  transform: scale(0.98);
}

/* ─── v2 Design System: Buttons (reusable) ─────────────────────────────────── */
.btn-primary, .btn-secondary, .btn-ghost, .btn-outline, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: var(--radius, 8px);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--brand, #2563eb);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-hover, #1d4ed8); }
.btn-primary:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35); outline: none; }
.btn-primary:disabled, .btn-primary.is-loading { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-secondary:focus { box-shadow: 0 0 0 2px var(--border); outline: none; }
.btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
}
.btn-ghost:hover { background: rgba(0,0,0,0.06); }
.dark .btn-ghost:hover { background: rgba(255,255,255,0.08); }

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline:hover { background: rgba(37, 99, 235, 0.1); }

.btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.btn-danger:hover { background: #dc2626; }
.btn-danger:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35); outline: none; }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-md { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* Cards */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-hover { transition: transform 0.2s, box-shadow 0.2s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-glow { box-shadow: 0 0 30px rgba(37, 99, 235, 0.15); }
.card-glow:hover { box-shadow: 0 0 40px rgba(37, 99, 235, 0.2); }

/* Form */
.ds-input, .ds-select, .ds-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ds-input:focus, .ds-select:focus, .ds-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.ds-textarea { min-height: 80px; resize: vertical; }
