/* ─────────────────────────────────────────────
   Levers — editorial-operator system
   ───────────────────────────────────────────── */

:root {
  --bg: #f4f4f2;
  --bg-2: #ededea;
  --bg-3: #e3e3df;
  --ink: #0a0a0a;
  --ink-2: #1a1a1a;
  --muted: #6b6b68;
  --muted-2: #9a9a96;
  --line: #d8d8d3;
  --line-2: #c6c6c0;
  --accent: #3a5fc4;
  --accent-soft: #e5ebf8;

  --serif: "Instrument Serif", "Cambria", "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

/* ─── Motion primitives ─── */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
    transition:
      opacity .9s cubic-bezier(.2,.7,.2,1),
      transform .9s cubic-bezier(.2,.7,.2,1),
      filter .9s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.is-in {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
}

/* word/line stagger for headlines */
.hero-h1 .line {
  display: block;
  overflow: hidden;
}
.hero-h1 .line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(.2,.75,.2,1);
  transition-delay: var(--line-delay, 0ms);
  will-change: transform;
}
.is-loaded .hero-h1 .line > span { transform: translateY(0); }

/* italic word underline draw */
.hero-h1 em {
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 95%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 1.2s cubic-bezier(.2,.7,.2,1) 1.2s;
  padding-bottom: 2px;
}
.is-loaded .hero-h1 em { background-size: 100% 1px; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ─── Top chrome ─── */

.shell { max-width: 1320px; margin: 0 auto; padding: 0 48px; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0 0;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
}
.wordmark-mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--sans);
}
.top-meta {
  display: flex; gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
}
.top-meta span b { color: var(--ink); font-weight: 500; }
.top-meta .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: #2db35a; margin-right: 6px; vertical-align: 1px;
  box-shadow: 0 0 0 3px rgba(45,179,90,.15);
}

/* ─── Hero ─── */

.hero {
  padding: 88px 0 56px;
  position: relative;
}
.hero-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
  display: flex; align-items: center; gap: 10px;
}
.hero-tag::before {
  content: ""; width: 24px; height: 1px; background: var(--ink);
}

.hero-h1 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(46px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 18ch;
  color: var(--ink);
  text-wrap: balance;
}
.hero-h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.hero-sub {
  margin: 32px 0 0;
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-sub b { color: var(--ink); font-weight: 500; }

/* router-diagram */

.diagram {
  margin: 56px 0 0;
  position: relative;
  height: 96px;
}
.diagram svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible;
}
.diagram-path {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1;
  transition: stroke .4s ease, stroke-width .4s ease;
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  animation: drawPath 1.4s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: var(--draw-delay, 0ms);
}
@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}
.diagram-path.is-active {
  stroke: var(--accent);
  stroke-width: 1.5;
}
.diagram-node {
  fill: var(--bg);
  stroke: var(--line-2);
  stroke-width: 1;
  transition: stroke .3s, fill .3s, transform .3s;
  opacity: 0;
  animation: fadeNode .5s ease forwards;
  animation-delay: var(--node-delay, 1200ms);
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes fadeNode {
  to { opacity: 1; }
}
.diagram-node.is-active {
  stroke: var(--accent);
  fill: var(--accent);
  transform: scale(1.6);
}
.diagram-origin {
  fill: var(--ink);
  transform-origin: center;
  transform-box: fill-box;
  animation: originPulse 3.2s ease-in-out infinite;
}
@keyframes originPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: .7; }
}
.diagram-label {
  opacity: 0;
  animation: fadeNode .6s ease forwards;
  animation-delay: var(--node-delay, 1200ms);
}
.diagram-label {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.diagram-origin-label {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--ink);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ─── Grid section ─── */

.grid-section { padding: 24px 0 96px; }

.grid-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.grid-head h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0;
  color: var(--muted);
}
.grid-head .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .04em;
}
.grid-head .count b { color: var(--ink); font-weight: 500; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--line);
}

/* ─── Lever card base ─── */

.lever {
  position: relative;
  padding: 32px 28px 28px;
  min-height: 380px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transition: background .35s ease;
  cursor: pointer;
  overflow: hidden;
}
.lever::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.lever:hover { background: var(--bg-2); }
.lever:hover::before { transform: scaleX(1); }

