/* ============================================================================
   Clarence Code — Marketing site
   Design language mirrors the desktop app: dark bg, mint accent, serif italic
   wordmark, SF Mono for monospace elements.
   ============================================================================ */

/* Fraunces (SIL OFL, see fonts/OFL-Fraunces.txt) — the same display serif
   the app ships, so wordmark and titles render identically to the product. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/Fraunces-Roman.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/Fraunces-Italic.woff2") format("woff2");
}

:root {
  --bg:          #06080c;
  --bg-card:     #0b0e15;
  --bg-chrome:   #0d1119;
  --mint:        #4fffb0;
  --yellow:      #e8ff3a;
  --blue:        #4daffe;
  --orange:      #ff7030;
  --text-hi:     #f0f4f8;
  --text-mid:    #6b7588;
  --text-low:    #4a5266;
  --text-ghost:  #2e3447;
  --border:      rgba(255, 255, 255, 0.05);
  --border-hover:rgba(255, 255, 255, 0.09);
  --nav-bg:      rgba(6, 8, 12, 0.85);

  --font-serif: "Quincy CF", "Fraunces", "New York", "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --font-mono:  "SF Mono", ui-monospace, Menlo, Monaco, "JetBrains Mono", monospace;
  --font-sans:  -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
}

/* ─── Light theme ────────────────────────────────────────────────────────────
   Toggled via [data-theme] on <html> (see the inline scripts in index.html).
   Mirrors the desktop app's light palette so the site and product match. */
:root[data-theme="light"] {
  --bg:          #ffffff;
  --bg-card:     #f5f6f8;
  --bg-chrome:   #eef0f3;
  --mint:        #0b7d73;
  --yellow:      #8a6300;
  --blue:        #1c64d1;
  --orange:      #c2410c;
  --text-hi:     #10151c;
  --text-mid:    #4b5563;
  --text-low:    #5f6979;
  --text-ghost:  #7d8697;
  --border:      rgba(0, 0, 0, 0.08);
  --border-hover:rgba(0, 0, 0, 0.14);
  --nav-bg:      rgba(255, 255, 255, 0.82);
}

/* The app "screenshots" (hero, multiplayer, knowledge-graph mockups) always
   render the product's dark UI regardless of the page theme — re-pinning the
   dark palette locally means every mockup child that reads these vars stays
   dark automatically, no per-element overrides needed. */
.mockup-window,
.mini-window,
.kg-graph-mock {
  --bg:          #06080c;
  --bg-card:     #0b0e15;
  --bg-chrome:   #0d1119;
  --mint:        #4fffb0;
  --yellow:      #e8ff3a;
  --blue:        #4daffe;
  --orange:      #ff7030;
  --text-hi:     #f0f4f8;
  --text-mid:    #6b7588;
  --text-low:    #4a5266;
  --text-ghost:  #2e3447;
  --border:      rgba(255, 255, 255, 0.05);
  --border-hover:rgba(255, 255, 255, 0.09);
  color: var(--text-hi);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-hi);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease-out, color 0.2s ease-out;
}

a { color: inherit; text-decoration: none; }

/* ─── Nav ────────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  transition: background 0.2s ease-out, border-color 0.2s ease-out;
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wordmark {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 30px;
  line-height: 1;
  color: var(--mint);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  color: var(--text-mid);
}

.nav-links a:hover { color: var(--text-hi); }

.nav-download {
  background: var(--mint);
  color: var(--bg) !important;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2px;
  transition: opacity 0.12s ease-out;
}
.nav-download:hover { opacity: 0.88; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border-hover);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition: color 0.12s ease-out, border-color 0.12s ease-out, background 0.12s ease-out;
}
.theme-toggle:hover { color: var(--text-hi); border-color: var(--text-mid); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline; }

/* Themes showcase (under the hero mockup) */

/* BETA badge */
.beta-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--blue) 32%, transparent);
  vertical-align: middle;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 88px 40px 56px;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-ghost);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: var(--text-hi);
  margin-bottom: 24px;
}

.hero-title em {
  font-style: italic;
  color: var(--mint);
}





.hero-sub {
  font-size: 18px;
  color: var(--text-mid);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn-download {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--mint);
  color: var(--bg);
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.2px;
  transition: opacity 0.12s ease-out, transform 0.1s ease-out;
}

