/* ==========================================================================
   BOTZELLA — Brand Identity & Design System Stylesheet
   Dark-First Midnight Navy & Turquoise Palette
   Arabic RTL Typography & High-End SaaS UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;500;600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Surface Tokens (Dark-First Depth) */
  --bg-void: #06080F;
  --bg-surface-1: #0A0E1A;
  --bg-surface-2: #111728;
  --bg-surface-3: #182038;
  --bg-surface-4: #222C4C;
  --bg-card: rgba(17, 23, 40, 0.75);
  --bg-card-hover: rgba(24, 32, 56, 0.85);
  
  /* Primary Brand Accent (Botzella Turquoise) */
  --teal-50: #E6FFFA;
  --teal-100: #B2F5EA;
  --teal-300: #4FD1C5;
  --teal-primary: #00E5BE;
  --teal-hover: #00F5CC;
  --teal-dark: #00B395;
  --teal-glow: rgba(0, 229, 190, 0.25);
  --teal-glow-intense: rgba(0, 229, 190, 0.5);
  --teal-dim: rgba(0, 229, 190, 0.08);

  /* Secondary AI Intelligence Accents */
  --electric-indigo: #6366F1;
  --indigo-glow: rgba(99, 102, 241, 0.2);
  --cyber-violet: #8B5CF6;
  --cyan-accent: #06B6D4;
  
  /* Semantic Tokens */
  --success: #10B981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --gold-accent: #FBBF24;

  /* Typography & Neutral Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-disabled: #475569;
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(0, 229, 190, 0.35);
  --border-active: #00E5BE;
  --line-divider: #1E293B;

  /* Typography Fonts */
  --font-arabic-display: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-arabic-body: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-latin: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 35px var(--teal-glow);
  --shadow-glow-lg: 0 0 70px rgba(0, 229, 190, 0.2);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Smoothness */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-arabic-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 229, 190, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 30%, rgba(99, 102, 241, 0.05), transparent 60%),
    radial-gradient(ellipse 60% 40% at 15% 70%, rgba(0, 229, 190, 0.04), transparent 60%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--teal-dark);
}

/* Typography Utility Classes */
h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-arabic-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.num-latin {
  font-family: var(--font-latin);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  direction: ltr;
  display: inline-block;
}

/* Glassmorphism Surface Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

.glass-panel:hover {
  border-color: var(--border-medium);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 229, 190, 0.07);
}

.glass-panel-interactive {
  position: relative;
  overflow: hidden;
}

.glass-panel-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0.6;
}

.glass-panel-highlight {
  border-color: rgba(0, 229, 190, 0.35);
  box-shadow: 0 0 35px rgba(0, 229, 190, 0.12);
}

/* Glow & Accent Gradients */
.text-gradient-teal {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--teal-hover) 65%, var(--teal-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-indigo {
  background: linear-gradient(135deg, #FFFFFF 30%, #818CF8 70%, var(--electric-indigo) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 190, 0.08);
  border: 1px solid rgba(0, 229, 190, 0.25);
  color: var(--teal-primary);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0, 229, 190, 0.12);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--teal-primary);
  box-shadow: 0 0 0 0 rgba(0, 229, 190, 0.7);
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 190, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 229, 190, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 190, 0); }
}

