/* ═══════════════════════════════════════════════════════════
   INNOVATION — Dark Luxe Design System
   Glassmorphism, glow effects, dark theme. Mobile-first.
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Backgrounds */
  --bg-deep: #08080d;
  --bg-surface: #0f0f17;
  --bg-elevated: #161622;
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);
  --bg-glass-active: rgba(255, 255, 255, 0.09);

  /* Brand — Warm on dark */
  --brand: #e8734a;
  --brand-light: #f4a261;
  --brand-gold: #e9c46a;
  --brand-glow: rgba(232, 115, 74, 0.25);
  --brand-glow-intense: rgba(232, 115, 74, 0.45);
  --brand-gradient: linear-gradient(135deg, #e8734a, #f4a261);
  --brand-gradient-text: linear-gradient(135deg, #ff8c5a 0%, #f4a261 40%, #e9c46a 70%, #ffb347 100%);

  /* Text */
  --text-primary: #f0ebe3;
  --text-secondary: #a89e94;
  --text-muted: #6e6560;
  --text-inverse: #08080d;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-brand: rgba(232, 115, 74, 0.25);
  --border-glow: rgba(232, 115, 74, 0.4);

  /* Status */
  --success: #4ade80;
  --success-glow: rgba(74, 222, 128, 0.2);

  /* Typography */
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  /* Radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
  --r-2xl: 24px; --r-pill: 50px;

  /* Shadows / Glows */
  --glow-sm: 0 0 20px var(--brand-glow);
  --glow-md: 0 0 40px var(--brand-glow);
  --glow-lg: 0 0 80px var(--brand-glow);
  --glow-card: 0 0 30px rgba(232, 115, 74, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);

  /* Layout */
  --nav-h: 64px;
  --max-w: 1280px;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg-deep);
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: var(--sp-4); z-index: 1000;
  background: var(--brand-gradient); color: #fff;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none; font-size: 14px;
  transition: top 0.2s;
}
.skip-link:focus { top: var(--sp-4); }

/* ── Animated Background ── */
.bg-warm {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% -10%, rgba(232, 115, 74, 0.07), transparent 55%),
    radial-gradient(ellipse 60% 70% at 85% 50%, rgba(244, 162, 97, 0.05), transparent 55%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(233, 196, 106, 0.04), transparent 55%),
    radial-gradient(ellipse 40% 40% at 50% 30%, rgba(232, 115, 74, 0.03), transparent 60%);
}

/* ── Navigation — Glass ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8, 8, 13, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}
nav.scrolled {
  background: rgba(8, 8, 13, 0.9);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
  border-bottom-color: var(--border-medium);
}

nav .nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--sp-6); display: flex;
  align-items: center; justify-content: space-between;
  height: var(--nav-h);
}

nav .logo {
  font-size: 22px; font-weight: 800; letter-spacing: -0.8px;
  color: #fff; display: flex; align-items: center; gap: var(--sp-2);
  text-decoration: none;
}
nav .logo-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-gradient); display: flex;
  align-items: center; justify-content: center;
  font-size: 16px; color: #fff; flex-shrink: 0;
  box-shadow: var(--glow-sm);
}

nav .nav-links { display: flex; gap: 32px; list-style: none; }
nav .nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; font-weight: 500; transition: color 0.2s;
  position: relative;
}
nav .nav-links a::after {
  content: ''; position: absolute; bottom: -6px; left: 0;
  width: 0; height: 2px; background: var(--brand-gradient);
  border-radius: 1px; transition: width 0.3s ease;
}
nav .nav-links a:hover { color: #fff; }
nav .nav-links a:hover::after { width: 100%; }

nav .btn-nav {
  background: var(--brand-gradient); color: #fff; border: none;
  padding: 10px 22px; border-radius: 10px; font-size: 13px;
  font-weight: 600; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; display: inline-block;
  box-shadow: 0 0 24px rgba(232, 115, 74, 0.2);
}
nav .btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(232, 115, 74, 0.35);
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; z-index: 101; background: none; border: none;
  min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none; position: fixed; top: var(--nav-h);
  left: 0; right: 0; bottom: 0; z-index: 99;
  background: rgba(8, 8, 13, 0.96);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  flex-direction: column; align-items: center;
  justify-content: center; gap: 32px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateY(0); display: flex; }
.mobile-menu a {
  color: var(--text-primary); text-decoration: none;
  font-size: 24px; font-weight: 600; transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--brand); }
.mobile-menu .mobile-cta {
  margin-top: var(--sp-4);
  background: var(--brand-gradient); color: #fff; border: none;
  padding: 16px 40px; border-radius: 14px; font-size: 18px;
  font-weight: 600; text-decoration: none;
  box-shadow: var(--glow-md);
}

/* ── Layout ── */
.container {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--sp-6); position: relative; z-index: 1;
}
.section { padding: var(--sp-20) 0; position: relative; z-index: 1; }