.btn-download-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.btn-download:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-download svg.apple-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: color-mix(in srgb, var(--bg), transparent 42%);
  letter-spacing: 0.2px;
}

.btn-download-large {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-ghost {
  font-size: 14px;
  color: var(--text-mid);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-hover);
  transition: color 0.12s ease-out, border-color 0.12s ease-out;
}
.btn-ghost:hover {
  color: var(--text-hi);
  border-color: var(--text-mid);
}


/* ─── Mockup ─────────────────────────────────────────────────────────────── */

.mockup-section {
  padding: 0 40px 80px;
}

.mockup-window {
  max-width: 960px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-hover);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 40px 80px rgba(0,0,0,0.6),
    0 0 60px color-mix(in srgb, var(--mint) 4%, transparent);
}

.mockup-titlebar {
  background: #0a0c12;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.mockup-ws-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-low);
  margin-left: 8px;
}

.mockup-body {
  display: flex;
  height: 320px;
  background: var(--bg);
}

.mockup-sidebar {
  width: 188px;
  min-width: 188px;
  background: #08090e;
  border-right: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mock-brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--mint);
  padding: 12px 16px 0;
  line-height: 1;
}

.mock-tagline {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 2px;
  color: var(--text-ghost);
  padding: 2px 16px 8px;
}

.mock-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mock-tab {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-low);
  padding: 6px 0 5px;
  text-align: center;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.mock-tab.active {
  color: var(--text-hi);
  border-bottom-color: var(--mint);
}

.mock-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--bg);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0;
}

.mock-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-low);
}

.mock-count {
  color: var(--text-ghost);
  letter-spacing: 1px;
}

.mock-add {
  color: var(--text-low);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Workspace cards — exact match to .workspace-card */
.mock-ws-card {
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid transparent;
  position: relative;
}

.mock-ws-card.focused {
  background: #0d1119;
  border-left-color: var(--accent, var(--mint));
}

.mock-ws-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-ws-name-text {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent, var(--mint));
  letter-spacing: -0.1px;
}

.mock-ws-meta {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-low);
}

.mock-divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 4px 0 0;
  flex-shrink: 0;
}

/* Agent group — exact match */
.mock-agent-group { padding-bottom: 4px; }

.mock-group-name {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 3px;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--accent, var(--text-mid));
}

.mock-group-bar {
  display: inline-block;
  width: 3px;
  height: 10px;
  background: var(--accent, var(--mint));
  border-radius: 2px;
  flex-shrink: 0;
}

.mock-agent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 14px 2px 24px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-mid);
}

.mock-agent-kind { color: var(--text-mid); }

.mock-status {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.3px;
}
.mock-status.working { color: var(--mint); }
.mock-status.idle    { color: var(--text-ghost); }

/* PR rows — exact match */
.mock-pr-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 5px 14px;
}

.mock-pr-num {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-ghost);
  flex-shrink: 0;
  padding-top: 1px;
}

.mock-pr-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mock-pr-title {
  font-size: 9.5px;
  color: var(--text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-pr-repo {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--text-low);
}

.mockup-panes {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.mockup-pane {
  background: var(--bg);
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}

.mockup-pane.focused {
  border-color: var(--accent, var(--mint));
  box-shadow: inset 0 0 0 1px var(--accent, var(--mint));
}

.pane-term {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--text-mid);
}

.pane-term .prompt { color: var(--mint); }
.pane-term .mint   { color: var(--mint); }
.pane-term .yellow { color: var(--yellow); }
.pane-term .dim    { color: var(--text-ghost); }
.pane-term .cursor {
  color: var(--text-hi);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── Multiplayer section ────────────────────────────────────────────────── */

.multi-section {
  padding: 100px 40px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.multi-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 80px;
}

.multi-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-ghost);
  margin-bottom: 20px;
}

.multi-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: var(--text-hi);
  margin-bottom: 20px;
}

.multi-title em {
  font-style: italic;
  color: var(--mint);
}

.multi-sub {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.65;
}

/* ─── Each mode (Observe / Handoff / Co-pilot) ───────────────────────────── */

.multi-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.multi-mode-flip {
  direction: rtl;
}
.multi-mode-flip > * {
  direction: ltr;
}