/* Button System */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--teal-hover) 0%, var(--teal-primary) 60%, var(--teal-dark) 100%);
  color: #041412;
  font-family: var(--font-arabic-body);
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 229, 190, 0.35);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 229, 190, 0.5);
  color: #020B0A;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-family: var(--font-arabic-body);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--bg-surface-3);
  border-color: rgba(0, 229, 190, 0.35);
  color: var(--teal-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Hero Simulator & Chat Components */
.hero-chat-device {
  position: relative;
  background: linear-gradient(180deg, rgba(17, 23, 40, 0.95) 0%, rgba(10, 14, 26, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 50px rgba(0, 229, 190, 0.1);
  overflow: hidden;
}

.chat-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(24, 32, 56, 0.5);
  border-bottom: 1px solid var(--border-subtle);
}

.chat-stream-body {
  padding: 20px;
  min-height: 380px;
  max-height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: 18px 18px 4px 18px;
  max-width: 84%;
  font-size: 0.94rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: slideInUp 0.3s ease-out forwards;
}

.bubble-bot {
  align-self: flex-start;
  background: var(--bg-surface-2);
  border: 1px solid rgba(0, 229, 190, 0.22);
  color: var(--text-primary);
  padding: 14px 18px;
  border-radius: 18px 18px 18px 4px;
  max-width: 88%;
  font-size: 0.94rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.35s ease-out forwards;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Product Card Inside Chat */
.chat-product-card {
  margin-top: 10px;
  background: rgba(10, 14, 26, 0.95);
  border: 1px solid rgba(0, 229, 190, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.product-img-box {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.typing-wave {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 16px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}

.typing-wave span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-primary);
  opacity: 0.4;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-wave span:nth-child(1) { animation-delay: 0s; }
.typing-wave span:nth-child(2) { animation-delay: 0.2s; }
.typing-wave span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.3; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Floating Live HUD Stats */
.hud-metric-pill {
  position: absolute;
  padding: 10px 16px;
  background: rgba(17, 23, 40, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  animation: floatSlow 6s ease-in-out infinite alternate;
}

@keyframes floatSlow {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-10px); }
}

/* Interactive Tabs */
.tab-pill {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-pill.active, .tab-pill:hover {
  background: rgba(0, 229, 190, 0.12);
  color: var(--teal-primary);
  border-color: rgba(0, 229, 190, 0.4);
}

/* Pricing Switcher Toggle */
.pricing-switch-container {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-2);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.pricing-switch-btn {
  padding: 8px 22px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pricing-switch-btn.active {
  background: var(--teal-primary);
  color: #061A16;
  box-shadow: 0 2px 10px rgba(0, 229, 190, 0.3);
}

/* Accordion FAQ */
.faq-item {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.faq-item.active {
  border-color: rgba(0, 229, 190, 0.35);
  background: var(--bg-surface-2);
}

.faq-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-arabic-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
  padding: 0 24px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.faq-item.active .faq-content {
  padding-bottom: 20px;
}

/* Range Slider Styling for ROI Calculator */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}
input[type=range]:focus {
  outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: var(--bg-surface-4);
  border-radius: 4px;
}
input[type=range]::-webkit-slider-thumb {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: var(--teal-primary);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 0 12px var(--teal-primary);
  border: 2px solid #FFFFFF;
}

/* Modal Drawer for Design System */
.design-system-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.88);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.design-system-modal.open {
  display: flex;
  opacity: 1;
}

.design-modal-body {
  width: 95%;
  max-width: 1280px;
  max-height: 92vh;
  margin: auto;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

/* Scroll Reveal Animations (applied via JS IntersectionObserver, see app.js) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Section Divider — subtle gradient hairline for extra depth between sections */
.section-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 190, 0.25), transparent);
}

/* Feature Comparison Table (pricing.html) */
.compare-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.compare-table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--bg-card);
}

.compare-table th, .compare-table td {
  padding: 14px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.compare-table thead th {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-family: var(--font-arabic-display);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 2;
}

.compare-table td:first-child, .compare-table th:first-child {
  text-align: right;
  color: var(--text-secondary);
  font-weight: 600;
  position: sticky;
  right: 0;
  background: var(--bg-surface-1);
  z-index: 1;
  min-width: 220px;
}

.compare-table thead th:first-child {
  background: var(--bg-surface-2);
  z-index: 3;
}

.compare-table .col-highlight {
  background: rgba(0, 229, 190, 0.05);
}

.compare-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.compare-table .cat-row td {
  text-align: right;
  background: var(--bg-surface-2);
  color: var(--teal-primary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px;
}

.feat-yes, .feat-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
}

.feat-yes {
  background: rgba(0, 229, 190, 0.14);
  color: var(--teal-primary);
  border: 1px solid rgba(0, 229, 190, 0.35);
}

.feat-no {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

/* Toast System */
#toastContainer {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface-2);
  border: 1px solid var(--teal-primary);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.3s ease-out;
}
