/* ============ Tokens ============ */
:root {
  --paper: #f3f4f8;        /* cool off-white */
  --paper-2: #e9ebf1;
  --white: #ffffff;
  --ink: #12131a;          /* cool near-black */
  --ink-2: #494e5c;        /* secondary text */
  --ink-3: #858b9a;        /* muted / labels */
  --line: #e3e5ec;         /* hairlines */
  --line-2: #d1d5e0;
  --accent: #4f46e5;       /* electric indigo, used sparingly */
  --accent-tint: #ecebfd;  /* soft indigo fill */
  --accent-line: #d9d6fa;  /* indigo hairline */
  --dark: #101119;         /* deep cool charcoal */
  --wrap: 1140px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* ============ Brand ============ */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 16px; height: 16px; border-radius: 3px;
  background: var(--ink); position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; left: 4px; top: 4px;
  width: 8px; height: 8px; border-radius: 1px; background: var(--paper);
}
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 16px 32px;
  display: flex; align-items: center; gap: 28px;
}
.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a { color: var(--ink-2); font-size: 14px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  font-size: 14px; font-weight: 500; color: var(--ink);
  padding-bottom: 2px; border-bottom: 1px solid var(--ink);
}
.nav-cta:hover { color: var(--ink-2); border-color: var(--ink-2); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 15px; padding: 12px 22px;
  border-radius: 6px; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #000; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ============ Section scaffolding ============ */
section { padding: 104px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent);
  margin: 0 0 18px; display: flex; align-items: center; gap: 10px;
}
.section-eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 42px); line-height: 1.14;
  letter-spacing: -0.015em; font-weight: 500; margin: 0 0 20px;
}
.section-lead { font-size: 17px; color: var(--ink-2); margin: 0; }

/* ============ Hero ============ */
.hero { padding: 128px 0 96px; border-bottom: 1px solid var(--line); }
.hero-eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 26px;
}
.hero-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 6.4vw, 74px); line-height: 1.05;
  letter-spacing: -0.02em; margin: 0 0 28px; max-width: 15ch;
}
.hero-sub {
  font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-2);
  max-width: 60ch; margin: 0 0 40px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ Sandbox frame ============ */
.sandbox-section { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.frame {
  margin-top: 8px;
  border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 48px -32px rgba(0,0,0,.28);
}
.frame-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: #f0eee9; border-bottom: 1px solid var(--line);
}
.tl { width: 11px; height: 11px; border-radius: 50%; background: #cfcac0; }
.frame-title {
  margin-left: 12px; font-size: 12.5px; color: var(--ink-3);
  font-weight: 500;
}
.frame-rec {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--ink-2);
}
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.frame-body {
  display: grid; grid-template-columns: 244px 1fr 232px;
  min-height: 340px;
}
.pane { padding: 16px 18px; background: var(--paper); }
.pane-left { border-right: 1px solid var(--line); }
.pane-right { border-left: 1px solid var(--line); }
.pane-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px;
}
.pane-left .pane-label:nth-of-type(2) { margin-top: 20px; }
.pane-right .pane-label:nth-of-type(2) { margin-top: 20px; }