.multi-mode-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
}

.multi-mode-copy h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.7px;
  color: var(--text-hi);
  margin-bottom: 16px;
}

.multi-mode-copy p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 24px;
}

.multi-mode-copy p em {
  font-style: italic;
  color: var(--text-hi);
}

.multi-mode-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.multi-mode-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mid);
  letter-spacing: 0.2px;
}

.bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Mini windows (mockups inside multi-mode) ───────────────────────────── */

.mini-window {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-hover);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 40px color-mix(in srgb, var(--mint) 3%, transparent);
  background: var(--bg);
}

.mini-window-wide { width: 100%; }

.mini-titlebar {
  background: #0a0c12;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid var(--border);
}

.mini-ws {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-low);
  margin-left: 8px;
}

/* ─── Observe mockup ─────────────────────────────────────────────────────── */

.observe-mock {
  padding: 0;
}

.observe-mock-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--mint) 4%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--mint) 10%, transparent);
}

.live-badge {
  background: color-mix(in srgb, var(--mint) 15%, transparent);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--mint) 25%, transparent);
}

.live-badge-sm {
  font-size: 8px;
  padding: 1px 4px;
}

.observe-mock-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mid);
}

.observe-mock-term {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.65;
  color: var(--text-mid);
  padding: 12px 14px;
}

.toast-mock {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-chrome);
  border: 1px solid var(--border-hover);
  border-top: 1px solid color-mix(in srgb, var(--mint) 20%, transparent);
  border-radius: 0 0 10px 10px;
  padding: 10px 14px;
  margin-top: -1px;
}

.toast-avatar-mock {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast-mock-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-hi);
  line-height: 1.3;
}

.toast-mock-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-ghost);
  margin-top: 2px;
}

.toast-mock-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.toast-accept {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--mint);
  color: #040608;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  cursor: default;
}

.toast-decline {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-low);
  padding: 4px 8px;
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  cursor: default;
}

/* ─── Handoff / Task mockup ──────────────────────────────────────────────── */

.task-mock {
  display: flex;
  flex-direction: column;
}

.task-mock-header {
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.task-mock-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-ghost);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

.task-mock-to {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-hi);
}

.task-mock-body {
  padding: 12px 16px;
}

.task-mock-textarea {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mid);
  line-height: 1.7;
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--yellow) 20%, transparent);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 6px;
}

.task-mock-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-ghost);
}

.task-mock-footer {
  padding: 10px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.task-mock-cancel {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-low);
  padding: 5px 10px;
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  cursor: default;
}

.task-mock-send {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--mint);
  color: #040608;
  padding: 5px 12px;
  border-radius: 4px;
  font-weight: 700;
  cursor: default;
}

/* ─── Co-pilot mockup ────────────────────────────────────────────────────── */

.copilot-mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.copilot-mock-tile {
  background: var(--bg);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}

.copilot-tile-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-low);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}

/* ─── Features ───────────────────────────────────────────────────────────── */

.features {
  padding: 80px 40px;
  max-width: 960px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.feature {
  background: var(--bg-card);
  padding: 32px 28px;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease-out;
}

.feature:hover {
  border-color: var(--border-hover);
}

.feature-icon {
  font-size: 22px;
  color: var(--mint);
  margin-bottom: 14px;
  line-height: 1;
}

.feature h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  color: var(--text-hi);
}

.feature p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.65;
}

/* ─── Open source ────────────────────────────────────────────────────────── */

.oss-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 40px;
  text-align: center;
}

.oss-inner {
  max-width: 560px;
  margin: 0 auto;
}

.oss-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-ghost);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.oss-section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.oss-section p {
  color: var(--text-mid);
  font-size: 15px;
  margin-bottom: 28px;
  line-height: 1.65;
}

/* ─── CTA ────────────────────────────────────────────────────────────────── */

.cta-section {
  padding: 100px 40px;
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.8px;
  margin-bottom: 36px;
}

/* ─── Knowledge graph section ────────────────────────────────────────────── */

.kg-section {
  border-top: 1px solid var(--border);
  padding: 100px 40px;
  background: linear-gradient(180deg, rgba(77,175,254,0.03) 0%, transparent 100%);
}

