/* ============================================================
   Agent-MVP Design System
   Dark celestial theme with glass morphism and fluid animations.
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-deep: #06060f;
  --bg-card: rgba(15, 15, 40, 0.65);
  --bg-card-hover: rgba(20, 20, 55, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(34, 211, 238, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #22d3ee;
  --accent-purple: #a78bfa;
  --accent-gold: #fbbf24;
  --accent-green: #34d399;
  --accent-rose: #fb7185;
  --gradient-hero: linear-gradient(135deg, #22d3ee 0%, #a78bfa 50%, #fbbf24 100%);
  --glass-blur: 16px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Canvas Background --- */
#starCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(6, 6, 15, 0.75);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s;
}
.navbar.scrolled { background: rgba(6, 6, 15, 0.92); }
.nav-left { display: flex; align-items: center; gap: 0.5rem; }
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text-primary);
  font-weight: 700; font-size: 1.1rem;
}
.logo-icon {
  font-size: 1.4rem;
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { text-shadow: 0 0 8px var(--accent-cyan); }
  50% { text-shadow: 0 0 20px var(--accent-cyan), 0 0 40px var(--accent-purple); }
}
.logo-text { letter-spacing: -0.02em; }
.nav-center { display: flex; gap: 2rem; }
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--accent-cyan);
  transform: scaleX(0);
  transition: transform 0.3s;
  border-radius: 1px;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; justify-content: center; }
.btn-primary {
  background: var(--gradient-hero);
  color: #0a0a1a;
  box-shadow: 0 4px 24px rgba(34, 211, 238, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.45);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-accent);
}
.btn-arrow { transition: transform 0.3s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* --- Sections --- */
section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* --- Gradient Text --- */
.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Hero --- */
.section-hero {
  display: flex;
  align-items: center;
  gap: 4rem;
  min-height: 100vh;
  padding-top: 8rem;
  padding-bottom: 6rem;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat span:last-child {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Hero Visual (Orbs + Chat Preview) --- */
.hero-visual {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.3), transparent);
  top: 10%; right: 20%;
}
.hero-orb-2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3), transparent);
  bottom: 20%; left: 10%;
  animation-delay: -3s;
}
.hero-orb-3 {
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25), transparent);
  top: 50%; left: 30%;
  animation-delay: -6s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-chat-preview {
  position: relative;
  z-index: 2;
  width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(34, 211, 238, 0.1);
  animation: previewFloat 5s ease-in-out infinite;
}
@keyframes previewFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.chat-preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
}
.chat-dots { display: flex; gap: 5px; }
.chat-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.chat-dots span:nth-child(1) { background: var(--accent-rose); }
.chat-dots span:nth-child(2) { background: var(--accent-gold); }
.chat-dots span:nth-child(3) { background: var(--accent-green); }
.chat-preview-title { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.chat-preview-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-preview-msg {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.5;
  animation: msgIn 0.4s ease-out;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-msg {
  background: rgba(34, 211, 238, 0.15);
  align-self: flex-end;
  max-width: 80%;
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.agent-msg {
  background: rgba(255, 255, 255, 0.05);
  align-self: flex-start;
  max-width: 90%;
  border: 1px solid var(--border-subtle);
}
.agent-msg-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-purple);
}
.agent-msg-icon { font-size: 0.7rem; }
.msg-cursor {
  display: inline;
  animation: blink 1s step-end infinite;
  color: var(--accent-cyan);
}
@keyframes blink {
  50% { opacity: 0; }
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
}
.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.1);
}
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Pricing Cards --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}
.pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.pricing-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.1);
}
.pricing-card-featured {
  border-color: var(--border-accent);
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.08);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 1rem;
  background: var(--accent-purple);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pricing-badge-featured {
  background: var(--accent-cyan);
  color: #0a0a1a;
}
.pricing-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: 0.25rem;
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.pricing-features {
  list-style: none;
  margin-bottom: 1.5rem;
}
.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.pricing-features li:last-child { border-bottom: none; }

/* --- Chat Demo --- */
.chat-demo {
  display: flex;
  height: 550px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.chat-demo-sidebar {
  width: 260px;
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1rem;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
}
.sidebar-logo { font-size: 1.1rem; }
.sidebar-sessions { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.session-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 0.2s;
}
.session-item:hover { background: rgba(255, 255, 255, 0.05); }
.session-item.active {
  background: rgba(34, 211, 238, 0.1);
  color: var(--text-primary);
}
.session-icon { font-size: 0.9rem; }
.sidebar-footer { padding-top: 0.75rem; border-top: 1px solid var(--border-subtle); }
.chat-demo-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chat-demo-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg .msg-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.55;
}
.chat-msg.user .msg-bubble {
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.chat-msg.agent .msg-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}
.msg-tool-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.tool-chip {
  padding: 0.2rem 0.5rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}
