/* knotpm design system — adapted for ClaudeFlows marketing site */

:root {
  /* Light tokens (default) */
  --bg: #ffffff;
  --surface: #e2e2e2;
  --surface-2: #e2e2e2;
  --border: #e2e2e2;
  --text: #000000;
  --text-muted: #494949;
  --text-subtle: #666666;
  --brand: #0c7864;
  --brand-strong: #004a3c;
  --link: #003fe2;
  --link-strong: #0a138a;
  --warn: #f86a1d;
  --danger: #db0000;
  --focus: #003fe2;

  --font-sans: "Lexend", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --measure: 72ch;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #242424;
    --surface: #353535;
    --surface-2: #494949;
    --border: #494949;
    --text: #e2e2e2;
    --text-muted: #666666;
    --text-subtle: #494949;
    --brand: #6dcfc0;
    --brand-strong: #1aab90;
    --link: #27a3ff;
    --link-strong: #003fe2;
    --focus: #27a3ff;
  }
}

:root[data-theme="dark"] {
  --bg: #242424;
  --surface: #353535;
  --surface-2: #494949;
  --border: #494949;
  --text: #e2e2e2;
  --text-muted: #666666;
  --text-subtle: #494949;
  --brand: #6dcfc0;
  --brand-strong: #1aab90;
  --link: #27a3ff;
  --link-strong: #003fe2;
  --focus: #27a3ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--link-strong); }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Layout */

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

main { flex: 1; }

/* Top nav */

.topnav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.topnav .brand-mark {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.topnav .brand-mark span { color: var(--brand); }
.topnav-right { display: flex; align-items: center; gap: 16px; }
.topnav-right a { color: var(--text-muted); text-decoration: none; font-size: 14px; }
.topnav-right a:hover { color: var(--text); }

/* Theme toggle */

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.01em;
  font-weight: 500;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-subtle); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Hero */

.hero {
  padding: 96px 0 64px;
  text-align: center;
}
.hero-logo {
  width: min(420px, 80%);
  height: auto;
  margin: 0 auto 16px;
  display: block;
}
.hero-wordmark {
  font-size: 32px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 24px;
}
.hero-wordmark span { color: var(--brand); }
@media (max-width: 720px) {
  .hero-wordmark { font-size: 24px; line-height: 28px; }
}
.hero h1 {
  font-size: 56px;
  line-height: 60px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.hero h1 span { color: var(--brand); }
.hero p.lede {
  font-size: 20px;
  line-height: 30px;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 auto 40px;
}

/* Install block */

.install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.install-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  user-select: all;
}
.copy-btn {
  background: var(--brand);
  color: var(--bg);
  border: none;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 120ms linear;
}
.copy-btn:hover { background: var(--brand-strong); }
.copy-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.install-note {
  font-size: 14px;
  color: var(--text-subtle);
  margin-top: 16px;
}

/* Sections */

section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
section.no-rule { border-top: none; }

section h2 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
section .section-lede {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 0 32px;
  max-width: 64ch;
}

/* Concept blocks (Elephant / Goldfish) */

.concepts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.concept {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.concept h3 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.concept h3 .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--brand);
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 8px;
}
.concept p { margin: 0; color: var(--text-muted); font-size: 15px; line-height: 24px; }

@media (max-width: 720px) {
  .concepts { grid-template-columns: 1fr; }
}

/* Pipeline diagram */

.diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  overflow-x: auto;
}
.diagram .mermaid {
  display: flex;
  justify-content: center;
}

/* Command grid */

.commands {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

.command {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
}
.command-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.command-head h3 {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
  color: var(--brand);
}
.command-head .tagline {
  font-size: 14px;
  color: var(--text-subtle);
}
.command p {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 16px;
  line-height: 26px;
  max-width: 64ch;
}
.command .mermaid {
  display: flex;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}

/* Usage */

.usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.usage-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.usage-item .when {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.usage-item code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
}
@media (max-width: 720px) {
  .usage-grid { grid-template-columns: 1fr; }
}

/* Code blocks (general) */

code, pre {
  font-family: var(--font-mono);
  font-size: 14px;
}
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 16px;
  overflow-x: auto;
  margin: 0;
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 14px;
  color: var(--text-subtle);
}
footer .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
footer a { color: var(--text-muted); text-decoration: none; }
footer a:hover { color: var(--text); text-decoration: underline; }

/* Mobile */

@media (max-width: 720px) {
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 40px; line-height: 44px; letter-spacing: -0.025em; }
  .hero p.lede { font-size: 17px; line-height: 26px; }
  section { padding: 48px 0; }
  section h2 { font-size: 24px; line-height: 30px; }
  .install-code { font-size: 12px; padding: 10px 12px; }
}