.kg-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.kg-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--blue);
  margin-bottom: 16px;
  opacity: 0.8;
}

.kg-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-hi);
  margin-bottom: 18px;
}

.kg-title em {
  font-style: italic;
  color: var(--blue);
}

.kg-body {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 28px;
}

.kg-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kg-bullets li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.55;
}

.kg-bullets strong { color: var(--text-hi); font-weight: 600; }

.kg-bullet-icon {
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── KG graph mockup ────────────────────────────────────────────────────── */

.kg-graph-mock {
  border: 1px solid rgba(77,175,254,0.2);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 0 40px rgba(77,175,254,0.05), 0 20px 60px rgba(0,0,0,0.4);
}

.kg-graph-header {
  background: rgba(77,175,254,0.06);
  border-bottom: 1px solid rgba(77,175,254,0.12);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kg-graph-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--blue);
  font-weight: 600;
}

.kg-graph-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-ghost);
}

.kg-graph-body {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kg-node {
  border-radius: 6px;
  border: 1px solid var(--border-hover);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kg-node-decision { border-color: rgba(79,255,176,0.2); background: rgba(79,255,176,0.03); }
.kg-node-attempt  { border-color: rgba(255,112,48,0.2); background: rgba(255,112,48,0.03); }
.kg-node-file     { border-color: rgba(77,175,254,0.2); background: rgba(77,175,254,0.03); }

.kg-node-kind {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-ghost);
}
.kg-node-decision .kg-node-kind { color: var(--mint); }
.kg-node-attempt  .kg-node-kind { color: var(--orange); }
.kg-node-file     .kg-node-kind { color: var(--blue); }

.kg-node-label {
  font-size: 12px;
  color: var(--text-hi);
  font-weight: 500;
}

.kg-node-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-ghost);
}

.kg-edge {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-ghost);
  padding: 2px 12px;
  letter-spacing: 0.5px;
}

.kg-conflict {
  margin-top: 4px;
  background: rgba(232,255,58,0.06);
  border: 1px solid rgba(232,255,58,0.2);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--yellow);
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.5;
}

.kg-conflict-icon { flex-shrink: 0; }

/* ─── Bottom CTA ─────────────────────────────────────────────────────────── */

.bottom-section {
  border-top: 1px solid var(--border);
  padding: 80px 40px;
  text-align: center;
}

.bottom-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.bottom-inner h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.7px;
}

.bottom-inner p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-wordmark {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--text-ghost);
  letter-spacing: -0.3px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex: 1;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-low);
  transition: color 0.12s ease-out;
}
.footer-links a:hover { color: var(--text-mid); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-ghost);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .kg-inner { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 700px) {
  .nav { padding: 0 20px; }
  .nav-links a:not(.nav-download) { display: none; }

  .hero { padding: 60px 20px 48px; }

  .mockup-section { padding: 0 20px 60px; }
  .mockup-sidebar { display: none; }
  .mockup-panes { grid-template-columns: 1fr; grid-template-rows: repeat(4, auto); }
  .mockup-body { height: auto; }

  .multi-hero { padding: 60px 20px 0; }
  .multi-mode { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .multi-mode-flip { direction: ltr; }

  .features { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; }

  .oss-section { padding: 60px 20px; }
  .cta-section { padding: 60px 20px; }

  .footer { padding: 24px 20px; flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 900px) and (min-width: 701px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .multi-mode { grid-template-columns: 1fr; gap: 36px; }
  .multi-mode-flip { direction: ltr; }
}

/* ─── Mockup: agent names (matches the product's random agent names) ─────── */

.mock-agent-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--mint);
}

/* ─── Docs page ──────────────────────────────────────────────────────────── */

.docs-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  max-width: 1060px;
  margin: 0 auto;
  padding: 120px 40px 80px;
}

.docs-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs-toc-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-ghost);
  margin-bottom: 12px;
}
.docs-toc a {
  font-size: 13.5px;
  color: var(--text-mid);
  text-decoration: none;
  padding: 5px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: color 0.12s ease-out, border-color 0.12s ease-out, background 0.12s ease-out;
}
.docs-toc a:hover {
  color: var(--text-hi);
  border-left-color: var(--mint);
  background: rgba(255, 255, 255, 0.02);
}

