/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --fg: #0f172a;
  --fg-muted: #64748b;
  --fg-subtle: #94a3b8;
  --accent: #34d399;
  --accent-dark: #059669;
  --accent-bg: #ecfdf5;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --max-w: 1100px;
  --radius: 10px;
  --radius-lg: 18px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--fg);
  text-decoration: none;
}

.nav-tag {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 400;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 100px 32px 90px;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 100%);
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 24px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2.5px;
  color: var(--fg);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 28px;
}

.hero-tools {
  font-size: 13px;
  color: var(--fg-subtle);
  letter-spacing: 0.02em;
}

/* ===== SECTION LABEL ===== */
.section-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 40px;
}

/* ===== WHAT ===== */
.what {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 32px;
}

.what-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.what-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.what-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
}

.what-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.what-card h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.what-card p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ===== RESULTS ===== */
.results {
  padding: 80px 32px;
}

.results-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.results-header {
  margin-bottom: 48px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.result-item {
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  text-align: center;
}

.result-item:first-child { border-left: none; }
.result-item:last-child { border-right: none; }

.result-number {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--fg);
  margin-bottom: 8px;
}

.result-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.4;
}

/* ===== HOW ===== */
.how {
  background: var(--fg);
  color: #fff;
  padding: 80px 32px;
}

.how-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.how .section-label { color: var(--fg-subtle); }

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  align-items: start;
}

.step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  padding-top: 4px;
}

.step-body h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  color: #fff;
}

.step-body p {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.65;
}

/* ===== PROOF ===== */
.proof {
  padding: 80px 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.proof-inner {
  max-width: 680px;
  margin: 0 auto;
}

.proof-quote {
  text-align: center;
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 80px;
  line-height: 0.5;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}

blockquote {
  font-family: var(--font-head);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.5px;
  color: var(--fg);
  margin-bottom: 24px;
}

cite {
  font-size: 14px;
  color: var(--fg-muted);
  font-style: normal;
}

/* ===== CLOSING ===== */
.closing {
  padding: 100px 32px;
  text-align: center;
}

.closing-inner {
  max-width: 720px;
  margin: 0 auto;
}

.closing-headline {
  font-family: var(--font-head);
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: var(--fg);
  margin-bottom: 20px;
}

.closing-sub {
  font-size: 18px;
  color: var(--fg-muted);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--fg);
  color: #fff;
  padding: 40px 32px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.footer-tag {
  font-size: 13px;
  color: #94a3b8;
}

.footer-copy {
  margin-left: auto;
  font-size: 12px;
  color: #475569;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .hero { padding: 72px 20px 64px; }
  .hero-headline { letter-spacing: -1.5px; }
  .hero-sub { font-size: 16px; }
  .what { padding: 60px 20px; }
  .what-grid { grid-template-columns: 1fr; gap: 12px; }
  .results { padding: 60px 20px; }
  .results-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .result-item:nth-child(2) { border-right: none; }
  .how { padding: 60px 20px; }
  .step { grid-template-columns: 48px 1fr; gap: 16px; }
  .proof { padding: 60px 20px; }
  .closing { padding: 72px 20px; }
  .footer-inner { flex-wrap: wrap; gap: 8px; }
  .footer-copy { margin-left: 0; width: 100%; }
  .nav-inner { padding: 14px 20px; }
  .nav-tag { display: none; }
}

@media (max-width: 480px) {
  .results-grid { grid-template-columns: 1fr; }
  .result-item { border-right: none; border-left: none; border-bottom: 1px solid var(--border); }
  .result-item:last-child { border-bottom: none; }
}

/* ===== DEMO BANNER ===== */
.chat-banner {
  position: fixed;
  bottom: 96px;
  right: 20px;
  z-index: 999;
  background: var(--fg);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px 10px 12px;
  border-radius: var(--radius);
  max-width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  animation: banner-in 0.4s ease both;
}
.chat-banner-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.chat-banner-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 0 0 4px;
}
.chat-banner-close:hover { color: #fff; }
@keyframes banner-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ===== CHAT WIDGET ===== */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 360px;
  max-height: 520px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chat-in 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes chat-in {
  from { opacity: 0; transform: scale(0.92) translateY(12px); transform-origin: bottom right; }
  to { opacity: 1; transform: none; }
}

.chat-header {
  background: var(--fg);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.chat-header:hover { background: #1e293b; }
.chat-header-left { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.chat-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.2px;
}
.chat-subtitle {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}
.chat-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.chat-minimize {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-minimize:hover { background: rgba(255,255,255,0.1); color: #fff; }

.chat-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  max-height: 340px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-msg { display: flex; max-width: 100%; }
.chat-msg--user { justify-content: flex-end; }
.chat-msg--assistant { justify-content: flex-start; }

.chat-bubble-inner {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 82%;
  word-break: break-word;
}
.chat-msg--user .chat-bubble-inner {
  background: var(--fg);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg--assistant .chat-bubble-inner {
  background: var(--surface);
  color: var(--fg);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.chat-link { color: var(--accent-dark); text-decoration: underline; }
.chat-link:hover { color: var(--accent); }

/* Typing dots */
.chat-typing .chat-bubble-inner { padding: 12px 16px; }
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--fg-subtle);
  border-radius: 50%;
  margin: 0 2px;
  animation: dot-bounce 1.2s infinite ease-in-out;
}
.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* CTA bar */
.chat-cta {
  padding: 10px 16px;
  background: var(--accent-bg);
  border-top: 1px solid #d1fae5;
  flex-shrink: 0;
}
.chat-cta-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-cta-link:hover { color: var(--accent); }
.chat-cta-link span { font-size: 16px; }

/* Input row */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--accent); background: #fff; }
.chat-input:disabled { opacity: 0.6; }
.chat-send {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--fg);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.chat-send:hover { background: var(--accent-dark); transform: scale(1.05); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Collapsed bubble */
.chat-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--fg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.2s, background 0.2s;
}
.chat-bubble:hover { transform: scale(1.1); background: var(--accent-dark); }
.chat-bubble-emoji { font-size: 26px; }
.chat-bubble-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ===== CHAT MOBILE ===== */
@media (max-width: 480px) {
  .chat-widget { width: calc(100vw - 20px); right: 10px; bottom: 10px; max-height: 80vh; }
  .chat-bubble { right: 10px; bottom: 10px; }
  .chat-banner { right: 10px; bottom: 82px; max-width: calc(100vw - 20px); }
}