/* keep-memory showcase — design tokens (Untitled UI gray ramp + semantics) */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --gray-25: #fcfcfd;
  --gray-50: #f9fafb;
  --gray-100: #f2f4f7;
  --gray-200: #eaecf0;
  --gray-300: #d0d5dd;
  --gray-400: #98a2b3;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1d2939;
  --gray-900: #101828;
  --success-50: #ecfdf3;
  --success-700: #067647;
  --error-50: #fef3f2;
  --error-700: #b42318;
  --warning-500: #f79009;
  --info-500: #2e90fa;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: #fff;
  color: var(--gray-900);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

::selection { background: var(--gray-200); }

.wrap { max-width: 1152px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); }

.lede { color: var(--gray-600); font-size: 1.125rem; max-width: 54ch; }
.lede-center { margin-left: auto; margin-right: auto; }

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

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: #fff;
  background: color-mix(in srgb, #fff 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 0.9375rem; font-weight: 500; color: var(--gray-600); }
.nav-links a:hover { color: var(--gray-900); }

/* ── Buttons (Untitled UI style) ─────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.9375rem;
  padding: 10px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid transparent; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-xs);
}
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--gray-900); color: #fff; border-color: var(--gray-900); }
.btn-primary:hover { background: var(--gray-800); }
.btn-secondary { background: #fff; color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); color: var(--gray-800); }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; box-shadow: none; }

/* ── Hero ────────────────────────────────────────────── */
.hero { padding: 96px 0 104px; border-bottom: 1px solid var(--gray-200); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 0.8125rem; font-weight: 500; color: var(--gray-600);
  border: 1px solid var(--gray-200); border-radius: 999px; padding: 4px 12px;
  margin-bottom: 20px; background: var(--gray-50);
}
.hero-copy .lede { margin: 20px 0 32px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-ctas .btn-primary { font-family: var(--mono); font-weight: 500; font-size: 0.875rem; }

/* ── Conversation ────────────────────────────────────── */
.convo-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 16px; box-shadow: var(--shadow-md);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.convo { display: flex; flex-direction: column; gap: 12px; }

.msg { display: flex; gap: 10px; align-items: flex-end; }
.msg-human { flex-direction: row-reverse; }
.msg .bubble {
  max-width: 85%; padding: 10px 14px; border-radius: var(--radius-lg);
  font-size: 0.9375rem; line-height: 1.55; color: var(--gray-800);
}
.msg-agent .bubble {
  background: #fff; border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px; box-shadow: var(--shadow-xs);
}
.msg-human .bubble { background: var(--gray-100); border-bottom-right-radius: 4px; }

.avatar {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar svg { width: 14px; height: 14px; }
.avatar-agent { background: var(--gray-900); color: #fff; }
.avatar-human { background: var(--gray-200); color: var(--gray-500); }

/* citation chips & receipts inside agent bubbles */
.cite {
  display: flex; align-items: center; gap: 6px; margin-top: 10px;
  font-family: var(--mono); font-size: 0.75rem; color: var(--gray-700);
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 6px; padding: 6px 10px; width: fit-content;
}
.cite em { font-style: normal; color: var(--success-700); font-weight: 600; }
.cite-icon { width: 14px; height: 14px; color: var(--gray-400); flex: none; }
.cite-muted { color: var(--gray-500); }

.receipt {
  display: block; margin-top: 10px;
  font-family: var(--mono); font-size: 0.78rem; color: var(--gray-500);
}
.receipt.caret::after { content: "▋"; color: var(--gray-400); animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.badge {
  display: inline-flex; align-items: center; margin-top: 10px;
  font-size: 0.75rem; font-weight: 500; border-radius: 6px; padding: 3px 8px;
}
.badge-error { background: var(--error-50); color: var(--error-700); border: 1px solid #fecdca; }

/* ── Story beats ─────────────────────────────────────── */
.story-intro { padding: 72px 0 8px; text-align: center; }
.story-intro .lede { margin-top: 12px; }

.beat { padding: 72px 0; }
.beat-alt { background: var(--gray-50); }
.beat-head { max-width: 620px; margin-bottom: 36px; }
.beat-day {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-600);
  background: #fff; border: 1px solid var(--gray-200); border-radius: 999px;
  padding: 4px 12px; margin-bottom: 14px;
}
.beat-alt .beat-day { background: #fff; }
.beat-cap { color: var(--gray-600); margin-top: 8px; }

.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.pane {
  border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 22px; background: #fff; box-shadow: var(--shadow-xs);
}
.pane-without { background: var(--gray-50); }
.pane-without .msg-agent .bubble { background: #fff; }
.pane-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--gray-500); margin-bottom: 18px;
}
.pip { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pip-error { background: var(--error-700); }
.pip-success { background: var(--success-700); }

.pane-note { margin-top: 18px; font-size: 0.875rem; color: var(--gray-500); }
.note-error { color: var(--error-700); }
.note-success { color: var(--success-700); }

/* empty state (friday, without) */
.empty-box {
  border: 1.5px dashed var(--gray-300); border-radius: var(--radius-lg);
  padding: 48px 24px; text-align: center;
}
.empty-box p:first-child { font-weight: 600; color: var(--gray-600); }
.empty-dim { color: var(--gray-400); font-size: 0.9375rem; }

/* "this week your project learned" */
.learned { display: flex; flex-direction: column; }
.learned-title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 12px; }
.learned-row {
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px;
  padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius);
  margin-bottom: 8px; background: #fff; align-items: center;
}
.row-dot { width: 7px; height: 7px; border-radius: 50%; align-self: center; }
.dot-success { background: var(--success-700); }
.dot-info { background: var(--info-500); }
.dot-warn { background: var(--warning-500); }
.row-id { font-family: var(--mono); font-size: 0.78rem; color: var(--gray-800); font-weight: 500; }
.row-desc { grid-column: 2; font-size: 0.8125rem; color: var(--gray-500); }
.learned .receipt { margin-top: 6px; }

/* knowledge graph */
.graph-wrap { margin-top: 16px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 10px; }
.graph { width: 100%; height: auto; display: block; }
.graph line { stroke: var(--gray-300); }
.graph circle { fill: var(--gray-50); stroke: var(--gray-400); stroke-width: 1.5; }
.graph text { font-family: var(--mono); font-size: 9.5px; fill: var(--gray-500); text-anchor: middle; }
.is-js .graph [data-node], .is-js .graph [data-edge] {
  opacity: 0; transition: opacity .5s ease var(--d, 0s), transform .5s ease var(--d, 0s);
  transform-origin: center; transform-box: fill-box; transform: scale(0.4);
}
.is-js .in-view .graph [data-node] { opacity: 1; transform: scale(1); }
.is-js .in-view .graph [data-edge] { opacity: 1; transform: scale(1); }

/* ── Capabilities ────────────────────────────────────── */
.capabilities { padding: 88px 0; border-top: 1px solid var(--gray-200); }
.capabilities h2 { margin-bottom: 40px; max-width: 560px; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cap {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cap:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); }
.cap-icon { width: 24px; height: 24px; color: var(--gray-700); margin-bottom: 14px; }
.cap h4 { font-size: 1rem; margin-bottom: 6px; }
.cap p { font-size: 0.875rem; color: var(--gray-600); }

/* ── Closing CTA ─────────────────────────────────────── */
.cta { padding: 96px 0; text-align: center; background: var(--gray-50); border-top: 1px solid var(--gray-200); }
.cta-in { max-width: 620px; }
.cta .lede { margin-top: 10px; }
.quickstart {
  margin: 32px auto; text-align: left; max-width: 480px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); padding: 18px 20px;
  font-family: var(--mono); font-size: 0.875rem;
}
.qs-line { color: var(--gray-800); padding: 3px 0; }
.qs-prompt { color: var(--gray-400); }
.cta-buttons { justify-content: center; }

/* ── Footer ──────────────────────────────────────────── */
.footer { border-top: 1px solid var(--gray-200); padding: 28px 0; font-size: 0.875rem; color: var(--gray-500); }
.footer strong { color: var(--gray-700); font-weight: 600; }
.footer-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── Motion (JS-gated) ───────────────────────────────── */
.is-js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.is-js .reveal.in-view { opacity: 1; transform: none; }
.is-js [data-seq] .seq-item { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.is-js [data-seq] .seq-item.shown { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 880px) {
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .panes { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; font-size: 0.875rem; }
  .nav-links a:not(.btn) { display: none; }
  .msg .bubble { max-width: 100%; }
}

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .is-js .reveal, .is-js [data-seq] .seq-item { opacity: 1; transform: none; }
}
