/* ============================================
   BUSINESS FRIENDLY — Global Styles
   ============================================ */

:root {
  --primary: #1a3a6b;
  --primary-dark: #122a50;
  --accent: #e8a020;
  --accent-dark: #c88010;
  --text: #1a1a2e;
  --text-light: #5a6070;
  --bg: #ffffff;
  --bg-light: #f7f9fc;
  --bg-dark: #1a3a6b;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --font: 'Georgia', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }

/* ---- LAYOUT ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-dark {
  background: var(--primary);
  color: #fff;
}

.section-dark .section-title,
.section-dark .section-sub { color: #fff; }

.section-light { background: var(--bg-light); }

.section-cta {
  background: var(--accent);
  color: var(--text);
  text-align: center;
  padding: 80px 0;
}

.section-cta h2 { font-size: 2rem; margin-bottom: 12px; }
.section-cta p { font-size: 1.1rem; margin-bottom: 32px; opacity: 0.85; }

.section-title {
  font-family: var(--font);
  font-size: 2.2rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 52px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--text);
}

.btn-primary:hover { background: var(--accent-dark); color: var(--text); }

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-ghost:hover { background: rgba(255,255,255,0.25); color: #fff; }

.btn-lg { padding: 16px 40px; font-size: 1.05rem; }

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img { height: 60px; width: auto; display: block; }

/* Legacy text fallback (unused but kept for safety) */
.logo span { color: var(--accent); }

nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav a {
  color: var(--text-light);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover { color: var(--primary); }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2a5298 100%);
  color: #fff;
  padding: 100px 0 80px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font);
  font-size: 3.4rem;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #fff;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 40px;
}

.stat strong {
  display: block;
  font-size: 2.4rem;
  font-family: var(--font);
  color: var(--accent);
}

.stat span {
  font-size: 0.88rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- STEPS ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.step {
  text-align: center;
  padding: 20px 12px;
}

.step-number {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.step p { color: var(--text-light); font-size: 0.82rem; line-height: 1.55; }

/* ---- REPORT FEATURES ---- */
.report-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.report-feature {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 28px;
}

.report-icon { font-size: 2rem; margin-bottom: 12px; }

.report-feature h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.report-feature p { color: rgba(255,255,255,0.8); font-size: 0.92rem; }

/* ---- QUADRANTS ---- */
.quadrants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}

.quadrant {
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}

.quadrant-hh { background: #f0fdf4; border-color: #86efac; }
.quadrant-hl { background: #fff1f2; border-color: #fda4af; }
.quadrant-ll { background: #fffbeb; border-color: #fcd34d; }
.quadrant-lh { background: #eff6ff; border-color: #93c5fd; }

.quadrant-label {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.quadrant-hh .quadrant-label { color: #166534; }
.quadrant-hl .quadrant-label { color: #9f1239; }
.quadrant-ll .quadrant-label { color: #92400e; }
.quadrant-lh .quadrant-label { color: #1e40af; }

.quadrant-axes {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: 12px;
}

.quadrant p { font-size: 0.92rem; color: var(--text-light); }

/* ---- AUDIENCE ---- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.audience-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.audience-card h3 {
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.audience-card p { color: var(--text-light); font-size: 0.92rem; }

/* ---- PRICING ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
  position: relative;
}

.pricing-featured {
  border-color: var(--primary);
  border-width: 2px;
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pricing-type {
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 8px;
}

.pricing-amount {
  font-family: var(--font);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.pricing-features li {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-light);
}

.pricing-features li::before {
  content: "✓ ";
  color: #16a34a;
  font-weight: 700;
}

.pricing-features li:last-child { border-bottom: none; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
}

.footer-inner {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 40px;
}

.footer-brand { max-width: 280px; }

.footer-brand .logo { margin-bottom: 12px; }

.footer-brand p { font-size: 0.88rem; line-height: 1.6; margin-bottom: 8px; }

.footer-copy { font-size: 0.8rem; opacity: 0.6; margin-top: 16px; }

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 120px;
}

.footer-links strong {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

/* ---- FORMS (shared) ---- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,107,0.1);
}

.form-error {
  color: #dc2626;
  font-size: 0.82rem;
  margin-top: 4px;
}

/* ---- PAGE WRAPPER (inner pages) ---- */
.page-wrap {
  min-height: calc(100vh - 68px);
  padding: 60px 0;
}

.page-title {
  font-family: var(--font);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.page-sub {
  color: var(--text-light);
  margin-bottom: 36px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

/* ---- RESPONSIVE ---- */
/* ---- CHAT WIDGET ---- */
#bf-chat-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(26,58,107,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

#bf-chat-toggle:hover { background: var(--primary-dark); transform: scale(1.06); }

#bf-chat-toggle svg { width: 26px; height: 26px; }

#bf-chat-window {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 1000;
  width: 360px;
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: bottom right;
}

#bf-chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  background: var(--primary);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.chat-header-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  flex-shrink: 0;
}

.chat-header-info { flex: 1; }

.chat-header-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}

.chat-header-status {
  font-size: 0.75rem;
  opacity: 0.8;
}

.chat-header-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.chat-header-close:hover { color: #fff; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-msg-bot {
  background: var(--bg-light);
  color: var(--text);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-msg-user {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-msg-typing {
  background: var(--bg-light);
  align-self: flex-start;
  padding: 12px 16px;
}

.chat-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.chat-dots span {
  width: 7px;
  height: 7px;
  background: var(--text-light);
  border-radius: 50%;
  animation: chatDot 1.2s infinite ease-in-out;
}

.chat-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatDot {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-footer {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

#bf-chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 0.88rem;
  resize: none;
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.4;
  max-height: 100px;
  overflow-y: auto;
  transition: border-color 0.2s;
}

#bf-chat-input:focus { outline: none; border-color: var(--primary); }

#bf-chat-send {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
  align-self: flex-end;
}

#bf-chat-send:hover { background: var(--accent-dark); }
#bf-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

#bf-chat-send svg { width: 18px; height: 18px; color: var(--text); }

@media (max-width: 480px) {
  #bf-chat-window { width: calc(100vw - 24px); right: 12px; bottom: 82px; }
  #bf-chat-toggle { right: 16px; bottom: 16px; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { gap: 28px; }
  .quadrants { grid-template-columns: 1fr; }
  nav a:not(.btn) { display: none; }
  .pricing-featured { transform: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .section { padding: 56px 0; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  nav .btn-primary { display: none; }
  nav > button { display: none; }
  nav > div { display: none; }
}

/* ---- MOBILE UX ---- */
/* Prevent iOS from zooming on form focus */
@media (max-width: 768px) {
  input, select, textarea, button {
    font-size: 16px !important;
  }

  /* Larger touch targets */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

  /* Dashboard card: stack buttons below info */
  .survey-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .survey-card > div:last-child {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* Narrower containers on mobile */
  .container { padding: 0 16px; }

  /* Plan cards single column */
  .plan-cards { grid-template-columns: 1fr !important; }

  /* Header height stays compact */
  .header-inner { height: 60px; }
  .logo img { height: 48px; }
}

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
a.skip-nav { position: absolute; top: -40px; left: 0; background: var(--primary); color: #fff; padding: 8px 16px; z-index: 9999; border-radius: 0 0 4px 0; font-weight: 700; }
a.skip-nav:focus { top: 0; }
