/* Compact CRM — landing
   Mobile-first, system fonts, light + dark via prefers-color-scheme. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --text: #0f1115;
  --text-muted: #5b616e;
  --border: #e4e7ec;
  --border-strong: #d4d8df;
  --accent: #2f72ff;
  --accent-contrast: #ffffff;
  --accent-hover: #2862e0;
  --shadow: 0 1px 2px rgba(15, 17, 21, 0.04);
  --radius: 18px;
  --radius-lg: 20px;
  --container: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-alt: #14171d;
    --surface: #15181f;
    --text: #ecedef;
    --text-muted: #9aa1ad;
    --border: #232830;
    --border-strong: #2e3440;
    --accent: #4f8aff;
    --accent-contrast: #0f1115;
    --accent-hover: #6a9bff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 720px; }

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 16px;
  top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
}
.topnav {
  display: none;
  gap: 24px;
}
.topnav a {
  color: var(--text-muted);
  font-size: 15px;
}
.topnav a:hover { color: var(--text); text-decoration: none; }
@media (min-width: 720px) {
  .topnav { display: inline-flex; }
}

/* Hero */
.hero {
  padding: 64px 0 56px;
}
.hero-title {
  margin: 0 0 18px;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero-sub {
  margin: 0 0 32px;
  color: var(--text-muted);
  font-size: 19px;
  line-height: 1.45;
  max-width: 38ch;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
@media (min-width: 560px) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }
}
@media (min-width: 720px) {
  .hero { padding: 112px 0 96px; }
  .hero-title { font-size: 64px; }
  .hero-sub { font-size: 22px; max-width: 42ch; }
}
@media (min-width: 960px) {
  .hero-title { font-size: 72px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: var(--accent-contrast);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--text-muted);
  text-decoration: none;
}

/* Sections */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.section-alt {
  background: var(--bg-alt);
}
@media (min-width: 720px) {
  .section { padding: 96px 0; }
}
.section-head {
  margin-bottom: 36px;
  max-width: 60ch;
}
.section-head h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
@media (min-width: 720px) {
  .section-head h2 { font-size: 36px; }
}
.section-lede,
.lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.5;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .cards { gap: 20px; }
  .cards.two { grid-template-columns: repeat(2, 1fr); }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
@media (min-width: 720px) {
  .card { padding: 28px; border-radius: var(--radius-lg); }
}
.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.card p {
  margin: 0 0 8px;
  color: var(--text-muted);
}
.card p:last-child { margin-bottom: 0; }
.card-meta {
  margin-top: 14px !important;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.card-strong { padding: 28px; }
@media (min-width: 720px) {
  .card-strong { padding: 32px; }
}

/* Steps */
.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}
.steps li {
  display: flex;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.step-num {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}
.steps h4 {
  margin: 4px 0 6px;
  font-size: 16px;
  font-weight: 600;
}
.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* CTA row */
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
  align-items: flex-start;
}
@media (min-width: 560px) {
  .cta-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}
.footer .brand { color: var(--text); }
.footer .muted { color: var(--text-muted); }
.footer p { margin: 8px 0 0; font-size: 14px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
}
.footer-links a { color: var(--text); }

/* Smooth scroll for anchors */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Focus visibility */
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
