/* FlowBot public landing page. Standalone: does not load app.css. */
:root {
  --ink: #141a2b;
  --ink-2: #48506a;
  --muted: #6b7385;
  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --line: #e3e7f0;
  --brand: #3b5bdb;
  --brand-dark: #2f49b5;
  --brand-soft: #eef2ff;
  --teal: #0ca678;
  --amber: #f59f00;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 26, 43, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 26, 43, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.landing {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
code { background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }

section { padding: 88px 0; }
.eyebrow {
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.section-sub { color: var(--ink-2); font-size: 18px; max-width: 680px; margin: 0 auto 40px; }
.section-title.center { margin-left: auto; margin-right: auto; max-width: 780px; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 10px;
  border: 2px solid var(--brand);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(59, 91, 219, 0.25); }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); box-shadow: none; }
.btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.btn-light:hover { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-dark); }
.link { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.link:hover { color: var(--brand); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 16px rgba(20, 26, 43, 0.05); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
.logo.small { font-size: 16px; }
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #15aabf);
  position: relative;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 8px 7px;
  border: 2px solid #fff;
  border-radius: 6px 6px 6px 2px;
}
.nav-links { display: flex; gap: 22px; margin-left: 12px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--brand); }
.nav-cta { margin-left: auto; display: flex; gap: 16px; align-items: center; }

