/* Berhub — Base design system (variables, buttons, nav, mocks, sections) */

:root {
  --brand-50: #eef2ff;
  --brand-100: #dbe3ff;
  --brand-200: #b8c7ff;
  --brand-400: #5a7bff;
  --brand-500: #2e54f5;
  --brand-600: #1b3ff6;
  --brand-700: #1432cc;
  --brand-900: #0a1d6b;

  --ink-900: #0b1020;
  --ink-800: #161b2e;
  --ink-700: #2a3047;
  --ink-500: #5b6178;
  --ink-400: #8b91a8;
  --ink-300: #b9bdcd;
  --ink-200: #dce0ec;
  --ink-100: #eef0f7;
  --ink-50: #f7f8fc;

  --paper: #ffffff;
  --paper-warm: #fbfaf7;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(11, 16, 32, 0.06), 0 1px 1px rgba(11, 16, 32, 0.04);
  --shadow: 0 4px 12px rgba(11, 16, 32, 0.06), 0 1px 2px rgba(11, 16, 32, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(11, 16, 32, 0.18), 0 8px 24px -8px rgba(11, 16, 32, 0.08);
  --shadow-xl: 0 40px 100px -30px rgba(11, 16, 32, 0.28), 0 12px 40px -12px rgba(11, 16, 32, 0.12);

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Manrope", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 980px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink-900); color: #fff; }
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-brand { background: var(--brand-600); color: #fff; }
.btn-brand:hover { background: var(--brand-700); transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(27,63,246,.45); }
.btn-ghost { background: transparent; color: var(--ink-900); border-color: var(--ink-200); }
.btn-ghost:hover { background: var(--ink-50); border-color: var(--ink-300); }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
}

.divider { height: 1px; background: var(--ink-100); border: 0; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.nav-links { display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
.nav-cta { display: flex; gap: 10px; }

/* Logo */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
}
.logo-mark { width: 32px; height: 32px; flex-shrink: 0; }
.logo-rule { width: 1px; height: 22px; background: rgba(11,16,32,0.18); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-weight: 800; font-size: 17px; letter-spacing: 0.02em; color: var(--ink-900); }
.logo-sub { font-weight: 600; font-size: 8.5px; letter-spacing: 0.18em; color: var(--ink-500); margin-top: 4px; }

/* Headings */
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(38px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3vw, 44px); line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0; line-height: 1.55; }

.lead { font-size: 18px; color: var(--ink-500); line-height: 1.55; }

/* Section spacing */
section { padding: 88px 0; }
.section-tight { padding: 56px 0; }

/* Feature card */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.feature {
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: #fff;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.feature:hover { border-color: var(--ink-200); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-500); font-size: 14px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price-card {
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  background: #fff;
  display: flex; flex-direction: column;
}
.price-card.featured {
  border-color: var(--ink-900);
  background: var(--ink-900);
  color: #fff;
  box-shadow: var(--shadow-xl);
}
.price-card h3 { font-size: 18px; }
.price-amount { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; margin: 16px 0 6px; }
.price-amount span { font-size: 16px; font-weight: 500; opacity: 0.7; }
.price-card .price-desc { font-size: 14px; opacity: 0.7; margin-top: 6px; color: var(--ink-500); }
.price-card.featured .price-desc { color: rgba(255,255,255,0.85); opacity: 0.85; }
.price-card .price-tax { font-size: 12px; opacity: 0.6; color: var(--ink-500); margin-top: -4px; }
.price-card.featured .price-tax { color: rgba(255,255,255,0.75); opacity: 0.7; }
.price-card .price-yearly { font-size: 13px; margin-top: 8px; color: var(--ink-700); }
.price-card.featured .price-yearly { color: rgba(255,255,255,0.85); }
.price-badge {
  display: inline-flex; align-self: flex-start;
  padding: 4px 10px; background: var(--brand-50); color: var(--brand-700);
  border-radius: 999px; font-size: 11px; font-weight: 600; margin-bottom: 12px;
}
.price-card.featured .price-badge { background: rgba(255,255,255,0.16); color: #fff; }
.price-list { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; font-size: 14px; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; }
.price-list .check { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--brand-600); }
.price-card.featured .check { color: #fff; }
.price-cta { justify-content: center; }
.price-card.featured .price-cta { background: #fff; color: var(--ink-900); }

/* FAQ */
.faq-item { border-top: 1px solid var(--ink-100); padding: 22px 0; }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-weight: 600; font-size: 17px; user-select: none;
  width: 100%; background: transparent; border: 0; padding: 0; text-align: left;
  color: inherit;
}
.faq-a {
  font-size: 15px; color: var(--ink-500);
  margin-top: 12px;
  max-width: 720px;
  display: none;
}
.faq-item.open .faq-a { display: block; }
.faq-toggle {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--ink-200);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
  flex-shrink: 0;
}
.faq-item.open .faq-toggle { transform: rotate(45deg); background: var(--ink-900); color: #fff; border-color: var(--ink-900); }

/* Footer */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--ink-100); font-size: 14px; color: var(--ink-500); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-900); margin-bottom: 14px; font-weight: 700; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 32px; margin-top: 40px; border-top: 1px solid var(--ink-100); font-size: 13px; }
.footer-tags { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

/* Showcase rows */
.showcase {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.showcase.reverse > :first-child { order: 2; }
.showcase h2 { margin-bottom: 16px; }
.showcase .lead { margin-bottom: 24px; }
.showcase ul { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.showcase li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.showcase .check { color: var(--brand-600); flex-shrink: 0; margin-top: 4px; }

/* ──────────── Mock UI primitives ──────────── */
.mock {
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 12px;
}
.mock-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-100);
  background: var(--ink-50);
}
.mock-dots { display: flex; gap: 5px; }
.mock-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-200); }
.mock-url {
  flex: 1; height: 22px; border-radius: 5px;
  background: #fff;
  border: 1px solid var(--ink-100);
  font-size: 11px; color: var(--ink-500);
  display: flex; align-items: center;
  padding: 0 8px;
  font-family: var(--font-mono);
}