/* ── Hero — Dramatic ── */
.hero {
  min-height: 100dvh; display: flex; align-items: center;
  justify-content: center; padding: 120px var(--sp-6) var(--sp-20);
  position: relative; z-index: 1; text-align: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(232, 115, 74, 0.1);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-pill); padding: 8px 20px;
  font-size: 13px; color: var(--brand-light);
  margin-bottom: var(--sp-8); animation: fadeInUp 0.8s ease-out;
  font-weight: 600; backdrop-filter: blur(8px);
  box-shadow: 0 0 30px rgba(232, 115, 74, 0.08);
}

.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); animation: pulse 2s infinite;
  box-shadow: 0 0 8px var(--brand-glow-intense);
}

.hero h1 {
  font-size: clamp(38px, 7vw, 78px); font-weight: 800;
  line-height: 1.08; letter-spacing: -2px;
  margin-bottom: 20px; animation: fadeInUp 0.8s ease-out 0.1s both;
  color: #fff;
}

.hero h1 .warm-gradient {
  background: var(--brand-gradient-text); background-size: 300% 300%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(232, 115, 74, 0.3));
}

.hero p {
  font-size: clamp(16px, 2vw, 20px); color: var(--text-secondary);
  max-width: 600px; margin: 0 auto var(--sp-10);
  animation: fadeInUp 0.8s ease-out 0.2s both; line-height: 1.75;
}

.hero-actions {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* ── Buttons ── */
.btn-primary {
  background: var(--brand-gradient); color: #fff; border: none;
  padding: 16px 36px; border-radius: 14px; font-size: 17px;
  font-weight: 600; cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none; display: inline-flex;
  align-items: center; gap: var(--sp-2);
  min-height: 52px; min-width: 52px;
  box-shadow: 0 0 40px rgba(232, 115, 74, 0.2);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 60px rgba(232, 115, 74, 0.35), 0 8px 32px rgba(0, 0, 0, 0.3);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none;
}

.btn-outline {
  background: transparent; color: var(--brand-light);
  border: 1.5px solid var(--border-brand);
  padding: 16px 36px; border-radius: 14px; font-size: 17px;
  font-weight: 600; cursor: pointer;
  transition: all 0.25s; text-decoration: none;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 52px; backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(232, 115, 74, 0.08);
  border-color: var(--border-glow);
  box-shadow: 0 0 30px rgba(232, 115, 74, 0.15);
}

/* ── Section Labels ── */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 3px; color: var(--brand); margin-bottom: var(--sp-4);
}
.section-label::before {
  content: ''; width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--brand), transparent);
}

.section h2 {
  font-size: clamp(28px, 4vw, 46px); font-weight: 800;
  letter-spacing: -1px; margin-bottom: var(--sp-3);
  line-height: 1.2; color: #fff;
}
.section .subtitle {
  color: var(--text-secondary); font-size: 17px;
  max-width: 560px; margin-bottom: var(--sp-12); line-height: 1.7;
}