.lever-name, .lever-job, .lever-body {
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.lever:hover .lever-name { transform: translateY(-2px); }
.lever:hover .lever-job  { transform: translateY(-1px); }

.lever-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted-2);
}
.lever-tag {
  position: absolute;
  top: 32px; right: 28px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  background: var(--bg);
  display: inline-flex; align-items: center; gap: 6px;
}
.lever-tag::before {
  content: ""; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
}
.lever-tag[data-tone="free"]::before { background: #2db35a; }
.lever-tag[data-tone="cheap"]::before { background: var(--accent); }
.lever-tag[data-tone="mid"]::before { background: #d68a2a; }
.lever-tag[data-tone="premium"]::before { background: #8a4dd6; }
.lever-tag[data-tone="soon"]::before { background: var(--muted-2); }
.lever-tag[data-tone="soon"] { color: var(--muted); }

.lever-name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
}
.lever-name em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.lever-job {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 32ch;
  text-wrap: pretty;
}

.lever-body {
  margin-top: auto;
  padding-top: 20px;
}

.lever-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color .25s ease;
  align-self: flex-start;
}
.lever-cta::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
  z-index: -1;
}
.lever:hover .lever-cta { color: var(--bg); }
.lever:hover .lever-cta::after { transform: translateY(0); }
.lever-cta-arrow { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.lever:hover .lever-cta-arrow { transform: translateX(5px); }

/* per-lever interior variations */

/* 01 Prompt Library — terminal feel */
.lever--prompts .prompt-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
  transform: translateX(0);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.lever--prompts .prompt-row:last-child { border-bottom: 0; }
.lever--prompts .prompt-row .pk { color: var(--muted); letter-spacing: .04em; }
.lever--prompts .prompt-row .pv { color: var(--ink); }
.lever--prompts .prompt-stack { margin-bottom: 18px; }
.lever--prompts:hover .prompt-row:nth-child(1) { transform: translateX(4px); transition-delay: 0ms; }
.lever--prompts:hover .prompt-row:nth-child(2) { transform: translateX(4px); transition-delay: 50ms; }
.lever--prompts:hover .prompt-row:nth-child(3) { transform: translateX(4px); transition-delay: 100ms; }
.lever--prompts:hover .prompt-row:nth-child(4) { transform: translateX(4px); transition-delay: 150ms; }
.lever--prompts .prompt-cursor {
  display: inline-block;
  width: 6px; height: 11px;
  background: var(--accent);
  vertical-align: -1px;
  animation: cursorBlink 1.1s steps(1) infinite;
}
@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* 02 Reel-Stack — talent index card style */
.lever--reel .reel-roster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  margin-bottom: 18px;
}
.lever--reel .reel-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.lever--reel .reel-row:nth-child(odd) { padding-right: 10px; border-right: 1px solid var(--line); }
.lever--reel .reel-row:nth-child(even) { padding-left: 10px; }
.lever--reel .reel-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--g1, #c4633a), var(--g2, #3a5fc4));
  font-family: var(--mono);
  font-size: 9px;
  color: #fff;
  display: grid; place-items: center;
  letter-spacing: .04em;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.lever--reel:hover .reel-row:nth-child(1) .reel-avatar { transform: rotate(-6deg) scale(1.08); transition-delay: 0ms; }
