/* Flowless — Singulariti house tokens */
:root {
  --void: #0A0A0B;
  --night: #1E1B18;
  --stone: #8A847C;
  --bone: #D9D5CB;
  --wash: #F0EDE6;
  --flare: #F2C782;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Instrument Sans', -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.serif, .serif-it { font-family: var(--serif); font-weight: 400; }
.serif-it { font-style: italic; color: var(--flare); }

/* header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,11,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #262220;
}
.head-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark { text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.wm-serif { font-family: var(--serif); font-size: 24px; color: var(--wash); letter-spacing: .5px; }
.wm-sub { font-size: 11px; color: var(--stone); letter-spacing: 2px; text-transform: uppercase; }
.wm-ma { height: 15px; align-self: center; opacity: .92; }
.head-nav { display: flex; gap: 22px; }
.head-nav a { color: var(--stone); text-decoration: none; font-size: 14px; transition: color .15s; }
.head-nav a:hover { color: var(--wash); }

/* hero */
.hero { padding: 110px 0 80px; }
.eyebrow {
  font-size: 12px; letter-spacing: 3px; color: var(--flare);
  text-transform: uppercase; margin-bottom: 20px; font-weight: 600;
}
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(42px, 6.5vw, 76px);
  line-height: 1.05; color: var(--wash);
  margin-bottom: 28px;
}
.lede { max-width: 640px; font-size: 19px; color: var(--stone); margin-bottom: 36px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* buttons */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 3px;
  text-decoration: none; font-size: 15px; font-weight: 600;
  font-family: var(--sans); cursor: pointer; border: 1px solid transparent;
  transition: transform .12s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-flare { background: var(--flare); color: var(--void); }
.btn-ghost { background: transparent; color: var(--bone); border-color: #3a352f; }
.btn-ghost:hover { border-color: var(--flare); color: var(--wash); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* sections */
section { padding: 80px 0; }
section h2 { font-size: clamp(30px, 4vw, 44px); color: var(--wash); margin-bottom: 16px; }
.section-sub { max-width: 680px; color: var(--stone); margin-bottom: 44px; font-size: 16px; }

/* demo grid */
.demo-grid { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 18px; align-items: start; }
.panel {
  background: var(--night); border: 1px solid #2a2521;
  border-radius: 8px; padding: 20px;
}
.panel-title {
  font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--flare); margin-bottom: 8px; font-weight: 700;
}
.panel-note { font-size: 13px; color: var(--stone); margin-bottom: 14px; }
#flowText {
  width: 100%; min-height: 330px; resize: vertical;
  background: #14110f; color: var(--bone);
  border: 1px solid #332d27; border-radius: 6px;
  font-family: var(--sans); font-size: 13px; line-height: 1.55;
  padding: 14px; outline: none;
}
#flowText:focus { border-color: var(--flare); }
.flow-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.flow-status { font-size: 12px; color: var(--flare); min-height: 16px; }

/* chat */
.chat-panel { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px; border-bottom: 1px solid #2a2521; background: #171310;
}
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; flex: none; }
.chat-dot.busy { background: var(--flare); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.chat-name { font-size: 14px; font-weight: 600; color: var(--wash); }
.chat-status { margin-left: auto; font-size: 12px; color: var(--stone); }
.chat-new { margin-left: 10px; font-size: 11px; padding: 3px 11px; border-radius: 8px; border: 1px solid rgba(242,199,130,.4); background: transparent; color: #f2c782; cursor: pointer; letter-spacing: .02em; }
.chat-new:hover { background: rgba(242,199,130,.12); }
.chat-body {
  height: 420px; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  background: #12100e;
}
.msg { max-width: 82%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.msg.lead { align-self: flex-end; background: #2c2620; color: var(--wash); border-bottom-right-radius: 4px; }
.msg.agent { align-self: flex-start; background: #1e1a16; border: 1px solid #332d27; color: var(--bone); border-bottom-left-radius: 4px; }
.msg.sys { align-self: center; font-size: 12px; color: var(--stone); background: none; padding: 4px; font-style: italic; }
.msg .t { display: block; font-size: 10px; color: var(--stone); margin-top: 6px; }
.typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--stone); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.chat-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px 0; background: #12100e; }
.chip {
  background: #211c18; border: 1px solid #332d27; color: var(--bone);
  font-size: 12px; padding: 7px 12px; border-radius: 20px; cursor: pointer;
  font-family: var(--sans);
}
.chip:hover { border-color: var(--flare); color: var(--wash); }
.chat-form { display: flex; gap: 10px; padding: 14px 18px; background: #12100e; border-top: 1px solid #2a2521; }
#chatInput {
  flex: 1; background: #1a1613; border: 1px solid #332d27; border-radius: 6px;
  color: var(--wash); font-size: 14px; padding: 11px 14px; outline: none;
  font-family: var(--sans);
}
#chatInput:focus { border-color: var(--flare); }
.send {
  background: var(--flare); color: var(--void); border: none; border-radius: 6px;
  width: 44px; font-size: 18px; font-weight: 700; cursor: pointer;
}

/* ops panel */
.ops-block { margin-bottom: 20px; }
.ops-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--stone); margin-bottom: 8px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px; background: rgba(242,199,130,.12); color: var(--flare);
  border: 1px solid rgba(242,199,130,.35); padding: 4px 10px; border-radius: 14px;
}
.tag-empty { font-size: 12px; color: var(--stone); font-style: italic; }
.lead-card { background: #14110f; border: 1px solid #332d27; border-radius: 6px; padding: 12px 14px; }
.lead-line { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; gap: 10px; }
.lead-line .k { color: var(--stone); }
.lead-line .v { color: var(--wash); font-weight: 600; text-align: right; word-break: break-word; }
.handoff-note { font-size: 12px; color: var(--flare); }
.transcript {
  background: #14110f; border: 1px solid #332d27; border-radius: 6px;
  padding: 12px 14px; max-height: 220px; overflow-y: auto; font-size: 12px;
}
.transcript p { padding: 3px 0; border-bottom: 1px dashed #262220; }
.transcript p:last-child { border-bottom: none; }
.transcript .who { color: var(--flare); font-weight: 600; }
.transcript .when { color: var(--stone); font-size: 10px; }

/* saved leads (cloud persistence) */
.sl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sl-head .ops-label { margin-bottom: 0; }
.sl-export {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  background: transparent; color: var(--flare);
  border: 1px solid #3a352f; border-radius: 3px;
  padding: 5px 10px; cursor: pointer; flex: none;
  transition: border-color .15s, color .15s;
}
.sl-export:hover:not(:disabled) { border-color: var(--flare); color: var(--wash); }
.sl-export:disabled { opacity: .4; cursor: default; }
.ops-sub { text-transform: none; letter-spacing: 0; font-weight: 400; }
.lead-saved .v { color: var(--flare); }
.saved-leads { background: #14110f; border: 1px solid #332d27; border-radius: 6px; padding: 12px 14px; max-height: 180px; overflow-y: auto; }
.saved-lead { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed #262220; }
.saved-lead:last-child { border-bottom: none; }
.saved-lead .sl-main { color: var(--bone); word-break: break-word; }
.saved-lead .sl-when { color: var(--stone); font-size: 10px; flex: none; }

/* how */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-card { background: var(--night); border: 1px solid #2a2521; border-radius: 8px; padding: 26px; }
.how-num { font-family: var(--serif); font-size: 30px; color: var(--flare); margin-bottom: 12px; }
.how-card h3 { font-size: 18px; color: var(--wash); margin-bottom: 10px; font-weight: 600; }
.how-card p { font-size: 14px; color: var(--stone); }

/* compare */
.table-wrap { overflow-x: auto; border: 1px solid #2a2521; border-radius: 8px; }
table.cmp { width: 100%; border-collapse: collapse; min-width: 640px; }
.cmp th {
  text-align: left; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--stone); padding: 16px 18px; border-bottom: 1px solid #2a2521;
  background: #171310;
}
.cmp td { padding: 14px 18px; font-size: 14px; color: var(--stone); border-bottom: 1px solid #211c18; }
.cmp tr:last-child td { border-bottom: none; }
.cmp .row-h { color: var(--wash); font-weight: 600; }
.cmp .win { color: var(--flare); }
.compare-note { max-width: 720px; color: var(--stone); font-size: 14px; margin-top: 20px; }

/* claim */
.claim { border-top: 1px solid #211c18; }
.claim blockquote {
  font-size: clamp(26px, 3.6vw, 40px); color: var(--wash);
  line-height: 1.2; margin-bottom: 24px;
}
.claim-note { max-width: 680px; color: var(--stone); margin-bottom: 30px; }

/* footer */
.site-foot { border-top: 1px solid #211c18; padding: 30px 0; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--stone); }
.foot-in a { color: var(--bone); }

/* mobile */
@media (max-width: 980px) {
  .demo-grid { grid-template-columns: 1fr; }
  .chat-body { height: 380px; }
  .how-grid { grid-template-columns: 1fr; }
  .head-nav { display: none; }
}