.mock-app { display: grid; grid-template-columns: 200px 1fr; min-height: 380px; }
.mock-sidebar {
  background: #fafbfd;
  border-right: 1px solid var(--ink-100);
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.mock-side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 6px;
  font-size: 12px; color: var(--ink-500); font-weight: 500;
}
.mock-side-item.active { background: var(--brand-50); color: var(--brand-700); }
.mock-side-item .ico { width: 14px; height: 14px; border-radius: 3px; background: currentColor; opacity: 0.5; }
.mock-side-section {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-400); padding: 12px 10px 4px; font-weight: 600;
}

.mock-main { padding: 18px 22px; }
.mock-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mock-title { font-size: 15px; font-weight: 700; color: var(--ink-900); }
.mock-sub { font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.mock-actions { display: flex; gap: 6px; }
.mock-action {
  height: 26px; padding: 0 10px;
  border: 1px solid var(--ink-200);
  border-radius: 6px; font-size: 11px;
  display: flex; align-items: center; gap: 5px; color: var(--ink-500);
}
.mock-action.primary { background: var(--brand-600); color: #fff; font-weight: 600; border-color: transparent; }

.mock-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.mock-stat { border: 1px solid var(--ink-100); border-radius: 8px; padding: 10px 12px; }
.mock-stat-label { font-size: 10px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.mock-stat-value { font-size: 18px; font-weight: 700; color: var(--ink-900); margin-top: 4px; }
.mock-stat-delta { font-size: 10px; color: #1a9560; font-weight: 600; }
.mock-stat-delta.warn { color: #8a6300; }

.mock-table { border: 1px solid var(--ink-100); border-radius: 8px; overflow: hidden; }
.mock-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 0.8fr;
  padding: 10px 12px;
  font-size: 11px;
  border-bottom: 1px solid var(--ink-100);
  align-items: center;
}
.mock-row.head { background: #fafbfd; font-weight: 600; color: var(--ink-500); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.mock-row:last-child { border-bottom: 0; }
.mock-row .name { font-weight: 600; color: var(--ink-900); display: flex; align-items: center; gap: 8px; }
.mock-row .right { text-align: right; color: var(--ink-500); }
.mock-row .right.warn { color: #8a6300; font-weight: 600; }
.mock-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-700));
  color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.mock-avatar.av-purple { background: linear-gradient(135deg,#7c5cff,#3a2bcc); }
.mock-avatar.av-green  { background: linear-gradient(135deg,#21b97a,#0e7a3a); }
.mock-avatar.av-orange { background: linear-gradient(135deg,#ff7a3c,#cc3a14); }
.mock-pill {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600; align-items: center; gap: 5px;
}
.pill-ok { background: #e7f7ee; color: #0e7a3a; }
.pill-warn { background: #fff5d9; color: #8a6300; }
.pill-info { background: var(--brand-50); color: var(--brand-700); }
.pill-neutral { background: var(--ink-100); color: var(--ink-500); }

/* Form designer mock */
.mock-fd { display: grid; grid-template-columns: 180px 1fr 200px; min-height: 360px; }
.mock-fd-left { background: #fafbfd; border-right: 1px solid var(--ink-100); padding: 14px; }
.mock-field-chip {
  padding: 8px 10px; border: 1px solid var(--ink-100); border-radius: 6px;
  font-size: 11px; margin-bottom: 6px; background: #fff; color: var(--ink-700);
  display: flex; align-items: center; gap: 8px;
}
.mock-field-chip .pip { width: 4px; height: 4px; border-radius: 50%; background: var(--brand-500); }
.mock-fd-center { padding: 22px; background: #f7f8fc; }
.mock-fd-card {
  background: #fff; border: 1px solid var(--ink-100); border-radius: 8px;
  padding: 22px; box-shadow: var(--shadow-sm);
}
.mock-fd-card-title { font-size: 14px; font-weight: 700; color: var(--ink-900); margin-bottom: 4px; }
.mock-fd-card-sub { font-size: 11px; color: var(--ink-500); margin-bottom: 18px; }
.mock-fd-fields { display: flex; flex-direction: column; gap: 12px; }
.mock-fd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mock-fd-right { border-left: 1px solid var(--ink-100); padding: 14px; background: #fff; }
.mock-fd-callout {
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: 6px; padding: 10px; font-size: 11px;
}
.mock-fd-callout .head {
  font-weight: 600; color: var(--brand-700); margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}
.mock-fd-callout .desc { color: var(--brand-700); opacity: 0.8; }
.mock-validation { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.mock-validation .ok { display: flex; align-items: center; gap: 6px; color: #0e7a3a; }
.mock-validation .warn { display: flex; align-items: center; gap: 6px; color: #8a6300; }
.mock-validation .warn .dot { width: 8px; height: 8px; border-radius: 50%; background: #e0a000; }

.form-field-label {
  font-size: 10px; color: var(--ink-500); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 4px; display: flex; align-items: center; gap: 6px;
}
.form-field-auto {
  background: var(--brand-50); color: var(--brand-700);
  padding: 1px 6px; border-radius: 999px; font-size: 9px;
  text-transform: none; letter-spacing: 0;
}
.form-field-input {
  height: 30px; padding: 0 10px; background: #fafbfd;
  border: 1px solid var(--ink-100); border-radius: 5px;
  font-size: 12px; color: var(--ink-900);
  display: flex; align-items: center;
}
.form-field-input.highlighted { background: #fffbe5; border-color: #e0c060; }

/* Workflow mock */
.mock-wf { padding: 24px; background: #f7f8fc; min-height: 320px; }
.mock-wf-head { display: flex; justify-content: space-between; margin-bottom: 16px; }
.mock-wf-title { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.mock-wf-sub { font-size: 11px; color: var(--ink-500); }
.mock-wf-live { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--ink-500); }
.mock-wf-live .dot { width: 6px; height: 6px; border-radius: 50%; background: #21b97a; }

.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: center; padding: 18px 16px; }
.flow-node {
  border: 1px solid var(--ink-100); border-radius: 8px;
  padding: 10px; background: #fff; font-size: 11px; position: relative;
}
.flow-node .nlabel { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-400); font-weight: 600; }
.flow-node .nname { font-weight: 600; color: var(--ink-900); margin-top: 2px; font-size: 11px; }
.flow-node.brand { background: var(--brand-50); border-color: var(--brand-200); }
.flow-node.brand .nname { color: var(--brand-700); }
.flow-arrow { text-align: center; color: var(--ink-300); font-size: 18px; }

/* Responsive */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .showcase { grid-template-columns: 1fr; gap: 32px; }
  .showcase.reverse > :first-child { order: 0; }
}