/* Hero */
.hero {
  padding: 72px 0 96px;
  background:
    radial-gradient(900px 400px at 85% 10%, rgba(21, 170, 191, 0.12), transparent 60%),
    radial-gradient(800px 500px at 10% 0%, rgba(59, 91, 219, 0.12), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 850; letter-spacing: -0.02em; }
.hl { background: linear-gradient(90deg, var(--brand), #15aabf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; gap: 22px; flex-wrap: wrap; color: var(--ink-2); font-size: 15px; }
.hero-points li::before, .checks li::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* Hero phone demo */
.hero-demo { position: relative; display: flex; justify-content: center; }
.phone {
  width: 340px;
  max-width: 100%;
  height: 560px;
  border-radius: 34px;
  background: #fff;
  border: 10px solid #141a2b;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.phone-top { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.phone-top small { display: block; color: var(--muted); font-size: 12px; }
.phone-top strong { font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.phone-chat { flex: 1; overflow: hidden; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-soft); }
.phone-controls { min-height: 64px; padding: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.demo-bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  animation: pop 0.25s ease-out;
}
.demo-bubble.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.demo-bubble.visitor { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.demo-bubble.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.demo-bubble.typing span:nth-child(2) { animation-delay: 0.2s; }
.demo-bubble.typing span:nth-child(3) { animation-delay: 0.4s; }
.demo-option {
  border: 1.5px solid var(--brand);
  color: var(--brand);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.demo-option.tapped { background: var(--brand); color: #fff; transform: scale(0.96); }
.demo-input {
  flex: 1;
  min-height: 38px;
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
}
.demo-input::after { content: "|"; color: var(--brand); animation: blink 1s infinite; margin-left: 1px; }

.float-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
}
.float-lead { right: -6px; top: 84px; }
.float-score { left: -10px; bottom: 120px; }
.float-score strong { color: var(--teal); }
.float-lead .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); margin-right: 6px; }
.hero-demo.captured .float-card { opacity: 1; transform: none; }
.hero-demo.captured .float-score { transition-delay: 0.25s; }

@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* Problem */
.problem { background: var(--bg-soft); }
.problem .section-title { text-align: center; margin-bottom: 40px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pain, .step, .tpl, .feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.pain { border-top: 4px solid #fa5252; }
.pain h3, .step h3, .tpl h3, .feature h3 { font-size: 19px; }
.pain p, .step p, .tpl p, .feature p { color: var(--ink-2); margin: 0; }

/* Journey funnel */
.funnel { list-style: none; padding: 0; margin: 0 auto; max-width: 980px; display: flex; flex-direction: column; gap: 12px; }
.stage {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 18px;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}
.stage::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--stage-color);
}
/* Narrowing widths draw the funnel. */
.s1 { --stage-color: #4c6ef5; width: 100%; }
.s2 { --stage-color: #3b5bdb; width: 95%; }
.s3 { --stage-color: #1c7ed6; width: 90%; }
.s4 { --stage-color: #1098ad; width: 85%; }
.s5 { --stage-color: #0ca678; width: 80%; }
.stage h3 { font-size: 20px; margin-bottom: 4px; }
.stage p { color: var(--ink-2); margin: 0; }
.stage-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--stage-color);
}
.stage-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Owner steps */
.steps { background: var(--bg-soft); }
.steps .section-title { margin-bottom: 40px; }
.step-num { display: block; font-size: 34px; font-weight: 850; color: var(--brand); opacity: 0.35; margin-bottom: 6px; }

/* Features */
.features .section-title { margin-bottom: 44px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { transition: transform 0.15s, box-shadow 0.15s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature h3 { font-size: 17px; margin-top: 14px; }
.feature p { font-size: 15px; }
.ficon {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--brand-soft);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px;
}
/* Simple stroke icons as SVG data URIs (allowed by the CSP: img-src 'self' data:) */
.ficon-builder { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bdb' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='2'/%3E%3Crect x='14' y='14' width='7' height='7' rx='2'/%3E%3Cpath d='M10 6.5h4a3 3 0 0 1 3 3V14'/%3E%3C/svg%3E"); }
.ficon-preview { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bdb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.ficon-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bdb' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='6' width='18' height='12' rx='3'/%3E%3Cpath d='M7 12h6M17 10v4'/%3E%3C/svg%3E"); }
.ficon-personal { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bdb' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E"); }
.ficon-score { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bdb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E"); }
.ficon-handoff { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bdb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H8l-5 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 10h8'/%3E%3C/svg%3E"); }
.ficon-transcript { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bdb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M9 11h7M9 15h7'/%3E%3C/svg%3E"); }
.ficon-csv { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b5bdb' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 21h16'/%3E%3C/svg%3E"); }

/* Templates */
.templates { background: var(--bg-soft); }
.templates .section-title { margin-bottom: 40px; }
.tpl { display: flex; flex-direction: column; gap: 14px; }
.tpl .btn { align-self: flex-start; margin-top: auto; }
.tpl-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: s; }
.tpl-steps li {
  counter-increment: s;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 4px 10px;
}
.tpl-steps li::before { content: counter(s) " · "; opacity: 0.6; }

/* Dashboard showcase */
.showcase-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 18px 0 28px; display: grid; gap: 10px; color: var(--ink-2); }
.mock-table { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-weight: 700; border-bottom: 1px solid var(--line); }
.mock-btn { background: var(--brand); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.mock-row { display: grid; grid-template-columns: 1.1fr 1.2fr 0.8fr 0.6fr; gap: 10px; padding: 12px 20px; border-bottom: 1px solid #f0f2f7; font-size: 15px; align-items: center; }
.mock-cols { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: #fafbfd; }
.pill { display: inline-block; text-align: center; min-width: 40px; font-weight: 700; font-size: 13px; border-radius: 999px; padding: 2px 8px; background: #f1f3f5; color: var(--muted); }
.pill.hot { background: #e6fcf5; color: var(--teal); }
.pill.warm { background: #fff9db; color: #b08800; }
.mock-note { margin: 0; padding: 8px 20px 12px; font-size: 12px; color: var(--muted); }

/* Trust */
.trust { padding: 56px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-item h3 { font-size: 18px; }
.trust-item p { color: var(--ink-2); margin: 0; }

/* FAQ */
.faq .section-title { margin-bottom: 32px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 24px; color: var(--brand); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 12px 0 0; }

/* Final CTA */
.final-cta { background: linear-gradient(135deg, #3b5bdb, #1098ad); color: #fff; }
.final-cta h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 850; }
.final-cta p { font-size: 18px; opacity: 0.92; margin-bottom: 28px; }
.final-cta .small-print { font-size: 15px; margin: 18px 0 0; }
.final-cta .small-print a { color: #fff; font-weight: 700; }

/* Footer */
.footer { padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer nav a { color: var(--ink-2); text-decoration: none; }
.footer nav a:hover { color: var(--brand); }
.footer .muted { margin-left: auto; }

/* Responsive */
@media (max-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .showcase-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 48px; }
  .hero-copy { text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-points { justify-content: center; }
  .stage { grid-template-columns: 44px 1fr; }
  .stage-tag { grid-column: 2; justify-self: start; white-space: normal; }
  .s1, .s2, .s3, .s4, .s5 { width: 100%; }
}
@media (max-width: 760px) {
  section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .cards-3 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .float-lead { right: 4px; }
  .float-score { left: 4px; }
  .mock-row { grid-template-columns: 1fr 1.2fr 0.8fr 0.7fr; padding: 10px 14px; font-size: 14px; }
  .footer .muted { margin-left: 0; }
}
@media (max-width: 380px) {
  .nav-cta .link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-bubble, .demo-bubble.typing span, .demo-input::after { animation: none; }
  .btn, .feature, .float-card { transition: none; }
}