.docs-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 44px;
  letter-spacing: -1px;
  color: var(--text-hi);
  margin-bottom: 14px;
}
.docs-intro {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 48px;
}
.docs-intro strong { color: var(--mint); font-weight: 600; }

.docs-main section {
  margin-bottom: 56px;
  scroll-margin-top: 96px;
}
.docs-main h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.4px;
  color: var(--text-hi);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.docs-main h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mint);
  margin: 24px 0 10px;
}
.docs-main p, .docs-main li {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.75;
}
.docs-main p { margin-bottom: 12px; }
.docs-main strong { color: var(--text-hi); font-weight: 600; }
.docs-main em { color: var(--text-hi); }
.docs-main a { color: var(--mint); text-decoration: none; }
.docs-main a:hover { text-decoration: underline; }
.docs-main ul { padding-left: 20px; margin-bottom: 12px; }
.docs-main ul li { margin-bottom: 8px; }

.docs-steps {
  padding-left: 22px;
  margin-bottom: 12px;
  counter-reset: step;
}
.docs-steps li { margin-bottom: 10px; }

.docs-code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-hi);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--mint);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 14px 0 16px;
  overflow-x: auto;
  white-space: pre;
  user-select: all;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}
.docs-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-mid);
}
.docs-table td:first-child { width: 120px; }

.docs-kbd, .docs-kbd-inline {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-hi);
  background: var(--bg-chrome);
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}
.docs-kbd-inline { font-size: 12.5px; }

.docs-faq li { margin-bottom: 14px; }

@media (max-width: 820px) {
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 100px 24px 60px;
  }
  .docs-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .docs-toc-tag { display: none; }
  .docs-toc a { border-left: none; border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 12px; }
}

/* ─── Mockup: pane labels (mirror the product's pane topbar) ─────────────── */

.mock-pane-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--mint);
  letter-spacing: 0.2px;
}
.mock-pane-accent {
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: var(--mint);
  flex-shrink: 0;
}
.mock-pane-kind {
  font-weight: 400;
  color: var(--text-low);
  text-transform: lowercase;
}

/* ─── Statement ──────────────────────────────────────────────────────────── */

.statement-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 110px 40px;
  text-align: center;
}

.statement-inner {
  max-width: 640px;
  margin: 0 auto;
}


.statement-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.18;
  letter-spacing: -1px;
  color: var(--text-hi);
  margin-bottom: 22px;
}
.statement-title em {
  font-style: italic;
  color: var(--mint);
}

.statement-sub {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-mid);
  max-width: 520px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .statement-section { padding: 70px 24px; }
  .statement-title { font-size: 30px; }
}

/* ─── Hero: closing punch line ───────────────────────────────────────────── */

.hero-sub-punch {
  display: block;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--text-hi);
  letter-spacing: -0.2px;
}

/* ─── Graph: teams callout ───────────────────────────────────────────────── */

.kg-teams {
  margin-top: 26px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--mint);
  border-radius: 8px;
}
.kg-teams-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--mint);
  margin-bottom: 8px;
}
.kg-teams p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-mid);
}
.kg-teams strong { color: var(--text-hi); }

/* ─── Download gate modal ────────────────────────────────────────────────── */

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.gate-overlay[hidden] { display: none; }

.gate-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 28px 30px 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.gate-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--mint);
}
.gate-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--mint);
  margin-bottom: 10px;
}
.gate-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--text-hi);
  margin: 0 0 8px;
}
.gate-sub {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-mid);
  margin: 0 0 18px;
}
.gate-form {
  display: flex;
  gap: 8px;
}
.gate-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-hi);
  caret-color: var(--mint);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
}
.gate-input:focus {
  border-color: color-mix(in srgb, var(--mint) 55%, transparent);
}
.gate-input::placeholder { color: var(--text-mid); opacity: 0.6; }
.gate-submit {
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bg);
  background: var(--mint);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.gate-submit:hover { filter: brightness(1.08); }
.gate-error {
  min-height: 18px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--yellow);
}
.gate-close {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--text-mid);
  background: none;
  border: none;
  cursor: pointer;
}
.gate-close:hover { color: var(--text-hi); }

.gate-shake { animation: gate-shake 0.3s ease; }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}