.lever--reel:hover .reel-row:nth-child(2) .reel-avatar { transform: rotate(5deg)  scale(1.08); transition-delay: 60ms; }
.lever--reel:hover .reel-row:nth-child(3) .reel-avatar { transform: rotate(-4deg) scale(1.08); transition-delay: 120ms; }
.lever--reel:hover .reel-row:nth-child(4) .reel-avatar { transform: rotate(6deg)  scale(1.08); transition-delay: 180ms; }
.lever--reel .reel-name { font-weight: 500; line-height: 1.1; }
.lever--reel .reel-role { font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* 03 Creative Engine — visual sample grid */
.lever--creative .creative-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}
.lever--creative .creative-tile {
  aspect-ratio: 1;
  background: var(--bg-2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.lever--creative .creative-tile::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg, transparent 0 4px, rgba(0,0,0,.05) 4px 5px);
  transition: transform .8s ease;
}
.lever--creative .creative-tile:nth-child(1) { background: linear-gradient(135deg, #d4d4cd, #a8a8a0); }
.lever--creative .creative-tile:nth-child(2) { background: linear-gradient(160deg, #c8c4b8, #8a8579); }
.lever--creative .creative-tile:nth-child(3) { background: linear-gradient(120deg, #b8b8b0, #6b6b65); }
.lever--creative .creative-tile:nth-child(4) { background: linear-gradient(135deg, #d6d2c8, #a09a8a); }
.lever--creative:hover .creative-tile:nth-child(1) { transform: translateY(-3px); transition-delay: 0ms; }
.lever--creative:hover .creative-tile:nth-child(2) { transform: translateY(-3px); transition-delay: 70ms; }
.lever--creative:hover .creative-tile:nth-child(3) { transform: translateY(-3px); transition-delay: 140ms; }
.lever--creative:hover .creative-tile:nth-child(4) { transform: translateY(-3px); transition-delay: 210ms; }
.lever--creative:hover .creative-tile::after { transform: translateX(8px); }
.lever--creative .creative-caption {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin: 10px 0 18px;
  letter-spacing: .02em;
  display: flex; justify-content: space-between;
}

/* 04 Product Catalog — schema table */
.lever--catalog .catalog-schema {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  margin-bottom: 18px;
  overflow: hidden;
}
.lever--catalog .catalog-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  align-items: center;
  transition: background .35s ease;
}
.lever--catalog .catalog-row:last-child { border-bottom: 0; }
.lever--catalog:hover .catalog-row:nth-child(2) { background: var(--accent-soft); transition-delay: 0ms; }
.lever--catalog:hover .catalog-row:nth-child(3) { background: var(--accent-soft); transition-delay: 80ms; }
.lever--catalog:hover .catalog-row:nth-child(4) { background: var(--accent-soft); transition-delay: 160ms; }
.lever--catalog:hover .catalog-row:nth-child(5) { background: var(--accent-soft); transition-delay: 240ms; }
.lever--catalog .catalog-row .ct-field { color: var(--muted); }
.lever--catalog .catalog-row .ct-type {
  color: var(--accent);
  font-size: 10px;
}
.lever--catalog .catalog-row .ct-val {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
}
.lever--catalog .catalog-head {
  background: var(--bg-2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}

/* 05 Airtable Build — node diagram */
.lever--airtable .nodes-diagram {
  margin-bottom: 18px;
  height: 110px;
  position: relative;
}
.lever--airtable .nodes-diagram svg { width: 100%; height: 100%; overflow: visible; }
.lever--airtable .nd-line {
  stroke: var(--line-2); stroke-width: 1; fill: none;
  stroke-dasharray: 4 4;
  animation: ndFlow 6s linear infinite;
}
@keyframes ndFlow {
  to { stroke-dashoffset: -32; }
}
.lever--airtable:hover .nd-line { stroke: var(--accent); }
.lever--airtable .nd-box {
  fill: var(--bg-2); stroke: var(--ink); stroke-width: 1;
  transition: fill .35s, stroke .35s;
}
.lever--airtable:hover .nd-box:not(.nd-box-accent) { fill: var(--bg); }
.lever--airtable .nd-box-accent {
  fill: var(--ink);
  transform-origin: center;
  transform-box: fill-box;
  animation: ndPulse 2.6s ease-in-out infinite;
}
@keyframes ndPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .75; }
}
.lever--airtable .nd-text {
  font-family: var(--mono); font-size: 9px; fill: var(--ink);
  letter-spacing: .04em; text-transform: uppercase;
}
.lever--airtable .nd-text-inverse { fill: var(--bg); }

/* 06 The Drop — newsletter editorial */
.lever--drop .drop-issue {
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
  line-height: 1.4;
  transition: padding-left .5s cubic-bezier(.2,.7,.2,1);
}
.lever--drop:hover .drop-issue { padding-left: 8px; }
.lever--drop:hover .drop-issue:nth-child(2) { transition-delay: 60ms; }
.lever--drop .drop-issue:last-of-type { border-bottom: 1px solid var(--line); }
.lever--drop .drop-issue .di-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex; gap: 12px;
  margin-bottom: 4px;
}
.lever--drop .drop-issue .di-title {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.lever--drop .drop-list { margin-bottom: 18px; }

/* ─── Framing section ─── */

.framing {
  padding: 80px 0 96px;
  border-top: 1px solid var(--line);
}
.framing-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}
.framing-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  position: sticky;
  top: 32px;
}
.framing-label-num {
  display: block; color: var(--ink); font-size: 32px;
  font-family: var(--serif); font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 8px;
}
.framing-body {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: pretty;
}
.framing-body p { margin: 0 0 28px; }
.framing-body p:last-child { margin-bottom: 0; }
.framing-body em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* ─── Email capture (6th lever feel) ─── */

.capture {
  padding: 60px 0 80px;
  border-top: 1px solid var(--line);
}
.capture-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
}
.capture-title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 14ch;
}
.capture-title em {
  font-family: var(--serif); font-style: italic; color: var(--accent);
}
.capture-sub {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 12px;
}
.capture-form {
  display: flex;
  border: 1px solid var(--ink);
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg);
}
.capture-form input {
  flex: 1;
  border: 0; background: transparent;
  font: inherit;
  font-size: 15px;
  padding: 14px 16px;
  color: var(--ink);
  outline: none;
}
.capture-form input::placeholder { color: var(--muted-2); }
.capture-form button {
  background: var(--ink);
  color: var(--bg);
  padding: 0 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .2s;
}
.capture-form button:hover { background: var(--accent); }
.capture-fine {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
  margin: 10px 0 0;
}

/* ─── Footer ─── */

footer.foot {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}
footer.foot .foot-links { display: flex; gap: 24px; }
footer.foot .foot-links a:hover { color: var(--ink); }

/* ─── Chatbot ─── */

.bot-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 14px 20px 14px 18px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 8px 28px rgba(0,0,0,.18), 0 1px 0 rgba(255,255,255,.06) inset;
  transition:
    transform .45s cubic-bezier(.2,.7,.2,1),
    background .25s,
    opacity .25s,
    box-shadow .35s;
  opacity: 0;
  transform: translateY(40px);
  animation: fabIn .9s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: 2.2s;
}
@keyframes fabIn {
  to { opacity: 1; transform: translateY(0); }
}
.bot-fab:hover {
  transform: translateY(-3px);
  background: var(--accent);
  box-shadow: 0 14px 38px rgba(0,0,0,.22), 0 1px 0 rgba(255,255,255,.06) inset;
}
.bot-fab.is-open { opacity: 0; pointer-events: none; transform: translateY(20px); }
.bot-fab-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(58,95,196,.6);
  animation: botpulse 2.4s ease-out infinite;
}
@keyframes botpulse {
  0% { box-shadow: 0 0 0 0 rgba(58,95,196,.7); }
  100% { box-shadow: 0 0 0 10px rgba(58,95,196,0); }
}