.msg-content strong { color: var(--text-primary); }
.msg-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.review-pass { color: var(--accent-green); }
.review-warn { color: var(--accent-gold); }
.chat-demo-input {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.chat-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  transition: border-color 0.3s;
}
.chat-input-wrapper:focus-within {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}
.chat-input::placeholder { color: var(--text-muted); }
.btn-send {
  background: var(--accent-cyan);
  border: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0a0a1a;
  transition: all 0.3s;
}
.btn-send:hover {
  background: #38dff5;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.4);
}
.chat-input-hints {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.hint-chip {
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.hint-chip.active { color: var(--accent-green); }
.hint-add {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.75rem;
}
.hint-add:hover { text-decoration: underline; }

/* --- Setup Steps --- */
.setup-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
}
.setup-step {
  text-align: center;
  max-width: 220px;
  opacity: 0;
  transform: translateY(30px);
}
.setup-step.visible {
  opacity: 1;
  transform: translateY(0);
}
.step-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.step-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.setup-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.setup-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.setup-connector {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.connector-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--border-card), var(--border-accent), var(--border-card));
  position: relative;
}
.connector-line::after {
  content: '';
  position: absolute;
  right: -3px; top: -2px;
  width: 6px; height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* --- Setup Preview Card --- */
.setup-preview {
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
}
.setup-preview.visible {
  opacity: 1;
  transform: translateY(0);
}
.setup-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.setup-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
}
.setup-progress::before {
  content: '';
  position: absolute;
  top: 14px; left: 30px; right: 30px;
  height: 2px;
  background: var(--border-subtle);
  z-index: 0;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.progress-step span {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all 0.3s;
}
.progress-step.done span {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #0a0a1a;
}
.progress-step.active span {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3);
  animation: progressPulse 2s infinite;
}
@keyframes progressPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 211, 238, 0.3); }
  50% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.5); }
}
.setup-connect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.connect-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: left;
}
.connect-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-accent);
}
.connect-card.connected {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.05);
}
.connect-icon { font-size: 1.3rem; }
.connect-name { flex: 1; font-weight: 500; }
.connect-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.connect-status.connected { color: var(--accent-green); }

/* --- CTA --- */
.section-cta {
  text-align: center;
  padding: 5rem 2rem;
}
.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.cta-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem 1.5rem;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 3rem;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  max-width: 280px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Loader Overlay --- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.loader-overlay.active { display: flex; }
.loader-ring {
  width: 60px; height: 60px;
  position: relative;
}
.loader-orbit {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: orbitSpin 1s linear infinite;
}
.loader-orbit::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
}
@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}
.loader-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  animation: loaderPulse 1.5s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* --- Scroll Animations --- */
[data-animate] {
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Mobile Nav --- */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 101;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}
.mobile-nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .section-hero { flex-direction: column; text-align: center; padding-top: 6rem; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { min-height: auto; }
  .hero-chat-preview { width: 100%; max-width: 420px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .chat-demo { flex-direction: column; height: auto; }
  .chat-demo-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .setup-steps { flex-direction: column; gap: 1rem; }
  .setup-connector { width: 40px; transform: rotate(90deg); }
  .footer-content { grid-template-columns: 1fr; }
  .nav-center { display: none; }
  .navbar { padding: 0 1rem; }
  .mobile-nav-toggle { display: flex; }
}
@media (max-width: 640px) {
  section { padding: 3rem 1rem; }
  .hero-title { font-size: 2rem; }
  .section-header h2 { font-size: 1.8rem; }
  .features-grid { grid-template-columns: 1fr; }
  .setup-connect-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .auth-modal { margin: 1rem; padding: 2rem 1.5rem; }
}

/* ============================================================
   AUTH MODAL
   ============================================================ */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.auth-modal-overlay.active {
  display: flex;
  opacity: 1;
}
.auth-modal {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: modalIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(34, 211, 238, 0.05);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.auth-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
  animation: logoPulse 3s ease-in-out infinite;
}
.auth-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.auth-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.auth-form {
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.auth-form.active {
  display: flex;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.auth-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-field input {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.3s;
  outline: none;
}
.auth-field input:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
  background: rgba(255, 255, 255, 0.06);
}
.auth-field input::placeholder {
  color: var(--text-muted);
}
.auth-pass-wrap {
  position: relative;
  display: flex;
}
.auth-pass-wrap input {
  flex: 1;
  padding-right: 3rem;
}
.pass-toggle {
  position: absolute;
  right: 4px; top: 4px; bottom: 4px;
  width: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  filter: grayscale(0.3);
}
.pass-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  filter: grayscale(0);
}
.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
.auth-switch a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
}
.auth-switch a:hover {
  text-decoration: underline;
}
.auth-error {
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  color: var(--accent-rose);
  display: none;
}
.auth-error.active {
  display: block;
  animation: shake 0.5s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* Logout Button */
.btn-logout {
  background: rgba(251, 113, 133, 0.1);
  color: var(--accent-rose);
  border: 1px solid rgba(251, 113, 133, 0.2);
  font-size: 0.8rem;
}
.btn-logout:hover {
  background: rgba(251, 113, 133, 0.2);
  border-color: rgba(251, 113, 133, 0.4);
}