/* ── Steps — Glass Cards ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl); padding: 40px 32px;
  text-align: center; position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}
.step-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-brand), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.step-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-brand);
  box-shadow: var(--glow-card), 0 8px 32px rgba(0, 0, 0, 0.3);
}
.step-card:hover::before { opacity: 1; }

.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(232, 115, 74, 0.2), rgba(244, 162, 97, 0.1));
  color: var(--brand-light); font-weight: 800; font-size: 24px;
  margin-bottom: 20px; border: 1px solid var(--border-brand);
  box-shadow: 0 0 24px rgba(232, 115, 74, 0.1);
}

.step-card h3 {
  font-size: 19px; font-weight: 700;
  margin-bottom: var(--sp-2); color: #fff;
}
.step-card p {
  color: var(--text-secondary); font-size: 14px; line-height: 1.7;
}

/* ── Tools Grid — Glass Cards ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; container-type: inline-size;
}

.tool-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: var(--sp-6);
  cursor: pointer; transition: all 0.3s ease;
  position: relative; user-select: none; -webkit-user-select: none;
}
.tool-card:hover {
  border-color: var(--border-brand);
  box-shadow: var(--glow-card), 0 4px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}
.tool-card.selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(232, 115, 74, 0.12), rgba(244, 162, 97, 0.06));
  box-shadow: 0 0 40px rgba(232, 115, 74, 0.15), inset 0 0 30px rgba(232, 115, 74, 0.04);
}
.tool-card:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

.tool-card .check-circle {
  position: absolute; top: 16px; right: 16px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border-medium);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease; background: transparent;
}
.tool-card.selected .check-circle {
  background: var(--brand-gradient); border-color: var(--brand);
  box-shadow: 0 0 12px var(--brand-glow);
}
.tool-card.selected .check-circle::after {
  content: '\2713'; color: #fff; font-size: 14px; font-weight: 700;
}

.tool-icon { font-size: 34px; margin-bottom: var(--sp-4); display: block; }

.tool-card h4 {
  font-size: 16px; font-weight: 700;
  margin-bottom: var(--sp-1); color: #fff;
}
.tool-card .tool-desc {
  color: var(--text-secondary); font-size: 13px; line-height: 1.6;
}

/* ── Tools Counter ── */
.tools-counter {
  text-align: center; padding: var(--sp-6) 0;
  font-size: 15px; color: var(--text-muted);
  transition: color 0.3s;
}
.tools-counter.has-selection { color: var(--brand-light); font-weight: 600; }
.tools-counter .count-num {
  font-weight: 800; font-size: 32px;
  background: var(--brand-gradient-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Bottom Bar — Glass ── */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15, 15, 23, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border-subtle);
  padding: 14px var(--sp-6);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-5);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
}
.bottom-bar.visible { transform: translateY(0); }
.bottom-bar .selected-pills {
  display: flex; gap: 6px; flex-wrap: wrap;
  max-width: 500px; overflow: hidden;
}
.bottom-bar .selected-pill {
  background: rgba(232, 115, 74, 0.15);
  border: 1px solid var(--border-brand);
  color: var(--brand-light); font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-sm); white-space: nowrap;
}
.bottom-bar .start-btn {
  background: var(--brand-gradient); color: #fff; border: none;
  padding: 14px 32px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; box-shadow: 0 0 30px rgba(232, 115, 74, 0.2);
}
.bottom-bar .start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(232, 115, 74, 0.35);
}
.bottom-bar .start-btn:disabled {
  opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none;
}

/* ── CTA Section ── */
.cta-section {
  text-align: center; padding: 100px var(--sp-6) var(--sp-20);
  position: relative; z-index: 1;
}
.cta-card {
  background: var(--bg-glass); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-2xl); padding: 60px 40px;
  max-width: 700px; margin: 0 auto;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-brand), transparent);
}
.cta-card::after {
  content: ''; position: absolute; top: -30%; right: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(232, 115, 74, 0.08), transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.cta-card h2 {
  font-size: clamp(26px, 4vw, 40px); font-weight: 800;
  margin-bottom: var(--sp-3); position: relative; z-index: 1; color: #fff;
}
.cta-card p {
  color: var(--text-secondary); font-size: 16px;
  margin-bottom: 32px; position: relative; z-index: 1;
  max-width: 400px; margin-left: auto; margin-right: auto; line-height: 1.7;
}

/* ── Wave Divider ── */
.wave-divider {
  position: relative; z-index: 1; overflow: hidden;
  line-height: 0; opacity: 0.3;
}
.wave-divider svg { display: block; width: 100%; height: auto; }

/* ── Footer ── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: var(--sp-12) var(--sp-6); text-align: center;
}
footer .footer-logo {
  font-size: 18px; font-weight: 800; color: var(--brand);
  margin-bottom: var(--sp-2); display: inline-flex;
  align-items: center; gap: 6px;
}
footer p { color: var(--text-muted); font-size: 13px; }

/* ── Agent Glow ── */
.agent-glow {
  display: inline-block; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brand);
  margin-left: 2px; animation: agentPulse 1.5s ease-in-out infinite;
  vertical-align: middle; box-shadow: 0 0 8px var(--brand-glow-intense);
}