.task { }
.task-cluster {
  display: inline-block; font-family: var(--mono); font-size: 10.5px;
  color: var(--accent); background: var(--accent-tint); border: 1px solid var(--accent-line);
  padding: 3px 8px; border-radius: 5px; margin-bottom: 12px;
}
.task-desc { font-size: 13px; color: var(--ink-2); margin: 0 0 16px; line-height: 1.55; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li {
  position: relative; padding: 6px 0 6px 26px;
  font-size: 12.5px; color: var(--ink-3);
}
.steps li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--line-2);
}
.steps li.done { color: var(--ink-2); }
.steps li.done::before { background: var(--ink); border-color: var(--ink); }
.steps li.done::after {
  content: ""; position: absolute; left: 4px; top: 12.5px;
  width: 4px; height: 2px; border-left: 1.5px solid var(--paper);
  border-bottom: 1.5px solid var(--paper); transform: rotate(-45deg);
}
.steps li.now { color: var(--ink); font-weight: 500; }
.steps li.now::before { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

.narration {
  margin: 0; font-family: var(--serif); font-style: italic;
  font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
  padding-left: 12px; border-left: 2px solid var(--line-2);
}

/* ---- CRM ---- */
.crm { background: var(--white); display: flex; flex-direction: column; }
.crm-top {
  display: flex; align-items: center; gap: 18px;
  padding: 9px 18px; border-bottom: 1px solid var(--line);
}
.crm-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.crm-logo { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg,#3b5bdb,#5c7cfa); }
.crm-tabs { display: flex; gap: 18px; font-size: 12.5px; color: var(--ink-3); }
.crm-tabs .active { color: var(--ink); position: relative; }
.crm-tabs .active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -13px;
  height: 2px; background: var(--ink);
}
.crm-search {
  margin-left: auto; font-size: 12px; color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 12px;
  min-width: 150px;
}
.crm-main { padding: 12px 18px; }
.crm-toolbar { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.crm-h { font-size: 14px; font-weight: 600; }
.crm-count { font-size: 12px; color: var(--ink-3); }

.crm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.crm-table th {
  text-align: left; font-weight: 500; color: var(--ink-3);
  padding: 6px 12px; border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .03em; text-transform: uppercase;
}
.crm-table td { padding: 7px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.crm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.crm-table tr:last-child td { border-bottom: none; }
.crm-table tbody tr.sel { background: #f7f9ff; }
.crm-table tbody tr.sel td:first-child { box-shadow: inset 2px 0 0 #3b5bdb; font-weight: 600; color: var(--ink); }
.crm-table .edit { color: var(--ink); font-weight: 600; }

.pill {
  display: inline-block; font-size: 10.5px; padding: 2px 9px;
  border-radius: 999px; border: 1px solid transparent;
}
.pill.ok { color: #2b7a4b; background: #e8f4ec; border-color: #cfe7d7; }
.pill.work { color: #3b5bdb; background: #eaeeff; border-color: #d3dbfb; }
.pill.flag { color: #a8632a; background: #f7ecdf; border-color: #ecd6bd; }

.crm-detail { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.detail-head {
  font-size: 12px; font-weight: 600; padding: 8px 14px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.detail-grid > div { padding: 9px 14px; border-right: 1px solid var(--line); }
.detail-grid > div:last-child { border-right: none; }
.detail-grid span { display: block; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 5px; }
.detail-grid b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.detail-grid .fixed b { color: #2b7a4b; }
.detail-grid .fixed i { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); text-decoration: line-through; margin-top: 2px; }

/* ---- Capture + eval ---- */
.capture { list-style: none; margin: 0 0 4px; padding: 0; }
.capture li { font-size: 11.5px; color: var(--ink-2); padding: 6px 0; line-height: 1.4; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 9px; font-weight: 500;
  padding: 2px 6px; border-radius: 4px; margin-right: 8px; letter-spacing: .04em;
}
.tag.dom { color: #3b5bdb; background: #eaeeff; }
.tag.key { color: #a8632a; background: #f7ecdf; }
.tag.scr { color: #2b7a4b; background: #e8f4ec; }
.tag.voi { color: var(--accent); background: var(--accent-tint); }

.eval { list-style: none; margin: 0 0 16px; padding: 0; }
.eval li {
  position: relative; padding: 8px 0 8px 24px;
  font-size: 12px; color: var(--ink-2); border-bottom: 1px solid var(--line);
}
.eval li:last-child { border-bottom: none; }
.eval li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid var(--line-2);
}
.eval li.pass::before { background: #2b7a4b; border-color: #2b7a4b; }
.eval li.pass::after {
  content: ""; position: absolute; left: 4px; top: 12.5px;
  width: 4px; height: 2px; border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff; transform: rotate(-45deg);
}
.eval li.run::before { border-color: var(--accent); border-style: dashed; }
.eval-flag {
  width: 100%; font-family: inherit; font-size: 11.5px; color: var(--ink-2);
  background: transparent; border: 1px dashed var(--line-2); border-radius: 6px;
  padding: 9px; cursor: pointer; transition: border-color .15s, color .15s;
}
.eval-flag:hover { border-color: var(--accent); color: var(--accent); }

.frame-status {
  display: flex; gap: 18px; align-items: center;
  padding: 9px 18px; background: var(--paper); border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-3); font-family: var(--mono);
}
.frame-status .right { margin-left: auto; }

/* ============ Product ============ */
.product { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flow li { padding-top: 22px; border-top: 2px solid var(--ink); }
.flow-n { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.flow h3 { font-size: 16px; margin: 12px 0 8px; letter-spacing: -0.01em; }
.flow p { font-size: 14px; color: var(--ink-2); margin: 0; }

.principle {
  margin-top: 56px; background: var(--dark); color: #eae7e0;
  border-radius: 12px; padding: 44px 48px;
}
.principle-label {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: #a5a0f5; margin: 0 0 16px;
}
.principle-body {
  font-family: var(--serif); font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.5; margin: 0; color: #d9d5cc; max-width: 46ch; font-weight: 400;
}
.principle-body b { color: #fff; font-weight: 500; }

/* ============ Approach ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--white); }
.moat { padding: 34px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.moat:nth-child(2n) { border-right: none; }
.moat:nth-child(n+3) { border-bottom: none; }
.moat h3 { font-family: var(--serif); font-weight: 500; font-size: 21px; margin: 0 0 10px; letter-spacing: -0.01em; }
.moat p { font-size: 15px; color: var(--ink-2); margin: 0; }

/* ============ CTA ============ */
.cta { text-align: center; }
.cta h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.015em;
  max-width: 20ch; margin: 0 auto 16px; line-height: 1.12;
}
.cta p { font-size: 18px; color: var(--ink-2); margin: 0 0 32px; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-tag { color: var(--ink-3); font-size: 14px; }
.footer-copy { margin-left: auto; color: var(--ink-3); font-size: 13px; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .flow { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .moat { border-right: none; }
  .moat:nth-child(3) { border-bottom: 1px solid var(--line); }
  .frame-body { grid-template-columns: 1fr; }
  .pane-left { border-right: none; border-bottom: 1px solid var(--line); }
  .pane-right { border-left: none; border-top: 1px solid var(--line); }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid > div:nth-child(2n) { border-right: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  section { padding: 72px 0; }
  .crm-search { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid > div { border-right: none; border-bottom: 1px solid var(--line); }
}