.bot-drawer {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 101;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 48px);
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(.96);
  opacity: 0; pointer-events: none;
  transform-origin: bottom right;
  transition:
    transform .45s cubic-bezier(.2,.75,.2,1),
    opacity .3s ease;
}
.bot-drawer.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.bot-msg, .bot-card-surface, .bot-typing {
  animation: msgIn .45s cubic-bezier(.2,.7,.2,1) backwards;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bot-chip {
  text-align: left;
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .25s, background .25s, transform .25s;
  animation: msgIn .35s cubic-bezier(.2,.7,.2,1) backwards;
}
.bot-suggest .bot-chip:nth-child(2) { animation-delay: 50ms; }
.bot-suggest .bot-chip:nth-child(3) { animation-delay: 100ms; }
.bot-suggest .bot-chip:nth-child(4) { animation-delay: 150ms; }
.bot-suggest .bot-chip:nth-child(5) { animation-delay: 200ms; }
.bot-chip:hover { border-color: var(--ink); background: var(--bg-2); transform: translateX(2px); }

.bot-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
}
.bot-head-l { display: flex; align-items: center; gap: 10px; }
.bot-head-icon {
  width: 22px; height: 22px; border-radius: 4px;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
}
.bot-head-title { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.bot-head-sub { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.bot-head-close {
  width: 28px; height: 28px; border-radius: 4px;
  display: grid; place-items: center;
  color: var(--muted);
  font-family: var(--mono); font-size: 14px;
}
.bot-head-close:hover { background: var(--bg-2); color: var(--ink); }

.bot-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin;
}

.bot-msg {
  max-width: 86%;
  font-size: 14px;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: 12px;
  text-wrap: pretty;
}
.bot-msg.from-bot {
  align-self: flex-start;
  background: var(--bg-2);
  border-top-left-radius: 4px;
}
.bot-msg.from-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}
.bot-typing {
  display: flex; gap: 4px;
  align-self: flex-start;
  background: var(--bg-2);
  border-radius: 12px;
  border-top-left-radius: 4px;
  padding: 12px 14px;
}
.bot-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted-2);
  animation: typing 1.2s infinite;
}
.bot-typing span:nth-child(2) { animation-delay: .15s; }
.bot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: .4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.bot-suggest {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg);
}
.bot-suggest-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.bot-card-surface {
  align-self: flex-start;
  width: 86%;
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.bot-card-surface-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.bot-card-surface-label::before {
  content: ""; width: 14px; height: 1px; background: var(--ink);
}
.bot-card-surface-title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.bot-card-surface-title em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.bot-card-surface-job {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.bot-card-surface-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg);
  padding: 10px 14px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  align-self: flex-start;
  transition: background .2s;
}
.bot-card-surface-cta:hover { background: var(--accent); }

.bot-input {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
}
.bot-input input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  padding: 8px 4px;
  color: var(--ink);
}
.bot-input input::placeholder { color: var(--muted-2); }
.bot-input button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 8px 12px;
  background: var(--bg-2);
  color: var(--muted);
  border-radius: 3px;
}
.bot-input button.is-ready { background: var(--ink); color: var(--bg); }

/* ─── responsive ─── */

@media (max-width: 980px) {
  .shell { padding: 0 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .framing-grid, .capture-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 48px; }
  .diagram { display: none; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .lever { min-height: 0; padding: 28px 22px; }
  .bot-drawer { width: calc(100vw - 32px); height: calc(100vh - 80px); }
  .top-meta { display: none; }
}