/* ── Scroll Indicator ── */
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%;
  transform: translateX(-50%); animation: bounceDown 2s infinite; z-index: 1;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--brand-glow-intense); }
  50% { opacity: 0.5; box-shadow: 0 0 16px var(--brand-glow-intense); }
}
@keyframes agentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 115, 74, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(232, 115, 74, 0); }
}
@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(14px); }
}

/* Scroll reveal */
.fade-in {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.06s; }
.stagger-2 { transition-delay: 0.12s; }
.stagger-3 { transition-delay: 0.18s; }
.stagger-4 { transition-delay: 0.24s; }

body.has-bar { padding-bottom: 85px; }

/* ═══════════════════════════════════════════════════════════
   CHAT WIDGET — Dark
   ═══════════════════════════════════════════════════════════ */
.chat-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: chatFadeIn 0.25s ease-out;
}
@keyframes chatFadeIn { from { opacity: 0; } to { opacity: 1; } }

.chat-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%; max-width: 720px;
  height: 85dvh; max-height: 760px;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 60px rgba(0, 0, 0, 0.6);
  animation: chatSlideUp 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow: hidden;
}
@keyframes chatSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.chat-panel.fullscreen {
  max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0;
}

.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated); flex-shrink: 0;
}
.chat-header-left { display: flex; align-items: center; gap: 10px; }
.chat-avatar {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--brand-gradient); display: flex;
  align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
  box-shadow: var(--glow-sm);
}
.chat-header-info h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0; }
.chat-header-info span {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.chat-header-info .online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); animation: pulse 2s infinite;
  box-shadow: 0 0 8px var(--success-glow);
}
.chat-header-actions { display: flex; gap: 6px; }
.chat-btn-icon {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass); color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; font-size: 16px;
}
.chat-btn-icon:hover { background: var(--bg-glass-hover); color: #fff; border-color: var(--border-medium); }

/* Messages */
.chat-messages {
  flex: 1; overflow-y: auto; padding: var(--sp-5);
  display: flex; flex-direction: column; gap: 16px;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06); border-radius: 2px;
}

.chat-welcome {
  text-align: center; padding: var(--sp-10) var(--sp-4);
  color: var(--text-muted);
}
.chat-welcome .welcome-icon { font-size: 52px; margin-bottom: var(--sp-4); opacity: 0.7; }
.chat-welcome h3 { color: var(--brand-light); font-size: 22px; margin-bottom: 8px; }
.chat-welcome p { font-size: 14px; line-height: 1.7; max-width: 420px; margin: 0 auto; }

.chat-msg {
  display: flex; gap: 10px; max-width: 85%;
  animation: msgIn 0.25s ease-out;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg .msg-avatar {
  width: 32px; height: 32px; border-radius: 9px;
  flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 14px; color: #fff;
}
.chat-msg.agent .msg-avatar { background: var(--brand-gradient); }
.chat-msg.user .msg-avatar { background: linear-gradient(135deg, #4a3a38, #2a1f1f); }

.chat-msg .msg-bubble {
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-lg);
  font-size: 14px; line-height: 1.65; word-break: break-word;
}
.chat-msg.agent .msg-bubble {
  background: var(--bg-elevated); color: var(--text-primary);
  border-bottom-left-radius: 4px; border: 1px solid var(--border-subtle);
}
.chat-msg.user .msg-bubble {
  background: var(--brand-gradient); color: #fff;
  border-bottom-right-radius: 4px; box-shadow: 0 4px 16px rgba(232, 115, 74, 0.2);
}

.bmc-canvas h3 { color: var(--brand-light); text-align: center; margin-bottom: var(--sp-4); font-size: 18px; }
.bmc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bmc-table th { background: var(--brand-gradient); color: #fff; padding: 10px 14px; text-align: left; font-weight: 700; font-size: 13px; }
.bmc-table th:first-child { border-radius: var(--r-sm) 0 0 0; }
.bmc-table th:last-child { border-radius: 0 var(--r-sm) 0 0; }
.bmc-table td { padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; line-height: 1.5; }
.bmc-table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.bmc-table td:first-child { font-weight: 700; color: var(--brand-light); white-space: nowrap; min-width: 170px; }

/* Typing */
.chat-typing {
  display: flex; gap: 6px; align-items: center;
  padding: 14px var(--sp-5); align-self: flex-start;
}
.chat-typing .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); animation: typingBounce 1.4s ease-in-out infinite;
  box-shadow: 0 0 6px var(--brand-glow);
}
.chat-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-7px); opacity: 1; }
}

