:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --surface-3: #ebe8df;
  --ink: #1f1e1c;
  --ink-2: #3c3a35;
  --muted: #8a857b;
  --muted-2: #b5b0a4;
  --border: #e8e5dc;
  --border-strong: #d7d2c5;
  --accent: #d97757;
  --accent-hover: #c36446;
  --accent-tint: #f6ece5;
  --status-blue: #2f7ff1;
  --status-green: #3fa96a;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(31, 30, 28, 0.04);
  --shadow-md: 0 1px 2px rgba(31, 30, 28, 0.04), 0 8px 24px -12px rgba(31, 30, 28, 0.12);
  --shadow-lg: 0 1px 2px rgba(31, 30, 28, 0.04), 0 24px 48px -20px rgba(31, 30, 28, 0.18);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover {
  color: var(--accent);
}

/* ---------- Brand mark (wavy filmstrip) ---------- */
.brand-mark {
  display: inline-block;
  color: var(--accent);
  height: 16px;
  width: auto;
  flex-shrink: 0;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.nav-logo .brand-mark {
  height: 18px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 560px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 72px 0 96px;
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
  color: var(--ink);
  margin: 0;
}

h1 {
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0 0 24px;
}
h1 .accent-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h2 {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 56px 0 16px;
  color: var(--ink-2);
}
h2 .accent-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.subtitle {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 580px;
  margin: 0 0 40px;
  font-weight: 400;
}

.lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 620px;
  margin: 0 0 12px;
}

/* ---------- Chips / Pills ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1;
  white-space: nowrap;
  transition: border-color 120ms ease, background 120ms ease;
}
.chip:hover {
  border-color: var(--border-strong);
}
.chip svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
  flex-shrink: 0;
}
.chip .chip-sep {
  color: var(--muted-2);
  margin: 0 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1.2;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease,
    transform 120ms ease;
}
.btn:active {
  transform: translateY(0.5px);
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: #2e2c28;
  color: var(--bg);
}
.btn-primary:disabled {
  background: var(--surface-3);
  color: var(--muted);
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn svg {
  width: 16px;
  height: 16px;
}

/* ---------- Inline code & install blocks ---------- */
.code-inline {
  font-family: var(--font-mono);
  font-size: 0.92em;
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: 5px;
  color: var(--ink);
  border: 1px solid var(--border);
}

.install-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.install-row .prompt {
  color: var(--muted-2);
  user-select: none;
  font-weight: 500;
}
.install-row .cmd {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
}
.install-row .copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  flex-shrink: 0;
}
.install-row .copy-btn:hover {
  background: var(--surface-2);
  color: var(--ink-2);
  border-color: var(--border);
}
.install-row .copy-btn svg {
  width: 14px;
  height: 14px;
}
.install-row .copy-btn.copied {
  color: var(--status-green);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Status ---------- */
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 14px;
  min-height: 20px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-blue);
  flex-shrink: 0;
}
.status.error {
  color: #c0574a;
}
.status.error .status-dot {
  background: #c0574a;
}
.status.success {
  color: var(--status-green);
}
.status.success .status-dot {
  background: var(--status-green);
}

/* ---------- Session mock (hero showpiece) ---------- */
.session-mock {
  margin: 56px 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
}
.session-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  color: var(--ink-2);
}
.session-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.session-header .dot.red {
  background: #ed6a5e;
}
.session-header .dot.yellow {
  background: #f5bf4f;
}
.session-header .dot.green {
  background: #61c554;
}
.session-header .crumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  color: var(--ink-2);
}
.session-header .crumbs .sep {
  color: var(--muted-2);
}
.session-header .crumbs .current {
  color: var(--ink);
  font-weight: 500;
}
.session-header .brand-mark {
  height: 10px;
}
.footer .brand-mark {
  height: 14px;
}
.session-body {
  padding: 28px 32px 24px;
}
.session-row {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.session-row:last-child {
  margin-bottom: 0;
}
.session-avatar {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.session-avatar.agent {
  background: var(--accent-tint);
  color: var(--accent);
}
.session-avatar.agent .brand-mark {
  height: 11px;
}
.session-bubble {
  flex: 1;
  min-width: 0;
}
.session-bubble .author {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.session-bubble p {
  margin: 0 0 10px;
  color: var(--ink);
}
.session-bubble p:last-child {
  margin-bottom: 0;
}
.session-bubble ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--ink-2);
}
.session-bubble li {
  margin-bottom: 4px;
}
.session-user-msg {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--ink);
}
.session-tool-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.session-tool-call .check {
  color: var(--status-green);
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}
.feature {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.feature .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-tint);
  color: var(--accent);
  margin-bottom: 12px;
}
.feature .feature-icon svg {
  width: 18px;
  height: 18px;
}
.feature h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.feature p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ---------- Divider ---------- */
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 64px 0 0;
}

/* ---------- Footer ---------- */
.footer {
  padding: 28px 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer .footer-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer a {
  color: var(--muted);
}
.footer a:hover {
  color: var(--ink);
}

/* ---------- Activate page ---------- */
.activate-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.activate-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(31, 30, 28, 0.06);
}

.activate-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.signed-in-row {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.signed-in-row .label {
  color: var(--muted);
  font-size: 13px;
}
.signed-in-row .value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  h1 {
    font-size: 44px;
  }
  .subtitle {
    font-size: 17px;
  }
  .session-body {
    padding: 20px;
  }
  main {
    padding: 40px 0 64px;
  }
  .nav {
    padding: 16px 20px;
  }
}