/* Input */
.chat-input-area {
  padding: var(--sp-3) var(--sp-5);
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-subtle);
  display: flex; gap: 10px; align-items: flex-end;
  flex-shrink: 0; background: var(--bg-elevated);
}
.chat-input-area textarea {
  flex: 1; background: var(--bg-glass);
  border: 1px solid var(--border-subtle); border-radius: 14px;
  padding: var(--sp-3) var(--sp-4); color: var(--text-primary);
  font-family: inherit; font-size: 14px; line-height: 1.5;
  resize: none; max-height: 120px; outline: none;
  transition: border-color 0.2s;
}
.chat-input-area textarea:focus { border-color: var(--border-glow); }
.chat-input-area textarea::placeholder { color: var(--text-muted); }

.chat-send-btn {
  width: 46px; height: 46px; border-radius: 14px; border: none;
  background: var(--brand-gradient); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: var(--glow-sm);
}
.chat-send-btn:hover { transform: translateY(-2px); box-shadow: var(--glow-md); }
.chat-send-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

/* Markdown */
.msg-bubble p { margin: 0; }
.msg-bubble p + p { margin-top: var(--sp-2); }
.msg-bubble ul, .msg-bubble ol { margin: 8px 0; padding-left: var(--sp-5); }
.msg-bubble li { margin-bottom: 4px; }
.msg-bubble strong { color: var(--brand-light); }
.msg-bubble code {
  background: rgba(255, 255, 255, 0.06); padding: 2px 8px;
  border-radius: 4px; font-size: 13px; font-family: var(--font-mono);
}
.msg-bubble pre {
  background: rgba(0, 0, 0, 0.3); padding: var(--sp-3);
  border-radius: 10px; overflow-x: auto; margin: var(--sp-2) 0;
  border: 1px solid var(--border-subtle);
}
.msg-bubble pre code { background: none; padding: 0; }

/* BMC Progress in chat */
.bmc-progress {
  padding: var(--sp-2) var(--sp-5);
  background: rgba(232, 115, 74, 0.04);
  border-bottom: 1px solid var(--border-subtle); flex-shrink: 0;
}
.bmc-progress-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.bmc-progress-fill {
  height: 100%; border-radius: 2px;
  background: var(--brand-gradient); transition: width 0.5s ease;
}
.bmc-progress-label { font-size: 11px; color: var(--text-muted); margin-top: var(--sp-1); text-align: right; }

/* SR only */
.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;
}
.announce-region {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — 6 Screen Classes
   ═══════════════════════════════════════════════════════════ */

/* Compact Mobile < 400px */
@media (max-width: 399px) {
  :root { --nav-h: 56px; }
  nav .logo { font-size: 18px; }
  nav .nav-links, nav .btn-nav { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 90px var(--sp-4) 70px; min-height: auto; }
  .hero h1 { font-size: 28px; letter-spacing: -1px; }
  .hero p { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-outline { width: 100%; max-width: 320px; justify-content: center; }

  .section { padding: 52px 0; }
  .section h2 { font-size: 24px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tool-card { padding: 14px 10px; border-radius: 14px; }
  .tool-card h4 { font-size: 13px; }
  .tool-card .tool-desc { font-size: 11px; }
  .tool-icon { font-size: 24px; margin-bottom: 8px; }
  .tool-card .check-circle { top: 10px; right: 10px; width: 22px; height: 22px; }

  .steps-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .step-card { padding: var(--sp-6) var(--sp-4); }
  .cta-card { padding: var(--sp-8) var(--sp-4); }

  .bottom-bar {
    padding: 10px var(--sp-4);
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    gap: var(--sp-2);
  }
  .bottom-bar .selected-pills { max-width: 160px; }
  .bottom-bar .selected-pill { font-size: 11px; padding: 3px 8px; }
  .bottom-bar .start-btn { font-size: 13px; padding: 10px 18px; }

  .chat-panel { height: 94dvh; max-height: 94dvh; }
  .chat-msg { max-width: 94%; }
  .chat-messages { padding: var(--sp-3) 14px; gap: 12px; }
}

/* Large Mobile 400-640px */
@media (min-width: 400px) and (max-width: 640px) {
  nav .nav-links, nav .btn-nav { display: none; }
  .hamburger { display: flex; }
  .hero { min-height: auto; padding: 100px var(--sp-5) 80px; }
  .hero h1 { font-size: 34px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { padding: var(--sp-4) var(--sp-3); }
  .steps-grid { grid-template-columns: 1fr; }
  .chat-panel { height: 92dvh; max-height: 92dvh; max-width: 100%; }
}

/* Tablet 641-1024px */
@media (min-width: 641px) and (max-width: 1024px) {
  .hero { min-height: 75dvh; }
  .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .chat-panel { max-width: 640px; height: 82dvh; }
}

/* Laptop 1025-1366px */
@media (min-width: 1025px) and (max-width: 1366px) {
  .tools-grid { grid-template-columns: repeat(4, 1fr); }
  .chat-panel { max-width: 680px; }
}

/* Desktop 1367px+ */
@media (min-width: 1367px) {
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .chat-panel { max-width: 720px; max-height: 800px; }
  .container { padding: 0 var(--sp-8); }
}

/* Large Desktop 1921px+ */
@media (min-width: 1921px) {
  .container { padding: 0 var(--sp-10); }
  .hero h1 { font-size: 80px; }
  :root { --max-w: 1400px; }
}

/* Split View */
@media (max-width: 599px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-outline { width: 100%; max-width: 320px; justify-content: center; }
  .chat-panel { width: 100%; max-width: 100%; }
}

/* ── Pointer Queries ── */
@media (pointer: coarse) {
  .tool-card:hover, .step-card:hover { transform: none; box-shadow: none; }
  .tool-card:active, .step-card:active { transform: scale(0.97); }
  .btn-primary:hover, .btn-outline:hover { transform: none; box-shadow: none; }
  .btn-primary:active, .btn-outline:active { transform: scale(0.97); }
  .chat-send-btn:hover { transform: none; box-shadow: var(--glow-sm); }
  .chat-send-btn:active { transform: scale(0.94); }
  nav .btn-nav:hover { transform: none; box-shadow: 0 0 24px rgba(232, 115, 74, 0.2); }
  nav .btn-nav:active { transform: scale(0.97); }
  .bottom-bar .start-btn:hover { transform: none; box-shadow: 0 0 30px rgba(232, 115, 74, 0.2); }
  .bottom-bar .start-btn:active { transform: scale(0.97); }
}

@media (pointer: fine) {
  .tool-card:hover { border-color: var(--border-brand); box-shadow: var(--glow-card), 0 4px 24px rgba(0,0,0,0.3); transform: translateY(-4px); }
  .step-card:hover { transform: translateY(-6px); border-color: var(--border-brand); }
}

/* ── Container Queries ── */
@container (max-width: 180px) {
  .tool-card { padding: var(--sp-3) var(--sp-2); border-radius: 14px; }
  .tool-card h4 { font-size: 12px; }
  .tool-card .tool-desc { display: none; }
  .tool-icon { font-size: 22px; margin-bottom: var(--sp-1); }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero h1, .hero p, .hero-actions,
  .fade-in, .chat-msg, .chat-panel, .chat-overlay,
  .step-card, .tool-card, .bottom-bar, .bg-warm {
    animation: none !important; transition: none !important;
  }
  .scroll-indicator { display: none; }
  .hero h1 .warm-gradient { animation: none !important; }
}
